/compact
Summarize conversation history to free context tokens without starting over.
/compact compresses the conversation into a summary so you can keep working in the same thread with more free context. Rules, skills, and memory files survive compaction.
Optional instructions
/compact [instructions] steers what the summary keeps. Example: /compact keep the Magento plugin files we touched and the failing test output.
Without instructions, Claude summarizes the whole conversation.
vs /clear and /resume
/compactshrinks history and continues this conversation.- /clear discards history and starts over.
- /resume restores a different conversation from disk.
Use /compact when you still need the thread, but the context window is filling up.