From 0951d909c9c3bf037f7b2b84c257c2b4e6b4844c Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 2 Nov 2026 04:47:16 -0800 Subject: [PATCH] docs(agents): the bracket trick for a pkill pattern that must be named MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing rule says don't `pkill -f` a pattern your own command line carries, and to prefer `pkill -x` — but a remote one-shot often has to name the pattern, and hitting it again today cost a silent `ssh` exit 255 with zero output, which reads like a network fault. Record the escape (`"serve[-]script.sh"`), the zsh glob-expansion trap that makes an unquoted `[s]` a no-op, and the exit-code signature. --- AGENTS.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index ffc5ae1..fad25dd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -735,7 +735,12 @@ linked runbooks. **Ops** - Never `pkill -f` a pattern that appears in your own command line — it kills your ssh session. - Use `pkill -x `. + Use `pkill -x `, or the bracket trick — `pkill -f "serve[-]script.sh"` — + when the pattern has to be named: the bracket makes the pattern stop matching the + command line that carries it. Quote it: a zsh remote glob-expands an unquoted `[s]` + and the kill silently never runs. Re-hit 2026-11-02 — + `ssh host 'pkill -f jfshowswatch.py; …'` killed the remote shell mid-command, and + ssh exits **255 with zero output**, which reads exactly like a network fault. - Both hosts allow passwordless sudo for the deploy user. Use plain `sudo` in committed scripts (no `echo pw | sudo -S`); `FRANK_SUDO_PW` covers hosts without it. - **ComfyUI on Dankclaw runs with GPU access** (`/dev/kfd` + `/dev/dri` via `AddDevice`,