[Bug] Long-running agent sessions re-read unbounded context, causing excessive token usage

Status Open
Reported on v2.1.299
Maintainer reply None cached
Activity 0 comments · opened Oct 14, 2026

Bug Description
The numbers:

  • Two sessions, 23 Opus agents, 13,033 model turns. One was the evening's 0.2.3 engine build, the other the overnight loop.
  • 5.57 billion tokens re-read, about 1.6 million written. Almost none of the usage was actual work.
  • Agents' conversations grew to 400–970k tokens and were never restarted. Every turn re-sends the whole conversation. 72% of the night

loop's re-reads were context above 150k.

  • Several agents ran 5–7.5 hours across many tasks. The main loop ran 10 hours straight.
  • About 13% was status checks. Agents kept checking on builds and benchmarks, and each check re-read around 460k tokens.
  • 570 full-size images stayed in context and were re-read on every later turn.
  • Everything ran on Opus, including benchmark babysitting.

A fresh agent per task, capped near 150k, would have cut the total by about 60%.

I saved these as standing rules for every future session:

  • one task per agent, restarted around 150k;
  • no status-check turns while waiting;
  • downsized images reviewed in short-lived agents;
  • Sonnet for mechanical work;
  • a stated token budget on long or overnight runs, with the spend reported at each check-in.

Environment Info

  • Platform: linux
  • Terminal: kitty
  • Version: 2.1.299
  • Feedback ID: 6bcba445-a8d3-4a2c-8de5-1e129472c328

View original on GitHub ↗