You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor(ai): extract BaseSession and buildEffectivePrompt
Pull shared session lifecycle (~80 lines duplicated across Claude and
Codex providers) into BaseSession: query guard, abort, ID resolution,
generation counter. Extract first-query prompt prepending into
buildEffectivePrompt() in context.ts.
Both providers now extend BaseSession. Behavior-preserving — all 54
existing tests pass unchanged.
For provenance purposes, this commit was AI assisted.
* feat(ai): add Pi provider via RPC subprocess
Spawns `pi --mode rpc` and communicates via JSONL over stdio. No Pi SDK
bundled — user must have the pi CLI installed. Provider auto-discovers
available models at startup via get_available_models.
Includes: PiProcess (JSONL client), PiSDKProvider, PiSDKSession extending
BaseSession, mapPiEvent for streaming, Pi icon in provider UI, and 12
new tests (9 event mapping + 3 buildEffectivePrompt).
For provenance purposes, this commit was AI assisted.
* fix(ai): harden Pi provider error paths
- Surface startup errors when Pi process dies (bad config, missing API keys)
instead of hanging the chat indefinitely
- Map tool-call errors as non-terminal tool_result instead of AIErrorMessage,
so Pi can continue reasoning after a failed tool call
- Fix subprocess leak in fetchModels() by moving proc.kill() to finally block
For provenance purposes, this commit was AI assisted.
* fix(ai): detect Pi prompt rejections and process crashes
- Use sendAndWait for prompt command so RPC-level rejections (expired
credentials, invalid session) surface as errors instead of hanging
- Emit process_exited instead of synthetic agent_end when Pi subprocess
dies, so crashes show as errors instead of silent empty successes
For provenance purposes, this commit was AI assisted.
* docs(ai): add Pi to AI features guide, code review docs, and installation
For provenance purposes, this commit was AI assisted.
* style(ai): apply biome formatting to new files
For provenance purposes, this commit was AI assisted.
Copy file name to clipboardExpand all lines: apps/marketing/src/content/docs/commands/code-review.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,8 +83,9 @@ Plannotator supports multiple AI providers. Providers are auto-detected based on
83
83
84
84
-**Claude** — Requires the `claude` CLI ([Claude Code](https://docs.anthropic.com/en/docs/claude-code))
85
85
-**Codex** — Requires the `codex` CLI ([OpenAI Codex](https://github.com/openai/codex))
86
+
-**Pi** — Requires the `pi` CLI ([Pi](https://github.com/mariozechner/pi-coding-agent))
86
87
87
-
Both providers can be available simultaneously. Plannotator does not manage API keys — you must be authenticated with each CLI independently (`claude` uses `~/.claude/` credentials, `codex` uses `OPENAI_API_KEY`).
88
+
All providers can be available simultaneously. Plannotator does not manage API keys — you must be authenticated with each CLI independently (`claude` uses `~/.claude/` credentials, `codex` uses `OPENAI_API_KEY`, `pi` uses its own local configuration).
Copy file name to clipboardExpand all lines: apps/marketing/src/content/docs/getting-started/installation.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Installation"
3
-
description: "How to install Plannotator for Claude Code, OpenCode, and other agent hosts."
3
+
description: "How to install Plannotator for Claude Code, OpenCode, Pi, and other agent hosts."
4
4
sidebar:
5
5
order: 1
6
6
section: "Getting Started"
@@ -109,3 +109,21 @@ Install the binary, then use it directly:
109
109
!plannotator review # Code review for current changes
110
110
!plannotator annotate file.md # Annotate a markdown file
111
111
```
112
+
113
+
## Pi
114
+
115
+
Install the Pi extension:
116
+
117
+
```bash
118
+
pi install npm:@plannotator/pi-extension
119
+
```
120
+
121
+
Or try it without installing:
122
+
123
+
```bash
124
+
pi -e npm:@plannotator/pi-extension
125
+
```
126
+
127
+
Start plan mode with `pi --plan`, or toggle mid-session with `/plannotator` or `Ctrl+Alt+P`. The extension provides file-based plan review, code review (`/plannotator-review`), markdown annotation (`/plannotator-annotate`), bash safety gating during planning, and progress tracking during execution.
128
+
129
+
See [Plannotator Meets Pi](/blog/plannotator-meets-pi) for the full walkthrough.
Copy file name to clipboardExpand all lines: apps/marketing/src/content/docs/guides/ai-features.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,12 @@ Requires the `codex` CLI installed and authenticated. The AI operates in a sandb
33
33
- GPT-5.2 Codex
34
34
- GPT-5.2
35
35
36
+
### Pi (via RPC subprocess)
37
+
38
+
Requires the `pi` CLI installed and configured. Plannotator spawns `pi --mode rpc` and communicates over JSONL/stdio. Models are discovered dynamically from your Pi installation — whatever models you've configured in Pi are available here.
39
+
40
+
No API keys are managed by Plannotator — Pi uses its own local configuration.
41
+
36
42
## Configuration
37
43
38
44
Provider and model selection is available in **Settings > AI**. These persist via cookies across sessions.
@@ -47,6 +53,8 @@ A session is created lazily on your first question. Until then, no resources are
47
53
48
54
**Codex sessions** inject the review context as a system prompt prefix. The AI has Codex's built-in capabilities plus the diff. Codex sessions are always standalone — fork support is not available.
49
55
56
+
**Pi sessions** inject the review context as a system prompt prefix, similar to Codex. Pi uses its full default toolset (read, bash, edit, write). Pi sessions are always standalone — fork and resume are not available.
57
+
50
58
**Diff context handling:** Large diffs are truncated at roughly 40k characters to stay within context limits. However, when you select specific lines and ask a question, the selected code is always sent alongside the question regardless of truncation.
51
59
52
60
## Permission requests
@@ -55,20 +63,22 @@ When using Claude, the AI may request permission to use tools like Read, Glob, G
55
63
56
64
Codex sessions run in a sandboxed read-only mode, so permission requests do not apply.
57
65
66
+
Pi does not expose a permission approval gate over RPC, so tool execution is handled entirely by Pi's own runtime.
67
+
58
68
## Reasoning effort
59
69
60
70
Codex supports a reasoning effort setting with four levels: **Low**, **Medium**, **High**, and **Max**. This is available in the config bar at the bottom of the AI sidebar. Higher effort means slower but more thorough responses.
61
71
62
-
This setting only applies to Codex — Claude does not expose a reasoning effort control.
72
+
This setting only applies to Codex — Claude and Pi do not expose a reasoning effort control.
63
73
64
74
## Available settings
65
75
66
76
| Setting | Description | Provider |
67
77
|---------|-------------|----------|
68
-
| Provider | Claudeor Codex|Both|
69
-
| Model | Model selection per provider |Both|
78
+
| Provider | Claude, Codex, or Pi|All|
79
+
| Model | Model selection per provider |All|
70
80
| Reasoning effort | Low / Medium / High / Max | Codex only |
71
81
| Default tools | Read, Glob, Grep, WebSearch | Claude only |
0 commit comments