Key loop-claude's session per slot, so two loops of one project run side by side

This commit is contained in:
2026-11-15 14:09:55 +01:00
parent 510df4b31d
commit cbf007f68c
10 changed files with 111 additions and 11 deletions
+7 -3
View File
@@ -43,8 +43,11 @@ what it prints in the first prompt (prompts.preflight_facts in bin/loop_claude/c
chunk-preflight --help says what it finds and makes. A preflight that fails, or is still running
after 600 s and is stopped, leaves the worker to find the facts itself.
Each project has one session, named "A <key> loop-claude", where <key> is the checkout's path
relative to ~/code, or to / outside it. The session is deleted when its chunk finishes. At every
Each loop runs one chunk at a time, in a session named "A <key> loop-claude", where <key> is the
checkout's path relative to ~/code, or to / outside it. Loops of one project run side by side: each
holds the lowest slot no other holds, a file locked under ~/.local/state/loop-claude/<key>/, and
from the second slot on the session's name ends in the slot's number, as "A <key> loop-claude 2".
The session is deleted when its chunk finishes. At every
interrupt, and as every cycle ends, Ctrl-C and a failure included, the session's transcript is
copied into a folder per chunk under $LOOP_CLAUDE_TRANSCRIPTS/<key> (default root
~/.claude/loop-claude-transcripts), named by its hash, with an outcomes file beside it: the task,
@@ -95,6 +98,7 @@ loop-claude --help succeeds: the loop reloads into the edited script.
Exit 1, saying why, when:
- no task is given
- git cannot start or finds no checkout
- its slot in the project cannot be taken
- the goals file, or AGENTS.md, docs/decisions.md, ~/.claude/CLAUDE.md, ~/.claude/rules/*.md or
the project's review standards where they exist, cannot be read or is not UTF-8
- no config names the checkout, its config cannot be read, or the goals file holds no premises
@@ -123,4 +127,4 @@ Exit 2, when the human is needed to go on:
- the claude opened for /talk, or for a release ready to cut, ends without
anything typed
- the judge rules a chunk unfinished 6 cycles running; rerun to give it 6 more
Rerunning resumes any open session."""
Rerunning resumes the open session of the slot the rerun takes."""