Code review, markdown annotation, and plan review are supported in Codex.
Plan review uses Codex's experimental Stop hook. This is a post-render review flow: when a turn stops, Plannotator reads the current rollout transcript, extracts the latest plan, and opens the normal plan review UI. If you deny the plan, Plannotator returns continuation feedback so Codex revises the plan in the same turn.
macOS / Linux / WSL:
curl -fsSL https://plannotator.ai/install.sh | bashWindows PowerShell:
irm https://plannotator.ai/install.ps1 | iexCodex hooks are currently experimental and require a feature flag.
Add this to ~/.codex/config.toml or <repo>/.codex/config.toml:
[features]
codex_hooks = trueThen create ~/.codex/hooks.json or <repo>/.codex/hooks.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "plannotator",
"timeout": 345600
}
]
}
]
}
}Notes:
- Codex loads
hooks.jsonnext to active config layers, so either the global~/.codexor repo-local.codexlocation works. - This currently depends on Codex hooks, which are experimental and disabled on Windows in the current official docs.
- Because this uses
Stop, the review happens after Codex renders the plan turn, not at a dedicatedExitPlanModeinterception point.
Once hooks are enabled, plan review opens automatically whenever a Codex turn ends with a plan. Approving keeps the turn completed. Sending feedback returns a Stop continuation reason so Codex revises the plan and Plannotator shows version history and diffs across revisions.
From the repo root, you can run a disposable local E2E flow against a real Codex session:
./tests/manual/local/test-codex-plan-review-e2e.sh --keepThis uses a temporary HOME, sample git repo, repo-local Codex CLI, and repo-local plannotator wrapper so it
doesn't modify your installed Codex or Plannotator state. If you want to automate the opened review UI with Playwright,
set PLANNOTATOR_BROWSER=/usr/bin/true before running the script.
Run !plannotator review to open the code review UI for your current changes:
!plannotator review
This captures your git diff, opens a browser with the review UI, and waits for your feedback. When you submit annotations, the feedback is printed to stdout.
Run !plannotator annotate to annotate any markdown file:
!plannotator annotate path/to/file.md
Run !plannotator last to annotate the agent's most recent response:
!plannotator last
The message opens in the annotation UI where you can highlight text, add comments, and send structured feedback back to the agent.
| Variable | Description |
|---|---|
PLANNOTATOR_REMOTE |
Set to 1 / true for remote mode, 0 / false for local mode, or leave unset for SSH auto-detection. Uses a fixed port in remote mode; browser-opening behavior depends on the environment. |
PLANNOTATOR_PORT |
Fixed port to use. Default: random locally, 19432 for remote sessions. |
PLANNOTATOR_BROWSER |
Custom browser to open. macOS: app name or path. Linux/Windows: executable path. |