From b5100c2e088ef5c966b114f968847de779ed852f Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Tue, 27 Oct 2026 11:36:43 +0200 Subject: sz-final-review-loop: wait with a wake armed, not blocked in sz-wait-for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The loop's agents blocked in a foreground sz-wait-for because nothing could bring an agent back from a background one. Both harnesses now can: pi's alarm fires when a when_done command exits, and Claude Code starts a new turn when a run_in_background Bash task exits (checked on 2.1.310). So an agent arms sz-wait-for as a wake and ends its turn: no context resent every 30 minutes to re-arm, the human can talk to it while it waits, and "arm, then signal" becomes literal. The foreground wait stays for a harness with neither. The invariant is unchanged in substance: never idle, where idle now means the other side's turn with no wake armed. sz-wait-for stays the watcher, for its settle window. pi-subagent: ยง5 says how to be woken in Claude Code too. --- skills/pi-subagent/SKILL.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'skills/pi-subagent/SKILL.md') diff --git a/skills/pi-subagent/SKILL.md b/skills/pi-subagent/SKILL.md index 06862c0..9245b0e 100644 --- a/skills/pi-subagent/SKILL.md +++ b/skills/pi-subagent/SKILL.md @@ -173,7 +173,10 @@ alarm action=set when_exits=[] in_minutes= alarm for all is the point. - The alarm sees no exit status. `status.sh` has it. - The deadline is a backstop, in case a run hangs past its own timeout. -- Without the `alarm` tool (print or RPC mode), monitor with `status.sh`. +- In Claude Code, which has no `alarm` but wakes you when a background Bash + task exits: launch the whole job as one `run_in_background` command that + starts the runs with `&` and ends with `wait`, and end your turn. +- Without either (pi in print or RPC mode), monitor with `status.sh`. **Don't sit on the wait loop.** With an alarm set, there's nothing to wait for. Otherwise, launching early is only worth it if you use the time: do your -- cgit v1.2.3