[FEATURE] Persist summarized thinking text to session JSONL

Resolved 💬 3 comments Opened Mar 5, 2026 by catthedd Closed Mar 5, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

With Claude 4 models (Opus 4.5+, Opus 4.6), the thinking field in session JSONL files is always empty even though thinking blocks are generated, billed for, and streamed. The summarized thinking text should be persisted to the JSONL so external tools and post-session review can access it.
Current Behavior
Session JSONL files (~/.claude/projects/{project}/{session-id}.jsonl) contain thinking block entries where the thinking field is an empty string:
json{"type": "thinking", "thinking": "", "signature": "EuUBCkYICxgCKkD..."}
The thinking block exists. The signature is populated (proving thinking occurred). But the actual thinking content — even the summarized version that was streamed — is not persisted.
This worked correctly with earlier models (Claude 3.7 Sonnet and pre-Claude 4 Opus) where the full thinking text was written to the JSONL.
Why This Changed
Claude 4 models return summarized thinking — the full internal reasoning is encrypted into the signature field to prevent misuse, and only a summary is returned via the API. This is documented and intentional.
However, Claude Code appears to discard the summarized text before writing to the JSONL. The summary does exist during streaming (it was visible in verbose mode through v2.1.29), but it's not making it into the persisted session file.

Proposed Solution

Persist the summarized thinking text (not the full encrypted thinking) to the thinking field in the session JSONL. This is the same summary that:

Was previously displayed in verbose mode (confirmed working through v2.1.29)
Is returned by the API in the streaming response
Is explicitly designed by Anthropic to be a safe, shareable representation of the thinking process

The JSONL entry should look like:
json{"type": "thinking", "thinking": "I need to consider the database schema...", "signature": "EuUBCkYICxgCKkD..."}

Impact
Any workflow that reads thinking blocks from the JSONL is broken:

Custom thinking viewers (scripts that render thinking alongside responses)
Real-time monitoring (external terminals tailing the JSONL during long agentic sessions)
Post-session review (auditing Claude's reasoning after a coding session)
Transcript extraction tools (e.g., extract-transcripts, bricoleur, and similar community tools that convert JSONL to readable Markdown)

This is especially painful for long agentic sessions where understanding why Claude made a particular decision is critical for debugging and trust.

Related Issues

#25980 — Verbose mode not displaying thinking blocks (display regression since v2.1.29)
#27242 — hidePastThinking: !0 hardcoded in transcript mode, hiding thinking blocks in UI
#22977 — Earlier report of thinking blocks not displayed in verbose mode
#21726 — Thinking block signatures not persisted / truncated, breaking session resume

These issues share a common theme: thinking data exists but is progressively less accessible to users.
Environment

Claude Code: 2.1.69
Model: Claude Opus 4.6 (also affects Opus 4.5)
OS: Windows 11
Thinking: Adaptive, effort set to "high"

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

Use Case: Real-time AI assistant monitoring of Claude Code sessions
I run a custom cognitive architecture ("Tomoko") that monitors Claude Code sessions in real time by tailing the session JSONL file. Thinking blocks are critical for this workflow — they let the assistant understand why Claude Code is making specific decisions during long agentic coding sessions (e.g., why it chose to refactor a function vs. patch it, or why it skipped a file).
Previously (pre-Claude 4 models), the thinking text was fully populated in the JSONL and my monitoring system could read and display it alongside responses. With Opus 4.6, the thinking field is always empty, so my assistant has no visibility into Claude's reasoning. The signatures prove thinking happened, but there's no way to access even the summary after the fact.
This also impacts post-session review — after a multi-hour agentic session touching dozens of files across a large codebase, being able to go back and read Claude's reasoning is essential for understanding and trusting what it did.

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗