Subagent context % display uses 200k denominator for 1M-context ([1m]) models — pins at 100% while real usage is ~20-60%

Open 💬 2 comments Opened Jul 3, 2026 by DataForgeAi1

Environment

  • Claude Code version: 2.1.199
  • Platform: Linux (Arch, kernel 7.0.10-arch1-1)
  • Session model: claude-fable-5[1m] (also reproduces with model: sonnet[1m] pinned in agent definition frontmatter)

Bug

The per-subagent context-usage percentage shown in the UI appears to be computed against a fixed 200,000-token window, even when the subagent inherits or pins a 1M-context ([1m]) model. The indicator climbs to 100% quickly and pins there, while the agents keep working normally far past 200k.

Evidence

From subagent transcript usage blocks (input_tokens + cache_creation_input_tokens + cache_read_input_tokens), sampled across 233 subagent runs over 7 days:

  • Multiple subagents ran to 455k, 586k, and 604k live context with no compaction and normal operation — consistent with a real 1M window.
  • Any percentage display dividing those totals by 200k reads 227–302%, clamped to 100%.
  • With a typical specialist spawn footprint of ~50k tokens, the indicator starts at ~25% immediately and reads "100%" after ~110 turns, while true usage is ~20% of the 1M window.

By contrast, subagents pinned to plain sonnet (200k window) genuinely compacted at the same displayed point — so the display is only wrong for [1m] models.

Expected

Subagent context % computed against the model's actual context window (1,000,000 for [1m] variants), matching the main-session behavior.

Repro

  1. Set "model": "claude-fable-5[1m]" (or any [1m] model) in settings.
  2. Spawn a subagent via the Agent tool and give it a long task (enough tool calls to exceed 200k cumulative prompt footprint).
  3. Compare the UI's context % for the subagent against the transcript's usage totals — the UI pins at 100% while the transcript shows ~25-60% of 1M.

View original on GitHub ↗

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