hermes - 💡(How to fix) Fix TUI: thinking content leaks through when show_reasoning=false

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When display.show_reasoning is set to false in config.yaml, the TUI (hermes --tui) still renders a collapsed thinking block after the turn completes:

▾ Thinking  ~358 tokens
The user is waiting for my response. Let me now compile...

The reasoning content is correctly hidden during streaming (via recordReasoningAvailable / recordReasoningDelta which check getUiState().showReasoning), but two other code paths bypass that gate and inject thinking into the segment store after the fact.

Root Cause

In ui-tui/src/app/turnController.ts:

Path 1 — flushStreamingSegment() (line ~283):

if (split.reasoning && !this.reasoningText.trim()) {
  this.reasoningText = split.reasoning
  // ... pushes thinking segment without checking showReasoning
}

Path 2 — recordMessageComplete() (line ~474):

const finalThinking = hasReasoningSegment ?  : savedReasoning.trim()
// savedReasoning is populated regardless of showReasoning

Both paths write thinking content into segmentMessages / turn state even when showReasoning is false.

Code Example

Thinking  ~358 tokens
The user is waiting for my response. Let me now compile...

---

if (split.reasoning && !this.reasoningText.trim()) {
  this.reasoningText = split.reasoning
  // ... pushes thinking segment without checking showReasoning
}

---

const finalThinking = hasReasoningSegment ?  : savedReasoning.trim()
// savedReasoning is populated regardless of showReasoning

---

if (split.reasoning && getUiState().showReasoning && !this.reasoningText.trim()) {

---

const show = getUiState().showReasoning
   const finalThinking = (show && !hasReasoningSegment) ? savedReasoning.trim() :
RAW_BUFFERClick to expand / collapse

Description

When display.show_reasoning is set to false in config.yaml, the TUI (hermes --tui) still renders a collapsed thinking block after the turn completes:

▾ Thinking  ~358 tokens
The user is waiting for my response. Let me now compile...

The reasoning content is correctly hidden during streaming (via recordReasoningAvailable / recordReasoningDelta which check getUiState().showReasoning), but two other code paths bypass that gate and inject thinking into the segment store after the fact.

Root Cause

In ui-tui/src/app/turnController.ts:

Path 1 — flushStreamingSegment() (line ~283):

if (split.reasoning && !this.reasoningText.trim()) {
  this.reasoningText = split.reasoning
  // ... pushes thinking segment without checking showReasoning
}

Path 2 — recordMessageComplete() (line ~474):

const finalThinking = hasReasoningSegment ?  : savedReasoning.trim()
// savedReasoning is populated regardless of showReasoning

Both paths write thinking content into segmentMessages / turn state even when showReasoning is false.

Proposed Fix

  1. flushStreamingSegment(): Gate the reasoning extraction with getUiState().showReasoning:

    if (split.reasoning && getUiState().showReasoning && !this.reasoningText.trim()) {
  2. recordMessageComplete(): Clear finalThinking when reasoning display is off:

    const show = getUiState().showReasoning
    const finalThinking = (show && !hasReasoningSegment) ? savedReasoning.trim() :

Environment

  • Hermes version: latest (main branch)
  • Platform: macOS
  • Entry point: hermes --tui
  • Config: display.show_reasoning: false

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix TUI: thinking content leaks through when show_reasoning=false