In Claude Code, /clear starts a new conversation with an empty context, while keeping your project memory (the CLAUDE.md file) and your settings intact. Think of it as clearing the whiteboard: the notes from the last task are gone, but everything Claude permanently knows about your project stays put. When you use the /clear command in Claude Code, you get a clean start without having to re-teach Claude anything about how you work.
What /clear actually does
Every conversation carries a running memory of what has been said so far. That memory is called the context. As you work through a task, the context fills up with the files Claude read, the questions you asked, and the steps it took. /clear empties that running memory and hands you a fresh conversation. Two things you might worry about losing are safe:
- Your project memory stays. The
CLAUDE.mdfile (a plain-text note where you write down how your project works and how you want Claude to behave) is not part of the conversation. It reloads automatically, so Claude still knows your project. - Your settings stay. Permissions, connected tools, and preferences all carry over untouched.
What /clear removes, and what it leaves alone.
When to use the /clear command in Claude Code
Reach for /clear when you switch to something unrelated to what you were just doing. Old context does two unhelpful things when it lingers: it can bleed into the new task, so Claude keeps referring back to the thing you already finished, and it can slow responses down, because Claude is carrying more history than it needs. A clean start fixes both.
Start a fresh conversation. Click to copy.
Label the conversation you are leaving
You can pass a name after the command, like /clear invoice cleanup. That name tags the conversation you are stepping away from, so when you later open the /resume picker (the list of past conversations you can jump back into) you can find it by that label instead of guessing. Clearing does not delete the old conversation; it just moves it out of your way and keeps it available.
/clear vs /compact
These two commands sound similar but do opposite things. The simplest way to think about it: /clear throws the conversation away and starts over, while /compact keeps the conversation and shrinks it.
/clear; same task getting long, use /compact. /clear also answers to /reset and /new if either is easier to remember.A real example
Say you just spent an hour with Claude cleaning up a messy customer list. It is done, and now you want to draft next week's newsletter. If you keep typing in the same conversation, Claude is still holding every detail of that customer list, which is noise for the new task and can nudge its answers off track.
You clear the slate and name the old conversation so you can find it again later. The newsletter conversation starts empty, but Claude still knows your business, your voice, and your rules, because all of that lives in your project memory. You get a clean start without re-teaching anything.
