diff --git a/packages/coding-agent/src/main.ts b/packages/coding-agent/src/main.ts index 521ed719c..30a459db2 100644 --- a/packages/coding-agent/src/main.ts +++ b/packages/coding-agent/src/main.ts @@ -1039,6 +1039,13 @@ export async function runRootCommand( }); } + // --print-thoughts (single-shot print mode) must surface reasoning, so un-hide + // thinking before the session is built — otherwise a passive hideThinkingBlock + // setting makes the provider omit summaries and the flag prints nothing. An + // explicit --hide-thinking below still wins. + if (parsedArgs.printThoughts && !isProtocolMode && !isInteractive) { + settingsInstance.override("hideThinkingBlock", false); + } // Apply --hide-thinking CLI flag (ephemeral, not persisted) if (parsedArgs.hideThinking) { settingsInstance.override("hideThinkingBlock", true);