[Bug] Token count calculation exceeds context window limit (Messages: 212.8k/200k)

Resolved 💬 4 comments Opened Jan 29, 2026 by jmclaughlin724 Closed Feb 28, 2026

Bug Description
Claude is incorrectly calculating or utilizing token count when handling context.

See example: /context
⎿ Context Usage
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ claude-opus-4-5-20251101 · 82k/200k tokens (41%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Estimated usage by category
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ System prompt: 15.9k tokens (7.9%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ System tools: 23.6k tokens (11.8%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ MCP tools: 15.5k tokens (7.7%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Custom agents: 8.1k tokens (4.0%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Memory files: 4.9k tokens (2.5%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Skills: 4.9k tokens (2.4%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Messages: 212.8k tokens (106.4%)
⛝ Autocompact buffer: 33.0k tokens (16.5%)

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.23
  • Feedback ID: eb35c4a7-6b77-4432-ab01-5de439abe7b5

Errors

[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:2063)\n    at iW (/$bunfs/root/claude:11:35715)\n    at readdirSync (/$bunfs/root/claude:12:2024)\n    at wQR (/$bunfs/root/claude:1783:380)\n    at wQR (/$bunfs/root/claude:1783:1350)\n    at <anonymous> (/$bunfs/root/claude:1783:4670)\n    at <anonymous> (/$bunfs/root/claude:1783:5401)\n    at A (/$bunfs/root/claude:11:7259)\n    at Ay8 (/$bunfs/root/claude:4793:4342)","timestamp":"2026-01-29T17:07:18.678Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:2063)\n    at iW (/$bunfs/root/claude:11:35715)\n    at readdirSync (/$bunfs/root/claude:12:2024)\n    at wQR (/$bunfs/root/claude:1783:380)\n    at wQR (/$bunfs/root/claude:1783:1350)\n    at <anonymous> (/$bunfs/root/claude:1783:4670)\n    at <anonymous> (/$bunfs/root/claude:1783:5401)\n    at A (/$bunfs/root/claude:11:7259)\n    at Ay8 (/$bunfs/root/claude:4793:4342)","timestamp":"2026-01-29T17:08:57.871Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:2063)\n    at iW (/$bunfs/root/claude:11:35715)\n    at readdirSync (/$bunfs/root/claude:12:2024)\n    at wQR (/$bunfs/root/claude:1783:380)\n    at wQR (/$bunfs/root/claude:1783:1350)\n    at <anonymous> (/$bunfs/root/claude:1783:4670)\n    at <anonymous> (/$bunfs/root/claude:1783:5401)\n    at A (/$bunfs/root/claude:11:7259)\n    at Ay8 (/$bunfs/root/claude:4793:4342)","timestamp":"2026-01-29T17:09:00.978Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n    at bhT (/$bunfs/root/claude:3118:938)\n    at async UxB (/$bunfs/root/claude:3199:2434)\n    at processTicksAndRejections (native:7…

Note: Content was truncated.

View original on GitHub ↗

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