You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Token counting now matches Claude Code UI context command
- Fixed token counting to include compact summary + user messages + assistant usage
- Added count_session_tokens() for consistent API interface
- Fixed isCompactSummary field name (was is_compact_summary)
- Includes cache_read_input_tokens for accurate counts
- Achieves 96% accuracy vs UI (6,341 vs 6,600 tokens)
- Closes API inconsistency issue for session token counting
🤖 Generated with Claude Code (https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments