From b3066893bf14622f716f8ca5d6def845cd76e56f Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sat, 11 Jul 2026 20:47:49 +0900 Subject: Fix ExecStop failure when tmux session has already exited The `-` prefix tells systemd to ignore the exit code of tmux kill-session, so restart succeeds even when the claude process has crashed and the session no longer exists. Co-Authored-By: Claude Sonnet 4.6 --- claude/systemd/claude-code@.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'claude') diff --git a/claude/systemd/claude-code@.service b/claude/systemd/claude-code@.service index e3983b6..e85507e 100644 --- a/claude/systemd/claude-code@.service +++ b/claude/systemd/claude-code@.service @@ -7,7 +7,7 @@ Type=oneshot RemainAfterExit=yes WorkingDirectory=/home/yyamashita/workspaces/repos/%i ExecStart=/usr/bin/tmux new-session -d -s claude-%i -c /home/yyamashita/workspaces/repos/%i /usr/local/bin/claude --remote-control %i --dangerously-skip-permissions -ExecStop=/usr/bin/tmux kill-session -t claude-%i +ExecStop=-/usr/bin/tmux kill-session -t claude-%i Environment=HOME=/home/yyamashita Environment=USER=yyamashita Environment=XDG_RUNTIME_DIR=/run/user/1000 -- cgit v1.2.3