[BUG] Thinking stalls exceeding conversation cache TTL
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?
When Claude Code uses thinking (medium), the thinking process stalls repeatedly at round token counts (observed: 33.0k, 65.0k, 97.0k tokens). Each stall lasts long enough (more than 5 minutes) that the conversation cache expires. After a long wait I see tokens being spent again, but notice >20% jump in token usage for my 5-hour session! This makes using Claude Code unusable on Pro for any non-trivial task where you wait for Claude Code to finish its thinking process without interrupting.
I tried waiting it out but got hit with API Error: Claude's response exceeded the 32000 output token maximum. To configure this behaviour, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable
I've been experiencing the same issue in Claude.ai Code on desktop where my usage for the 5 hour interval is used up without a single line of code output. (Not exaggerating here)
What Should Happen?
Thinking should progress continuously or resumes within cache TTL window.
Error Messages/Logs
Steps to Reproduce
- Start Claude Code CLI in terminal
- Give a complex implementation task
- Observe thinking token counter pausing at round numbers
- Stall duration exceeds cache TTL, see hits on session token usage
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.123
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗