What it does
/clear drops your conversation history from the current session. It wipes the transcript — all prior messages, tool results, and inline context — so the next turn starts fresh. The agent can no longer see what was discussed five messages ago or earlier in the turn.
When to use it
Clear context when the conversation grows long and you're switching gears: moving from debugging a bug to building a feature, or from research to implementation. Each context window has limits (usually unconscious to you, handled automatically), but the agent's understanding of what you're trying to accomplish can drift or bloat after 20+ turns of back-and-forth. Starting fresh keeps reasoning sharp.
Use /clear also when you realize the agent misunderstood your intent from an early message, and that misunderstanding has contaminated the whole conversation — a clean slate is faster than trying to correct stale context in-place.
Clearing is NOT necessary for per-file isolation (that's the agent's job) or when you want the agent to remember patterns (use memory for that — /clear only drops the conversation, not your saved memories).
Try it yourself
Type /clear right now and hit enter. Then ask a simple question unrelated to your prior work — "tell me the date" or "what's the current directory?" — and notice that the agent answers without referencing anything you discussed before. Now start a new task and see how the agent treats it as a fresh context, not a continuation.
Gotchas
What persists after /clear:
- Environment: working directory, shell state, env vars you've set,
node_modules, git branches - Project context: CLAUDE.md, project instructions, design tokens, local configuration
- Memory: your saved
.claude/memory/notes — the agent can still recall them - Session: you're still in the same terminal session; git history, file timestamps, uncommitted changes are all still there
What resets:
- Conversation history: every prior turn, every message, every tool result
- Inline context: anything the agent was tracking from earlier messages ("you said X was a blocker" — gone)
- Agent state: assumptions about what you're doing, half-finished solutions, debugging trails
Can't undo: /clear is destructive. There's no undo; the history is gone. If you need a record of prior discussion, take a note or save a plan before clearing.
Silent loss of nuance: The agent won't know constraints you mentioned three turns ago unless you restate them. If a design decision was motivated by an earlier discussion ("we chose React hooks because Vue would break our build"), that reasoning context is erased. Be explicit in your next request if context matters.
Try it yourself
Type the command in the fake terminal. Nothing leaves your browser.