From 3bb45acd87d09a4ae0e001ad35d035090b9028d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Wed, 3 Jun 2026 20:17:09 +0200 Subject: [PATCH] fix: give hive-bash-daemon PATH so it can spawn sh + agent tooling --- nix/templates/harness-base.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index c0ae6ae9..dfbcd843 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -1147,6 +1147,18 @@ in systemd.services.hive-bash-daemon = { description = "bash task runner daemon for hive-bash-mcp"; wantedBy = [ "multi-user.target" ]; + # The daemon runs every bash task via `Command::new("sh")` and the + # commands themselves (hive-forge, git, jq, …) resolve from PATH. + # Pre-split this ran inside hive-ag3nt.service and inherited the + # agent's PATH; the standalone daemon needs the same or `sh` itself + # isn't found (spawn fails with ENOENT, the task is marked done in + # 0s with no output / no .out/.err). Mirror the harness unit's PATH: + # NixOS appends `/bin` to each entry → /run/wrappers/bin (setuid + # sudo) + /run/current-system/sw/bin (sh, coreutils, hive-forge, …). + path = [ + "/run/wrappers" + "/run/current-system/sw" + ]; environment = { HIVE_BASH_SOCKET = "/run/hive-bash/socket"; HIVE_CONTROL_SOCKET = "/run/hive/mcp.sock";