Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
Exploring the Frontier of AI Intelligence
claude-me.com
LATEST
Cutting API Costs With Prompt Caching: An Overlooked Setting That Actually Saves Money  ·  Your First Claude Code Project: A Complete Walkthrough From Zero  ·  Anthropic's Responsible Scaling Policy: A Safety Framework That Tightens Automatically as Model Capability Grows  ·  When to Actually Use Extended Thinking: Not Every Question Needs Claude to Slow Down  ·  Claude Skills vs. Projects: What's Actually Different, and How I Decide Which to Use  ·  Anthropic's Model Welfare Research: What a Company Does If Claude Might Have Some Degree of Moral Status
Glossary · Core Concepts

Compaction

Core Concepts beginner

30-Second Version · For the impatient
The process of automatically compressing earlier parts of a long conversation into a summary once it nears the context window limit, preserving key points while freeing up space to continue.
Full Explanation +
01 · What is this?

What is compaction, and how does it differ from simply deleting old messages?

Compaction refers to automatically condensing a long conversation or task history into a compact summary that replaces the verbatim original content, freeing up space in the context window. This differs from simple deletion—deletion discards information outright, while compaction attempts to preserve the key conclusions, agreed-upon points, and unresolved questions, just in a more condensed form.

For the user, ideal compaction should be largely invisible—the conversation can continue, and the model still remembers the key directions discussed earlier, it's just no longer retaining every original sentence verbatim.

02 · Why does it exist?

Why does compaction exist, and what problem does it solve?

Even as context windows keep growing, long-running tasks—multi-turn debugging, lengthy research collaboration, or an agent executing dozens of consecutive steps—can still fill up the window, or even without filling it, excessive content volume can trigger context rot, lowering the model's accuracy at extracting key points. Compaction exists to extend how long a conversation or task can keep running without interruption.

This matters especially for long-running agent applications: if the conversation had to restart entirely every time it approached the window limit, both user experience and task continuity would suffer. Automatic compaction lets the system handle this quietly in the background without disrupting the user's workflow.

03 · How does it affect your decisions?

How does compaction actually work in practice? What are common approaches?

Common implementations include: "rolling summarization"—once a conversation accumulates near a certain token threshold, the earliest segment gets condensed into a few sentences that replace the original text in context, with this summarized range continuing to advance as the conversation proceeds; "selective retention"—prioritizing content the user has explicitly flagged as important, or that the system identifies as a key decision point, while background information gets compressed first; and "tool output trimming"—the large volume of intermediate output an agent generates while executing a task (like code execution results or search results) is typically condensed into a conclusory summary once the task is done, without needing to retain the full raw output.

A shared challenge across these approaches is that the criteria for what to compress are hard to fully automate—if a summary drops a detail that turns out to be needed later, it creates a new problem rather than solving the original one.

04 · What should you do?

What does compaction mean for me, and what should I watch for in practice?

If you're using Claude for long-running tasks—long-form collaborative writing, multi-step agent workflows—understanding that compaction exists helps you recognize when "the model seems to have forgotten an earlier detail" is a normal side effect of compaction rather than a model error. If you notice an important constraint established early on (like "this document can't use passive voice") getting ignored later in the conversation, it's likely that detail was summarized away during compaction—at that point, simply restating it directly is usually more efficient than trying to diagnose why.

For rules or constraints that are truly critical and can't afford to be dropped during compaction, a practical habit is to periodically restate them in the conversation, or keep them as a short standalone list you paste in repeatedly, rather than relying entirely on the system to judge what should be preserved.

Real-World Example +

Claude Code automatically triggers compaction during long, multi-step coding tasks once a conversation reaches a certain length, condensing the detailed process of completed steps (like line-by-line code change logs) into a conclusory statement such as "Completed: fixed null pointer error in login module, added unit tests"—letting subsequent steps continue without overflowing the context window.

Common Misconceptions +
✕ Misconception 1
× Misconception: Compaction is the same as deleting old messages, when actually: compaction attempts to preserve key conclusions and agreed points in a more condensed form, unlike deletion which discards information outright
✕ Misconception 2
× Misconception: After compaction, the model completely forgets the compressed content, when actually: the summary itself remains in context and the model can still see it—it just no longer sees the verbatim original. Only details not captured in the summary are truly lost
The Missing Link +
Direct Impact

Compaction's advantage is extending how long a task can keep running without interruption, avoiding frequent conversation restarts; the downside is that compression criteria can't be fully automated, and important details may get dropped during summarization—tasks demanding extreme precision (like verbatim legal document comparison) require extra vigilance and proactively restating key constraints.

Ask a Question
Please enter at least 10 characters
More Related Topics
Content Repurposing Workflow: Using Claude to Turn One Core Piece Into Five Platform-Ready Versions Automatically
Claude Cowork Me
The most time-consuming part of content repurposing isn't the writing — it's switching between different output modes. Claude handles format conversion; you handle insights and creativity. That's the right division.
#claude-code
Daily Work Briefing Automation: Let Claude Organize Everything That Matters Today Before You Even Start Working
Claude Cowork Me
Spending 15 minutes every morning organizing 'what to do today' is actually a hidden work cost. Claude scheduling automates this — you open your computer, and today's priorities are already organized, so you can start executing immediately.
#claude-code
Tool Use Mechanism Complete Breakdown: How AI Agents 'Act,' and Why This Design Determines Whether They Can Be Trusted
AI Agent Bible
An AI Agent's LLM doesn't actually execute any tool — it only outputs 'I want to do this' requests; your backend code does the real execution. This design is the foundation of all security: the execution layer is under your control, and security validation is added there. How well tools are designed determines whether an Agent can be trusted.
#claude-code
How to Run Your First Crypto Agent: A Complete Beginner's Guide, and the Mistakes Most People Make
AI Agent Bible
The most common mistake running your first Crypto Agent isn't wrong code — it's giving the Agent too much authorization from the start. Real main wallet, no amount limits, skipping testnet: all three together is a recipe for regret. Read first, test next, real money last.
#claude-code