/compact – Summarize a long conversation to free space – Claude Code
- Home
- Conversation & context
- /compact
/compact[instructions]
Summarize a long conversation to free space
★ Start here
Summarizes the conversation so far to free context space, continuing the same conversation. Optional instructions steer what the summary keeps.
Best use
After a long session: /compact keep the database schema and the list of open bugs.
Related commands · Conversation & context
- /clearStart a fresh conversation (the old one stays resumable)
- /contextSee what is filling the context window
- /planGet a plan first; edits wait for your approval
- /resumeGo back to an earlier conversation
- /rewindUndo: roll code and conversation back
- /autocompactSets how full the context window gets before automatic compaction, e.g.
- /branchCreates a branch of the conversation at this point and switches into it; the original is preserved and reachable via /resume.
- /btwAsks a side question about the current session without adding it to the conversation.
← See all commands