What's wrong with this entry?
What: Added automatic detection of extended thinking content in conversation history to ensure accurate token counting and proper API parameter configuration.
How it works: When Claude Code needs to count tokens for API calls, it now scans through the message history to detect if any assistant responses contain thinking or redacted_thinking blocks. If detected, it automatically includes the appropriate thinking parameters in the API call.
Details:
- Detects both
thinkingandredacted_thinkingcontent types - Automatically adjusts token counting for conversations with extended thinking
- Ensures API calls include proper thinking budget parameters (1024 tokens)
- Improves accuracy when estimating costs for conversations using extended thinking
- Evidence:
uS2() at line 376194(new detection function), enhancedTZ1() at line 376212anddS2() at line 376234