CONCEPT Cited by 2 sources
Context compaction¶
Definition¶
Context compaction is the practice of trimming or summarising older content in an LLM agent's context window to keep a long-running reasoning loop within token limits without discarding earlier reasoning entirely.
Atlassian's Long Horizon architecture runs a dedicated Context Compaction Service before each model call. When the conversation approaches the token limit, older tool outputs are trimmed or summarised while recent results are kept at full resolution. Pruned outputs are offloaded (not discarded) so the model can read them back on demand if it later needs the detail. (Source: sources/2026-06-18-atlassian-long-horizon-reasoning-engine)
Trade-offs¶
- Keeps long runs viable. Without compaction, a 150-iteration reasoning loop would exceed context limits within ~20 iterations for tool-heavy tasks.
- Lossy by nature. Summarisation introduces information loss; the model may miss details it needs later. Atlassian mitigates this with on-demand retrieval of pruned content.
- Latency cost. Running compaction before every LLM call adds overhead (summarisation step).
- Complementary to decomposition. Compaction handles depth (one long chain); child-instance decomposition handles width (many parallel strands). Both manage context pressure.
Seen in¶
- sources/2026-06-18-atlassian-long-horizon-reasoning-engine — Atlassian Long Horizon's Context Compaction Service runs before each model call, with offloaded content available for on-demand retrieval.
- sources/2026-08-27-atlassian-opening-the-door-to-agent-autonomy-the-architecture-behind-rovos-agent-harness — the 2026-08-27 harness post reframes the same Long Horizon reasoning loop from the runtime side (the Rovo Agent Harness); compaction remains the depth-management lever, complemented by the harness's async interactive sub-agents for width.
- sources/2026-09-02-github-how-we-make-ai-coding-more-cost-efficient — GitHub Copilot applies the same "compress noise, preserve useful information" idea to tool output rather than conversation history (selective-output-compaction), guarded by a lossless recovery path whose usage is tracked as a quality signal.
Related¶
- concepts/context-window-as-token-budget — the constraint compaction addresses
- context-rot — quality degradation that motivates compaction before the hard limit
- systems/rovo-agent-harness — the runtime this reasoning loop executes on
- context-compaction-service — the pattern instantiation
- patterns/context-segregated-sub-agents — complementary technique for width rather than depth
Merged aliases¶
online-context-summarisation