The command for each task, in each harness. Pick what you are working with, then read across: commands you type in your shell or a script and commands you type inside an open session are listed separately. Commands for renaming sessions are on Thread naming and importing from another harness on Migration.
From your shell
Commands you run in a terminal or script, outside a session.
| Task | Claude Codechecked at 2.1.296 |
|---|---|
| Use | |
| Open the manager | Open agent view to monitor and start supervised sessions. 1 noteRequires an interactive terminal. |
| List |
Print active interactive and background sessions as JSON. 1 noteState is working, blocked, done, failed or stopped, on background entries only. |
| Show logs | Print a supervised session's recent output. |
| Start in the background |
also claude --background [prompt] Start a supervised session that keeps running without a terminal, and print its short id. 2 notesRejected with -p. With --resume <session-id> it continues that session in the background. Checks workspace trust; an untrusted directory errors in a script. Run a shell job under the supervisor instead of a model session. 1 noteOutput stays in memory; the row is cleaned up about 5 minutes after exit. Not shown in claude --help.
Start a supervised session whose main agent is a named subagent definition. 1 noteAn unknown name still reports as backgrounded, then exits immediately. |
| Attach | Open a supervised session in this terminal, restarting it if it exited. 1 notePart of the session name works while it runs (2.1.290+); use the id to restart a stopped one. Ctrl+Z returns to the shell. |
| Change | |
| Restart | Restart one supervised session, or every running one, on the installed binary. |
| Remove | |
| Stop | also claude kill <id> Stop a supervised session's process while keeping its conversation. |
| Delete |
Remove a supervised session from the list, and its worktree when safe. 1 noteThe conversation transcript stays on disk. |
Inside a session
Slash commands you type into an open session.
| Task | Claude Codechecked at 2.1.296 |
|---|---|
| Use | |
| Start in the background | also /bg [prompt] Move the current conversation into a supervised session and free the terminal. 1 noteAn in-flight response continues. |
| Fork | Copy the current conversation into a new supervised session. 1 noteRequires 2.1.212+; with agent view off it starts a forked subagent instead. |
| Remove | |
| Stop | Stop the background session you are attached to, keeping its transcript and worktree. 1 noteUse /exit to detach without stopping. |
Notes and sources
Claude Code
- Some plugin authoring and evaluation commands are newer than the public reference, so each command keeps its live help evidence.
- Plugin installs that run a marketplace-declared command need --accept-command <sha256> without a TTY.
- Interactive commands are recorded separately from their shell equivalents.
- 2.1.304 adds /auto-mode-setup across Bedrock, Vertex, Foundry, Claude apps gateway and telemetry-disabled sessions; help output was corrected for several flags, and plugin validate no longer predicts where mod hooks run. Existing command help observations retain their versions.
- claude plugin can also be written claude plugins.
- claude-cli-2.1.296 help observation, live observation, checked 2026-10-14
- Claude Code MCP, Documentation, checked 2026-10-15
- Claude Code plugin CLI reference, Documentation, checked 2026-10-14
- Claude Code: Manage multiple agents with agent view, Documentation, checked 2026-10-15
- Claude Code commands, Documentation, checked 2026-10-15
- Claude Code CLI reference, Documentation, checked 2026-10-15
- Claude Code sessions, Documentation, checked 2026-10-15
- Claude Code costs and usage, Documentation, checked 2026-10-15
- Claude Code 2.1.304 published changes; no runtime probe, Documentation, checked 2026-10-21
- claude worktree documentation, reviewed 2026-10-27, Documentation, checked 2026-10-27