From 4a4bebf87bd7b5b05e93adcca8100396e5a36e67 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:35:39 +0200 Subject: [PATCH 1/6] Record the reading cost of the last chunk --- docs/reading-cost.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 5a4e6e54..30605c75 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -705,3 +705,11 @@ Read most (opens and searches): Read most (opens and searches): - `rules/decisions.md` 1 + +## Reading cost, chunk 14a854b3a90e, finished 2026-10-21T20:29:57Z + +54018 new input tokens before the first commit. + +Read most (opens and searches): + +- `CLAUDE.md` 1 -- 2.52.0 From 14e323ef015ae271a03cb6b9b20f2ebfa1e7a956 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:35:39 +0200 Subject: [PATCH 2/6] Start loop-claude's worker with ScheduleWakeup disallowed --- CHANGELOG.md | 1 + bin/loop_claude/cycle/worker.py | 2 ++ bin/loop_claude/test_loop_claude.py | 6 ++++++ skills/larv-review/SKILL.md | 2 +- todo.md | 5 ----- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcfa8b0a..5e7229ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- loop-claude's worker now starts with `ScheduleWakeup` disallowed. A worker that scheduled a wakeup kept `claude -p` running after its turn ended, so loop-claude neither ran the judge nor asked you, and the chunk stalled until someone killed the worker. Now a worker that ends its turn on a question exits, and the judge runs. - Every project's audience now includes the contributor, the person who reads the code to change it. A README doesn't list them; only its `**Void:** code health` line drops them. larv-review's comprehension check now measures how hard the project is for them to read. - `score-outcomes` now also measures projects that merge by rebase: each run of commits that share one commit time counts as a chunk. Add `docs/score-anchors.md` to those projects too. A chunk that was pushed or fast-forwarded may hold only part of its pull request, so the medians and rank correlations leave it out. - `settings.json` no longer carries a model: each machine keeps the one you pick with `/model`. Git's clean filter `bin/settings_filter.py` drops `"model"` and sorts the keys, so neither a pick nor Claude Code's key order can reach a commit. Update now starts with `git add settings.json`: without it, Update's `git checkout -f` drops the machine's model. On upgrade, on each machine: diff --git a/bin/loop_claude/cycle/worker.py b/bin/loop_claude/cycle/worker.py index 75867f88..6db290ec 100644 --- a/bin/loop_claude/cycle/worker.py +++ b/bin/loop_claude/cycle/worker.py @@ -47,6 +47,8 @@ def worker_args(session: Session, worker: Rung, prompt: str, resume: bool) -> li *start, "--output-format", "stream-json", "--permission-mode", "bypassPermissions", + # A pending wakeup keeps claude -p running after the turn ends, so loop-claude never sees the worker exit and the judge never runs. + "--disallowedTools", "ScheduleWakeup", "--verbose", *worker.flags(), ] diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index 7c05efaf..2c106906 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -1184,6 +1184,12 @@ class WorkerArgs(unittest.TestCase): self.assertNotIn("--session-id", resumed) self.assertTrue(resumed[resumed.index("-p") + 1].startswith("Continue the task; the previous run ended before the chunk was finished. The chunk is finished once")) + def test_disallows_a_wakeup_so_a_worker_that_ends_its_turn_exits(self): + opened = session.session_named("A proj loop-claude", pathlib.Path("/h/.claude/projects")) + for resume in (False, True): + args = worker.worker_args(opened, Rung("m"), "Do it.", resume=resume) + self.assertEqual(args[args.index("--disallowedTools") + 1], "ScheduleWakeup") + class Records(unittest.TestCase): def test_heads_each_record_by_its_name_the_humans_rules_last(self): diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 0509924c..63516131 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -5,7 +5,7 @@ description: Ship a work chunk through review to a merged PR; decisions land in # larv-review — ship the chunk, review until clean, gate green, merge -You orchestrate, fix, and ship; reviewers only report. Run every reviewer synchronously (`run_in_background: false`) and watch CI in the foreground: a headless run exits when the turn ends, and a background watcher or a scheduled wakeup dies with it. The turn runs on until §6. +You orchestrate, fix, and ship; reviewers only report. Run every reviewer synchronously (`run_in_background: false`) and watch CI in the foreground: a headless run exits when the turn ends, and a background watcher dies with it. Never schedule a wakeup: loop-claude's worker has `ScheduleWakeup` disallowed, since a pending wakeup keeps the run alive after the turn ends. The turn runs on until §6. **Forge-neutral.** Five PR operations recur below: read a PR's diff, open a draft PR, read check status, mark ready, merge. Resolve the tooling from the remote per `~/.claude/CLAUDE.md` → "Git, commits, and PRs"; on any other forge, achieve the same intents through its CLI or API — discover how rather than assuming. A forge without a native draft state gets the closest equivalent (a `WIP:`/`Draft:` title prefix); note any approximation in the summary. diff --git a/todo.md b/todo.md index 839870bf..a7e469a0 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 199 | 0.3.0 | | defect | **Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs.** | 2 | 1 | 3 | 4 | 2 | 1.5 by 6, 1.2 by 3 | 11.8 | | 170 | 0.3.0 | | decision | **Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings.** | 2 | 2 | 3 | 5 | 2 | 1.1 by 3, 1.4 by 5 | 10.9 | | 117 | 0.4.0 | | | **Give `todo_table.items` one way to say a plan has no items table, so no caller tells it from an empty plan by truthiness.** | 1 | 1 | 3 | 3 | 2 | code health by 4, 1.4 by 4 | 29.2 | | 126 | 0.4.0 | | | **State when work has landed towards a release once, in `bin/larv_review/plan.py`, and have larv-review's help point to it.** | 1 | 2 | 1 | 2 | 2 | code health by 4, 1.4 by 4 | 29.2 | @@ -89,10 +88,6 @@ ## Details -### 199. Start loop-claude's worker with `ScheduleWakeup` disallowed, so a worker that ends its turn on a question exits and the judge runs. - -Claude Code's `ScheduleWakeup` tool resumes a session after a delay. While a wakeup is pending, the worker's `claude -p` keeps running after its turn ends. loop-claude acts only once the worker exits, so it neither runs the judge nor interrupts the human, and the chunk stalls. Seen on 2026-10-18 in another project, session `678cac80`: the worker asked the human to approve a fourth round of the stability pass, then scheduled a 30-minute wakeup, and another each time one fired, until someone killed the worker. A worker doesn't need a wakeup: larv-review already has it wait on reviewers and CI in the foreground. Add `--disallowedTools ScheduleWakeup` to `bin/loop_claude/cycle/worker.py`'s `worker_args`, with a test asserting the flag. Correct `skills/larv-review/SKILL.md`'s opening paragraph, which says a scheduled wakeup dies with a headless run. - ### 170. Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings. `docs/decisions.md` → `routing: one ladder…` calls the steps lilleman approved on 2026-10-16 a first guess. Once 10 chunks that each shipped one item scored with L, E and I have merged, read `score-outcomes`' rank correlations for L, E and I and the routed-chunks table of `routing-figures.md`, and propose new steps to lilleman, whose call they are. -- 2.52.0 From d1230a515e1346c715f1b589647be02423828323 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:37:29 +0200 Subject: [PATCH 3/6] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20label=20the=20test's=20case?= =?UTF-8?q?s=20and=20fix=20a=20paragraph's=20wording?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/loop_claude/test_loop_claude.py | 5 +++-- skills/larv-review/SKILL.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index 2c106906..53fa76dd 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -1187,8 +1187,9 @@ class WorkerArgs(unittest.TestCase): def test_disallows_a_wakeup_so_a_worker_that_ends_its_turn_exits(self): opened = session.session_named("A proj loop-claude", pathlib.Path("/h/.claude/projects")) for resume in (False, True): - args = worker.worker_args(opened, Rung("m"), "Do it.", resume=resume) - self.assertEqual(args[args.index("--disallowedTools") + 1], "ScheduleWakeup") + with self.subTest(resume=resume): + args = worker.worker_args(opened, Rung("m"), "Do it.", resume=resume) + self.assertEqual(args[args.index("--disallowedTools") + 1], "ScheduleWakeup") class Records(unittest.TestCase): diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 63516131..3a89aa24 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -5,7 +5,7 @@ description: Ship a work chunk through review to a merged PR; decisions land in # larv-review — ship the chunk, review until clean, gate green, merge -You orchestrate, fix, and ship; reviewers only report. Run every reviewer synchronously (`run_in_background: false`) and watch CI in the foreground: a headless run exits when the turn ends, and a background watcher dies with it. Never schedule a wakeup: loop-claude's worker has `ScheduleWakeup` disallowed, since a pending wakeup keeps the run alive after the turn ends. The turn runs on until §6. +You orchestrate, fix, and ship; reviewers only report. Run every reviewer synchronously (`run_in_background: false`) and watch CI in the foreground: a headless run exits when the turn ends unless a wakeup is pending, and a background watcher dies with it. Never schedule a wakeup: loop-claude's worker has `ScheduleWakeup` disallowed, since a pending one keeps the run alive with no one to read its result. The turn runs on until §6. **Forge-neutral.** Five PR operations recur below: read a PR's diff, open a draft PR, read check status, mark ready, merge. Resolve the tooling from the remote per `~/.claude/CLAUDE.md` → "Git, commits, and PRs"; on any other forge, achieve the same intents through its CLI or API — discover how rather than assuming. A forge without a native draft state gets the closest equivalent (a `WIP:`/`Draft:` title prefix); note any approximation in the summary. -- 2.52.0 From a558ef09b7a873c86f234ba1871af332d8e040f9 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:37:29 +0200 Subject: [PATCH 4/6] =?UTF-8?q?Answer=20principles=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20no=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From d7c4873481698b16e8dafd8f0b1fcd64e00c0b66 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:37:33 +0200 Subject: [PATCH 5/6] =?UTF-8?q?Answer=20security=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20no=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From a94e4c78b8d7d2c742c2feccc23ba1d6e869b5a0 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 21 Oct 2026 22:38:53 +0200 Subject: [PATCH 6/6] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20reword=20the=20wakeup=20par?= =?UTF-8?q?agraph,=20the=20changelog=20entry=20and=20the=20comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- bin/loop_claude/cycle/worker.py | 2 +- skills/larv-review/SKILL.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7229ed..5bb4b27b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- loop-claude's worker now starts with `ScheduleWakeup` disallowed. A worker that scheduled a wakeup kept `claude -p` running after its turn ended, so loop-claude neither ran the judge nor asked you, and the chunk stalled until someone killed the worker. Now a worker that ends its turn on a question exits, and the judge runs. +- loop-claude's worker now starts with `ScheduleWakeup` disallowed. A worker that scheduled a wakeup kept `claude -p` running after its turn ended, so loop-claude neither ran the judge nor asked you, and the chunk stalled until someone killed the worker. - Every project's audience now includes the contributor, the person who reads the code to change it. A README doesn't list them; only its `**Void:** code health` line drops them. larv-review's comprehension check now measures how hard the project is for them to read. - `score-outcomes` now also measures projects that merge by rebase: each run of commits that share one commit time counts as a chunk. Add `docs/score-anchors.md` to those projects too. A chunk that was pushed or fast-forwarded may hold only part of its pull request, so the medians and rank correlations leave it out. - `settings.json` no longer carries a model: each machine keeps the one you pick with `/model`. Git's clean filter `bin/settings_filter.py` drops `"model"` and sorts the keys, so neither a pick nor Claude Code's key order can reach a commit. Update now starts with `git add settings.json`: without it, Update's `git checkout -f` drops the machine's model. On upgrade, on each machine: diff --git a/bin/loop_claude/cycle/worker.py b/bin/loop_claude/cycle/worker.py index 6db290ec..f9190b63 100644 --- a/bin/loop_claude/cycle/worker.py +++ b/bin/loop_claude/cycle/worker.py @@ -47,7 +47,7 @@ def worker_args(session: Session, worker: Rung, prompt: str, resume: bool) -> li *start, "--output-format", "stream-json", "--permission-mode", "bypassPermissions", - # A pending wakeup keeps claude -p running after the turn ends, so loop-claude never sees the worker exit and the judge never runs. + # A pending wakeup keeps claude -p from exiting, which holds back the judge. "--disallowedTools", "ScheduleWakeup", "--verbose", *worker.flags(), diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 3a89aa24..0a307156 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -5,7 +5,7 @@ description: Ship a work chunk through review to a merged PR; decisions land in # larv-review — ship the chunk, review until clean, gate green, merge -You orchestrate, fix, and ship; reviewers only report. Run every reviewer synchronously (`run_in_background: false`) and watch CI in the foreground: a headless run exits when the turn ends unless a wakeup is pending, and a background watcher dies with it. Never schedule a wakeup: loop-claude's worker has `ScheduleWakeup` disallowed, since a pending one keeps the run alive with no one to read its result. The turn runs on until §6. +You orchestrate, fix, and ship; reviewers only report. Run every reviewer synchronously (`run_in_background: false`) and watch CI in the foreground: a headless run exits when the turn ends, and a background watcher dies with it. Never schedule a wakeup: a pending one keeps a headless run from exiting, so loop-claude neither runs its judge nor asks the human. The turn runs on until §6. **Forge-neutral.** Five PR operations recur below: read a PR's diff, open a draft PR, read check status, mark ready, merge. Resolve the tooling from the remote per `~/.claude/CLAUDE.md` → "Git, commits, and PRs"; on any other forge, achieve the same intents through its CLI or API — discover how rather than assuming. A forge without a native draft state gets the closest equivalent (a `WIP:`/`Draft:` title prefix); note any approximation in the summary. -- 2.52.0