[BUG] Internal reasoning ("thinking") text leaks into visible response despite showThinkingSummaries: false

Status Open
Reported on v2.1.233
Maintainer reply None cached
Activity 0 comments · opened Aug 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary

Internal reasoning content ("thinking") is appearing directly in the visible response text, despite showThinkingSummaries: false in settings.json and an explicit user rule (CLAUDE.md) forbidding any reasoning narration in visible output.

Expected behavior

Reasoning content stays in a separate channel, never rendered in the visible response text.

Observed behavior

Multiple times within the same session, a block of English text clearly matching internal reasoning (hypothesis analysis, "I think", "let me check", step-by-step deliberation) appeared concatenated at the start of or inside the visible reply — not as a distinct thinking summary, but mixed directly into the text meant for the user.

The problem persisted after several explicit user interruptions mid-generation (stop button) flagging the issue, and after multiple system reminders already injected on every turn via a UserPromptSubmit hook repeating the rule "no reasoning narration, ever."

Impact

Tokens billed to the user for content never requested, regenerated repeatedly despite immediate reporting.

Configuration checks performed (nothing abnormal found)

  • settings.json: showThinkingSummaries: false, unchanged since 2026-08-08.
  • CLAUDE.md (global user rule): explicit rule present, unchanged since 2026-08-08.
  • UserPromptSubmit hook (terse-reminder.py): injects the reminder every turn, unchanged since 2026-08-08, functioning correctly (reminder consistently present in context).
  • Claude Code version: 2.1.233, last updated 2026-08-15 — no update on the day of the incident.

Environment

  • Claude Code CLI 2.1.233, running via Claude Agent SDK (non-interactive/automated session).
  • Windows 11.
  • Model: Sonnet 5 (claude-sonnet-5) at the time of the incident; .claude.json history shows several models used in prior sessions (opus-4-7, opus-4-8, opus-5, sonnet-5) with no timestamp available to confirm a model change coinciding with the bug's reappearance.

Reproducibility

Reported by the user as a behavior that worked correctly (no leak) until the previous day, and reappeared on the day of the incident with no identifiable configuration change on their end.

What Should Happen?

Reasoning ("thinking") content should stay entirely in its own internal channel and never appear as text in the visible response — regardless of showThinkingSummaries setting, custom output-style rules, or mid-generation interruptions.

Error Messages/Logs

No system error or crash — this is a content-leak issue, not a failure. The "log" evidence is the leaked text itself: blocks of English reasoning narration ("I think...", "let me check...", step-by-step hypothesis analysis) appearing concatenated into the visible assistant response, sometimes at the start of the message, sometimes mid-message. No stack trace or console error accompanies it.

Steps to Reproduce

  1. Start a long-running Claude Code session (non-interactive, via Claude Agent SDK) with a UserPromptSubmit hook that injects a reminder on every turn instructing the model never to show reasoning/narration in the visible response.
  2. Work through a mixed sequence of coding tasks over many turns (file edits, builds, tests) using Sonnet 5.
  3. At unpredictable points, the visible response begins with or contains a block of English reasoning text instead of/alongside the expected terse action+result output.
  4. Interrupting generation mid-response when this is noticed does not prevent the same behavior from recurring on a later turn.

Not reliably reproducible on demand — occurred intermittently across a single long session after having not occurred in prior sessions the day before, with no configuration change identified on the user's end (settings.json, CLAUDE.md, and the hook script all unchanged).

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.233 (same version) — not a CLI version regression. The client version did not change between the day it worked correctly and the day the leak reappeared (confirmed via .last-update-result.json, last update 2026-08-15). If this is a regression, it's more likely tied to a model/server-side change rather than a Claude Code client release.

Claude Code Version

2.1.233 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗