From 2d3777a7d0746110da6a98c6ad0a6578ffe1706d Mon Sep 17 00:00:00 2001 From: Natalie Date: Tue, 2 Jun 2026 23:25:43 -0700 Subject: [PATCH] =?UTF-8?q?fix(@projects/@claire):=20=F0=9F=90=9B=20claire?= =?UTF-8?q?-agent=20KillMode=3Dprocess=20so=20redeploys=20don't=20kill=20w?= =?UTF-8?q?orkers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default control-group KillMode meant restarting claire-agent.service (every deploy) SIGTERMed the whole cgroup, silently killing the live worker claude/tmux sessions the agent had spawned (next-tour-planner lost on 2026-06-02). KillMode= process signals only `claire agent run`; panes survive and the fresh agent re-discovers them via pull. Note: takes effect from the NEXT restart (a unit's stop phase uses the KillMode it was started under). Co-Authored-By: Claude Opus 4.8 (1M context) --- deployments/systemd/claire-agent.service | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deployments/systemd/claire-agent.service b/deployments/systemd/claire-agent.service index 52d1374..4eb2164 100644 --- a/deployments/systemd/claire-agent.service +++ b/deployments/systemd/claire-agent.service @@ -8,6 +8,13 @@ Wants=network-online.target [Service] Type=simple +# KillMode=process (NOT the default control-group): restarting this unit on a +# redeploy must NOT tear down the worker claude/tmux sessions the agent spawned +# into its cgroup. control-group SIGTERMs the whole tree, silently killing live +# dispatched workers on every deploy (the next-tour-planner was lost this way on +# 2026-06-02). With process, only `claire agent run` is signalled; the panes +# survive and the fresh agent re-discovers them via the pull/liveness pass. +KillMode=process # rclaude (session-tools) lives in ~/.local/bin (+ pnpm global). systemd --user # starts with a minimal PATH, so the supervisor couldn't find rclaude — add the # user bin dirs. (Where rclaude is absent, the supervisor self-disables.)