Pi TaskExec
v0.4.0A host-agnostic MCP worker runtime for supervising local Pi coding-agent processes.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pi_spawn
Start one bounded independent investigation, analysis, implementation, or verification task when delegation offers a useful benefit. Give a clear goal, context, scope, expected result, and stopping condition. Simple or context-dependent work can be done directly. Use inspect for read-only work; implement permits writes and shell commands only within authorized scope. The supervisor retains global decisions and final review. A failed implement worker may leave partial edits. Success means accepted, not completed.
| Parameter | Type | Description |
|---|---|---|
cwd * | string | Absolute working directory inside PI_WORKER_ALLOWED_ROOTS. The worker runs in exactly this directory. |
task * | string | One bounded task with a clear scope and expected result. |
model | string | Optional model override for this worker only. When omitted, Pi chooses its locally configured default. The value must resolve to a model available in this worker's local Pi environment. |
profile | string | inspect is read-only and may share a checkout; implement can write files. |
taskTimeoutMs | integer | Optional activity-cycle deadline in milliseconds. |
thinking | string | Optional reasoning level for this worker only. When omitted, Pi keeps its configured default. Must be supported by the active model; an unsupported level is reported instead of being silently ignored. |
pi_status
Check a worker's progress, state, and the authoritative result of its current activity cycle. The result comes only from Pi's final assistant message and is independent of streamed diagnostics. Settled means the cycle ended; it does not mean the result is correct. Use waitMs to block, event driven, until the cycle settles or fails; a wait timeout does not cancel the worker. Avoid frequent busy polling.
| Parameter | Type | Description |
|---|---|---|
workerId * | string | ID returned by pi_spawn or pi_list. |
cycleId | integer | Optional activity cycle to wait for. Returns once that cycle has ended, even if a newer cycle has already started. |
waitMs | integer | Optional bounded wait in milliseconds (0-30000). Returns as soon as the current cycle settles, fails, or the process exits. Defaults to an immediate snapshot. |
pi_steer
Correct the direction of a running worker when its current task is drifting. Use only while it is running; this is not a follow-up. For a related next task after settlement, use pi_continue.
| Parameter | Type | Description |
|---|---|---|
task * | string | Concise direction correction for the current task. |
workerId * | string | ID of a running worker. |
pi_continue
Give the same worker a related follow-up that benefits from its current context. While running, the follow-up is queued and delivered inside the current activity cycle; once the cycle has settled (or failed), it starts a new cycle on the same process. Accepted/queued is not completed. Use a new worker for unrelated work. Cannot reuse a released or crashed worker.
| Parameter | Type | Description |
|---|---|---|
task * | string | Related follow-up task with a clear expected result. |
workerId * | string | ID of the worker whose context should be reused. |
pi_abort
Cancel the current activity cycle of a running worker without releasing its process or live-worker slot. The worker can be continued afterwards when its process is still alive. A worker with no running cycle returns its existing snapshot unchanged. Use pi_release to terminate the process and free the slot.
| Parameter | Type | Description |
|---|---|---|
workerId * | string | ID of the worker whose current cycle should be cancelled. |
pi_release
Release a worker's process and live-worker slot without reverting its edits or deleting files. Releasing a settled or failed worker preserves its authoritative result and failure. Releasing a running worker cancels and terminates it. Release is idempotent; if termination cannot be confirmed the snapshot carries releaseError and pi_release can be retried.
| Parameter | Type | Description |
|---|---|---|
workerId * | string | ID of the worker to release. |
pi_list
Inspect the current worker fleet before spawning more workers. Results are newest first and include live workers (running, settled, or cycle-failed), which still occupy slots and can be continued or released, plus bounded released/crashed snapshots, which cannot be reused. The list does not include the configured worker limit.