Command reference ยท Claude Code
/compact
Summarizes the conversation so far to free up context.
Summarizes the conversation so far to free up context. Optionally, a focus instruction can be given for the summary.
โ WHEN TO USE IT?
Free up context during ongoing work on the same topic
/compact
Summarize with a focus instruction
/compact focus: open TODOs and next steps
โ WHEN NOT TO?
Complete topic change
/compact summarizes the conversation so far and keeps the thread going - for a complete topic change that drags along unnecessary baggage.
Better: /clear
SOURCES
- Claude Code Doku (offiziell) โ code.claude.com