Pi Coding Agent Cheat Sheet: Commands, Flags & Shortcuts

Pi Coding Agent commands, flags, slash commands, shortcuts, configuration paths, MCP setup, package management, and print/JSON/RPC modes in one terminal reference.

Pi Coding Agent has a compact terminal workflow. Once sessions, model switching, tool selection, MCP servers, package management, and automation modes enter the picture, the exact syntax becomes easy to forget. This cheat sheet keeps the commands, flags, shortcuts, configuration paths, and runtime controls in one place for quick lookup.

Use it to launch or resume sessions, switch models, manage tools and extensions, configure MCP servers, locate important files and environment variables, or run Pi through print, JSON, and RPC modes. Concise notes call out defaults, conflicts, platform differences, and security caveats where they affect the command you are looking for.

Last updated: October 5, 2026.

Quick reference

Command / inputWhat it does
piStart Pi.
pi -cContinue the latest session for the current project.
pi -rOpen the saved-session picker.
pi -p "prompt"Run one prompt, print the final response, and exit.
/loginAuthenticate a provider.
/modelOpen the model selector.
/treeOpen the current session tree.
/compactCompact older context.
@pathAdd a file or image to the prompt.
!commandRun Bash and add its output to model context.
!!commandRun Bash without adding its output to model context.
/hotkeysShow active keyboard shortcuts.
pi -vShow the installed Pi version.

Install, update, and uninstall

Command / actionPurpose / requirement
curl -fsSL https://pi.dev/install.sh | shInstall Pi on macOS or Linux.
powershell -c "irm https://pi.dev/install.ps1 | iex"Install Pi on native Windows.
npm install -g --ignore-scripts @earendil-works/pi-coding-agentInstall with npm. Requires Node.js 22.19 or newer.
nix profile add github:earendil-works/pi/stableInstall with Nix on macOS or Linux. Older Nix versions use nix profile install.
pi updateUpdate Pi. Aliases: pi update --self, pi update self, pi update pi.
npm uninstall -g @earendil-works/pi-coding-agentUninstall an npm installation.
nix profile remove piRemove a Nix installation.
Managed installer → Uninstall PiRemove a managed installation. Data in ~/.pi/agent is retained.
Platform noteBehavior
Native WindowsBash commands use Git Bash. Install Git for Windows or configure a Bash executable.
WSLPi uses the Linux environment.

CLI basics

CommandWhat it does
pi --version, -vShow the installed version and exit.
pi --help, -hShow help, including options from loaded extensions.
pi <subcommand> --helpShow options for a subcommand.
pi "<prompt>"Open Pi with an initial prompt when stdin and stdout are terminals.

Startup flags

Model and authentication flags

FlagWhat it does
--model <pattern>Select an exact or fuzzy model ID/name. Accepts provider/id and a :<thinking> suffix.
--provider <name>Restrict model lookup to a provider. Requires --model.
--api-key <key>Use a key for this process. Requires --model or --models.
--thinking <level>Set off, minimal, low, medium, high, xhigh, or max.
--models <patterns>Set a comma-separated startup/cycling scope. Accepts exact IDs, fuzzy matches, case-insensitive globs, and thinking suffixes.
--list-models [search]List available models, optionally filtered by fuzzy search, and exit.

Session flags

FlagWhat it does
--continue, -cContinue the most recent session for the current project.
--resume, -rOpen the saved-session picker.
--session <path-or-id>Open a file, exact ID, or partial ID.
--session-id <id>Open an exact project session ID or create it if absent.
--fork <path-or-id>Fork an existing session into a new session for the current project.
--session-dir <dir>Override session storage and lookup.
--no-sessionKeep the session in memory only.
--name <name>, -nSet the session display name.
Session ruleValue
Session ID charactersLetters, numbers, ., _, and -. IDs must begin and end with a letter or number.
--fork conflicts--session, --continue, --resume, --no-session
--session-id conflicts--session, --continue, --resume
New fork IDCombine --session-id with --fork.

Prompt, display, and trust flags

FlagWhat it does
--system-prompt <text-or-path>Replace the default system prompt with text or file contents.
--append-system-prompt <text-or-path>Append text or file contents. Repeatable.
--tui-mode <mode>Choose fullscreen or regular.
--verboseShow detailed interactive startup information.
--approve, -aTrust protected project configuration and resources for this process.
--no-approve, -naSkip trust-gated project resources for this process.
--offlineDisable automatic network activity such as catalog refreshes.
Trust noteBehavior
Tool permissionsTools and extensions use the operating-system permissions of the account that starts Pi.
Working directoryThe project folder does not restrict tool access to other paths.
Per-tool approvalPi does not request approval before every tool call.

Built-in slash commands

Sessions and context

CommandWhat it does
/newStart a new session.
/resumeSwitch to another saved session.
/name [name]Set or show the session display name.
/sessionShow session file/ID, message/tool counts, token usage, and available cost statistics.
/treeNavigate branches and earlier entries in the current session.
/forkCreate a separate session from an earlier user message.
/cloneDuplicate the active branch through the current position into a separate session.
/compact [instructions]Summarize older context and retain recent history.
/import <path>Import and resume a JSONL session after confirmation.

Models, authentication, and settings

CommandWhat it does
/model [provider/model]Open the model selector or select a model directly.
/thinking [level]Open the thinking selector or select a supported level.
/scoped-modelsConfigure models used by interactive cycling.
/login [provider]Open authentication choices or start a provider login flow.
/logoutRemove saved provider credentials.
/settingsChange common preferences.

Copy, export, and share

CommandWhat it does
/copyCopy the last assistant message.
/export [path]Export HTML by default. A .jsonl path exports JSONL.
/shareUpload a Radius organization artifact or create a private GitHub gist through authenticated gh.
/bug [description]Prepare a private bug report for the Pi developers.

Review transcripts before export, upload, or reporting. They can contain conversation text, file contents, tool output, and exposed credentials.

Runtime and project controls

CommandWhat it does
/trustSave a project-trust decision.
/reloadReload settings, keybindings, context files, extensions, Skills, prompt templates, and themes.
/hotkeysShow active shortcuts.
/changelogShow changelog entries.
/quitQuit Pi.
/debugWrite rendered terminal lines and session messages to <agent-dir>/pi-debug.log.

Default keyboard shortcuts

Prompt entry, cursor movement, and editing

ShortcutAction
EnterSubmit while idle. During a run, queue steering.
Shift+Enter or Ctrl+JInsert a newline.
Alt+Enter (Ctrl+Q on Windows/WSL)Queue follow-up work.
Alt+Up (Alt+Q on Windows/WSL)Restore queued messages to the editor.
EscapeAbort the current operation.
Ctrl+CCopy selected text. Otherwise clear the editor, then exit on a second press.
Ctrl+D with an empty editorExit Pi.
Ctrl+GOpen the prompt in an external editor.
Ctrl+V (Alt+V on Windows/WSL)Paste files, images, or text where supported.
TabComplete commands and paths.
Up / DownMove the cursor and browse prompt history at editor boundaries.
Left or Ctrl+BMove left.
Right or Ctrl+FMove right.
Alt+Left, Ctrl+Left, or Alt+BMove one word left.
Alt+Right, Ctrl+Right, or Alt+FMove one word right.
Home or Ctrl+AMove to the beginning of the line.
End or Ctrl+EMove to the end of the line.
Ctrl+]Jump forward to a character.
Ctrl+Alt+]Jump backward to a character.
PageUp or Ctrl+PageUpScroll the editor up one page.
PageDown or Ctrl+PageDownScroll the editor down one page.
BackspaceDelete the previous character.
Delete or Ctrl+DDelete the next character.
Ctrl+W or Alt+BackspaceDelete the previous word.
Alt+D or Alt+DeleteDelete the next word.
Ctrl+U / Ctrl+KDelete to the beginning/end of the line.
Ctrl+YPaste the most recently deleted text.
Alt+YCycle through deleted text after Ctrl+Y.
Ctrl+-Undo. Native Windows uses Ctrl+Z. WSL uses Alt+Z.
Ctrl+Z on Unix/WSLSuspend Pi. Resume with fg.

If modified Enter is not forwarded by the terminal, use Ctrl+J. Windows Terminal reserves Alt+Enter for fullscreen unless reconfigured.

Lists, selectors, and fullscreen transcript

ShortcutAction
Up / Down in a selectorMove the selection.
PageUp / PageDown in a selectorMove through the list by page.
Enter in a selectorConfirm the selection.
Escape or Ctrl+C in a selectorCancel the selection.
PageUp / PageDown in fullscreenScroll the transcript.
Ctrl+Shift+Up / Ctrl+Shift+DownJump to the previous/next marked message.
Ctrl+Shift+F (Ctrl+F on Windows/WSL)Search the transcript.
Enter or Ctrl+G during searchSelect the next match.
Shift+Enter or Ctrl+Shift+G during searchSelect the previous match.
Escape during searchClose transcript search.
Ctrl+Home / Ctrl+End in fullscreenJump to the beginning/end of the transcript.

Models, thinking, messages, and tool output

ShortcutAction
Ctrl+LOpen the model selector.
Ctrl+PCycle to the next model.
Ctrl+Shift+P (Alt+P on Windows/WSL)Cycle to the previous model.
Shift+TabCycle supported thinking levels.
Ctrl+S in a model/thinking selectorSave the selected startup default or scoped-model configuration.
Ctrl+TExpand/collapse thinking blocks.
Ctrl+OExpand/collapse tool output.
Ctrl+XCopy the last assistant message or active selection.

Session picker and tree

ShortcutAction
Ctrl+P in the session pickerToggle file paths.
Ctrl+S in the session pickerChange sort order.
Ctrl+N in the session pickerToggle named sessions only.
Ctrl+R in the session pickerRename the selected session.
Ctrl+D in the session pickerDelete the selected session.
Ctrl+Backspace in the session pickerDelete the selected session when the query is empty.
Ctrl+Left / Alt+Left in the treeFold or move to the previous segment.
Ctrl+Right / Alt+Right in the treeUnfold or move to the next segment.
Shift+L in the treeEdit the selected entry label.
Shift+T in the treeToggle label timestamps.
Ctrl+D in the treeUse the default tree filter.
Ctrl+T in the treeToggle hiding tool results.
Ctrl+U in the treeToggle user-message filtering.
Ctrl+L in the treeToggle labeled-entry filtering.
Ctrl+A in the treeToggle the all-entries view.
Ctrl+O / Ctrl+Shift+O in the treeCycle tree filters.

Scoped models selector

ShortcutAction
Ctrl+AEnable all models, or all matching the current search.
Ctrl+XClear all models, or all matching the current search.
Ctrl+PToggle all models for the current provider.
Alt+Up / Alt+DownMove a model up/down in the cycling order.

Custom keybindings

File / actionBehavior
<agent-dir>/keybindings.jsonStores custom bindings.
[]Clears an action’s default binding.
/reloadReload keybinding changes.
app.session.new, app.session.tree, app.session.fork, app.session.resumeNo assigned default key.
{"app.message.followUp":"ctrl+shift+enter","app.session.tree":"alt+t"}

Special terminal input

InputBehavior
@pathInclude a text file or image.
!<command>Run Bash and add output to model context.
!!<command>Run Bash without adding output to model context.
--Stop CLI option parsing before a prompt that begins with -.
Input noteBehavior
ImagesRequire an image-capable chat model.
Native Windows ! / !!Continue to use Bash even when the optional PowerShell tool is enabled.
Clipboard / inline imagesDepend on terminal support.

Session behavior

Command / stateBehavior
/treeMove to another point or branch inside the current session file.
/forkCreate a new session from an earlier user message.
/cloneCopy the active branch through the current position into a new session.
/compact [instructions]Summarize older active context and retain recent history.
Active branchSupplies conversation history to the next model request.
Previous branchesStay in the JSONL session file.
Automatic compactionEnabled by default.
ResumeRestores recorded model and thinking-level choices for the session.

Tools and tool-selection flags

Core tools

ToolPurpose / availability
readRead text and supported images. Active by default.
bashExecute shell commands. Active by default.
editApply exact text replacements. Active by default.
writeCreate or overwrite files. Active by default.
grepSearch file contents. Opt-in.
findFind paths with glob patterns. Opt-in.
lsList directory contents. Opt-in.
powershellExecute PowerShell. Opt-in on native Windows.

Bundled extension tools

ToolPurpose / availability
codemodeRun JavaScript that calls registered tools. Inactive by default.
tool_searchFind undeclared tools and declare matches for the next call. Inactive by default.

Tool-selection flags

FlagWhat it does
--tools <list>, -tReplace the built-in/extension/custom selection with comma-separated names or * patterns.
--exclude-tools <list>, -xtDisable comma-separated names or * patterns after other selection controls.
--no-builtin-tools, -nbtStart core tools inactive while retaining extension/custom defaults.
--no-tools, -ntDisable built-in, extension, custom, and MCP tools.
--no-mcpDisable built-in MCP support for this run.
Tool-selection noteBehavior
MCP with --toolsMCP tools stay available until a --tools entry starts with mcp__.
defaultToolsPlain names replace inherited selection. +name / -name modify it.
Empty defaultTools arrayDisables core tools while retaining extension/custom defaults.
Native Windows["-bash","+powershell"] replaces model-facing Bash with PowerShell.
Settings changes/reload enables newly added default tools. Restart applies removals.

Skills and prompt templates

Input / settingWhat it does
/skill:<name> [request]Load a Skill and append the request.
/<template-name> [arguments]Expand a loaded Markdown prompt template.
/review "API compatibility"Example of one quoted argument passed to review.md.
$1, $2Positional template arguments.
$@, $ARGUMENTSAll template arguments.
${1:-default}Positional argument with a default value.
enableSkillCommands=falseHide Skills from interactive command discovery.
Resource ruleBehavior
SkillsDiscovered recursively from configured locations.
Prompt directoriesLoad direct .md children.
Name collisionAn extension command takes precedence over a template.
Resource editsRun /reload after adding or editing Skills/templates.

Extensions, themes, and resource loading

FlagWhat it does
--extension <path>, -eLoad an extension file, directory, package source, or builtin:<name>. Repeatable.
--no-extensions, -neDisable discovered, configured, and bundled extensions.
--no-mcpDisable built-in MCP support for this run.
--skill <path>Load a Skill file or directory. Repeatable.
--no-skills, -nsDisable discovered/configured Skills.
--prompt-template <path>Load a template file or directory. Repeatable.
--no-prompt-templates, -npDisable discovered/configured templates.
--theme <path>Load a theme file or directory. Repeatable.
--use-theme <name[/name]>Select the initial theme.
--no-themesDisable discovered/configured themes.
--no-context-files, -ncDisable instruction-file discovery, including AGENTS.md and CLAUDE.md.
Resource / commandBehavior
builtin:mcpBundled MCP extension.
builtin:llama.cppBundled llama.cpp extension.
builtin:codemodeBundled Codemode extension.
builtin:tool-searchBundled tool-search extension.
pi -ne -e builtin:mcpLoad only bundled MCP support for one run.
-builtin:<name> in settingsDisable one bundled extension.
+builtin:<name> / -builtin:<name> in project settingsOverride user choices.
CLI resource pathsTemporary and relative to the working directory.

Bundled llama.cpp control

Command / settingWhat it does
/llamaManage loading, unloading, and downloads on the configured llama.cpp router.
/login llama.cppConfigure the llama.cpp provider.
LLAMA_BASE_URLSet the router URL. Default: http://127.0.0.1:8080.
LLAMA_API_KEYSet the optional router API key.
Router --no-models-autoloadRequires loading a model before selection.

Pi package management

CommandWhat it does
pi install <source>Install and record a package in user settings.
pi listList configured packages.
pi remove <source>Remove a package declaration and managed files.
pi uninstall <source>Alias of pi remove <source>.
pi configEnable/disable package resources and bundled extensions.
pi updateUpdate Pi.
pi update --extensionsUpdate/reconcile all installed packages.
pi update <source>Update one package.
pi update --modelsRefresh model catalogs.
pi update --allUpdate Pi and installed packages.
pi update --forceForce reinstall for supported writable global installations.
Package option / sourceBehavior
--local, -lUse project settings with install, remove, uninstall, or config.
npm:<package>@<version>Install an npm package. Exact versions stay pinned.
git:<repository>@<ref>Install a Git repository. Tags and commits stay pinned.
<local-path>Load local resources without copying the source.
[] resource filterLoad none of that resource type.
!patternExclude matching package resources.
+path / -pathInclude/exclude exact declared resource paths.
Package noteBehavior
Project package declarationsRequire project trust.
Nix installationUpdate with nix profile upgrade pi.
Native Windows unmanaged self-updateSupports npm and pnpm installations.

Authentication and credential commands

CommandWhat it does
pi auth check --provider <provider>Print ready, not_ready, or invalid. Exit status: 0, 1, or 2.
pi auth print-api-key --provider <provider>Print the resolved API key.
pi auth print-bearer-token --provider <provider>Print a resolved OAuth bearer token.
OptionWhat it does
--provider <provider>Resolve credentials for a provider.
--model <model>Resolve credentials from a model.
--jsonReturn auth check results as JSON.
--credentialsInclude the resolved credential when ready.
--no-refreshSkip expired OAuth-token refresh.
--min-expiry <duration>Require remaining bearer-token lifetime, for example 30m.

auth print-api-key, auth print-bearer-token, and auth check --credentials write secrets to stdout.

Credential source prioritySource
1Runtime API-key override
2Saved auth.json credentials
3models.json API key
4Provider environment variables or ambient cloud credentials

MCP management

MCP shell commands

CommandWhat it does
pi mcp add <server> [options] -- <command> [args...]Add/replace a stdio server.
pi mcp add <server> [options] --url <url>Add/replace a streamable HTTP server.
pi mcp list [--json]Connect enabled servers and show states, tools, and errors.
pi mcp login <server> [--timeout <seconds>]Complete HTTP OAuth sign-in.
pi mcp logout <server>Delete saved OAuth credentials.
pi mcp remove <server>Remove configuration while retaining OAuth credentials.

mcp add options

OptionWhat it does
--env KEY=VALUESet a stdio server environment entry. Repeatable.
--cwd <dir>Set a stdio server working directory.
--header KEY=VALUESet an HTTP header. Repeatable.
--bearer-token-env-var <NAME>Read an HTTP bearer token from the named environment variable.
--oauth-client-id <id>Set a registered OAuth client ID.
--oauth-client-secret <secret>Set a registered OAuth client secret.
--oauth-callback-port <port>Set the OAuth callback port.
--oauth-client-name <name>Set the OAuth client name.
--exposure <mode>Select server tool exposure. Default: codemode.
--description <text>Describe server capabilities for discovery.

Bundled MCP slash commands

CommandWhat it does
/mcpInspect connections/tools, change exposure, enable/disable servers, or choose sign-in/reconnect actions.
/mcp login <server>Sign in to an OAuth server.
/mcp logout <server>Delete saved OAuth credentials.
/mcp reconnect <server>Reconnect the server.

MCP tool exposure

ValueModel access
codemodeReach tools through JavaScript scripts or tool search. Default.
deferredDiscover tools through tool_search. Codemode can also call them.
directDeclare tools directly to the model.
hiddenKeep tools unreachable unless a per-tool override exposes them.
MCP ruleBehavior
--local, -l with mcp add/removeWrite the current project’s mcp.json.
User defaultmcp add/remove writes user mcp.json.
Project MCP serversLoad only after project trust.
Legacy SSEUnsupported.
Server namesLetters, digits, _, and -.
mcp__<server>__<tool>MCP tool naming pattern.
toolExposureExact tool names win, then the first matching wildcard.
autoEnableCodemode: falseStop automatic Codemode activation for MCP servers.
mcp-auth.jsonStores MCP OAuth credentials.

Related: What Is MCP? Model Context Protocol Explained

Settings and important paths

Files and resource directories

PathPurpose
~/.pi/agentDefault agent/config directory.
<agent-dir>/settings.jsonUser defaults, resource paths, and packages.
.pi/settings.jsonProject settings and package declarations.
<agent-dir>/auth.jsonPrivate provider API keys and OAuth credentials.
<agent-dir>/models.jsonCompatible endpoints and model overrides.
<agent-dir>/keybindings.jsonCustom shortcut assignments.
<agent-dir>/mcp.json, .pi/mcp.jsonUser/project MCP servers.
<agent-dir>/mcp-auth.jsonPrivate MCP OAuth credentials.
<agent-dir>/trust.jsonSaved directory/ancestor trust choices.
<agent-dir>/sessions/Saved JSONL sessions grouped by working directory.
<agent-dir>/extensions/, .pi/extensions/User/project extensions.
<agent-dir>/skills/, .pi/skills/User/project Skills.
~/.agents/skills/, .agents/skills/Shared Agent Skills locations.
<agent-dir>/prompts/, .pi/prompts/Markdown prompt templates.
<agent-dir>/themes/, .pi/themes/Theme files.
AGENTS.override.md, AGENTS.md, CLAUDE.mdInstruction files.
<agent-dir>/SYSTEM.md, .pi/SYSTEM.mdSystem-prompt replacement files.
<agent-dir>/APPEND_SYSTEM.md, .pi/APPEND_SYSTEM.mdAppended system instructions.

Selected settings

SettingValue / default
defaultProvider, defaultModelStartup provider/model. Automatic selection by default.
defaultThinkingLevelStartup reasoning level. Default: medium, limited to model support.
enabledModelsStartup/cycling patterns. Default: all available models.
compaction.enabledAutomatic compaction. Default: true.
steeringMode, followUpModeone-at-a-time or all. Default: one-at-a-time.
externalEditorEditor command. Falls back to environment variables/platform editor.
doubleEscapeActiontree, fork, or none. Default: tree.
tuiModefullscreen or regular. Default: fullscreen.
themeDefault: system.
sessionDirSession storage. Relative paths resolve from the working directory.
shellPathCustom Bash executable.
defaultProjectTrustUser-only fallback: ask, always, or never. Default: ask.
Settings ruleBehavior
Project settingsOverride user settings.
Nested settingsMerge.
Resource listsCombine.
User relative resource pathsResolve from the agent directory.
Project relative resource pathsResolve from .pi.
CLI relative resource pathsResolve from the working directory.
models.jsonReloads when the model picker opens.
Project/user same-name MCP entryProject entry replaces or overrides the user entry according to its fields.

Pi process environment variables

VariablePurpose
PI_CODING_AGENT_DIROverride the agent/config directory.
PI_CODING_AGENT_SESSION_DIROverride session storage below --session-dir.
PI_PACKAGE_DIROverride the package directory.
PI_OFFLINEDisable automatic network activity.
PI_SKIP_VERSION_CHECKDisable the latest-version request.
PI_TELEMETRYControl install/update telemetry and provider-attribution headers.
PI_CACHE_RETENTIONSet extended provider prompt caching where supported.
PI_SHARE_VIEWER_URLOverride the /share viewer URL.
PI_RADIUS_GATEWAYOverride the Radius gateway origin.
PI_HARDWARE_CURSORControl hardware-cursor display.
PI_HYPERLINKSOverride terminal hyperlink detection.
PI_IMAGE_PROTOCOLOverride inline-image protocol detection.
PI_TRUE_COLOROverride truecolor detection.
PI_TUI_ESC_TIMEOUTSet the ESC-key timeout in milliseconds.
VISUAL, EDITORExternal-editor fallbacks.
HTTP_PROXY, HTTPS_PROXYProxy outbound HTTP requests.

Shell tool session variables

VariablePurpose
PI_SESSION_IDCurrent session ID.
PI_SESSION_FILEAbsolute session JSONL path.
PI_PROVIDERSelected model provider.
PI_MODELSelected model ID.
PI_REASONING_LEVELCurrent reasoning level.
AI_AGENT=piGeneric launching-agent marker.
PI_CODING_AGENT=truePi-specific process marker.

User-entered ! and !! commands do not receive the session-specific PI_SESSION_*, PI_PROVIDER, PI_MODEL, or PI_REASONING_LEVEL values.

Common provider and local-model variables

VariablePurpose
ANTHROPIC_API_KEYAnthropic API authentication.
OPENAI_API_KEYOpenAI API authentication.
GEMINI_API_KEYGoogle Gemini API authentication.
OPENROUTER_API_KEYOpenRouter API authentication.
LLAMA_BASE_URL, LLAMA_API_KEYllama.cpp router URL and optional key.

Print, JSON, and RPC modes

One-shot output and export

FlagOutput / behavior
--print, -pRun prompts, write final assistant text to stdout, and exit.
--mode textSelect text output.
--mode jsonWrite a session header followed by JSONL events, then exit.
--mode rpcRead JSONL commands and stream responses/events until shutdown.
--export <input> [output]Export a session file to HTML and exit.
git diff | pi -p "Review this change"
pi --mode json "Inspect this project" > events.jsonl
pi --mode rpc --no-session
Mode noteBehavior
Redirected stdin/stdoutDefaults to print mode unless JSON or RPC is selected.
Piped stdinPrepended to the first prompt.
Session persistenceContinues unless --no-session is used.

Compact RPC control reference

JSON requestAction
{"type":"prompt","message":"TASK"}Start a prompt.
{"type":"steer","message":"INSTRUCTION"}Queue steering after the current assistant turn/tool calls.
{"type":"follow_up","message":"NEXT TASK"}Queue work after the agent finishes.
{"type":"abort"}Abort and wait for idle.
{"type":"get_state"}Inspect model, thinking level, queue, and session state.
{"type":"set_model","provider":"PROVIDER","modelId":"MODEL_ID"}Select an available model.
{"type":"set_thinking_level","level":"high"}Change the thinking level.
{"type":"new_session"}Start a new session.
{"type":"switch_session","sessionPath":"PATH"}Switch to a saved session.
{"type":"get_commands"}Discover loaded extension, prompt-template, and Skill commands.
RPC noteBehavior
Request delimiterOne JSON object followed by LF on stdin.
Request idUse a unique string to correlate responses.
CompletionContinue reading events until agent_settled for a started run.
handled promptStarts no run and needs no completion wait.
agent_endNot the final completion boundary.
Startup @file argumentsRejected in RPC mode. Send prompt/image input through request records.
ShutdownClose stdin for orderly shutdown.
Core TUI slash commandsDo not execute through RPC prompt input.

Related resources

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!