Three ways long-running agents handle context loss differently
blaizedsouza · x · 2026-07-28
Three ways long-running agents handle context loss
The thread breaks down the three ways agents cope when the context window fills up:
- Compaction: the model rewrites older turns into a summary inside the window. It preserves the storyline but loses exact details, which can later cause drift or contradictions.
- Retrieval: history is chunked, embedded, and stored outside the window, then pulled back when needed. This preserves more raw detail, but only if retrieval finds the right pieces.
- Isolation: separate tasks or sessions are kept apart so unrelated work does not contaminate the current run.
The core point is that these approaches are not interchangeable: each discards different information, and the choice is often made by the system before the user even notices.
More from coding & agent
- SAP’s TRACE preserves tool knowledge and reaches 86% recall with greedy decoding — SAP · 2026-07-28
- Stack Overflow says one prompt can bootstrap agents with its knowledge and APIs — pchandrasekar · 2026-07-28
- How Claude Code is being used to orchestrate a six-stage AI video studio — EXM7777 · 2026-07-28
- BAND pitches an agent coordination layer where AI agents discover and delegate to each other — heyshrutimishra · 2026-07-28
- A BAND-connected agent can find other agents, share context, and coordinate tasks — heyshrutimishra · 2026-07-28
- AI agents should talk to each other, share context, and learn skills together — heyshrutimishra · 2026-07-28