diff --git a/packages/opencode/src/command/index.ts b/packages/opencode/src/command/index.ts index 3da260ea645b..4d8adfee2932 100644 --- a/packages/opencode/src/command/index.ts +++ b/packages/opencode/src/command/index.ts @@ -35,6 +35,8 @@ export const Info = Schema.Struct({ // Some command templates are lazy promises from MCP prompt resolution. template: Schema.Unknown, subtask: Schema.optional(Schema.Boolean), + // noReply: skip LLM dispatch after command output (display-only commands) + noReply: Schema.optional(Schema.Boolean), hints: Schema.Array(Schema.String), }).annotate({ identifier: "Command" }) @@ -105,6 +107,7 @@ export const layer = Layer.effect( return command.template }, subtask: command.subtask, + noReply: command.noReply, hints: hints(command.template), } } diff --git a/packages/opencode/src/config/command.ts b/packages/opencode/src/config/command.ts index fa64aef8c3bb..d6783b87ae3b 100644 --- a/packages/opencode/src/config/command.ts +++ b/packages/opencode/src/config/command.ts @@ -18,6 +18,8 @@ export const Info = Schema.Struct({ agent: Schema.optional(Schema.String), model: Schema.optional(ConfigModelID), subtask: Schema.optional(Schema.Boolean), + // noReply: skip LLM dispatch after command output (display-only commands) + noReply: Schema.optional(Schema.Boolean), }) export type Info = Schema.Schema.Type diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index 5d79bff049be..9bd5432b8c9c 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -2005,6 +2005,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the agent: userAgent, parts, variant: input.variant, + noReply: cmd.noReply ?? false, }) yield* bus.publish(Command.Event.Executed, { name: input.command,