Repository navigation
Conversation
|
Action required: PR inactive for 5 days. |
bugakov
force-pushed
the
feat/herdr-integration-upstream
branch
from
October 10, 2026 10:13
c0be8f7 to
0afd6d4
Compare
bugakov
force-pushed
the
feat/herdr-integration-upstream
branch
from
October 15, 2026 11:32
54cc575 to
973f8af
Compare
Adds a HerdrReporter hook that pushes forge state into the herdr agent pane via `herdr pane report-agent` whenever the process is running inside a herdr environment ($HERDR_ENV=1): - Start -> working - Response -> idle - ToolcallStart -> working (with tool name) - process exit -> release-agent The reporter is a no-op outside herdr (no active runner, no herdr env), so impact on plain terminal usage is zero. This is the official "add Herdr support to your agent" integration path and requires no herdr binary changes; on the herdr side it enables agent detection, sidebar presence, `herdr agent wait`, notifications and session resume.
bugakov
force-pushed
the
feat/herdr-integration-upstream
branch
2 times, most recently
from
October 15, 2026 15:46
7adcdbe to
66c2b39
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While running forge inside Herdr, I noticed there's no way
for Herdr to know when forge is working, idle, or needs input. Herdr documents
a first-party integration path for exactly this — "Add Herdr support to your
agent" (
herdr pane report-agent) — so I implemented it for forge.The change is fully opt-in and a strict no-op outside Herdr; it cannot
affect normal terminal usage.
How it works
When forge runs inside a Herdr pane it inherits
HERDR_ENV,HERDR_PANE_ID,HERDR_BIN_PATHandHERDR_SOCKET_PATH. A small reporter hooked into forge'sexisting lifecycle events turns those into state reports:
Startworking(+ resume argv)ResponseidleToolcallStartworking(with tool name)release-agentReports are fire-and-forget (background spawn, short timeout, errors ignored),
so Herdr can never slow forge down.
seqis epoch-milliseconds as Herdrrecommends. On the Herdr side this enables: showing forge in the sidebar,
herdr agent wait, completion notifications, and restoring the same sessionafter a server restart.
Files
crates/forge_app/src/hooks/herdr.rs(new)crates/forge_app/src/hooks/mod.rscrates/forge_app/src/app.rscrates/forge_app/src/lib.rscrates/forge_main/src/main.rsNo new dependencies. Verified against Herdr 0.9.3 (local server).
Happy to adjust anything (naming, placement, or wiring) to fit your
conventions. Thanks for the great tool!