Plugin launchers open the review in Ghostty.app when the agent runs in Herdr.app
Problem
I run Claude Code inside Herdr.app, a native macOS window for terminals and agents. It is a different product from herdr, the terminal multiplexer that the launchers already support.
When the agent starts a review with the revdiff plugin, the review does not open in Herdr.app. It opens as a split in the front Ghostty.app window. I have to switch to another application to review, and then switch back to the agent. Without Ghostty.app installed, the launch fails.
Why it happens
Herdr.app embeds libghostty, so it sets TERM_PROGRAM=ghostty. It does not set HERDR_ENV. So the launchers skip the herdr branch and take the Ghostty branch, which sends AppleScript to Ghostty.app.
Herdr.app sets these variables in each terminal:
HC_TERMINAL_ID(for examplet9c),HC_TERMINAL_SOCKET,HC_SCOPETERM_PROGRAM=ghostty__CFBundleIdentifier=dev.herdr.app
Proposed approach
Add a Herdr.app branch to all three launchers (launch-revdiff.sh for Claude and Codex, and launch-plan-review.sh). Put it directly before the Ghostty branch and detect Herdr.app by HC_TERMINAL_ID.
Herdr.app has two CLIs:
hcruns programs in persistent terminals.hc run --bgstarts revdiff in a hidden terminal.herdr-appcontrols the window.herdr-app do terminal.peek --terminal <address>shows that terminal as an overlay. The overlay takes focus and closes when revdiff exits.
The launcher then waits for the sentinel, as the other backends do.
Some details:
- If
HC_TERMINAL_IDis set buthcorherdr-appis missing, the launcher exits 1. It does not fall through to Ghostty. - If the review was never shown (peek failed or the launcher was killed first), the launcher stops it with
hc killandhc rm. - If the user hides the overlay, the review keeps running. The user can reopen it from the Agents list in the sidebar.
Environment
- macOS 27.2 (Apple Silicon)
- Herdr.app 0.1.14,
hc0.1.19 - revdiff v1.15.0, Claude plugin 0.8.26
Implementation
I have an implementation with tests and docs in my fork: https://github.com/besolov/revdiff/tree/rbesolov/herdr-app-overlay-support
I tried it in Herdr.app and it works: the review opens as an overlay over the agent's tab, and the annotations come back to the agent when I quit revdiff.
If this approach fits the project, I can open a PR. I am open to questions and happy to change the approach.
the approach fits. Pls open the PR from rbesolov/herdr-app-overlay-support, we can sort out the details in the review.