agent-modules: hand an api-key agent's subagent daemon the backend file
A claude agent with useApiKey gets ANTHROPIC_API_KEY through backendEnvironmentFile, but only the harness unit loaded that file; hive-subagent-daemon loaded it for ACP agents alone. The daemon's nested claude inherits the daemon's environment (hive-claude adds to it, never clears it), and an api-key agent has no OAuth session in ~/.claude, so its claude subagents started with no credentials. hive-subagent-daemon now loads backendEnvironmentFile when the agent is ACP (unchanged) or has useApiKey set. Module-eval covers the api-key claude arm; the existing claude arm (file set, useApiKey unset) still asserts no EnvironmentFile. Closes #5088
This commit is contained in:
parent
4edf965f05
commit
a5448c81c4
4 changed files with 25 additions and 7 deletions
|
|
@ -209,7 +209,9 @@ in
|
|||
before creating the file, or a fresh host rebuild before state is
|
||||
restored — makes systemd skip it rather than refuse to start the
|
||||
harness. See `services.hyperhive.agent.useApiKey`'s doc for the option this one is
|
||||
paired with.
|
||||
paired with. The subagent daemon loads the same file on an ACP agent
|
||||
and on an agent with `useApiKey` set, so its subagents authenticate
|
||||
the same way the harness does.
|
||||
|
||||
On an ACP agent using the `opencode` preset, a provider key this file
|
||||
leaves unset is read from the swarm secret store at
|
||||
|
|
|
|||
Loading…
Reference in a new issue