Pi
GOAT can use your existing Pi coding agent installation while keeping Pi’s models, auth, extensions, skills, context files, and native session history.
Set Up Pi
- Install Pi on the machine running the GOAT server. Pi requires Node.js 22.19 or newer; its platform installers can install Node if needed. GOAT supports Pi 0.80.5 or newer.
- Run
piin a terminal, then/loginto connect your model provider or configure its API key. - Open GOAT Settings, enable Pi, and refresh the provider.
For an npm installation, use:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
If pi is not on the server’s PATH, set Pi’s binary path to the executable. Provider environment
variables and launch arguments are also available for installations that need a custom agent
directory, endpoint, or model configuration. --provider must be paired with --model. GOAT
rejects launch arguments that change Pi’s execution mode or select a session because GOAT owns those
parts of the process lifecycle.
On a remote or headless server, connect to that machine over SSH and run pi, then /login.
Open the authorization URL on your own computer. If the callback cannot reach the server,
paste the final redirect URL or authorization code back into Pi when prompted. You can also
set your model provider’s API-key environment variable in the Pi instance’s settings; mark
secret values as sensitive.
Update installer-managed Pi with pi update. If another package manager owns the installation,
update it through that manager instead. For example, a Nix profile installation uses
nix profile upgrade pi.
What Carries Over
GOAT discovers the models reported by Pi and exposes their supported thinking levels. The thinking picker marks the discovered active model’s configured level as its default without overriding it. Other models keep their Pi defaults when no level is selected. Threads use Pi’s native session files for resume, rollback, and forks within the same Pi instance. Forks preserve the native conversation through the selected turn in the destination workspace. Switching providers uses portable conversation context. Extension dialogs appear in the GOAT composer, and the composer context meter follows Pi’s own usage reporting while a response streams and after it settles.
Pi skills appear in the composer’s $ menu. This includes user skills and project skills that Pi
loads for the current workspace; selecting one uses Pi’s native skill expansion.
Pi loads its normal user extensions, and project extensions once the folder is trusted in Pi.
Blocking select, confirm, input, and editor dialogs work in GOAT. Notifications appear in
the work log. Pi terminal decoration such as titles, status lines, and widgets does not have a GOAT equivalent.
Use OpenCodex Home
A Pi instance can send its model requests through your
OpenCodex Home and use Home’s
accounts and shared quota. In the instance’s settings in Settings →
Providers, set Model route to OpenCodex Home. OpenCodex address is
OpenCodex on the machine running the instance, http://127.0.0.1:10100/v1 by
default. An agent can also ask you to approve the change. A routed instance
uses only the models Home offers. If Home is unavailable, requests fail; GOAT
never switches to another account. Set Model route back to Provider
settings to stop.
While routed, Pi runs with a separate GOAT configuration: your Pi sign-ins, settings, and extensions are not copied into it. Your Pi sessions stay where they are, so threads continue after you change the route.
Permission Modes
GOAT applies the composer permission mode through Pi’s blocking tool hook:
- Supervised asks before commands, file changes, and extension tools. Read-only tools continue.
- Auto-accept edits allows Pi’s edit and write tools, but asks before commands and extension tools.
- Full access allows tools without GOAT approval prompts.
The Auto option is not shown for Pi because Pi does not expose an AI approval reviewer. Threads that already stored Auto before Pi support was added behave and display as Supervised.
Changing the mode restarts the Pi provider session and resumes the same native conversation. The policy covers Pi tool calls; it is not an operating-system sandbox, and code that a trusted Pi extension runs outside a tool call remains governed by Pi’s own extension trust model.
GOAT’s task.create path creates durable child threads in the shared subagent UI. If the user
installs Pi’s example subagent extension, GOAT also shows its task progress and results in that
UI. Pi runs those children without a session, so they cannot be opened or resumed as GOAT
threads.
Troubleshooting
- If Pi is unavailable, confirm that the configured binary runs on the server machine, then refresh the provider in Settings.
- If no models appear, open Pi directly and confirm its authentication and model configuration.
- If discovery cannot complete, GOAT keeps Pi available with the
Pi defaultmodel. Start a thread to let the interactive Pi session handle any startup prompt. - If Pi skips project settings, extensions, skills, prompts, MCP servers, or system prompt files
because the folder is not trusted, the thread shows a notice on the first turn of the Pi session.
Run the configured Pi binary in that folder on the server machine, using the same provider
environment, including
PI_CODING_AGENT_DIRif set. Trust the folder or its parent with/trust, then start a new thread using that same worktree. Launch arguments with--no-approvekeep project files off without the notice. - The context meter appears once Pi reports usage for the thread. Some model providers only report usage when a response completes, so the meter can wait for the first reply.