Interactive Mode
This page provides a complete reference for keyboard shortcuts, input modes, and interactive features in Command Code sessions.
Built-in slash commands available in interactive mode. Type / to open the command menu.
| Slash Command | Description | Context |
|---|---|---|
/init | Initialize AGENTS.md for this project | Project setup |
/memory | Manage Command Code memory | Memory management |
/resume | Resume a past conversation | Session recovery |
/rewind | Restore to a previous checkpoint (Press Esc twice) | Session control |
/clear | Clear the conversation history | Session reset |
/share | Share conversation (copy link to clipboard) | Collaboration |
/unshare | Stop sharing conversation | Collaboration |
/taste | Manage taste learning and usage | Taste management |
/learn-taste | Learn taste from sessions with other coding agents | Reinforcement |
/skills | Browse and open agent skills | Agent skill execution |
/agents | Manage agent configurations | Agent control |
/mcp | Manage MCP server connections | External servers |
/model | Switch between Command Code models | Model selection |
/compact | Compact (compress) the conversation history | Context management |
/ide | Connect IDE to share your open file and selected lines | IDE integration |
/login | Authenticate with Command Code via browser | Auth |
/logout | Remove stored authentication | Auth |
/feedback [title] | Share feedback or report bugs (optional title) | Reporting /feedback "MCP bug" |
/plan [task] | Enter plan mode; /plan <task> plans that task | Planning before implementation |
/review | Review a pull request (auto-detects PR from branch) | Code review |
/pr-comments | Fetch all PR comments for the current branch | Code review |
/add-dir | Manage additional directory scope | File access |
/help | Display help information | Reference |
/exit | Exit the REPL | Session termination |
/model switches the model for the running session and becomes the default for new sessions: the next time you start Command Code, it opens on the model you last chose. Other sessions you already have open are not disturbed: each running session keeps the model it started with, so picking a model in one terminal never switches another mid-conversation.
You can also start on a specific model with the --model (-m) flag. This is a session-scoped override: it does not change your saved default, and an explicit /model pick later in the session takes over from it. Unknown ids are rejected up front; run cmd --list-models to see every id you can pass (see Available models).
The model your requests use is resolved in this order:
- A
--modelflag you passed at launch is in effect until you make an explicit/modelpick or switch conversations with/resume, either of which clears it. - The model you picked with
/modelthis session, or the model adopted when you resume a conversation (see below) - The default: the model you last picked with
/model(snapshotted when this session started), then the built-in default
A launch --model flag wins at first, but it isn't sticky: the moment you pick a model with /model (step 2) the flag is cleared, so your deliberate in-session choice takes over for the rest of the session.
Resuming a conversation restores its model. Whenever you continue an older conversation, the banner and your outgoing requests both switch to the model that conversation was last using:
- Cold
--resume/--continue(a fresh process): adopts the conversation's saved model, so you pick up exactly where you left off. Exception: passing--modelon the same command (cmd --model X -r <id>) wins, since you've asked to resume and override the model in one breath. - In-TUI
/resume(switching conversations inside a running session): always adopts the model of the conversation you jump into, even if you launched with--modelor picked one with/modelthis session. Switching conversations is a fresh choice, so it supersedes both.
Adopting a model on resume is transient: it changes the model for that session but does not rewrite your default, so opening an old conversation won't quietly change what new sessions start on. Only an explicit /model pick updates the default.
Either way the banner and your outgoing requests stay in sync: whichever model the banner shows is the model your requests use.
List of the shortcuts that are available during interactive sessions:
| Shortcut | Description | Context |
|---|---|---|
/ at start | Slash command | Command discovery |
! at start | Bash mode | Run commands directly and add execution output to the session |
@ | File path mention | Trigger file path autocomplete |
Keyboard shortcuts available in interactive mode:
| Shortcut | Description | Context |
|---|---|---|
shift+tab | Cycle permission mode | Cycles through: default → auto-accept → plan. |
ctrl+t | Toggle learning feed | Show or hide the learning feed. |
ctrl+o | Toggle expanded tool output | Use shift+o in iTerm2. |
alt+p | Quick model switch | option+p on macOS. |
ctrl+g | Open input in external editor ($EDITOR) | See setting up your editor. |
Press Esc twice | Rewind to previous checkpoint | Same behavior as /rewind. |
/ | Open command menu | Type at the start of input. |
Command Code uses the $EDITOR environment variable to open files. This is used by features like ctrl+g and the /skills command.
Configure $EDITOR
Add the EDITOR environment variable to your shell configuration file, then restart your terminal or source the file.
macOS/Linux (bash)
macOS (zsh)
Windows (PowerShell)
Common editors:
code- Visual Studio Codevim- Vimnano- Nanoemacs- Emacssubl- Sublime Textatom- Atom