mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
5.7 KiB
5.7 KiB
Slash Commands
Codex CLI supports a set of slash commands you can type at the start of the composer input. These commands provide quick actions, toggles, or expand into full prompts. This document lists all built‑in commands and what they do.
Notes
- Commands are shown in the TUI’s slash popup; the order below matches the UI.
- Commands marked “prompt‑expanding” transform your input into a full prompt and typically kick off multi‑agent flows.
- Some commands accept arguments; if required, usage is shown in parentheses.
Navigation & Session
/browser: open internal browser./chrome: connect to your Chrome browser./new: start a new chat during a conversation./resume: resume a past session for this folder./quit: exit Codex./logout: log out of Codex./login: manage Code sign-ins (select, add, or disconnect accounts)./settings [section]: open the settings panel. Optional section argument jumps directly tomodel,theme,agents,auto,review,validation,limits,chrome,mcp, ornotifications.
Workspace & Git
/init: create anAGENTS.mdfile with instructions for Codex./diff: showgit diff(including untracked files)./undo: open a snapshot picker so you can restore workspace files to a previous Code snapshot and optionally rewind the conversation to that point./branch [task]: create a worktree branch and switch to it. If a task/description is provided, it is used when naming the branch. Must be run from the repository root (not inside another branch worktree). SetCODE_BRANCH_COPY_CACHES=1(legacy:CODEX_BRANCH_COPY_CACHES=1) to mirrornode_modulesand Rust build caches into the worktree; otherwise no cache directories are copied automatically./merge: merge the current worktree branch back into the default branch and remove the worktree. Run this from inside the worktree created by/branch./push: tell Codex to commit, push, and monitor workflows with guarded instructions. Skips cleanup or GitHub monitoring steps automatically when the workspace is already clean or required tooling/files are missing./review [focus]: without arguments, opens a review picker so you can audit the workspace, a specific commit, compare against another branch, or enter custom instructions. With a focus argument, skips the picker and uses your text directly. Configure Auto Resolve and the max re-reviews (defaults to 5) from/settings reviewwhen you want Codex to rerun fixes and follow-up checks automatically./cloud: browse Codex Cloud tasks, view details, apply patches, and create new tasks from the TUI./cmd <name>: run a project command defined for the current workspace.
UX & Display
/theme: customize the app theme./verbosity (high|medium|low): change text verbosity./model: choose your default model./reasoning (minimal|low|medium|high): change reasoning effort./prompts: show example prompts./status: show current session configuration and token usage./limits: adjust session limits and visualize hourly and weekly rate-limit usage./update: check the installed version, detect available upgrades, and open a guided upgrade terminal that runs the installer interactively when possible./notifications [status|on|off]: manage notification settings. Without arguments, shows the notifications panel. With arguments:statusshows current config,onenables all,offdisables all./mcp [status|on|off <name>|add]: manage MCP servers. Without arguments, shows all servers with toggle controls. With arguments:statuslists servers,on <name>enables,off <name>disables, andaddstarts the new server workflow./validation [status|on|off|<tool> (on|off)]: inspect or toggle validation harness settings.
Search & Mentions
/mention: mention a file (opens the file search for quick insertion).
Performance & Agents
/perf (on|off|show|reset): performance tracing controls./agents: configure agents and subagent commands (including autonomous follow-ups and observer status; available in dev, dev-fast, and perf builds)./auto [goal]: start the maintainer-style auto coordinator. If no goal is provided it defaults to "review the git log for recent changes and come up with sensible follow up work".
Prompt‑Expanding (Multi‑Agent)
These commands expand into full prompts (generated by codex-core) and
typically start multiple agents. They require a task/problem description.
/plan <task>: create a comprehensive plan (multiple agents). Prompt‑expanding./solve <problem>: solve a challenging problem (multiple agents). Prompt‑expanding./code <task>: perform a coding task (multiple agents). Prompt‑expanding.
Development‑Only
/demo: populate the chat history with assorted sample cells (available in dev and perf builds for UI testing)./test-approval: test approval request (available in debug builds only).
Implementation Notes
- The authoritative list of commands is defined in
code-rs/tui/src/slash_command.rs(theSlashCommandenum). When adding a new command, please update this document to keep the UI and docs in sync. - Prompt formatting for
/plan,/solve, and/codelives incode-rs/core/src/slash_commands.rs. When no[[agents]]are configured, the orchestrator advertises the following model slugs to the LLM for multi-agent runs:code-gpt-5.1,claude-sonnet-4.5,claude-opus-4.1,gemini-3-pro,gemini-2.5-pro,gemini-2.5-flash,qwen-3-coder,code-gpt-5.1-codex, andcode-gpt-5.1-codex-mini(withcloud-gpt-5.1-codexgated byCODE_ENABLE_CLOUD_AGENT_MODEL). You can replace or pin this set via[[agents]]or per-command[[subagents.commands]].agents.