Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 9 min read

Plannotator: Review Your AI Agent's Plan Before It Writes a Single Line of Code

If you use an AI coding agent like Claude Code, Codex, or OpenCode, you have probably seen this happen: the agent writes a plan, you skim it in the terminal, approve it, and twenty minutes later you realize step 4 was wr

If you use an AI coding agent like Claude Code, Codex, or OpenCode, you have probably seen this happen: the agent writes a plan, you skim it in the terminal, approve it, and twenty minutes later you realize step 4 was wrong. Now you are undoing changes across six files.

The cheapest place to fix a bad decision is in the plan, before any code exists. The problem is that terminals are a bad place to read and comment on a long plan.

Plannotator solves that. It opens your agent's plan (or a code diff) in a local browser UI, lets you annotate specific lines, and sends your comments back to the agent as structured feedback.

This post covers what it does, how to install it for your agent, and the details you should know before relying on it.

What Plannotator actually is

Plannotator is a local, browser-based review tool for AI coding agents. It is open source, dual-licensed under Apache 2.0 or MIT, and has close to 10k stars on GitHub at the time of writing.

It does two main jobs:

  1. Plan review. When your agent finishes planning, Plannotator intercepts it and opens a review page. You mark up the plan, then approve it or send it back with your notes.
  2. Code review. You run a command and get a diff viewer for your uncommitted changes or a GitHub/GitLab PR. You comment on lines, and those comments go back to the agent.

It also lets you annotate arbitrary markdown files, folders, URLs, rendered HTML, and the agent's last message.

Supported agents

  • Claude Code
  • Codex
  • Copilot CLI
  • Gemini CLI
  • OpenCode
  • Kiro
  • Droid
  • Amp
  • Pi

Support level varies. For example, Droid currently gets the commands but not automatic plan interception. Check the per-agent notes below.

How plan review works

Understanding the flow makes debugging much easier, so here it is in plain terms:

  1. Your agent finishes a plan and calls its "exit plan mode" step (in Claude Code this is ExitPlanMode).
  2. A hook registered by Plannotator fires on that event.
  3. A small local server starts, reads the plan, and opens the review UI in your browser.
  4. You highlight text and leave comments.
  5. You click Approve or Deny.
    • Approve: the agent continues and starts implementing.
    • Deny: your annotations are sent back as structured feedback and the agent revises the plan.
  6. When the revised plan comes back, you see a diff of what changed between versions.

You do not run any command for this. Once installed, it triggers automatically whenever the agent produces a plan.

How code review works

  1. You run /plannotator-review (or pass it a PR/MR URL).
  2. Plannotator collects the changes from your working tree, or fetches the PR.
  3. A diff viewer opens in the browser.
  4. You comment on lines, suggest code, and stage or unstage files.
  5. Your comments are sent back to the agent session. Approving sends an "LGTM".

It works with Git, GitButler, Jujutsu (jj), Perforce (p4), GitHub, and GitLab.

Installation

Step 1: Install the binary

macOS, Linux, or WSL:

curl -fsSL https://plannotator.ai/install.sh | bash

Windows PowerShell:

irm https://plannotator.ai/install.ps1 | iex

The installer downloads the release binary from GitHub, detects which agents you have installed, and sets up the hooks, skills, and slash commands for them.

If you only want the binary (installed to ~/.local/bin) with no agent configuration:

curl -fsSL https://plannotator.ai/install.sh | bash -s -- --minimal

As always with curl | bash, read the script first if your team has policies about that. There is also an option to verify release attestations during install, covered further down.

Step 2: Agent-specific setup

Claude Code. Run these inside Claude Code, then restart it:

/plugin marketplace add backnotprop/plannotator
/plugin install plannotator@plannotator

Codex. Nothing extra. Plan review uses Codex's experimental Stop hook. On native Windows, the installer prints the manual steps you need.

Copilot CLI. Run these, then restart. Plan review activates when you are in plan mode (Shift+Tab):

/plugin marketplace add backnotprop/plannotator
/plugin install plannotator-copilot@plannotator

Gemini CLI. Nothing extra, but you need Gemini CLI 0.36.0 or later.

Kiro CLI. Nothing extra. Try it with:

kiro-cli chat --agent plannotator

OpenCode. Add the plugin to opencode.json and restart:

{
  "plugin": ["@plannotator/opencode@latest"]
}

Pi. Skip the installer and install the extension directly:

pi install npm:@plannotator/pi-extension

Start Pi with --plan, or toggle with /plannotator-plan-mode.

Droid. Commands only for now, no plan interception:

droid plugin marketplace add https://github.com/backnotprop/plannotator
droid plugin install plannotator@plannotator

Amp. Copy plannotator.ts from apps/amp-plugin in the repo into ~/.config/amp/plugins/, then run plugins: reload.

Claude Code without the plugin

If you prefer not to use the plugin marketplace, you can wire the hook manually. Add a PermissionRequest hook in ~/.claude/settings.json with the matcher ExitPlanMode, have it run the plannotator command, and give it a long timeout (the README uses 345600) so the agent waits while you review.

Commands you will actually use

Annotate documents

/plannotator-annotate README.md                  # a local markdown file
/plannotator-annotate src/                       # browse and annotate files in a folder
/plannotator-annotate https://example.com/docs   # fetch and annotate a URL
/plannotator-annotate report.html --render-html  # render HTML as-is
/plannotator-last                                # annotate the agent's last message

/plannotator-last is underrated. When the agent writes a long explanation and you disagree with two paragraphs of it, this lets you point at exactly those two paragraphs.

Review code

/plannotator-review                     # uncommitted changes
/plannotator-review <github-pr-url>     # a GitHub pull request
/plannotator-review <gitlab-mr-url>     # a GitLab merge request
plannotator review --gitbutler          # an active GitButler workspace
plannotator review --patch-file my.diff # a static unified diff

Manage sessions

plannotator sessions           # list active review sessions
plannotator sessions --open 1  # reopen a session in the browser
plannotator archive            # browse past plan decisions (read-only)

On Codex, the syntax is a bit different: use !plannotator review or the $plannotator-* skills.

Running it over SSH or in a devcontainer

This is the part most people trip over. Plannotator is a local web server, so if your agent runs on a remote box, your browser needs to reach that server.

Plannotator detects SSH sessions and switches to a fixed port automatically (default 19432 in remote mode). For explicit control:

export PLANNOTATOR_REMOTE=1
export PLANNOTATOR_PORT=9999

Then forward that port. For plain SSH, add this to your host entry in ~/.ssh/config:

LocalForward 9999 localhost:9999

VS Code devcontainers forward ports for you, so it usually works with no extra steps.

Privacy: what stays local and what does not

If you are going to point this at a proprietary codebase, read this section.

Stays local by default: plans, diffs, annotations, and config. The project states it collects no usage telemetry or analytics.

Leaves your machine only when you use these features:

  • URL annotation. Fetched through Jina Reader by default. Disable with PLANNOTATOR_JINA=0.
  • GitHub/GitLab PR review. Goes through your own CLI tooling.
  • AI features. "Ask AI" and AI review agents send content to whatever provider you configured. Turn them all off with PLANNOTATOR_AI=disabled.
  • Sharing. See below.

Small network calls to be aware of:

  • Each review page checks GitHub for the latest release when it loads. No content is sent, but GitHub sees a normal request. There is currently no setting to turn this off.
  • Local Git review may run git ls-remote against origin to detect your default branch. It only runs on user actions. Disable with PLANNOTATOR_GIT_REMOTE_CHECK=0 or --no-git-remote-check.

Sharing links

You can share a plan with a teammate, and the behavior depends on size:

  • Small markdown is compressed into the URL fragment (the part after #). Fragments are not sent to the server, but the content is not encrypted. Anyone with the link can read it.
  • Large markdown and HTML is encrypted with AES-256-GCM before upload. The key lives in the URL fragment. Uploads expire after 7 days, and the paste service can be self-hosted.

If you do not want sharing available at all:

export PLANNOTATOR_SHARE=disabled

Configuration reference

Settings can come from the UI, environment variables, or ~/.plannotator/config.json. The UI stores settings in cookies because each hook run uses a random port. The environment variables most developers will care about:

Variable What it does
PLANNOTATOR_REMOTE 1 forces remote mode, 0 forces local, unset auto-detects SSH
PLANNOTATOR_PORT Fixed port (random locally, 19432 in remote mode)
PLANNOTATOR_BROWSER Use a custom browser, or none to open nothing
PLANNOTATOR_AI disabled turns off all AI features
PLANNOTATOR_SHARE disabled turns off link sharing
PLANNOTATOR_JINA 0 disables Jina Reader for URL fetching
PLANNOTATOR_DATA_DIR Where plans, history, and config live (default ~/.plannotator)
PLANNOTATOR_GIT_REMOTE_CHECK 0 disables the git ls-remote check
PLANNOTATOR_ORIGIN Override agent detection (claude-code, codex, opencode, etc.)

A reasonable "locked down" setup for work machines:

export PLANNOTATOR_AI=disabled
export PLANNOTATOR_SHARE=disabled
export PLANNOTATOR_JINA=0
export PLANNOTATOR_GIT_REMOTE_CHECK=0

Integrations

  • VS Code. Open plans in editor tabs, view diffs, and annotate from the gutter.
  • Obsidian. Approved plans can be saved automatically to a vault with YAML frontmatter, tags, and backlinks. Useful if you want a searchable history of design decisions.
  • Bear. Save plans as Bear notes with nested tags.

There is also an optional Vim keybinding profile under Settings, off by default.

Supply chain verification

Each release ships a SHA256 checksum, SLSA provenance attestations (from v0.17.2), and a CycloneDX SBOM. To verify attestations during install (requires the gh CLI):

curl -fsSL https://plannotator.ai/install.sh | bash -s -- --verify-attestation

Or make it the default in ~/.plannotator/config.json:

{ "verifyAttestation": true }

You can also pin a specific version:

curl -fsSL https://plannotator.ai/install.sh | bash -s -- --version vX.Y.Z

Updating and uninstalling

To update, run the installer again. For the Claude Code plugin:

claude plugin marketplace update plannotator
claude plugin update plannotator@plannotator

Then restart Claude Code. For Pi, run pi update --extensions.

To uninstall:

plannotator uninstall          # keeps your plans, history, and settings
plannotator uninstall --purge  # also deletes local Plannotator data

--dry-run previews what will be removed.

A note for Claude Code users

On recent Claude Code versions, the flow changed slightly: instead of the agent blocking while you review, Claude ends its turn and your approve/deny decision arrives later as a message. If you prefer the older blocking behavior, set:

export PLANNOTATOR_CLAUDE_MOD=0

Contributing

The project uses Bun. To get a dev environment running:

bun install
bun run dev:hook     # plan review server
bun run dev:review   # code review editor

To test the Claude Code plugin from your local checkout:

claude --plugin-dir ./apps/hook

One gotcha from the README: build order matters. If you touch UI code in packages/ui/, packages/editor/, or packages/review-editor/, rebuild the review app before the hook:

bun run --cwd apps/review build && bun run build:hook

Is it worth adding to your workflow?

If you regularly approve agent plans without reading them closely, yes. The value is not the UI itself. It is that you get a real review step at the point where changes are cheapest, and your feedback reaches the agent as precise, line-level comments instead of "no, redo step 3, but also keep the part about caching."

A good way to try it:

  1. Install it for the agent you already use.
  2. Give the agent a medium-sized task in plan mode.
  3. Deny the first plan with two or three specific annotations.
  4. Look at the diff of the revised plan.

That loop will tell you within ten minutes whether it fits how you work.

Repo: github.com/backnotprop/plannotator

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.