CONCEPT Cited by 1 source
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.
Related¶
- concepts/context-window-as-token-budget — the constraint compaction addresses
- concepts/context-rot — quality degradation that motivates compaction before the hard limit
- patterns/context-compaction-service — the pattern instantiation
- patterns/context-segregated-sub-agents — complementary technique for width rather than depth