diff --git a/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix b/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix index 53df1de..9972d2e 100644 --- a/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix +++ b/nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix @@ -169,9 +169,15 @@ SSHCFG # Append one line to REBOOTS.md per genuine reboot (boot_id-gated; not on manual restart). ExecStartPre = "${pkgs.bash}/bin/bash /srv/cc-ci/cc-ci-plan/reboot-log.sh"; }; - environment = { RESUME_PHASE = "1"; HOME = "/home/loops"; }; + # CLAUDE_BIN points at the standalone CLI installed by claude-install.service; the loops + # backend defaults to claude (persisted in .loop-backend). Without this, launch.py's preflight + # `which(claude)` fails because the systemd `path` below has no /home/loops/.local/bin. + environment = { RESUME_PHASE = "1"; HOME = "/home/loops"; CLAUDE_BIN = "/home/loops/.local/bin/claude"; }; path = [ pkgs.bash pkgs.tmux pkgs.git pkgs.python3 pkgs.openssh pkgs.nettools ]; script = '' + # Put the standalone claude/opencode binaries on PATH. On a cold boot this is the env the + # tmux server (and thus every agent session) inherits, so bare `claude` resolves everywhere. + export PATH="/home/loops/.local/bin:$PATH" [ -x /srv/cc-ci/cc-ci-plan/launch.sh ] && /srv/cc-ci/cc-ci-plan/launch.sh start || \ echo "workspace not staged yet — skipping loop start" '';