Skip to content

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.

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.

Terminal window
# Drop the example into ~/.pi/agent/extensions/ and /reload,
# or install the repo as a git package:
pi install git:github.com/earendil-works/pi

Benefits

  • 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.

Interactive plan review with annotations. Lets you annotate the agent’s messages, review code/PRs, and approve plans with inline notes.

Terminal window
pi install npm:@plannotator/pi-extension

Benefits

  • 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.

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.

Terminal window
pi install npm:pi-agent-flow

Benefits

  • 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.
  • Want the simplest, official approach: the built-in plan-mode example.
  • Want to review and annotate plans/PRs: @plannotator/pi-extension.
  • Want structured phases across the whole session: pi-agent-flow.