Auto-compaction warns when it keeps refilling, and remote forks skip needless compaction
Claude Code can now warn that auto-compaction is thrashing, and forked agents in remote sessions skip compaction the normal threshold would not trigger
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
CompactionArea: what it touches
ImprovementsKind: in v2.1.286,
ImprovementsSection of the release
What
Compaction is when Claude Code summarises the conversation so far to free room in the context window, the amount of text the model can take in at once. Claude Code has a new message for when compaction keeps being undone: "Autocompact is thrashing: the context refilled to the limit within 3 turns of the previous compact, 3 times in a row."
In remote sessions, where CLAUDE_CODE_REMOTE is set, some forked agents do not follow CLAUDE_AUTOCOMPACT_PCT_OVERRIDE. A forked agent is a separate copy of the conversation that runs side work. Those forks can now skip compacting when their token count is still below the threshold that would apply without the override. Claude Code also logs a new usage event for early compaction in forks.
Why
Forked agents in remote sessions no longer compact when they do not need to. The new message points out a session where compaction is not buying lasting room, because the context fills back up within three turns, three times running.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is unclear where the thrashing message is shown.