You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: noReply flag for display-only commands to skip LLM dispatch #27520
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
Slash commands that produce display-only output (panels, status confirmations) emit
their entire user-visible content via the command.execute.before hook's parts
output. After that hook returns, the host's command dispatch in packages/opencode/src/session/prompt.ts always invokes the LLM for the next
assistant turn — wasting a round-trip for every such command, even when the model
has nothing meaningful to do.
A real-world plugin that ships three display-only commands (/show-models, /pick, /auto-pick) currently emits an "Acknowledged" turn from the model after
each invocation, costing tokens and latency for zero user value.
What I tried in the plugin
Initially I added a template instruction "No further response is required" to each
command. The instruction tells the model to stay silent, but the LLM stream is
still dispatched — the suppression is text-only, not behavioral. Visual QA against
a freshly built opencode confirmed the dispatch happens.
Plugin-side workarounds don't exist:
command.execute.before hook output is just { parts } — no flag exposed
chat.message hook output is { message, parts } — same
client.session.abort() from a hook races the runner becoming busy
The plugin Effect runtime dies on throw, so we can't crash the session as a side-channel
Proposed solution
Add an optional noReply?: boolean field to the command schema
(packages/opencode/src/command/index.ts). When set, the dispatch path forwards noReply: true to prompt(), which already has a short-circuit
(if (input.noReply === true) return message). With this flag, display-only
commands can opt out of the follow-up LLM turn while keeping their existing panel
behavior.
Opt-in and additive: existing commands without noReply keep current behavior.
Verification I did locally
6-line patch on a local fork (PR coming)
Typecheck clean (14/14 tasks)
bun test test/session/prompt.test.ts — 53/53 pass
Visual QA via tmux: baseline window (20s idle) → 0 LLM dispatches; post-/show-models
window (20s) → 0 LLM dispatches. The flag works end-to-end.
PR forthcoming. Happy to iterate on naming, location, or schema shape.
The title should start with [FEATURE]: as required by the Feature Request template (e.g., [FEATURE]: noReply flag for display-only commands to skip LLM dispatch)
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
[FEATURE]: allow chat.message hook to skip the assistant turn (noReply) #26022: Nearly identical request — adds a noReply flag to skip the assistant turn after a hook, reusing the same PromptInput.noReply short-circuit in prompt.ts. The scope differs slightly (that issue targets chat.message; this one targets command.execute.before), but the underlying mechanism and goal are the same.
Activity
github-actions commentedon May 14, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:as required by the Feature Request template (e.g.,[FEATURE]: noReply flag for display-only commands to skip LLM dispatch)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
noReplyflag to skip the assistant turn after a hook, reusing the samePromptInput.noReplyshort-circuit inprompt.ts. The scope differs slightly (that issue targetschat.message; this one targetscommand.execute.before), but the underlying mechanism and goal are the same.command.execute.beforehook #18554: Requests cancellation support for thecommand.execute.beforehook — same root problem of preventing the LLM dispatch after a display-only command.If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon May 14, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.