$ cat ~/map/pi-agent-substrate.md
pi-agent-substrate
Suspendable remote workspaces for pi and Oh My Pi, on a self-hosted Agent Substrate cluster.
extensions✓ Sep 22
Facts
- GitHub Stars
- ★ 10
- Forks
- 0
- license
- Apache-2.0
- npm / mo
- —
- last push
- Sep 21, 2026
install
From a checkout: bun install --frozen-lockfile, then pi install . (or try it with pi -e ./src/pi.ts --substrate-endpoint <url>, pointing at your deployed Environment API or a loopback tunnel); requires Pi 0.86.1 with Node 22.19+, a deployed Environment API endpoint, and an operator-provided actor template containing ate-env-guest — the package does not provision infrastructure## TL;DR
pi-agent-substrate connects pi or Oh My Pi to a self-hosted Agent Substrate cluster so files and processes live in a suspendable remote workspace while the conversation stays local — four substrate tools, /substrate lifecycle commands, opt-in idle suspension, and explicit isolation boundaries.
## Key points
- $Remote tool surface: substrate_read, substrate_write, substrate_shell, and substrate_process cover remote files, editing, search, and Git through the sh remote shell; transfers and collected output are bounded to 1 MiB, foreground shell calls to 120 seconds, and longer jobs run with background: true and are inspected through substrate_process.
- $Environment lifecycle commands: /substrate create, attach, status, suspend, detach, and delete — deletion requires the exact attached ID and interactive confirmation and is unavailable in headless mode; idle suspension is an explicit opt-in between 0 and 86400 seconds and is blocked during active calls, tracked jobs, or uncertain process state.
- $Checkpoint/restore is verified in the README: an end-to-end proof on a self-hosted kind cluster suspends the environment to a FULL-scope snapshot and resumes with filesystem and same-process memory restored.
- $Session binding rules: resuming the same conversation with the same endpoint and atespace restores the saved attachment and process tracking; forked and new sessions do not silently inherit the attachment — attach explicitly when sharing is intentional; closing the harness neither deletes nor suspends the environment.
- $Ambiguity handling: a lost process-start response is treated as uncertain and the command is not replayed; on foreground cancellation, timeout, output overflow, or output failure the extension attempts to terminate the known remote process.
- $Security posture: use HTTPS for non-loopback endpoints with standard TLS verification left enabled, pass SUBSTRATE_TOKEN through your secret manager rather than URLs or command arguments, and note that no token is stored in the session binding.
## FAQ
Q Does the local conversation move to the remote workspace?
No — the conversation and terminal stay local; the four substrate_* tools are what act on the remote environment, while local built-in tools, shell shortcuts, other extensions, and subagents remain outside the routing boundary.
Q Does one adapter serve both pi and Oh My Pi?
The package ships separate pi and Oh My Pi adapters over one shared client and workspace state machine, and the README warns against loading both adapters in the same harness.
Q Does suspend happen automatically?
Only as an explicit opt-in: idle suspension is disabled by default (--substrate-idle-seconds defaults to 0), and active operations, tracked processes, or uncertain process starts prevent it; after a suspension attempt no new attempt is scheduled until further workspace activity.
## References
## Related entries
$ big-pi
Model-driven compression that summarizes completed phases into tiered blocks while Pi's JSONL transcript stays authoritative and untouched.
$ Pi Taste
Local preference-learning extension that distills accepted and rejected turns into one readable taste.md.
$ pi-ask-user-question
Adds a Claude Code-compatible ask_user_question tool that lets the LLM pop structured multiple-choice dialogs.
## Guides
Last updated: Sep 22, 2026