The Alternatives Issue For tool owners Sign in

Conversation compaction

Conversation compaction summarises a long agent or chat history into a tight representation that preserves the relevant signal — used when the conversation approaches the model's context window.

In more detail

What it means

As agent loops and long chats grow, the history eventually approaches the context window. Compaction runs a summariser (typically a cheaper model) that rewrites the history as a structured summary — current goal, key facts learned, open subtasks, important decisions — and discards verbatim tool outputs once their information has been extracted. Production implementations: Claude Code's auto-compact, OpenAI Assistants thread summarisation, LangGraph state compaction nodes. The hard problem is what to keep vs drop; aggressive compaction loses signal, light compaction barely helps. Most teams in 2026 trigger compaction at 70-80% context fill.

Part 1 of 2

When to use it, and when not

Use it for

  • Long agent loops (15+ steps).
  • Multi-hour chat sessions.

Part 2 of 2

Common mistakes

  • Compacting too aggressively — losing context the next step needed.
  • Compacting too late — the model has already lost quality from context pressure.

FAQ

Questions readers ask.

What is conversation compaction?

Conversation compaction summarises a long agent or chat history into a tight representation that preserves the relevant signal — used when the conversation approaches the model's context window.

When should you use conversation compaction?

Long agent loops (15+ steps). Multi-hour chat sessions.

What are the common mistakes with conversation compaction?

Compacting too aggressively — losing context the next step needed. Compacting too late — the model has already lost quality from context pressure.

Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/compaction.md. Found a mistake? Tell us.