diff --git a/codex-rs/exec/src/event_processor_with_human_output.rs b/codex-rs/exec/src/event_processor_with_human_output.rs index 8173be08f2..8cc8fecd12 100644 --- a/codex-rs/exec/src/event_processor_with_human_output.rs +++ b/codex-rs/exec/src/event_processor_with_human_output.rs @@ -107,13 +107,12 @@ impl EventProcessorWithHumanOutput { ThreadItem::Reasoning { summary, content, .. } => { - if self.show_agent_reasoning { - if let Some(text) = + if self.show_agent_reasoning + && let Some(text) = reasoning_text(&summary, &content, self.show_raw_agent_reasoning) - && !text.trim().is_empty() - { - eprintln!("{}", text.style(self.dimmed)); - } + && !text.trim().is_empty() + { + eprintln!("{}", text.style(self.dimmed)); } } ThreadItem::CommandExecution {