<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dot.git/skills/pi-subagent, branch master</title>
<subtitle>Shell, editor and terminal configuration, and the tools that go with them
</subtitle>
<id>https://git.soarez.net/sz/dot.git/atom?h=master</id>
<link rel='self' href='https://git.soarez.net/sz/dot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.soarez.net/sz/dot.git/'/>
<updated>2026-10-27T09:36:43+00:00</updated>
<entry>
<title>sz-final-review-loop: wait with a wake armed, not blocked in sz-wait-for</title>
<updated>2026-10-27T09:36:43+00:00</updated>
<author>
<name>Igor Soarez</name>
<email>igor@soarez.org</email>
</author>
<published>2026-10-27T09:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.soarez.net/sz/dot.git/commit/?id=b5100c2e088ef5c966b114f968847de779ed852f'/>
<id>urn:sha1:b5100c2e088ef5c966b114f968847de779ed852f</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>pi alarm: fire when a command exits or when processes exit</title>
<updated>2026-10-27T09:12:21+00:00</updated>
<author>
<name>Igor Soarez</name>
<email>igor@soarez.org</email>
</author>
<published>2026-10-27T09:12:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.soarez.net/sz/dot.git/commit/?id=11adcd3f5c6b2d60578096b039426ab21d171bda'/>
<id>urn:sha1:11adcd3f5c6b2d60578096b039426ab21d171bda</id>
<content type='text'>
when_done runs a command (bash -c, in pi's cwd, output to a log file) and
fires when it exits, with its exit status; cancelling the alarm or ending
the session stops it. when_exits polls PIDs already running and fires once
all are gone. Either takes an optional deadline, 24 hours by default, at
which the alarm fires anyway and a still-running command is stopped.

A process exiting is a signal any condition can be turned into -- gh run
watch, sz-wait-for, an until-curl loop -- so the agent can start something
long, end its turn and be woken, instead of blocking on it. The delivery
path is the existing one, unchanged.

pi-subagent: §5 sets an alarm on the runs' PIDs instead of waiting.
</content>
</entry>
<entry>
<title>pi-subagent: opt-in sessions, to follow up, resume after a timeout, or fork</title>
<updated>2026-10-21T11:39:32+00:00</updated>
<author>
<name>Igor Soarez</name>
<email>igor@soarez.org</email>
</author>
<published>2026-10-21T11:39:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.soarez.net/sz/dot.git/commit/?id=9faef45275e9ab24e10bfed878f6890ba76a1bb0'/>
<id>urn:sha1:9faef45275e9ab24e10bfed878f6890ba76a1bb0</id>
<content type='text'>
run-agent.sh still runs with --no-session by default. --session saves the
run as session &lt;name&gt; under &lt;workdir&gt;/sessions/; --followup TEXT sends the
next message in it, from any provider and model; --fork FROM starts &lt;name&gt;
as a copy of FROM. A follow-up or fork inherits --tools, --thinking, --cwd
and --context-files, so a read-only subagent stays read-only, and the
earlier round's files move to &lt;name&gt;.round&lt;N&gt;.*.

Sessions are opened by file path: by id, pi looks only among sessions
started in the current directory and otherwise silently creates an empty
one, exit 0. A fresh retry moves the old session aside, since pi would
resume it given the same id.

pi-review-panel launches members with --session, so a contradiction can be
put to both reviewers before it is settled; verdicts are still tallied from
the original reviews.

From dot request 20261021-123436-work-laptop-d0adf2.
</content>
</entry>
<entry>
<title>skills: pi-subagent, extracted from pi-review-panel, which now runs on it</title>
<updated>2026-10-21T11:23:28+00:00</updated>
<author>
<name>Igor Soarez</name>
<email>igor@soarez.org</email>
</author>
<published>2026-10-21T11:23:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.soarez.net/sz/dot.git/commit/?id=32123f167dd5a7cdcbdaf6e5c144f40654d236fc'/>
<id>urn:sha1:32123f167dd5a7cdcbdaf6e5c144f40654d236fc</id>
<content type='text'>
The panel's mechanics -- headless pi runs that don't hang, answer
extraction, billed cost, retries, verifying what comes back -- are not
review-specific. pi-subagent covers one delegated task, one brief fanned out
to several models, or a job split into parallel parts; pi-review-panel keeps
only what a review adds.

run-agent.sh replaces run-member.sh and fixes what it got wrong:

- `timeout` is not on a Mac without coreutils, which failed every member
  with exit 127; it falls back to gtimeout, then perl's alarm (142 -&gt; 124).
- pi exits 0 when the provider refuses the request, or the answer is empty;
  both are now exit 1, with stopReason and error in the cost file.
- a retry moves the earlier attempt to &lt;name&gt;.attempt&lt;N&gt;.* instead of
  overwriting its cost file.

New options: --tools (an allowlist; read,grep,find,ls is read-only by
construction), --cwd, --context-files, --brief, --deliver. status.sh
replaces the `pgrep -f run-member.sh` loop, which counted every panel on the
machine, and prints the cost table.

From dot request 20261021-114826-work-laptop-2b868c.
</content>
</entry>
</feed>
