subagent: close the start/continue TOCTOU race with an atomic reservation

This commit is contained in:
damocles 2026-09-09 19:49:19 +02:00
commit 561bd09618
3 changed files with 181 additions and 35 deletions

View file

@ -339,9 +339,9 @@ in
serviceConfig = {
ExecStart = "${config.hyperhive.packages.hive-subagent-daemon}/bin/hive-subagent-daemon --http 127.0.0.1:${toString config.hyperhive.mcp.subagentHttpPort}";
SyslogIdentifier = "hive-subagent-daemon";
# `always`, same reasoning as `hive-bash-daemon`: the MCP tool is
# `always`, same reasoning as `hive-bash-daemon`: the MCP tools are
# served in-process, so a down window is total loss of
# `spawn_subagent` with no stdio fallback.
# `start`/`continue`/`status`/`interrupt` with no stdio fallback.
Restart = "always";
RestartSec = 3;
User = userName;