Skip to content

Compaction Is Lossy. Steer It.

2026-07-23claude-code, context

A long session auto-compacts, the tool that condenses your conversation history so it fits in context again, and suddenly it has forgotten which files you modified and what the test command was.

Most people only know /clear, which wipes everything. There are three finer tools.

Compact with instructions: /compact focus on the API changes steers what survives instead of leaving it to a generic summary. The rewind menu, Claude Code's checkpoint picker, will summarise only part of a conversation, from a point or up to it. And an instruction file line like "when compacting, always preserve the full list of modified files and any test commands" survives automatic compaction too.

Compaction is lossy summarisation. These decide what's essential rather than letting the summariser guess.