Interaction¶
nanocode runs as a conversation in your terminal. You type a request, the agent works through it with tools, and you stay in the loop the whole time — steering, answering questions, and reviewing changes.
Follow-ups¶
You can keep typing while nanocode works. A submitted follow-up joins the current task if another model step begins; otherwise it becomes the next task. Interrupting does not submit a draft that is still in the editor.
Everything below the divider is waiting. The agent picks those messages up at its next step, and they move up into the log above the divider once they are in.
Key |
When |
Effect |
|---|---|---|
|
While the agent works |
Queue a follow-up for the next model step |
|
While the agent works |
Interrupt the current task; keep any draft in the editor |
|
Idle prompt |
Clear input line |
|
While working, with an empty editor |
Recall the newest queued message |
Commands¶
Type / commands at the prompt to inspect state, switch models, manage the
session, or configure runtime behavior on the fly. Run /help for the built-in
reference.
Looking around¶
/status — Shows everything about the runtime at a glance: workspace path,
session id, active provider and model, context window fill percentage,
conversation history, prompt-cache hit ratio, code index state, background jobs,
and whether an update is available.
The /status output at a glance.¶
/diff — Review changes from the latest turn or the whole session. See
Reviewing changes below.
The two tabs pick the range; each row is one changed file with its added and removed line
counts. Enter opens the selected file’s diff.
/ps — Lists active background jobs (see Tools).
Each row shows job id, state, command, and elapsed time.
/skills — Lists every installed skill by name, source, and
description.
/config — Shows the active configuration: provider blocks, runtime settings,
and their resolved values.
The code index¶
/index [force] — Build or rebuild the code symbol index that powers
InspectCode. The first build walks every source file; later syncs are fast. Add
force to rebuild from scratch. See Code symbol index
for details.
Switching models¶
/provider [NAME] — Show or switch the active provider. Without an argument it
lists every configured provider (from your configuration)
and lets you pick one interactively. With a name it switches immediately.
/model [MODEL] — Show or switch the model for the current provider. Without
an argument it opens an interactive picker with configured and discovered models.
Changing the model also prompts you to pick a reasoning effort.
/reason [EFFORT] — Show or set reasoning effort (OpenAI o-series and DeepSeek
R1). Values: off, minimal, low, medium, high, xhigh. Without an
argument it opens a picker.
Switching providers and models mid-session.¶
Managing the session¶
/compact — Summarize and shrink the conversation immediately. nanocode keeps
long sessions within budget on its own, but /compact trims on demand.
/yolo — Toggle confirmation prompts. See Safety before turning
this off permanently.
/strict — Toggle strict tool-call schemas (OpenAI / DeepSeek).
/set KEY VALUE — Set provider.* or runtime.* for the session. Example:
/set provider.model deepseek-v4-flash.
/resend — Re-send the in-flight model request. Type this while a turn is
working.
MCP¶
/mcp — Manage MCP server connections. Sub-commands:
Usage |
Effect |
|---|---|
|
List servers and connection status |
|
Connect servers now |
|
Disconnect a server |
|
List tools from a connected server |
Help and exit¶
/help — Show the built-in command and tool reference.
/exit, /quit — Leave nanocode. Your session is saved automatically and can
be resumed with -c or --resume.
Mentions¶
Two inline references, both Tab-completed as you type:
Keys and input editing¶
Interactive selectors (model picker, MCP manager, diff viewer) support:
j/kor arrow keys to moveg/Gto jump to top / bottom/to search,Enterto accept,Escto cancel
The input line supports:
history recall and completion
Ctrl-C— clear idle input; while running, interrupt the current turnCtrl-D— exit from an empty promptCtrl-R— reverse-search your historyCtrl-X Ctrl-EorCtrl-G— edit the current input in$VISUAL/$EDITOR(falls back to vim)
Typing a follow-up message in an external editor.¶
Sessions¶
Your work is saved automatically — the conversation, edits, and diffs
are tied to the project directory you started in, so an interrupted session picks up where it
stopped. Inactive sessions older than seven days are removed at startup by default; set
runtime.session_retention_days = 0 to keep them indefinitely.
Resume from the command line:
nanocode -c # resume the latest session in this project
nanocode --resume # same, explicit
nanocode --resume UID # resume a specific session by id
Reviewing changes¶
/diff opens an interactive, tabbed viewer with two views:
Latest — what changed during the most recent round of your requests
Session — the net diff for everything since the session began
Navigate with j/k, g/G, and / search; press Esc to close.
Choosing a file to diff.¶
Side-by-side detail view of a changed file.¶
Long sessions¶
nanocode keeps long conversations within a working budget on its own, summarizing older
context as needed so a session can run indefinitely. Run /compact to trim it now, or
/status to see current context and token usage.