Command
/clear
Wipes the conversation history and starts a brand-new context, in the same working directory and session.
/clear is the blunt instrument next to /compact's scalpel: instead of summarizing what came before, it throws it away entirely and starts clean. Nothing about your project changes — files on disk are still exactly as Claude left them — only the conversation memory resets.
Reach for this when a session has genuinely finished its task and you're starting something unrelated. Carrying over a long, irrelevant conversation costs context budget for no benefit once the topic has actually changed.
If there's anything from the old conversation worth keeping — a decision, a gotcha you don't want re-discovered — write it to CLAUDE.md first (see the # shortcut) before clearing, since /clear doesn't preserve anything.
/clearFrequently asked questions
What does /clear do in Claude Code?
Wipes the conversation history and starts a brand-new context, in the same working directory and session.
How do I use it?
Try: /clear
Any caveats to know about?
If there's anything from the old conversation worth keeping — a decision, a gotcha you don't want re-discovered — write it to CLAUDE.md first (see the # shortcut) before clearing, since /clear doesn't preserve anything.
Is this covered in the Claude Code Toolkit?
Yes — /clear and patterns like it are part of the full command, hook, and template pack included with a Claude Code Toolkit subscription.
Want the full command, hook, and template pack?
This is one pattern out of the full Claude Code Toolkit — subscribe for the complete set, plus everything we add going forward.
Subscribe to the toolkit — $79/mo