Cluster Build

Pi sessions

Run an installed Pi agent through Cluster Build with `cluster --agent pi` — native tools and history, a Build-owned transcript, and resume.

View as Markdown

Cluster Build can run an installed Pi as a native agent. Pi keeps its own login, tools, extensions, model context, and inference history; Build provides the viewer, an account-bound transcript, and the session lifecycle. With remote control on, your other devices can also start Pi sessions on this machine.

cluster --agent pi
cluster exec --agent pi --model openai/gpt-5.4-mini 'Explain this repository'
cluster exec --agent pi --json 'Explain this repository'
cluster resume <build-session-id>
cluster exec --resume <build-session-id> 'Continue'

Install and authenticate Pi separately. Build still requires workspace trust and a Cluster login to own the transcript, but never passes Cluster credentials, tools, project instructions, or memory to Pi. Build doesn't require a specific Pi version; if the installed version isn't compatible, the session fails with an error.

Execution policy

Pi's native tools have no built-in sandbox or approval gate. Pi exposes only Full access to remote clients; Ask and Auto aren't available. The startup banner and /status show the execution policy, and trusting the workspace allows Pi's native extensions to load.

Pi extension confirm and bounded select dialogs appear as Build questions, and your answer applies only to that request. Free-form or editor dialogs are rejected. Headless runs cancel any interaction they can't answer and exit unsuccessfully.

Limitations

Pi sessions support text, attachments, native tool progress, questions, interruption, transcript replay, clear, and resume. Not available: steering, plan mode, Cluster tools and MCP, goals, forking into a separate Build chat, and in-session model changes. --effort and --ephemeral don't apply.

Pi accepts images only when the session's model supports image input; otherwise Build rejects the message before the turn starts. Remove the image and retry, or start a new session with a vision-capable model. PDF and text attachments work with any model.

Choose a model with --model when starting a new session. Resume refuses a model different from the saved session, and a native extension that changes the model fails the turn.

Interrupting and exit codes

Interrupting clears queued input, cancels pending dialogs, and aborts native work; partial output stays in the transcript. cluster exec --json returns the Build session ID, native model, text, stopped_early, and backend: "pi". Exit codes are 0 for success, 1 for failure, and 130 for interruption.

Two histories

Build keeps its transcript in ~/.cluster/sessions. Pi keeps its native history in its agent directory (normally ~/.pi/agent, or PI_CODING_AGENT_DIR). Resume picks the saved backend automatically and requires the same account, workspace, native history, and native login. If the native history is missing, resume fails instead of creating a replacement; the Build transcript stays readable. Deleting Build history doesn't delete Pi's history.

Edit a message on mobile

In a remote Build chat, wait for Pi to finish, then select Edit message on one of your messages. You can revise the prompt and its attachments in the composer. Opening or canceling the edit leaves both histories unchanged.

Sending the edit replaces the selected message and everything after it in the same Build chat. Pi forks its native history at the selected message so the replacement uses the earlier conversation without changing the original Pi history.

On this page