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 | Codex CLIchecked at 0.162.1 | Claude Codechecked at 2.1.296 | Cursor Agentchecked at 2026.10.12-d47ca18 | OpenCode 2.xchecked at 2.0.28 | pichecked at 1.2.0 |
|---|---|---|---|---|---|
| Set up | |||||
| Create | — | — | Create a new empty chat and print its id. | — | — |
| Import | — | — | — |
Import session data from a JSON file or URL. 1 noteMoved from the top-level import command. | — |
| Use | |||||
| Open the manager | Open the agent command center for sessions on the shared local or a remote app-server. 2 notesNo --json. Takes --remote, --remote-auth-token-env, -C/--cd and --no-alt-screen; rejects --no-daemon. Keys: Open, New, New worktree, Resume, Fork, Rename, Stop (interrupts an active thread), Archive, Hide, Delete, Pin. | 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. | List persistent sessions. |
List top-level sessions in the current project, newest first. 1 noteDefault limit 100. | — |
| 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. |
Start a session that keeps running after a terminal or SSH disconnect. | — | — |
| Send a message |
Queue a text message for an existing session by UUID or exact name. 1 noteImage attachments are not supported. --worktree is rejected. | — | — | — | — |
| 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. |
Reattach this terminal to a running persistent session. | Connect the client to a specific server instead of the background service. 1 noteReplaces 1.x opencode attach. | — |
| Resume |
Resume a saved interactive session by UUID or name, with a picker by default. 2 notes--last, --all, --include-non-interactive, --remote, --remote-auth-token-env. --worktree parses but is rejected at run time. | — | Resume a chat by id, or open the picker. |
also opencode -c, opencode -s <id> Continue the last session or a given one. 1 noteThe root command has no --fork in 2.x. | also pi -r Open the session picker to choose a saved session. 1 noteThe picker can search, rename, delete and sort sessions. Open a session by file path, exact id or partial id. 1 noteOffers to fork a match from another project. |
| Fork |
Fork a saved session into a new chat, with a picker by default. 2 notesSESSION_ID is documented as a UUID only. --worktree works only with an explicit SESSION_ID. | — | — |
Fork the session before continuing. 1 noteOnly on run and mini. | Fork a saved session into a new session for this project. |
| Export | — | — | — |
Export session data as JSON. 1 noteMoved from the top-level export command. | Export a session file to HTML. |
| Change | |||||
| Restart | — | Restart one supervised session, or every running one, on the installed binary. | — | — | — |
| Archive | Archive a saved session by id or name. 1 noteA UUID takes precedence over a name. --worktree is rejected. | — | — | — | — |
| Unarchive | — | — | — | — | |
| Remove | |||||
| Stop | — | also claude kill <id> Stop a supervised session's process while keeping its conversation. | Stop a persistent session. | — | — |
| Delete | Permanently delete a saved session by id or name. 1 noteDestructive. --force skips the prompt but requires a UUID; names always need confirmation. |
Remove a supervised session from the list, and its worktree when safe. 1 noteThe conversation transcript stays on disk. | — |
Delete a session and its child sessions. | — |
Inside a session
Slash commands you type into an open session.
| Task | Codex CLIchecked at 0.162.1 | Claude Codechecked at 2.1.296 | Cursor Agentchecked at 2026.10.12-d47ca18 | OpenCode 2.xchecked at 2.0.28 | pichecked at 1.2.0 |
|---|---|---|---|---|---|
| Set up | |||||
| Import | — | — | — | — | Import a JSONL session file and resume it. |
| Use | |||||
| Open the manager | Open the agent command center from inside a session. 1 noteRequires a shared local or remote server. | — | — | — | — |
| 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. | Hand the conversation to a Cloud Agent that keeps running remotely. 1 noteA message prefix, not a slash command. | — | — |
| Detach | — | — | Leave the persistent session running and return to the shell. | — | — |
| Resume | Open the saved-session picker, or resume a session by id or name. | — | Open recent chats and resume one. | also /resume, /continue List sessions and switch to one. 1 noteThe dialog can also delete, rename and pin sessions. | Switch to another saved session through the picker. |
| Fork | Fork the current chat, optionally into a new managed worktree. | Copy the current conversation into a new supervised session. 1 noteRequires 2.1.212+; with agent view off it starts a forked subagent instead. | Fork the current session from a chosen message. | Create a new session from an earlier user message. Duplicate the current session at its current position. | |
| Export | — | — | — | Export the current session transcript. | Export the current session as HTML or JSONL. |
| Share | — | — | — | — | Upload the session as a shareable link. 1 noteUses a Radius artifact when configured, otherwise a private GitHub gist. |
| Change | |||||
| Archive | — | — | — | — | |
| Remove | |||||
| Stop | — | Stop the background session you are attached to, keeping its transcript and worktree. 1 noteUse /exit to detach without stopping. | — | — | — |
| Delete | Permanently delete the current session and its subagent threads after confirmation. 1 noteDestructive. Unavailable while a task runs or in a side chat. | — | — | — | Delete a saved session from the picker. 1 noteMoves it to the trash when a trash command exists. No shell command. |
Notes and sources
Codex CLI
- The shell CLI installs and removes plugins but has no enable, disable, update or validate command; the /plugins browser can switch plugins on or off.
- --worktree starts new sessions in a managed Git worktree and works with codex fork given an explicit session; resume, queue, archive, unarchive and delete reject it at run time.
- MCP protocol capabilities are recorded in mcp.json; these records cover the operator commands.
- codex-cli-0.162.1 help observation, live observation, checked 2026-10-14
- Codex developer commands, Documentation, checked 2026-10-15
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
Cursor Agent
- Nested --help at this version prints the top-level help, so subcommand syntax for plugin marketplaces and in-session commands comes from the docs and changelog.
- agent env, agent cloud and agent automations exist behind feature flags and are not recorded.
- cursor-agent-2026.10.12 help observation, live observation, checked 2026-10-14
- Cursor CLI MCP, Documentation, checked 2026-10-15
- Cursor CLI changelog, Documentation, checked 2026-10-15
- Cursor CLI overview, Documentation, checked 2026-10-15
- Cursor CLI parameters, Documentation, checked 2026-10-15
- Cursor self-hosted pools, Documentation, checked 2026-10-14
OpenCode 2.x
- @opencode/cli 2.x runs one shared background service per user, managed with opencode service. Session sharing is not supported yet.
- 2.1 restores archiving through client.session.update({ sessionID, archived: true|false }) and archive filtering in client.session.list. These are SDK/HTTP operations, not newly claimed shell subcommands.
- 2.1 adds editable saved-grant action/resource patterns through client.permission.saved.update / PATCH /api/permission/saved/:id. Action is a tool/action name, not an allow/deny effect.
- 2.1.1 fixes provider reasoning variant generation after package normalization; other command observations retain their earlier help/source versions.
- opencode-2.0.28 help observation, live observation, checked 2026-10-14
- OpenCode v2 CLI commands, Documentation, checked 2026-10-14
- OpenCode 2.0.29 source, Source code, checked 2026-10-15
pi
- Shell MCP commands always use the built-in MCP and do not load extensions. In-session behaviour is documented, not live-probed.
- pi-1.2.0 help observation, live observation, checked 2026-10-14
- pi 1.2.0 documentation, Documentation, checked 2026-10-15