A long coding session can contain a finished fix, a rejected approach, several failed tests and a decision that must not be reopened. Claude Opus 5.5 auto compact questions usually begin when that history grows too large and the client summarizes it. The useful goal is to preserve the task’s state so the next action remains correct.
There is no universal best compaction percentage for every project. The model, the client and the task all matter. Before changing a threshold, understand what your application compacts and make sure important decisions exist somewhere more durable than a long conversational explanation.
What Claude Opus 5.5 auto compact preserves
Compaction replaces older conversational material with a shorter representation. When using Claude Opus 5.5, distinguish the model’s context capacity from the client’s decision to compact and from any compaction feature exposed by an API. They are related parts of the workflow, but they are not one setting.
Anthropic documents automatic compaction in Claude Code as a way to summarize history near context limits. Its API documentation separately describes on-demand and threshold-based compaction. Follow the instructions for the product you are using instead of copying a setting from another environment.
A summary can preserve the useful state of a task, but it is not a verbatim archive of every prior turn. Exact error messages, unresolved alternatives and small constraints are worth recording explicitly when later work depends on them.
Consider an illustrative session fixing a date-formatting bug. The code change is complete, one check has passed and another remains pending. A summary that says “date formatting fixed” loses the distinction between implementation and verification. The next action should be the pending check, not a new redesign of the date component.
That is the kind of failure to plan around. You need a concise account of what is true now, how it was established and what remains to be done. Repeating the entire conversation in another document defeats the purpose.
Write down the decisions a summary cannot guess
Before a long session becomes difficult to follow, save a short task note in an appropriate project location. Name the objective, the affected files, the current result and the next unresolved step. Add constraints that still apply, such as preserving an existing interface or leaving a particular file untouched.
Use precise completion language. “Code changed; test not run” is different from “verified.” “Proposed” is different from “approved.” A future continuation should not need to infer those distinctions from the tone of an earlier message.
Include failed approaches only when they prevent a likely repeat. A sentence explaining that one library call does not exist in the installed version can save time. A full transcript of every discarded idea will mostly consume context again.
Keep exact technical details where they matter. Record the command used for a check, the relevant error and the file version or environment condition needed to reproduce it. Leave credentials and unrelated private information out of the note.
Claude Code’s documented /compact command accepts instructions about what to preserve. Its documentation also describes compact instructions in a project’s CLAUDE.md. Use these facilities to emphasize the task’s decisions and remaining checks, rather than trying to force an exhaustive transcript into a small summary.
For unrelated work, starting a fresh conversation can be cleaner than carrying a summary forward. Save the current task state first. A new topic should not inherit old assumptions simply because the previous thread still has room.
Avoid choosing a threshold solely to postpone compaction as long as possible. A very large active history can contain duplicated logs and obsolete material. Inspect what occupies the context before deciding that the only problem is insufficient space.
Check the first move after compaction
After the summary is created, ask for the current objective, completed work and next action. Compare that short account with the saved task note. Correct a missing constraint before allowing it to shape another round of edits.
If another assistant, such as GPT-6 Astra, takes over, provide the same concise handoff and the actual files it needs. A model switch does not transfer unseen conversational history. The handoff should stand on its own without implying that the new assistant remembers earlier decisions.
Check the first substantive action especially carefully. Does it resume the pending test, or reopen an already settled design? Does it inspect the current file, or describe a version that no longer exists? These observations reveal whether the saved state is sufficient.
If something important was lost, improve the task note at the point of failure. Add the missing condition or distinguish an ambiguous status. A longer note is not automatically a better one; the useful addition is the fact needed to choose the next action correctly.
Retain the original files and logs separately from the summary. A brief handoff can point to evidence without reproducing it. When a detailed question returns, reopen that evidence rather than asking the model to reconstruct it from a compressed description.
For repeated work, settle on a small handoff format that the team can maintain. Objective, current state, evidence and next step are often enough. Expand it when the task requires more, and remove stale notes when they no longer describe the project.
The practical improvement to Claude Opus 5.5 auto compact is a recoverable task. When the conversation becomes shorter, the work should still have a clear owner, a known state and an obvious next check.
