Desktop app context-window breakdown shows 90% free while header shows 60% used

Status Open
Reported on v2.1.272
Maintainer reply None cached
Activity 0 comments · opened Sep 15, 2026

Summary

In the Claude Code desktop app (Code tab, Windows), the Context window popover header shows the correct total, but the per-category breakdown below it does not add up and reports ~90% free space for a session that is actually 60% full.

What I saw

Header: 598.5k / 1M (60%)

Breakdown rows in the same popover:

| Row | Tokens | % |
|---|---|---|
| System tools | 18.6k | 1.9% |
| Memory files | 14.7k | 1.5% |
| Messages | 13.4k | 1.3% |
| System prompt | 10.8k | 1.1% |
| Skills | 4.3k | 0.4% |
| Custom agents | 529 | 0.1% |
| Autocompact buffer | 33k | 3.3% |
| Free space | 904.6k | 90.5% |

The rows sum to ~95k, so "Free space" is computed as 1M minus ~95k, ignoring ~500k of real context.

Verification

I read the session's transcript JSONL. The last assistant message's usage was:

input_tokens=32  cache_creation_input_tokens=644  cache_read_input_tokens=597573

That is 598,249 tokens, matching the header. The session had 174 assistant turns over ~1h12m with many tool results (file reads, command output, subagent reports). "Messages 13.4k" appears to count only message text and omits tool results, which are the bulk of the context.

Expected

The category rows and "Free space" should reconcile with the header total (i.e. tool results/conversation content should be attributed, and free space should be ~400k / 40%).

Environment

  • Claude Code 2.1.272, desktop app (Code tab)
  • Windows 11 Home 10.0.26200
  • Model: Fable 5.1, effort High, bypass permissions
  • Session running in a git worktree, launched by a scripted chain (claude non-interactive launch, then viewed in the desktop app)

View original on GitHub ↗