Running a child on kilo

agent_spawn with kind: "kilo" starts a child on the Kilo CLI. Bellwether supports Kilo CLI 7, published on npm as @kilocode/cli, and its code targets 7.8.40. Kilo CLI 7 is a fork of OpenCode 1.x, so its store and flags differ from OpenCode 2's.

Install the native binary under the name kilo

herdr detects kilo by the name of its process, kilo. npm's kilo is a Node launcher, and it runs the real binary under the name .kilo, so herdr never detects a child started through it and Bellwether can't watch that child. Put the native binary first on PATH under the name kilo:

npm install -g @kilocode/cli
ln -s "$(npm root -g)/@kilocode/cli/bin/.kilo" ~/.local/bin/kilo

When the daemon's kilo is a script, the spawn refuses before it opens a tab, and the error gives the same fix.

Launch arguments and the session check

Each child starts with one argument that points at its brief:

kilo --prompt "Your task is in <cwd>/.bellwether/brief-<child id>.md. Read it, then do what it says."

kilo refuses a --session id that it didn't create, so Bellwether can't pick the session id. herdr reports a kilo session only through herdr's own kilo integration, which an operator may not have installed. So the spawn finds the session in kilo's store and waits up to 30 seconds for a row that:

The prompt contains the path of the brief file, whose name includes the child id, so only the child's own session matches. Without such a row, the spawn fails. Its error gives the store and what the last check found. The spawn closes the tab and keeps the brief file for inspection.

When the daemon's environment sets KILO_DB, that file is the store. Otherwise it's kilo.db in kilo's data directory, ~/.local/share/kilo by default. The child gets the same path, so both sides read one file. The child record keeps that path as store.

Status, dialogs and the conversation

kilo's default agent runs MCP tools without a permission question, so the child's parent_report doesn't wait for approval. A permission rule in the operator's own kilo configuration still applies, and a question it raises reaches the parent as blocked.

Refusals

The spawn refuses these before it writes a record:

agent_move doesn't move a kilo child. agent_spawn with resume and agent_restart reopen its session with kilo --session <id>.