From 5fd066432f85fa73de1b1a35ede01bd54518fcf7 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 3 Feb 2026 15:43:17 -0500 Subject: [PATCH] cli: add --thinking flag to show reasoning blocks in run command --- packages/opencode/src/cli/cmd/run.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.ts index 59d0e01a7cc8..6960ffd553f3 100644 --- a/packages/opencode/src/cli/cmd/run.ts +++ b/packages/opencode/src/cli/cmd/run.ts @@ -277,6 +277,11 @@ export const RunCommand = cmd({ type: "string", describe: "model variant (provider-specific reasoning effort, e.g., high, max, minimal)", }) + .option("thinking", { + type: "boolean", + describe: "show thinking blocks", + default: false, + }) }, handler: async (args) => { let message = [...args.message, ...(args["--"] || [])] @@ -455,7 +460,7 @@ export const RunCommand = cmd({ UI.empty() } - if (part.type === "reasoning" && part.time?.end) { + if (part.type === "reasoning" && part.time?.end && args.thinking) { if (emit("reasoning", { part })) continue const text = part.text.trim() if (!text) continue