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
{{ message }}
Repository navigation
Deliver feedback to agents in Rex, or through a pluggable delivery command #136
Problem
plannotator-tui can deliver feedback only to an agent in Herdr (herdr agent prompt) or to the clipboard. Rex is another terminal multiplexer built for coding agents, and it has everything the Herdr integration uses. Its rex CLI can:
open a split or popup pane running a command;
report what a pane runs: rex block call -b BLOCK process (foreground pid, name, cwd) and program_status (the app, such as pi, and the state idle / working / blocked / done / error);
read a pane's output: rex capture -b BLOCK --trim --unwrap;
type into a pane: rex send and rex send-key.
For now I run plannotator-tui in Rex by pretending to be Herdr. A script sets HERDR_ENV=1 and points HERDR_BIN_PATH back at itself, then runs plannotator-tui herdr pane. It answers the four herdr commands the pane runs with rex:
herdr command
What the script does
agent prompt
Pastes the feedback with bracketed paste and presses Enter. Returns agent_blocked while the program status is blocked.
pane get
Reports the app from the program status, or the name of the foreground process.
pane read
Reads the pane's output with rex capture.
agent read
Same as pane read.
This works well: Send, Approve and the agent label all behave as they do in Herdr. But it depends on HerdrEnv and the herdr arguments, which are internal and could change in any release.
Checked against plannotator-tui 0.9.9.
Proposal, in order of preference:
A delivery target that isn't tied to one multiplexer. For example, PLANNOTATOR_TUI_DELIVER_CMD: a program that gets the feedback on stdin and reports blocked or unavailable through its exit code, or the same JSON envelope parse_response already reads. Herdr, Rex, tmux and others could each plug in a one-line script, and Delivery stays the only seam.
Built-in Rex support in the style of herdr: a RexAgent delivery through rex send / rex send-key, plus plannotator-tui rex open|last|terminal launchers driven by REX_BLOCK.
At least make the herdr contract public. Document the commands and JSON shapes the pane expects from HERDR_BIN_PATH, so a shim like mine doesn't break unnoticed.
I'm happy to send a PR for whichever option you prefer.
Thanks for the detailed write-up and the shim. #127 adds built-in Rex support (plannotator-tui rex open|last|terminal), which is your option 2, and should land soon. It currently sees Node agents like pi as node; a follow-up will read Rex's program_status app so pi gets Send. A pluggable PLANNOTATOR_TUI_DELIVER_CMD (your option 1) is welcome as a separate PR if you'd still like it.
Thanks again for the write-up, @ian-pascoe. Your option 1 is in #151 (merged), alongside the built-in Rex (#127, #140) and herdr-core (#129) hosts.
Setting it:PLANNOTATOR_TUI_DELIVER_CMD, or [deliver] command in the config. The env var wins over the config.
How it runs:sh -c on unix, cmd /S /C on Windows, so pipelines work. The feedback is on stdin, and PLANNOTATOR_TUI_REVIEW_PATH names the file or folder under review.
Exit codes:0 delivered (the first stdout line joins the status), 75 blocked (copies; E retries), 69 unavailable (copies), anything else failed with stderr. The review stops the command after 30 s.
Where it sits: a target a Herdr, Rex or hc launcher named for the review comes first; the command replaces the clipboard everywhere else. The header shows it as cmd · <program>.
Pi:plannotator-tui pi send --session <id> works as the command.
Details are in the README under "Any other agent: a delivery command".
Activity
backnotprop commentedon Nov 10, 2026
Thanks for the detailed write-up and the shim. #127 adds built-in Rex support (
plannotator-tui rex open|last|terminal), which is your option 2, and should land soon. It currently sees Node agents like pi asnode; a follow-up will read Rex'sprogram_statusapp so pi gets Send. A pluggablePLANNOTATOR_TUI_DELIVER_CMD(your option 1) is welcome as a separate PR if you'd still like it.backnotprop commentedon Nov 15, 2026
Thanks again for the write-up, @ian-pascoe. Your option 1 is in #151 (merged), alongside the built-in Rex (#127, #140) and herdr-core (#129) hosts.
PLANNOTATOR_TUI_DELIVER_CMD, or[deliver] commandin the config. The env var wins over the config.sh -con unix,cmd /S /Con Windows, so pipelines work. The feedback is on stdin, andPLANNOTATOR_TUI_REVIEW_PATHnames the file or folder under review.0delivered (the first stdout line joins the status),75blocked (copies;Eretries),69unavailable (copies), anything else failed with stderr. The review stops the command after 30 s.cmd · <program>.plannotator-tui pi send --session <id>works as the command.Details are in the README under "Any other agent: a delivery command".