Repository navigation
Description
Summary
Every Hermes profile connected to Buzz Desktop as a custom ACP harness (hermes -p <profile> acp) can still receive Buzz messages, but no longer replies in the channel or DM. The agent writes a reply, runs buzz messages send as the Buzz base prompt instructs, and the CLI fails:
{"error":"auth_error","message":"auth error: BUZZ_PRIVATE_KEY is required (use --private-key or set env var)","retryable":false}
The same setup worked until the install moved to a build with the gateway attach model. The last working build we know of is d923a5eb48. It is broken on bf0203a794.
This looks like a regression of #76243, which was fixed by #78511 / #99433. That fix passes BUZZ_* to terminal children only when _buzz_terminal_context_active() is true:
BUZZ_MANAGED_AGENTis in the process env, orHERMES_SESSION_PLATFORM == "buzz".
Under the attach model, neither condition holds in the process that actually runs the tools.
Environment
- macOS 27.0.1
- Hermes Agent:
hermes acp --version= 0.22.5, checkoutbf0203a794a07aac3ff764972ab9087baa4e4f4e(2026-10-22) - Buzz Desktop v0.5.28. The agent uses a custom harness: command
~/.hermes/hermes-agent/.hermes/bin/hermes, args-p sb-librarian acp, no extra env vars. - One host gateway (multiplexed) serves all local profiles. Hermes Desktop started it via
hermes gateway ensure.
Steps to reproduce
- In Buzz Desktop, add a custom harness that runs
hermes -p <profile> acp, and attach a Buzz agent to it. - Make sure the host Hermes gateway is already running. Opening Hermes Desktop is enough.
- @mention the agent in a Buzz channel or DM.
Expected
The agent's terminal tool gets the harness-provided BUZZ_PRIVATE_KEY / BUZZ_RELAY_URL / BUZZ_AUTH_TAG, so buzz messages send succeeds. This is the behaviour #99433 restored.
Actual
- The prompt arrives and the turn runs. The gateway log shows
gateway.run: inbound message: platform=local ...andagent.turn_context: ... platform=acp. - In the agent's terminal tool,
env | grep '^BUZZ'returns nothing. buzz messages sendexits with code 3 (auth_error), so the reply never reaches Buzz.
Timeline on the affected host
- 2026-10-16 12:07: Hermes checked out at
d923a5eb48. - 2026-10-16 12:22: last successful Buzz reply. The session store records it as source
acp(in-process).buzz messages sendreturned"accepted":true. - 2026-10-25 10:12: Hermes checked out at
bf0203a794. - 2026-10-25 10:13: Hermes Desktop starts the host gateway.
- 2026-10-25 13:45 onward: every Buzz turn is stored as source
local(routed through the gateway) and every send fails withauth_error. Seen on two profiles so far (sb-librarian,profile-b); the owner reports that every Buzz-connected profile has stopped replying. - The OS upgrade to macOS 27.0.1 on 2026-10-09 is not the cause: replies were still succeeding on 2026-10-16.
Evidence (names only, no values)
ps ewwon the Buzzbuzz-acpprocesses showsBUZZ_PRIVATE_KEY,BUZZ_RELAY_URL,BUZZ_AUTH_TAGandBUZZ_MANAGED_AGENTall present. Buzz hands them over as designed.- The host gateway process (started by Hermes Desktop via osascript →
hermes ... gateway run --external-supervisor) has noBUZZ_*variables. acp_adapter/gateway_server.py: "ACP projection of the profile gateway; never constructs an execution owner."acp_adapter/entry.py: "MCP discovery and execution belong to the gateway daemon; this process is a viewer." Tools run in the gateway, not in the process the harness spawned.- In
tools/environments/local_env_policy.py,_buzz_terminal_context_active()checksos.environ.get("BUZZ_MANAGED_AGENT")in the gateway process, which is false, and the session platform, which isacp/localrather thanbuzz. The carve-out therefore never activates. terminal.env_passthroughis no workaround:BUZZ_*names are refused there by design (GHSA-rhgp-j443-p4rf).
Why the obvious workarounds don't fit
gateway.standalone: trueis unlikely to help (not tested). The ACP process is still a viewer of whichever gateway is serving the profile, and that gateway gets the harness env only if the harness happened to start it. The flag is also documented as a temporary shim.- Pinning to a pre-attach-model build would likely work (not tested), but means giving up current fixes.
Suggested fix directions (for maintainers to decide)
- The ACP viewer forwards the harness-provided
BUZZ_*values (andBUZZ_MANAGED_AGENT) to the gateway as session-scoped credentials when it attaches or submits. The gateway then injects them only into that session's terminal children. This keeps the existing scope rule: no other session or profile sees them. - Alternatively, tag the session as Buzz-managed at attach time so
_buzz_terminal_context_active()is true for that session only, with the values held in a per-session secret scope rather than the gateway's process env.
Related
- Buzz Desktop managed Hermes agent wakes but cannot reply because BUZZ_PRIVATE_KEY is stripped #76243 (original issue), fix(terminal): let Buzz-managed agents inherit the BUZZ CLI credentials the harness hands them #78511, fix(terminal): Buzz agents can use the buzz CLI from the terminal — credentials pass to their children only (salvages #78065 #78511) #99433 (fix)
- [Bug] Hermes agent does not work out of the box — managed session missing BUZZ_PRIVATE_KEY and BUZZ_RELAY_URL block/buzz#3768, buzz-acp: hermes-agent ACP turns complete successfully but reply never publishes to the channel block/buzz#4923 (same symptom, reported on the Buzz side)
Activity
pmckelvy1 commentedon Nov 5, 2026
Tested this PR locally at b37af7b5b8d4e939a7cf2153a8a893106b21fd36 on Apple Silicon macOS with Hermes v0.22.7, revision b200f5b, using Docker as Hermes’s terminal backend.
Before this change, the agent received messages and generated responses, but posting failed with:
The Buzz harness and ACP client processes had the required variables, but execution was handled by a separate launchd-managed Hermes gateway without them.
With this PR’s standalone development app, I created a Hermes test agent and verified:
This fixes the authenticated DM-reply failure in my setup. It works for ordinary channel replies as well.
Thanks for addressing this. Is there anything else I can test to help get it merged?
sambilge commentedon Nov 7, 2026
Thanks for testing this. Could you share the PR or branch for commit b37af7b5…? I couldn't find it in the main repo. #144841 looks related, but its Limitations section says credential-like variables stay filtered, so it wouldn't cover BUZZ_PRIVATE_KEY.
I also re-checked on v0.23.0 (2bd378e) on macOS 27.0.1, with the gateway restarted after the update. The bug still reproduces. The turn reaches the gateway, but buzz messages send fails with auth_error: BUZZ_PRIVATE_KEY is required (exit 3). The gateway process has no BUZZ_* variables, while the buzz-acp harness processes do. I'm happy to test a build of the PR if you can point me to it.
pmckelvy1 commentedon Nov 9, 2026
Sorry for the confusion, my earlier “this PR” wording was inaccurate. The build I tested was from the Buzz-side PR block/buzz#8643 (“fix: let Hermes-backed Buzz agents send messages”), branch eatmianbao:codex/fix-buzz-hermes-messages, at b37af7b5b8d4e939a7cf2153a8a893106b21fd36.
This is not a commit in hermes-agent or a test of #144841. The Buzz fix attaches the bundled buzz-dev-mcp bridge to each Hermes ACP session with agent-scoped credentials and directs Buzz CLI commands through that session’s MCP shell, rather than passing BUZZ_PRIVATE_KEY into the shared Hermes gateway environment.
sambilge commentedon Nov 10, 2026
Thank you for clarifying. Linking for anyone hitting this:
the fix pmckelvy1 tested is Buzz-side, block/buzz#8643, which attaches buzz-dev-mcp to each Hermes ACP session instead of passing BUZZ_PRIVATE_KEY into the gateway environment. It's open and approved, pending security review and merge. This issue can stay as the Hermes-side tracker or be closed once Buzz ships it, at the maintainers' discretion.
alt-glitch commentedon Nov 10, 2026
Tracked in #134889: the shared gateway now runs the tools for an ACP harness session, and it doesn't pass the harness's Buzz credentials through, so Buzz managed agents can't send replies.