Plan mode
“Plan mode” — where the agent proposes a plan and waits for approval before touching your code — is deliberately not built into Pi. It’s a popular addition, available both as a built-in example extension and as polished third-party packages with review UIs.
Alternatives
Section titled “Alternatives”1. Built-in plan-mode example extension
Section titled “1. Built-in plan-mode example extension”The Pi repository ships a plan-mode example extension.
It’s the canonical, minimal implementation — copy it into your extensions
directory (or install from git) and tweak to taste.
# Drop the example into ~/.pi/agent/extensions/ and /reload,# or install the repo as a git package:pi install git:github.com/earendil-works/piBenefits
- Official, minimal, easy to read and customize.
- No third-party trust required.
Drawbacks
- It’s an example — you’re expected to adapt it.
- No fancy review UI.
2. @plannotator/pi-extension
Section titled “2. @plannotator/pi-extension”Interactive plan review with annotations. Lets you annotate the agent’s messages, review code/PRs, and approve plans with inline notes.
pi install npm:@plannotator/pi-extensionBenefits
- Rich review experience — annotate rather than just approve/reject.
- Doubles as a code/PR review aid.
Drawbacks
- Heavier than a bare plan gate.
- The annotation workflow is opinionated.
3. pi-agent-flow
Section titled “3. pi-agent-flow”A flow-state transition extension that structures the session into phases (e.g. plan → execute), giving you plan-mode-like discipline as part of a broader state machine.
pi install npm:pi-agent-flowBenefits
- Phase transitions enforce a deliberate workflow.
- More than plan/execute — models your whole flow.
Drawbacks
- Conceptually larger; overkill if you only want an approval gate.
Which should I pick?
Section titled “Which should I pick?”- Want the simplest, official approach: the built-in
plan-modeexample. - Want to review and annotate plans/PRs:
@plannotator/pi-extension. - Want structured phases across the whole session:
pi-agent-flow.