Talking to the agent looks simple: you say what you need in plain words, and it does the work. But that same input line has a second entry point. Start a message with a slash / and Claude Code looks for a matching item in its command menu.

This article focuses on commands that manage the session - your whole current conversation with the agent, from launch to exit. You use them to switch the model, clear the conversation, check its state, or undo an attempt that went wrong. The easiest picture is a remote control: the session has its own buttons, and you press them separately from the conversation about the task. But not every slash entry is a remote-control button. The same menu can launch ready-made procedures and prompts from connected tools. Claude Code calls them skills and workflows; they can hand the agent a complete task and change the project.

Below: how to find any command in two seconds, which twelve are worth knowing from the start, which ones you can press freely just out of curiosity, and which ones can rewrite files on disk.

Two ways to talk to the agent

Free text sets a task. "Add a feedback form to the page" - the agent reads the files, decides what to change, and changes it.

The built-in commands in this section manage the session. /model switches the model, /clear starts the conversation over, /status shows what you're working with right now. Project files usually stay untouched.

One technical rule trips people up: a command is recognized only at the very start of a message. A slash in the middle of a sentence is just a character, no command there. And everything after the command name becomes its argument:

What you typedHow the agent reads it
add a feedback form to the pagea task in plain words, no slash anywhere
/compact keep everything about the form layouta command, and everything after its name is the argument
fix the path src/main/index.htmlslashes, but not at the start, so no command
A command sent mid-answer is not lost

Send a command while the agent is still answering and it joins the queue, then runs as soon as the current step is done. Some commands behave differently and fire immediately without interrupting the answer - /status, for example.

Finding the command you need

You don't have to memorize the list, and that's probably the main thing to take away from this article 😅. Type / on an empty line and a menu of every available command opens. Add a couple of letters and the list filters down; Tab accepts the highlighted suggestion.

If you want explanations rather than a menu, there's /help. It answers the question "what is even available here".

The menu holds more than built-in commands. Skills, workflows, and prompts from plugins and connected tools show up there too. These aren't control buttons but ready-made procedures: they give the agent instructions, can run tools, and can change the project. So the set grows with the project, and you can add to it yourself - a topic for another article.

One caveat up front, so nothing surprises you later: the list is different for different people. Some commands depend on the platform, the plan, and what's connected to the project. If a row from the table below is missing on your machine, that's normal, not a sign that something is broken.

A starter set that lasts

Twelve commands that will carry you for a long while. No need to learn them by heart - read through once and remember that they exist.

CommandWhat it doesWhen it helps
/helphelp text and the list of available commandsyou forgot what you have on hand
/statusversion, model, account, connectionsyou're not sure what you're actually running
/doctorchecks the installation and settings: PATH, duplicate installs, unreadable settings files; offers to fix what it finds, but changes nothing without your confirmationthe agent starts, but behaves oddly
/modelswitch the modelthe task calls for a different model
/idethe state of the connection to your editorthe plugin is connected but behaves oddly
/contextwhat exactly is filling the context windowthe conversation grew and you want to see what is taking up the space
/clearstart the conversation from a clean slateyou moved on to another task
/compactsqueeze the conversation down to a summarythe conversation is long and the task hasn't changed
/rewindgo back to an earlier point in the conversation or the codethe last attempt made a mess
/resumeswitch to another saved conversationyou need yesterday's work back
/costhow much you've spent, same as /usageyou're curious what a session costs
/exitquityou're done

A note on /rewind: it also answers to /undo and /checkpoint. So if you type "undo" out of habit, it still works.

What a command changes, and what it only shows

The table splits into three groups, and the difference between them matters more than it seems at first.

  • They only show. /help, /status, /context, /cost, /ide. Nothing changes in the project or in the conversation. Press them as often as you like.
  • They change the conversation or the agent's settings, but not project files. /clear, /compact, and /resume work only with what the agent is holding in its head: the first two with the current conversation, the third swaps it for another one. /model switches the model and remembers the choice for new sessions. /exit closes the session, and the conversation stays saved.
  • They can change files on disk. /rewind and /doctor. The first is the only one that puts the code back into an earlier state. The second doesn't touch code, but it may offer edits to settings, as well as to CLAUDE.md and the project's skills, and it applies them only after you confirm.
Careful with /rewind

This is the one command in the starter set that changes code on disk. Its menu asks you to pick the point you're going back to and what exactly to restore: the code, the conversation, or both. Read what's selected before you press: what goes away are the edits the agent made with its file-editing tools after that point. Subagent edits are usually not included. Rollback leaves alone what it did with terminal commands - rm, mv, scripts - and your own edits in files the agent never touched; you'll have to bring those back some other way.

And while we're on the subject of losing things. /clear deletes nothing: not the project files, not the previous conversation. The files stay on disk exactly where they were, the conversation is still saved and you can come back to it. You simply carry on from a clean slate.

Command, flag, and hotkey

Control is spread across three different places, and this is usually where the confusion starts.

A launch flag is typed in the terminal when no session exists yet, while a slash command and a hotkey work inside a session that is already openNo session yetSession is openLaunch flagSlash commandHotkeyclaude --resume/resumeEsc Esc
On the left you type in the terminal, on the right in the input line of an agent that is already running

The dividing line is the launch itself. To the left of it there's no agent yet and nobody to talk to, so only a flag works. To the right the agent is open, and both doors lead into the same session.

A slash command works inside a session that's already running. The agent is open and you type into its input line.

A flag is set at launch, when there's no session yet. You type it in the terminal next to the claude command, not in the agent's input line - and it isn't a command of its own, just an addition to the usual launch:

claude              # normal launch, clean slate
claude --continue   # continue the last conversation in this folder
claude --resume     # pick a conversation from the list

The agent starts either way. The flag only says where to begin: from an empty conversation or from one of the earlier ones.

The clearest illustration is a pair that does the same job from two different places:

claude --resume     # the list of conversations, before the session starts
/resume             # the same list, from inside an open one

Hotkeys are the third place. There are only a few, but they bail you out more often than commands do:

  • Esc interrupts the current answer. Nothing is lost, the agent simply stops;
  • Esc Esc on an empty line opens the rollback menu, the same thing as /rewind;
  • Tab accepts the autocomplete suggestion;
  • Shift+Tab switches the permission mode, meaning how freely the agent edits files without asking you.

The double Esc has one catch that everyone runs into. The rollback menu opens only when the input line is empty. If you already typed something, the first double Esc just wipes what you typed. The text isn't lost, though: it goes into the input history, and the up arrow brings it back.

Why this matters day to day

The management commands in this article aren't about explaining a task better. They help keep the session in working order. The full / menu is broader: skills and workflows can launch tasks of their own. A few things worth taking with you:

  • these management commands don't make an answer to an arbitrary task better. That still depends on what you wrote in plain words;
  • when something goes wrong, the order is usually the same: /status to see what you're running, /context to see what the conversation is full of, and only then a choice between /clear, /compact, and /rewind;
  • you invoke the built-in interface commands yourself. A skill can load automatically when its description matches the task; that's an instruction for the agent, not a session-control button;
  • the / menu grows along with the project. Connect a plugin or add a skill and rows appear that weren't there yesterday;
  • /doctor is worth remembering on its own: it looks at the agent's installation and settings, not at your project's code, may suggest trimming CLAUDE.md, and changes nothing without your "yes". If claude behaves strangely from the very first launch, that's the sensible place to start. And if claude won't start at all, there's nowhere to type the command - then run claude doctor in the terminal: it only prints diagnostics and fixes nothing.
Do not try to recall the name

Type / and the first letters of what you want to do. The menu filters itself - faster than recalling the exact spelling, and more reliable than searching the web.


What sits in the menu depends on your Claude Code version, platform, and plan, so your list may differ from the one here. /help always shows the current set on your machine.