Haruspex

Remote control from a script

Remote control (see remote-control) also takes requests from a script. Turns run on this computer.

Connect

Send the token as Authorization: Bearer <token>, and trust the certificate: save it with Copy certificate in Settings → Remote control → Advanced and pass it, e.g. curl --cacert haruspex.pem. From a trusted computer, send X-Haruspex: 1 instead of a token.

Code sessions and chats

{"type":"sessions.list"}, session.new (root, and on Windows a wslDistro with a Linux root; wsl.distros lists them), session.send (id, text), session.get, session.stop, session.compact. Chats: chats.list, chats.search (query), chat.new, chat.send, chat.get, chat.stop, chat.continue, chat.retry. Prompts waiting on you: prompts.list and prompts.answer.

A session's controls: session.close (stops its turn and processes; stays saved), session.delete (its worktree stays), session.fork (index of a message; mode worktree for its own worktree), session.rewind (index; cuts it back there in place, putting files back unless restoreFiles is false; overwrite names changed ones to restore too; dryRun lists them), session.rename, session.effort (low to xhigh, or null for Settings), session.model ({baseUrl, modelId, apiKeyId} or null) and session.stopBackground (processId). A chat's: chat.delete, chat.rename, chat.memory (enabled), chat.folder (path or null; id, else the open chat) and chat.rewind (keep: messages that stay; then chat.send or chat.retry).

Models: models.list names the Settings model, the saved remote options and servers, and the API keys; models.probe (baseUrl, apiKeyId) lists a server's models. Keys go by id, never by value.

session.send and chat.send take images, a list of up to 8 hashes from /api/v1/upload; a message can be pictures alone. A message starting with /name runs as it does in the input box: a skill goes with the message, and a built-in such as /new answers {"handled":true} with its note or new id, sending nothing. Mid-turn, a send steers and a /name is just text.

Jobs

Events, for each run going now: job-run when its status or steps change, job-run-live with its text; and job-queue. A guided-planning or asset job's question shows in prompts.list with its runId.

Watching the app

Events: task when a background task changes; home-card (cardId) when a card changes.

Settings

A patch can't set a secret, the API keys, Settings → Integrations (accounts), Settings → MCP servers, Settings → Remote control or Settings → Guest chat. Most changes apply at the next turn. A patch doesn't start the model server, but probes an added image or video model.

Lean mode

app.mode (Read) answers {"lean":true} in lean mode, when ops that open or drive a session are refused and only research jobs can be made (see lean-mode).

What each permission allows

What it doesn't do