[UI] Token counter shows cumulative I/O during execution, switches to final context size on completion
Resolved 💬 3 comments Opened Dec 29, 2025 by 0ximu Closed Feb 14, 2026
The token counter displayed for subagents shows inconsistent metrics depending on task state:
- During execution: Shows cumulative tokens transferred (all API round-trips)
- After completion: Shows final context size
This creates confusion where a task might display 14.2M tokens while running, then snap to 89.8K upon completion.
Screenshots
Running agent (Phase 7):
10m 0s · 14.2M tokens · 118 tools
Completed agent (Phase 8):
✔ Completed · 10m 9s · 89.8k tokens · 59 tools
Both phases ran for ~10 minutes on similar enum migration tasks. Phase 8 lshowed similar multi-million token counts during execution before settling to 89.8K.
Expected behavior
Either:
- Show consistent metric (cumulative tokens) in both states, or
- Display both values:
Context: 89.8K · Total consumed: 14.2M
Why it matters
- Users see alarming token counts (18-20M) without understanding what they represent
- Makes cost estimation difficult during long-running tasks
- Creates confusion about actual context window usage vs billing
Environment
- OS: macOS
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗