# Plannotator reviews in a Rex split via terminal-browser

> Source: <https://gist.github.com/iliferov/bd6e55a4ee3c48ad4ac0bd5f8e130f2f>
> Published: 2026-12-06 17:33:42+00:00

**Key takeaway:** Setting PLANNOTATOR_BROWSER to a small wrapper script lets Plannotator reviews open in a Rex split beside the agent pane, using REX_BLOCK to target the requesting agent's block.

`plannotator-rex-browser` is a tiny `PLANNOTATOR_BROWSER` target that opens agent reviews in a Rex split right next to the agent.

| Component | Role | 
|---|---|
| [Plannotator](https://plannotator.ai) ([GitHub](https://github.com/backnotprop/plannotator) ) | Review UI for agent plans, diffs and replies; sends the feedback back to the agent | 
| [Rex](https://www.superlogical.com/rex) by Superlogical | Terminal and multiplexer; hosts the agent and the review split | 
| [terminal-browser](https://terminal-browser.com) ([GitHub](https://github.com/zenbu-labs/terminal-browser) ) by Zenbu Labs | Chromium rendered inside a terminal pane | 
| `plannotator-rex-browser` (this gist) | Decides where the review page opens | 

```
┌──────────────────────┐                        ┌────────────────────────────────┐
│ Agent                │  1. /plannotator-last  │ Plannotator plugin             │
│ e.g. Claude Code     │───────────────────────►│ + review server                │
│ in a Rex pane        │◄───────────────────────│ (localhost)                    │
│                      │  5. feedback in chat   │                                │
└──────────────────────┘                        └────┬───────────────────────┴───┘
                                                     │ 2. runs               ▲
                                                     │ $PLANNOTATOR_BROWSER  │
                                                     ▼                       │
                                                ┌──────────────────────────┐ │
                                                │ plannotator-rex-browser  │ │ 4.
                                                │ (this gist)              │ │ Send
                                                └────┬─────────────────────┘ │
                                                     │ 3. rex split          │
                                                     │ -b $REX_BLOCK         │
                                                     ▼                       │
                                                ┌────────────────────────────┴───┐
                                                │ terminal-browser               │
                                                │ split next to the agent        │
                                                │ you annotate, press Send       │
                                                └────────────────────────────────┘
```

The result in Rex:

```
┌─────────────── Rex window ───────────────┐
│ agent pane         │ terminal-browser    │
│ (e.g. Claude Code) │ Plannotator review  │
└────────────────────┴─────────────────────┘
```

Rex sets `REX_BLOCK` in every pane, so the split opens next to the agent that asked, and focus stays there. The page sends your feedback to the review server directly; Plannotator's auto-close after Send closes the page, and with it the split.

Where the page opens:

| Where it runs | What it does | 
|---|---|
| In Rex, with terminal-browser installed | Split to the right of the agent's pane | 
| In Rex on a remote host, without terminal-browser | `rex open` : the Rex app forwards the port and opens the review in your local default browser | 
| Outside Rex | System browser ( `open` on macOS,`xdg-open` on Linux) | 

```
mkdir -p ~/.local/bin
curl -fsSLo ~/.local/bin/plannotator-rex-browser https://gist.githubusercontent.com/iliferov/bd6e55a4ee3c48ad4ac0bd5f8e130f2f/raw/plannotator-rex-browser
chmod +x ~/.local/bin/plannotator-rex-browser
```

Read the script before you run it; it is about 30 lines.

Then set the variable once for every shell, so every agent picks it up:

```
# zsh: ~/.zshenv   ·   bash: ~/.profile
export PLANNOTATOR_BROWSER="$HOME/.local/bin/plannotator-rex-browser"
```

Restart your agent from a new shell, then start a review, for example `/plannotator-last` in Claude Code.
