Skip to main content
Browse the documentation

Working with the agent

Slash commands

Everything you can type at the prompt that is not a request, grouped by what you are trying to do.

Type / on an empty prompt to open the picker — arrow keys to navigate, type to filter, and commands with sub-commands drill down. Every command also works as plain typed text, so /mode plan is the same as picking it from the menu.

Staying in control

CommandWhat it does
/modeToggle plan (read-only) ↔ act (full access) — see Modes
/rewindUndo: pop the last auto-checkpoint — see Checkpoints
/rollbackReverse the recorded side-effects of this session
/permissionsActive grants — list and revoke
/planPlan branches (git worktrees): list, new, branch, switch, current, diff, apply, discard, deactivate

Managing the conversation

CommandWhat it does
/contextContext budget, and when compaction will trigger
/tokensToken usage for this conversation
/compactCompress the conversation now to reclaim room
/clearReset conversation history
/save, /loadWrite a session to a file, read one back
/exportWrite this conversation to a Markdown file
/shareUpload this session to the web so you can read it anywhere

See Context for what these numbers mean and when to act on them.

Looking at the project

CommandWhat it does
/mapDisplay the repository structure
/diffShow uncommitted git changes (--stat)
/testRun tests with auto-fix
/code-reviewActivate the code-reviewer skill
/memory, /initProject memory — see Memory

Long-running and background work

CommandWhat it does
/backgroundBackground agent tasks: list, status, cancel
/monitorRecurring monitors — prod health, poll an endpoint, watch a file: list, status, pause, resume, cancel

A monitor runs on a fixed interval and reports each cycle inline in the chat. Two flavours: a raw shell command with a pass condition, which costs nothing per cycle, or a full agent turn, which is smarter and costs accordingly.

Extending the agent

CommandWhat it does
/toolsList the tools available to the agent right now
/skillsSkills: list, show, activate, deactivate, create, edit, delete, reload, install
/mcpMCP servers — connect and list

Skills are guided workflows that restrict the agent to a role — code reviewer, test generator, security auditor. /skills install <git-url> pulls one from a repository. The full treatment, alongside the SPEC registry and create_tool, lives in Extending the agent.

Housekeeping

CommandWhat it does
/helpAll commands and shortcuts
/doctorCheck toolchain, wasm target, provider, .snaga/ permissions, spec registry
/rebuildRebuild and restart from source
/refreshRedraw after a terminal resize glitch
/metricsTUI telemetry counters
/voiceVoice input settings
/quit, /exitLeave (Ctrl+C twice or Ctrl+D also work)

Two commands that are easy to confuse

/mode plan makes the agent read-only. /plan creates a git worktree so the agent can write into an isolated branch. Opposite intentions, adjacent names — the built-in help for each points at the other for exactly this reason.