From aaedff20a96d76c1a97f4d3266f6d644aa1d8221 Mon Sep 17 00:00:00 2001 From: atlas Date: Mon, 21 Sep 2026 17:07:07 +0200 Subject: [PATCH] agent-modules/mcp: give subagent daemon a longer default bash timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A subagent's backgrounded bash child is reaped along with the rest of its process tree at turn end, which silently orphans anything still running past the CLI's default 2-minute timeout — the run reports normally but the log file is empty or truncated. Raise the default on hive-subagent-daemon's own unit rather than in managed-settings, since managed-settings is also read by the main agent's session and the operator's ruling is explicit that the main agent's environment stays as is. --- nix/agent-modules/mcp.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nix/agent-modules/mcp.nix b/nix/agent-modules/mcp.nix index 094ec4ec..83ab96b9 100644 --- a/nix/agent-modules/mcp.nix +++ b/nix/agent-modules/mcp.nix @@ -408,6 +408,15 @@ in # HYPERHIVE_HARNESS_DIR / HYPERHIVE_STATE_DIR: see # `hive-bash-daemon`'s own comment above — same global injection, # same reasoning. + # A subagent's backgrounded bash child is reaped with the rest of + # its process tree at turn end, which orphans anything still + # running past the CLI's default 2-minute timeout with a silent + # truncated/empty log rather than a reported failure. Raising the + # default here (not in managed-settings, which the main agent's + # session also reads) scopes the longer timeout to subagent turns + # only — the operator's ruling was explicit that the main agent's + # environment stays as is. + BASH_DEFAULT_TIMEOUT_MS = "1800000"; # 30 minutes }; serviceConfig = { ExecStart = "${config.services.hyperhive.agent.packages.hive-subagent-daemon}/bin/hive-subagent-daemon --http 127.0.0.1:${toString config.services.hyperhive.agent.mcp.subagentHttpPort}";