umputun / umputun/revdiff

pi extension: herdr never shows the agent as blocked while a revdiff review is open

Open
#318 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
881
Forks
90
Avg merge
14h 29m
Merged PRs (30d)
21

Description

Current behavior

With the pi plugin, revdiff_review runs revdiff in-place: runDirectReview in plugins/pi/extensions/revdiff.ts does spawnSync(revdiffBin, ..., { stdio: "inherit" }), so pi is suspended inside the tool call while the user reviews. To anything supervising the agent from outside, the session looks busy rather than waiting on the user.

Concrete case: herdr gets omp/pi lifecycle state from its installed hook integration (which disables herdr's screen-scraping fallback for the pane). The integration reports working for the entire review, because a parked tool call is indistinguishable from active work. Result: no blocked state in the sidebar, no notification, and herdr agent wait <pane> --until blocked never fires — easy to miss that the agent is waiting.

The standalone launcher scripts already integrate with herdr for tab placement (the HERDR_ENV branch in launch-revdiff.sh), so herdr awareness exists in the project; only the pi in-place path lacks any state signal.

Expected behavior

While the revdiff UI owns the terminal, the supervising integration should see the session as blocked/waiting-for-user.

Reproduction

  1. herdr integration install omp, start omp (TUI) inside a herdr pane.
  2. /revdiff (or let the agent call revdiff_review).
  3. While the review UI is open: herdr agent listagent_status: working until revdiff exits.

Proposed fix

herdr's omp/pi integration listens on pi's shared extension event bus for a herdr:blocked channel. Emitting around the review run is enough:

pi.events.emit("herdr:blocked", { active: true, label: `revdiff review: ${launch.label}` });
try {
  result = await runDirectReview(ctx, launch, cwd);
} finally {
  pi.events.emit("herdr:blocked", { active: false });
}

EventBus.emit with no listener is a no-op, so this is free for non-herdr users and needs no HERDR_ENV gate. PR with this change: #319.

Environment

  • revdiff-pi 0.4.1, omp 17.3.5, herdr 0.8.0 (omp integration v6), macOS arm64

(Disclosure: drafted by an AI coding agent on behalf of the human reporter, who reviewed and approved this text before it was posted.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in plugins/pi/extensions/revdiff.ts at runDirectReview and inspect the pi extension event bus used by the herdr integration. Verify the review lifecycle reports a blocked state while the revdiff UI is open and clears it when the review exits, including error or cancellation paths; PR #319 already contains the proposed change.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.