fix(coding-agent): surface thinking for --print-thoughts when hidden
Threading printThoughts only into runPrintMode is too late when hideThinkingBlock is set (settings or --hide-thinking): the session is built with hideThinkingSummary=true, so the provider omits reasoning summaries and --print-thoughts prints nothing. Override hideThinkingBlock to false for single-shot print mode before session creation, gated on print mode; an explicit --hide-thinking still wins.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user