
When a conversation gets long, Claude replaces the older part with a summary so it can keep going. It does this on its own, and you can also ask for it by typing /compact. Claude decides what goes into the summary, so details you care about can get lost.
You can tell it what to keep. For one summary, type your instructions after the command, like the first example below. For every summary in this project, add a short "Compact instructions" section to your CLAUDE.md, the file of notes Claude reads at the start of every conversation. Claude reads CLAUDE.md again from the file after each summary, so that section survives too.
/compact Keep the decisions we made, the prices and dates we agreed, and anything I asked you not to change.# Compact instructions
When you summarise this conversation, always keep the decisions I made, the prices and dates we agreed, and anything I asked you not to change.Why it works
In our test, /compact Keep only the delivery fee and the launch date worked: afterwards Claude still knew the fee and the date, and said the head baker's name and the colours were "not kept". A line in CLAUDE.md steered a plain /compact the same way.
Watch out
Claude follows these instructions closely, so ask it to keep things rather than to leave things out. In our test, "leave out everything else" dropped everything else. A rule you only said in the chat can be lost in a summary, so if it matters every time, write it in CLAUDE.md.