Artifact 205a371d77ccf01fcbee2ceb1c1fbed5467ac17c15a73bb6756dbe8b523b9626:
- File
docs/reference/rpc-commands.md
— part of check-in
[a49aa20f3e]
at
2026-11-23 15:38:55
on branch last-model
— Start new conversations on the model last chosen
A model picked in the terminal interface (picker, /model NAME, Ctrl+P) is saved as the default, so the next conversation, pic ask and pic -p start on it and the first line says "your last choice". --model, RPC set_model without persist and a phone save nothing; rememberModel false restores a fixed default. Ctrl+S in the picker says it is already saved. (user: dmestas, size: 3246) [annotate] [blame] [check-ins using] [more...]
# RPC commands The commands `pic --mode rpc` reads on stdin, one JSON object per line, with Pi's fields, responses and errors (Pi's `docs/rpc.md` and `docs/rpc-commands.md`). How the mode behaves is in [RPC mode](../manual/rpc.md). | Command | What it does | |---|---| | `prompt` | send a message (with `images` and `streamingBehavior`) | | `steer` | steer the running request | | `follow_up` | queue a message for after the running request | | `abort` | stop the running request | | `clear_queue` | drop queued steering and follow-ups | | `new_session` | start a new conversation | | `get_state` | the session's state | | `get_messages` | the conversation's messages | | `set_model` | switch model; applies from the next request; `persist: true` also saves it as the model new conversations start on | | `cycle_model` | the next model | | `get_available_models` | models whose provider has a key | | `set_thinking_level` | set the thinking level; applies from the next request | | `cycle_thinking_level` | the next thinking level | | `get_available_thinking_levels` | the model's supported levels | | `set_steering_mode` | how steering is delivered | | `set_follow_up_mode` | how follow-ups are delivered | | `compact` | compact now, outside any request | | `set_auto_compaction` | the `compaction.enabled` setting | | `set_auto_retry` | saved as Pi's `retry.enabled` | | `abort_retry` | stop waiting for a retry | | `bash` | run a command and journal it | | `abort_bash` | stop the running bash command | | `get_session_stats` | tokens and cost | | `export_html` | the conversation as an HTML page | | `switch_session` | continue another conversation: a conversation id, or a file `pic export --pi` wrote, as `sessionPath` | | `fork` | fork from an entry | | `clone` | duplicate the conversation | | `rewind` | pic's: `entryId` (a user message), `mode` (both, conversation, files), `forcePartial`; or `undo` | | `get_fork_messages` | the messages a fork can start from | | `get_entries` | the conversation's own path | | `get_tree` | the conversation's own path, as a tree | | `get_last_assistant_text` | the last reply's text | | `set_session_name` | name the conversation | | `get_commands` | prompt templates and skills | | `extension_ui_response` | answered with an error: pic has no extensions | | `login` | `provider`: its subscription sign-in in the browser; messages on stderr, the redirect completes it; a locked store is opened with `unlock` first | | `logout` | `provider`: remove its stored sign-in or key; `data.removed` | | `unlock` | pic's: `passphrase`: open the credential store (RPC never asks on a terminal); a store with no passphrase yet is made with it, and `data.created` is true | | `get_credentials` | pic's: `provider` (optional); `data.credentials`, each key's `provider`, `label`, `kind`, `active`, `state` (ok, invalid, credit, limited, unknown) and, when known, `status`, `until`, `checked`, `reason`; never a value | | `set_credential` | pic's: `provider`, `label`: this RPC process's requests to the provider use that key from the next one; the saved choice (`pic auth use`) is left alone | | `get_auth_status` | each stored credential's `provider`, `type`, `label`, `createdAt`, `lastUsedAt`; never a value |