Skip to content

Known ACP agents on the login-shell PATH (e.g. Hermes) are not detected under launchd/systemd #1388

Closed

Description

@Willhong

Summary

Known ACP agents whose CLI is installed only on the user's login-shell PATH (not the daemon's process PATH) are never detected, so they don't appear as providers. This happens because the known_acp_agents.status host-daemon handler queries which <executable> with the daemon's process environment instead of the resolved user shell environment that the sibling provider_cli.status handler already uses.

Workflow / what I was trying to do

Run Hermes Agent (hermes acp) as an ACP provider in bb. Per the provider guide, "Hermes' hermes CLI on PATH appears as provider acp-hermes-agent." The hermes CLI is installed at ~/.local/bin/hermes (on the login-shell PATH).

What happened

  • acp-hermes-agent never appeared as an available provider.
  • codex and claude-code detection on the same host worked fine.

What I expected

hermes on the login-shell PATH should be detected and surfaced as acp-hermes-agent, the same way codex/claude are.

Misdiagnosis trap (worth writing down)

This looks like "the CLI isn't installed" or "PATH is just wrong" — but it is neither. The decisive tell is that codex/claude are detected while the ACP agent is not, on the same machine. That asymmetry rules out a global PATH problem and points at a per-handler difference.

The daemon is launched by launchd (macOS) / systemd (Linux), which gives it a stripped PATH that does not include ~/.local/bin. bb already solves this elsewhere by resolving the user's real login-shell PATH (resolveUserShellPath → /bin/zsh -ilc env) and feeding it to provider-CLI health checks. The ACP-agent status handler simply doesn't pass that env through.

Concrete on my host:

# daemon (launchd) process PATH — no ~/.local/bin
$ which hermes            # from that env → exit 1 (not found)

# resolved login shell PATH — has ~/.local/bin
$ /bin/zsh -ilc 'which hermes'
/Users/…/.local/bin/hermes

Root cause

apps/host-daemon/src/command-dispatch.ts, onlineRpcHandlers:

"known_acp_agents.status": async (command) =>
  getKnownAcpAgentsStatus({ agents: command.agents }),

getKnownAcpAgentsStatus defaults its runner to createSpawnProviderCliCommandRunner(env = process.env), so with no env it runs which against the daemon's stripped process PATH. The very next handler does it correctly:

"provider_cli.status": async (_command, options) =>
  getProviderCliStatus({
    env: providerCliEnvFromShellEnv(options.runtimeManager.getShellEnv()),
  }),

So codex/claude (via provider_cli.status) see the real user PATH; known ACP agents (via known_acp_agents.status) do not.

Fix

Pass the resolved shell env into the ACP-agents status handler, matching provider_cli.status:

"known_acp_agents.status": async (command, options) =>
  getKnownAcpAgentsStatus({
    agents: command.agents,
    env: providerCliEnvFromShellEnv(options.runtimeManager.getShellEnv()),
  }),

getKnownAcpAgentsStatus already accepts an optional env — this just wires it up. PR: fixes this with a regression test.

Risk

Low, and strictly a widening: previously the handler could only see the daemon's process PATH; now it additionally sees whatever is on the resolved user shell PATH, exactly like the provider-CLI checks already do.

Activity

  1. added theissue type on Aug 12, 2026
  2. self-assigned this
    on Aug 13, 2026
  3. added a commit that references this issue on Aug 13, 2026
    b3b5f87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions