From ed849096a69f892c36bf615452abac6750a73289 Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Mon, 1 Jun 2026 21:46:29 +0000 Subject: [PATCH] fix(nix): put claude on the cc-ci-loops service PATH so loops start on boot The service path lacked /home/loops/.local/bin, so launch.py preflight's which(claude) failed on every boot and the loops never auto-started (they were restarted by hand). Set CLAUDE_BIN to the standalone CLI's absolute path and prepend the dir to PATH so the tmux server every agent session inherits resolves bare claude. Co-Authored-By: Claude Opus 4.8 --- nix/hosts/cc-ci-orchestrator-hetzner/configuration.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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" '';