pi
Start a task in a separate local coding agent that returns only its final answer and stats. Use for parallel investigations or a second opinion without using your main context.
Instructions
Start a NEW task in the local pi agent — a separate CLI coding agent with its own read/bash/edit/write tools and its own context window. Blocks until pi settles, then returns only its final answer plus stats, prefixed [session: ]; continue that session later with pi_reply.
Good for: a second opinion from a different model, work kept out of this context, or parallel investigation.
Caution: pi has no permission system. With its default tools it edits files and runs shell commands as your user inside cwd. For analysis-only work pass tools or no_tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Usually omit to use this server's cwd. If set, must be an absolute path (relative is rejected). pi works and edits here, and reads AGENTS.md / CLAUDE.md from here. | |
| model | No | Model pattern or id, e.g. 'sonnet', 'bifrost/minimax/MiniMax-M3', 'provider/id:thinking'. Defaults to pi's own settings; pi_models lists valid values. | |
| tools | No | Usually omit to keep pi's default set (includes bash/edit/write). Set a comma-separated allowlist of pi tool names only to restrict, e.g. 'read,grep,ls' for a read-only run. | |
| prompt | Yes | The complete task. pi cannot see this conversation, so include everything it needs: file paths, goal, constraints, expected output format. | |
| no_tools | No | Disable all pi tools: pure reasoning over the prompt, no file or shell access. | |
| thinking | No | Thinking level. No-op on models without thinking support (check pi_models). Defaults to pi's own settings. | |
| transport | No | Usually omit. The default 'rpc' keeps pi up, so a running turn can be steered or aborted with pi_send. 'print' runs one process per turn that cannot be reached while it works. | |
| timeout_ms | No | Usually omit — the server default is generous. Override only when the task's real size demands it. A run killed at the deadline is not lost: it still returns its session id and is resumable with pi_reply. | |
| system_prompt_append | No | Extra text appended to pi's system prompt for this run. |