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 CommandDescriptionContext
/initInitialize AGENTS.md for this projectProject setup
/memoryManage Command Code memoryMemory management
/resumeResume a past conversationSession recovery
/rewindRestore to a previous checkpoint (Press Esc twice)Session control
/clearClear the conversation historySession reset
/shareShare conversation (copy link to clipboard)Collaboration
/unshareStop sharing conversationCollaboration
/tasteManage taste learning and usageTaste management
/learn-tasteLearn taste from sessions with other coding agentsReinforcement
/skillsBrowse and open agent skillsAgent skill execution
/agentsManage agent configurationsAgent control
/mcpManage MCP server connectionsExternal servers
/modelSwitch between Command Code modelsModel selection
/compactCompact (compress) the conversation historyContext management
/ideConnect IDE to share your open file and selected linesIDE integration
/loginAuthenticate with Command Code via browserAuth
/logoutRemove stored authenticationAuth
/feedback [title]Share feedback or report bugs (optional title)Reporting /feedback "MCP bug"
/plan [task]Enter plan mode; /plan <task> plans that taskPlanning before implementation
/reviewReview a pull request (auto-detects PR from branch)Code review
/pr-commentsFetch all PR comments for the current branchCode review
/add-dirManage additional directory scopeFile access
/helpDisplay help informationReference
/exitExit the REPLSession 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:

  1. A --model flag you passed at launch is in effect until you make an explicit /model pick or switch conversations with /resume, either of which clears it.
  2. The model you picked with /model this session, or the model adopted when you resume a conversation (see below)
  3. 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 --model on 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 --model or picked one with /model this 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:

ShortcutDescriptionContext
/ at startSlash commandCommand discovery
! at startBash modeRun commands directly and add execution output to the session
@File path mentionTrigger file path autocomplete

Keyboard shortcuts available in interactive mode:

ShortcutDescriptionContext
shift+tabCycle permission modeCycles through: default → auto-accept → plan.
ctrl+tToggle learning feedShow or hide the learning feed.
ctrl+oToggle expanded tool outputUse shift+o in iTerm2.
alt+pQuick model switchoption+p on macOS.
ctrl+gOpen input in external editor ($EDITOR)See setting up your editor.
Press Esc twiceRewind to previous checkpointSame behavior as /rewind.
/Open command menuType 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)

# Add to ~/.bashrc and reload echo 'export EDITOR="code"' >> ~/.bashrc source ~/.bashrc

macOS (zsh)

# Add to ~/.zshrc and reload echo 'export EDITOR="code"' >> ~/.zshrc source ~/.zshrc

Windows (PowerShell)

# Set permanently (restart terminal after) setx EDITOR "code"

Common editors:

  • code - Visual Studio Code
  • vim - Vim
  • nano - Nano
  • emacs - Emacs
  • subl - Sublime Text
  • atom - Atom