Skip to content

What does Claude Code lose when it compacts a conversation?

Short answer. Compaction replaces the conversation with a shorter summary. Instruction files in the project root, such as CLAUDE.md, are loaded again afterwards; instructions and findings that existed only in the conversation depend on what the summary kept. Saving them as project records before compaction keeps them available either way.

Updated by Contextingo.

What is re-read and what is not

  • Re-read from disk after compaction: the project instruction files Claude Code loads at the start.
  • Kept only if the summary kept it: decisions, findings, the reason you ruled something out, the exact error message.

The details most worth keeping are usually the ones a summary drops first, because they look minor: why an approach failed, which file the problem was really in.

What to do about it

  • Save findings and failed attempts as you go, not at the end. They are then independent of the conversation.
  • Let the hook do it. The Contextingo hook saves what the summary would lose after a compaction, and leaves a checkpoint after a commit.
  • After compaction, ask for the brief again: your AI reads the requirements first and then only what changed.

Source for the Claude Code behaviour: the Claude Code memory documentation, section on instructions that seem lost after /compact, read on 26 October 2026.

Questions

Good to know.

Should I avoid compaction?

No. Compaction is useful. Just do not make the conversation the only place a finding exists.

Does the hook run by itself?

Yes, once the setup command has installed it in Claude Code and Codex. It runs locally on your machine.

Nothing learned is lost. Nothing unchecked is done.