Resume of long sessions loads disproportionate tokens from opaque thinking signatures

Resolved 💬 10 comments Opened Apr 1, 2026 by KenMalloy Closed May 18, 2026

Summary

When resuming a long conversation, thinking block signatures from prior turns are replayed as input tokens. These signatures are base64-encoded, opaque to the user, and can dominate the context budget — making resume impractical for exactly the kind of long sessions where it's most valuable.

Observed behavior

I analyzed the JSONL for a ~24-hour brainstorming session (480 messages, 33 turns). Each assistant turn that used extended thinking stored a block like:

{"type": "thinking", "thinking": "", "signature": "EppNClkIDBgCKkBPOAzXuQ...  (up to 13,184 chars)"}

The thinking field is empty (stripped for local storage), but the signature field contains the encrypted thinking content. On resume, these signatures must be sent back to the API.

Token budget breakdown for this session

| Component | Est. chars | Est. tokens |
|-----------|--------:|--------:|
| User text messages | 62,248 | ~15,500 |
| Assistant text | 157,868 | ~39,500 |
| Tool results | 211,536 | ~52,900 |
| Tool use inputs | 36,200 | ~9,000 |
| Thinking signatures | 207,120 | ~38,800 |
| Total on resume | ~675,000 | ~156,000 |

Thinking signatures account for ~25% of the entire resume payload despite being invisible to the user.

Details

  • 54 thinking blocks across 33 turns
  • Average signature size: 3,835 chars
  • Max signature size: 13,184 chars
  • Total signature chars: 207,120
  • All thinking text fields are empty strings — only signatures remain

Impact

  • Resuming a long brainstorming/dialog session costs ~156K input tokens before the user types anything
  • ~39K of those tokens are purely from thinking signatures the user never sees
  • This makes resume impractical for long sessions — the exact use case where resume is most needed
  • Users on metered plans pay for tokens they can't see or control

Expected behavior

Options that might help:

  1. Summarize/compact thinking signatures on resume — rather than replaying all 54 thinking blocks verbatim, summarize older ones and only preserve recent signatures
  2. Drop thinking signatures beyond a recency window — e.g., only keep the last N turns' thinking intact
  3. Show thinking token cost in the resume prompt — so users can make an informed decision about whether to resume vs. start fresh
  4. Apply the existing auto-compaction logic to thinking signatures — the system already compresses prior messages as context limits approach, but thinking signatures may not be included in that calculation

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6 (1M context)
  • Platform: macOS Darwin 24.6.0

View original on GitHub ↗

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