Skip to content

feat: Add noReply option to command.execute.before hook #9306

Closed

Description

@arismoko

Problem

The command.execute.before plugin hook allows modifying command parts before execution, but there's no way to skip the LLM invocation entirely. This is needed for plugins that want to handle slash commands directly without invoking the LLM.

Currently, the only workaround is throwing an error in the hook, which is hacky.

Proposed Solution

Add an optional noReply field to the hook output object. When set to true, the command flow passes noReply: true to prompt(), which skips the LLM loop.

Changes:

  1. packages/plugin/src/index.ts - Add noReply?: boolean to hook output type
  2. packages/opencode/src/session/prompt.ts - Pass hookOutput.noReply to prompt()

Use Case

Plugins can implement custom slash commands (e.g., /tty list) that execute shell commands or other logic and display results without LLM involvement.

Activity

  1. github-actions commented on Jan 18, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if these don't fully address your specific case.

  2. github-actions commented on Mar 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions