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 is mainly about 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 roll back an attempt that went wrong. The easiest way to picture them 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 line is a remote-control button. The same menu also launches ready-made procedures and prompts from connected tools. Claude Code calls them skills and workflows; they can hand the agent a whole 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

Plain 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 causes most of the confusion: 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 at all
/compact keep everything about the form layouta command, and everything after its name is the argument
fix the path src/main/index.htmlslashes are there, but not at the start, so no command
A command sent mid-answer isn't lost

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

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'd rather have explanations than a menu, there's /help. It answers the question "what's even here".

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

One heads-up so you don't get thrown off later: the list is different for different people. Some commands depend on the platform, the plan, and what's connected to the project. Don't see a row from the table below on your own setup - that's normal, not something broken.

A starter set for now

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

CommandWhat it doesWhen it helps
/helphelp text and the list of available commandsyou forgot what's on hand
/statusversion, model, account, connectionsnot sure what exactly you're working with right now
/doctorchecks the installation and settings: PATH, duplicate installs, unreadable settings files; offers to fix what it finds, but only after you confirmthe 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
/contextexactly what's filling the context windowthe conversation has grown and you want to see what's taking up the room
/clearstart the conversation from a clean slateyou switched tasks
/compactsqueeze the conversation into a short summarythe conversation is long, but the task hasn't changed
/rewindgo back to an earlier point in the conversation or the codethe last attempt made a mess of things
/resumeswitch to another saved conversationyou need yesterday's work back
/costhow much you've spent, same as /usagecurious what a session costs
/exitquityou're done

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

What a command changes, and what it only shows

The set from the table splits into three groups, and the difference between them matters more than it looks at first glance.

  • Only show something. /help, /status, /context, /cost, /ide. They change nothing, not in the project, not in the conversation. Press them as often as you like.
  • Change the conversation or the agent's settings, but not project files. /clear, /compact, and /resume work only with what the agent holds 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.
  • Can change files on disk. /rewind and /doctor. The first is the only one that puts the code back to 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 makes them only after you confirm.
Be careful with /rewind

This is the only command in the starter set that changes code on disk. Its menu asks you to pick the point you're going back to and exactly what to restore: the code, the conversation, or both. Read what's selected before you press it: the edits the agent made with its own editing tools after that point will disappear. Subagent edits are usually not included. The rollback leaves alone what it did through 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 right where they were on disk, the conversation stays saved, and you can return to it. You just carry on from a clean slate.

Command, flag, and hotkey

Control is spread across three different places, and that's usually where the confusion starts.

A launch flag is typed in the terminal when there's no session yet, while a slash command and a hotkey work inside a session that's 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's already open

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

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

A flag is set at launch, when there's no session yet. You type it not in the agent's line but in the terminal, right next to the claude command - and it's not a command on its own, just an addition to the regular 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 thing from two different places:

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

Hotkeys are the third place. There aren't many, but they bail you out more often than commands do:

  • Esc interrupts the current answer. Nothing is lost - the agent just 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 - how independently the agent edits files without asking you.

Double Esc has one catch everyone runs into. The rollback menu opens only if the input line is empty. If you've 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 in everyday work

The control commands in this article aren't about explaining a task better. They help keep the session in working order. The whole / menu is broader than that: skills and workflows can launch tasks on their own. A few things worth taking away:

  • these control commands won't improve the answer to an arbitrary task. That still depends on what you wrote in plain words;
  • when something goes wrong, the usual order is: /status to see what you're working with, /context to see what's filling the conversation, and only then a choice between /clear, /compact, and /rewind;
  • you launch the built-in interface commands yourself. A skill can connect automatically if its description fits the task; that's an instruction to the agent, not a session-control button;
  • the / menu grows along with the project. Connect a plugin, add a skill - and rows show up that weren't there yesterday;
  • /doctor is worth keeping in mind on its own: it looks at the agent's installation and settings, not at your project's code, it may suggest trimming CLAUDE.md, and it changes nothing without your "yes". If claude behaves strangely right from launch, it's a reasonable place to start. And if claude doesn't start at all, there's nowhere to type the command - then run claude doctor in the terminal: it only shows diagnostics, without fixing anything.
Don't try to recall the command name

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


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