diff --git a/AGENTS.md b/AGENTS.md index b09427d3..0b3970d9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,7 @@ Decisions live in `docs/decisions.md`: - loop-claude: every claude it starts bypasses permissions inside its sandbox - loop-claude: one session per project, its id derived from the checkout's path relative to `~/code`, or to `/` outside it - loop-claude: the archive keeps the raw transcript, and a failed archive stops the loop +- loop-claude: the worker's claude compacts its context above 200k tokens, and `CLAUDE.md` β†’ "Compact instructions" says what the summary keeps - machine load: a heavy command waits for one of the machine's heavy slots, one for every 4 CPUs, which every session shares, and loop-claude starts a worker only while at least a quarter of the machine's memory is available - machine load: every container a session starts has a memory limit and a swap limit as large as its work needs; rule-hook's `docker-run-memory` blocks a `docker run` or `docker create` without them outside run-heavy, under which a container that lacks them gets the slot's share of three quarters of the memory; and no daemon-wide cap limits all containers together - principles: about seven things per level, four or five where they act on each other, more where a reader finds them by name; crossing a limit asks for a grouping or a recorded reason diff --git a/CHANGELOG.md b/CHANGELOG.md index c6fbe3a3..94f346d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- loop-claude's worker now compacts its context once it passes 200k tokens, handed as `CLAUDE_CODE_AUTO_COMPACT_WINDOW`; Claude Code compacted it at about 967k before. Since 2026-10-21, a worker's turns above 200k were 55% of what workers cost, and the chunks that compacted took no more review rounds per message than those that did not. `CLAUDE.md` has a new section, "Compact instructions", saying what the summary keeps. - On Linux, `run-heavy` now caps the memory of a container its command makes with `docker run` or `docker create`. A container that sets no limit gets a memory limit and a swap limit, both the slot's share: three quarters of the machine's memory, split across the heavy slots. A container that sets one of the two limits keeps it, and gets the other as large. This covers containers a project's own scripts start, which rule-hook can't see. A `docker compose` service, and a docker named by its full path, get no cap. rule-hook's `docker-run-memory` now lets a `docker run` under run-heavy pass. - rule-hook has a new rule, `docker-run-memory`. It blocks a `docker run` or `docker create` that lacks a memory limit or a swap limit, such as `--memory 4g --memory-swap 4g`, sized to what the work needs. `--memory-swap -1`, unlimited swap, counts as none. `CLAUDE.md` asks for the same limits on a container a script or a compose file starts, which rule-hook can't see. rule-hook's `run-heavy` rule also now reads docker's `--tlscacert`, `--tlscert`, `--tlskey` and buildx's `--builder` as options that take a value, and reads `docker container run` as a run: `docker --tlscacert ca.pem build .` was not blocked outside run-heavy before. - Reviewers now mark a πŸ”΄ or 🟑 `[misread]` where it arose because the implementer misread code that had already shipped. A round's commit title now counts the marked findings, as in `Answer stability round 1: 1 πŸ”΄, 2 🟑 (1 misread); …`, and rule-hook's `round-title-counts` blocks a round title without that count. `score-outcomes` shows the count on each finished item, and lists it after the medians for each chunk whose round titles carry it, newest first. A chunk whose round titles predate this change reads as unknown. diff --git a/CLAUDE.md b/CLAUDE.md index ac1b89b3..0d4e2af4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -104,6 +104,10 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i - **A list or threshold a consumer relies on is sourced.** Deny-lists, defaults, limits: follow a published standard or a widely deployed tool, and cite it in the decision recording the choice; where none exists, ask. Never assemble one from names that seem plausible. - When a page renders client-side and comes back empty/blocked, use the Playwright renderer at `~/code/playwright-for-agents/` β€” `./pw [options]` (see its README). Don't use claude-in-chrome for this. +## Compact instructions + +When you compact, keep in the summary: the task loop-claude gave and each `todo.md` item the chunk takes, with its L and E + I; the worktree, branch and PR; the rung loop-claude named for each review launch, rerun and escalated subagent; each review pass's rounds so far, each open πŸ”΄ and 🟑, and how the answered ones were answered; every question the human answered, with the answer; each escalation trigger that fired; and what remains before the chunk is finished. + ## Vocabulary - **chunk** β€” the unit of work, shipped as one PR; "Working loop" says what it holds. diff --git a/bin/loop_claude/cycle/run.py b/bin/loop_claude/cycle/run.py index cf65353b..d7b9ba77 100644 --- a/bin/loop_claude/cycle/run.py +++ b/bin/loop_claude/cycle/run.py @@ -5,6 +5,7 @@ import typing from loop_claude.cycle.states import Active, Archived, Closing, Ended, Event, HumanTalked, HumanTyped, Interrupting, Judging, QUOTED_ANSWERS_PER_CYCLE, Ruled, State, TalkChosen, Talking, transition, TypedAnswer, WorkerRan, Working from loop_claude.routing import after_ruling, judge_rung from transcript_archive.write import archive +from loop_claude.cycle.worker import AUTO_COMPACT_WINDOW, COMPACT_ABOVE, run_worker, worker_args from claude_code.session import delete_session, Session, session_open, transcript_file from loop_claude.effects import Effects from failure import Failure @@ -17,7 +18,6 @@ from loop_claude.cycle.interrupt import put_question, talk, Talk from claude_code.transcript import read_transcript from loop_claude.cycle.retry import retried from model_routing.route import Route -from loop_claude.cycle.worker import run_worker, worker_args from model_routing.ladder import Rung from loop_claude.escalation_mark import StepUp from loop_claude.stop import Stop @@ -116,8 +116,8 @@ def work(cycle: Cycle, answered: QuotedAnswer | TypedAnswer | None, step_up: Ste def worker_environment(cycle: Cycle) -> dict[str, str]: - """The rungs the worker's claude is handed, which rule-hook holds its review launches to.""" - return worker_rungs.environment(cycle.project, cycle.route) + """The rungs the worker's claude is handed, which rule-hook holds its review launches to, and the context size above which it compacts.""" + return {**worker_rungs.environment(cycle.project, cycle.route), AUTO_COMPACT_WINDOW: str(COMPACT_ABOVE)} def worker_start(cycle: Cycle, answered: QuotedAnswer | TypedAnswer | None, step_up: StepUp | None) -> list[str]: diff --git a/bin/loop_claude/cycle/worker.py b/bin/loop_claude/cycle/worker.py index 2a63b85f..8587ef38 100644 --- a/bin/loop_claude/cycle/worker.py +++ b/bin/loop_claude/cycle/worker.py @@ -12,6 +12,9 @@ from claude_code.session import Session PRINTED_TOOL_INPUT = 160 # Seconds between reads of the machine's memory while too little of it is available to start a worker. MEMORY_POLL = 60 +# The context size, in tokens, above which the worker's claude compacts, handed to it in this variable: docs/decisions.md β†’ `loop-claude: the worker's claude compacts its context above 200k tokens`. +AUTO_COMPACT_WINDOW = "CLAUDE_CODE_AUTO_COMPACT_WINDOW" +COMPACT_ABOVE = 200_000 def run_worker(root: str, args: list[str], env: dict[str, str], effects: Effects) -> Failure | Limited | None: diff --git a/bin/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index 909ed5ec..6bc6c9ea 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -47,6 +47,10 @@ time. The layout, and when a copy is replaced, are in bin/transcript_archive/__i Before each worker starts, loop-claude waits until at least a quarter of the machine's memory is available (bin/machine_load/memory.py). +Each worker's claude, and the session /talk opens, compacts its context once it passes 200k tokens, +handed as CLAUDE_CODE_AUTO_COMPACT_WINDOW (bin/loop_claude/cycle/worker.py), so a long chunk +re-reads less each turn; ~/.claude/CLAUDE.md β†’ "Compact instructions" says what the summary keeps. + Every claude loop-claude starts runs the project's model, saved per in ~/.claude/loop-claude-models.json and read each cycle, unless routing, below, puts the worker, the session /talk opens and the judge on another rung, a model at an effort. A project without an diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index e330fc82..c55a5bca 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -256,7 +256,7 @@ class Cycles(unittest.TestCase): fake = FakeEffects(streams=[Worker(self.paths.claude_code_transcripts.parent)], claude=[judged("finished")]) cycle = dataclasses.replace(self.cycle(fake), project=Rung("claude-opus-5-5", "medium"), route=Route(Rung("claude-haiku-5-5", "max"), 163, 1, 5)) self.assertEqual(run.run_cycle(cycle).verdict, Finished("working")) - self.assertEqual(fake.worker_environments, [{"LOOP_CLAUDE_PROJECT_RUNG": "claude-opus-5-5 at medium effort", "LOOP_CLAUDE_WORKER_RUNG": "claude-haiku-5-5 at max effort", "LOOP_CLAUDE_ESCAPE_AND_IMPACT": "5"}]) + self.assertEqual(fake.worker_environments, [{"LOOP_CLAUDE_PROJECT_RUNG": "claude-opus-5-5 at medium effort", "LOOP_CLAUDE_WORKER_RUNG": "claude-haiku-5-5 at max effort", "LOOP_CLAUDE_ESCAPE_AND_IMPACT": "5", "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000"}]) def test_the_claude_an_interrupt_resumes_is_handed_the_same_rungs_as_the_worker(self): def answer(args): diff --git a/docs/decisions.md b/docs/decisions.md index b2b44cd7..ffba8260 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -72,6 +72,27 @@ The cap is 5, `bin/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the 2026-09-28, lilleman. Serves goals 1 and 3: saving each transcript locally is the first step of backing it up, and it shows afterwards what an unattended run did. A copy of the `.jsonl`, deduplicated by content hash, with its outcomes beside it; a rendering drops tool results, and a second-resolution stamp names two states within one second as one file. A failed archive exits 1, since a loop that loses its record silently fails the backup goal. Valid while transcripts stay small enough to copy whole. +## loop-claude: the worker's claude compacts its context above 200k tokens, and `CLAUDE.md` β†’ "Compact instructions" says what the summary keeps + +2026-10-27, claude through todo item 231, awaiting lilleman's yes. Serves goal 1.4, under goal 1.1's counter-signal. Item 231 asked for the best means to lower what a chunk spends on context, in dollars, then hours, with no loss of quality. + +Measured from loop-claude's archive over the 90 chunks with messages after the routing figures' reset of 2026-10-21, at the list prices read on 2026-10-26 (Opus 5.5: $4 per million input tokens, $5 and $8 for 5-minute and 1-hour cache writes, $0.20 for cache reads, $20 for output; no model but Haiku 5.5 charges more above 200k): $1,215, which is 0.86 of what the chunks' `cost-state` entries sum to, since some chunks' subagent transcripts are not in the archive. Worker main threads cost $375 (31%): 1-hour cache writes $149, cache reads $153, output $74. Subagents cost $840: 5-minute cache writes $379, output $274, cache reads $187, with the principles auditors at $274 over 342 runs, the stability reviewers $179 and general-purpose subagents $192. A worker starts at 41k tokens of context and peaks at a median 167k, one in ten past 358k, the largest at 848k: Claude Code compacts a model with a native 1M window at about 967k. The worker's messages above 200k were 32% of its messages and 55% of its cost. + +Each option item 231 named, on those chunks: + +- Compaction. Compacting the worker above 200k saves $78 of the workers' $375, 6% of all spend, at 0.5 compactions per chunk; above 150k $75 at 1.0; above 300k $54 at 0.2. It also bounds at 200k the 36 re-writes of a whole context, up to 785k tokens, after a gap longer than the cache's hour or a change of rung, which cost $62. Compacting subagents above 150k costs more than it saves, since a compaction reads the context once more and writes a summary, and subagents are short. A 200k window through `CLAUDE_CODE_DISABLE_1M_CONTEXT` would compact at the same point and also narrow every interactive session. +- A fresh context for the review phase, handed 60k tokens of facts, saves $39, which compaction covers, and loop-claude would need a second session per chunk. +- Read with an offset and a limit, or Grep, in place of `cat`, `sed` and `head`: the worker's tool results were 13.2M characters, 65% of them Bash reads, but only 13% whole files; the rest were ranges. A character a worker reads costs about $8 per million tokens to write to the 1-hour cache and $0.20 per million at each later turn, so all the worker's reads cost about $45 and the whole-file ones about $6. A rule would change the tool, not how much is read. +- Code-intelligence tooling: the `LSP` tool, with a language server per language on PATH, replaces a grep and the reads of candidate files with one lookup. Its ceiling is the same $45, and each machine would need a server per language (goal 2). Not tried. +- What a reviewer reads: the auditors read the project whole by design. Of their πŸ”΄ and 🟑 findings since the reset, 47% named a file the chunk edited and 51% another file, so reading only the change would drop half of them; item 236 asks lilleman about that scope, and item 233 has one auditor read the project once per round. +- The base context: every thread starts with `~/.claude/CLAUDE.md` (19k characters), `~/.claude/AGENTS.md` (11k, this repo's decisions, which Claude Code loads as user instructions into every project's sessions; item 52), the project's `AGENTS.md`, and, for the worker and general-purpose subagents, the skill listing (18k) and the agent listing (12k). Subagents' first messages wrote $97 of it; trimming the listings would save about $20. + +Quality. 19 chunks compacted between 2026-10-10 and 2026-10-22, at 214k to 972k tokens, the windows Claude Code tuned then. Per 100 worker messages they took a median 3.6 review rounds past each pass's first against 4.0 for the 68 uncompacted chunks of 100 messages or more, and 13.9 πŸ”΄ and 🟑 findings against 16.6. 4 of 19 had an unfinished verdict against 3 of 68, each 8 to 10 hours after the compaction and followed by a finished verdict within minutes. Two summaries read whole kept the chunk's intent, files, errors and next step in 12k to 20k characters, and the worker resumed without re-reading. A compaction takes 51 to 83 seconds, under a minute per chunk at 0.5 each. + +The window is handed to the worker, and the session /talk opens, as `CLAUDE_CODE_AUTO_COMPACT_WINDOW` (`bin/loop_claude/cycle/worker.py`), not set in `settings.json`: the archive measured loop-claude's workers, and interactive sessions are lilleman's. Subagents inherit it, and at 200k almost none compacts. A probe on 2026-10-27 showed that a `Compact instructions` section in a CLAUDE.md shapes the summary: a session whose CLAUDE.md asked the summary to end with its secret word did. So `CLAUDE.md` β†’ "Compact instructions" names what a worker's summary keeps. Path-scoped rules leave the context at a compaction and return at the next matching read, and rule-hook holds each review launch to its rung whatever the summary keeps. Item 235 compares the first 20 chunks under the window with the 20 before. + +Valid while cache reads cost a twentieth of input and Claude Code's compaction keeps the worker's task. + ## machine load: a heavy command waits for one of the machine's heavy slots, one for every 4 CPUs, which every session shares, and loop-claude starts a worker only while at least a quarter of the machine's memory is available 2026-10-23, lilleman. Serves goal 1.5. On 2026-10-22 ai-sandbox, with 8 CPUs and 16 GiB, thrashed for hours: four to six loops ran mutation tests, full gates, `docker build`s and QEMU-booting e2e tests at once, and nothing told one loop how busy the machine was. lilleman chose both limits; no standard sets either, and GNU parallel's `--memfree`, which does the memory wait's job, has no default. A slot is a file lock, so a session that dies frees its slot. The memory wait reads `/proc/meminfo` only, and off Linux a worker starts at once. `bin/machine_load/` holds the slots and the memory share, `bin/run-heavy` takes a slot, `CLAUDE.md` β†’ "Working with the codebase" has every session use it, and loop-claude's worker waits for the share. rule-hook's rule `run-heavy` blocks a `docker build`, and a run of a mutation tool stability-reviewer names, outside run-heavy, whether direct or inside a container. No program can tell a gate script from a light one, so only `CLAUDE.md` asks a session to run a gate under run-heavy. Valid while one machine runs several loops at once. diff --git a/todo.md b/todo.md index ad25c17d..73dab6af 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 235` +`Next ID = 237` ## Items @@ -16,7 +16,9 @@ | 232 | 0.4.0 | 231 | | **Launch a round's review passes in one message, except a pass that must wait for another's findings, so a round lasts about as long as its slowest reviewers, not their sum.** | 3 | 2 | 3 | 6 | 3 | 1.5 by 6 | 5.8 | | 233 | 0.4.0 | 231 | | **Run one principles-auditor per round that checks the goals and every principles file that applies, in place of one auditor for each, so the principles pass reads the project once per round.** | 3 | 2 | 3 | 6 | 3 | 1.4 by 3, 1.5 by 2 | 4.9 | | 234 | 0.4.0 | 231 | | **Report the routing figures in dollars, cache reads included, from the cost each archived run records.** | 2 | 2 | 2 | 4 | 3 | 1.4 by 3 | 3.0 | +| 236 | 0.5.0 | | question | **Answer whether the principles audit keeps reading the whole project, or reads only the files the chunk changed and their callers, now that half of its πŸ”΄ and 🟑 findings name a file the chunk did not edit.** | 1 | 1 | 1 | 1 | 1 | 1.4 by 4 | 6.4 | | 226 | 0.5.0 | | question | **Answer whether rule-hook's `run-heavy` rule should also catch a mutation run or docker build behind `uv run`, `poetry run`, `python3 -m`, `sudo`, `docker image build` and `docker compose up --build`, or narrow the `machine load:` decision's wording.** | 2 | 2 | 3 | 5 | 3 | 1.2 by 2, 1.5 by 2 | 4.0 | +| 235 | 0.5.0 | | | **Compare review rounds past each pass's first, unfinished verdicts, πŸ”΄, 🟑 and misread findings, and dollars per chunk, for the first 20 chunks whose worker ran under the 200k compaction window against the 20 before them, and file an item where any rose.** | 1 | 2 | 1 | 2 | 2 | 1.1 by 2, 1.4 by 3 | 6.8 | | 59 | 0.5.0 | | | **Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end.** | 2 | 1 | 3 | 4 | 3 | 1.4 by 6 | 6.0 | | 167 | 0.5.0 | | | **Refuse a `/security-review` or `/claude-security` Skill call below the project's rung, as rule-hook refuses such an Agent call.** | 3 | 2 | 3 | 6 | 2 | 1.1 by 4 | 5.6 | | 6 | 0.5.0 | | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 3 | 3 | 3 | 7 | 3 | 1.1 by 5 | 5.3 | @@ -96,7 +98,7 @@ Evaluate at least these options, ambitiously, measuring each one's cost, hours a - A fresh context for the review phase, handed only the chunk's facts and the reviewers' verdicts. - What a reviewer reads: the diff and the places it touches, in place of the whole project. -Judge quality by these figures per chunk, before and after: review rounds, unfinished verdicts, πŸ”΄ and 🟑 findings, and findings that a later change fixes. Replay archived rounds with `review-replay` where it applies. Record each choice where `~/.claude/CLAUDE.md` β†’ "Ask, don't guess" puts it, and file an item for each option worth doing later. +Judge quality by these figures per chunk, before and after: review rounds, unfinished verdicts, πŸ”΄ and 🟑 findings, and findings that a later change fixes. Replay archived rounds with `review-replay` where it applies. Record each choice where `~/.claude/CLAUDE.md` β†’ "Working loop", "Ask, don't guess" puts it, and file an item for each option worth doing later. Items 232, 233 and 234 wait for this item. Item 233 changes what a reviewer reads, which this item evaluates; items 232 and 234 wait on lilleman's call alone. @@ -106,16 +108,24 @@ Since 2026-10-21, all 1,372 Agent calls in workers' transcripts were one per mes ### 233. Run one principles-auditor per round that checks the goals and every principles file that applies, in place of one auditor for each, so the principles pass reads the project once per round. -Since 2026-10-21, 253 principles-auditor runs cost about $304, 16% of all, and each read the project anew. Today larv-review Β§3 β†’ "Principles" launches one auditor for the README's goals and code health, and one per file in `~/.claude/principles/` that applies. The merged auditor must find what the separate ones found: replay archived rounds with `review-replay`, and keep separate auditors where the merged one misses a πŸ”΄ or 🟑. Rename the report files, `principles--round-.md` today (Β§3 β†’ "Reports"), to one per round. +Since 2026-10-21, 342 principles-auditor runs cost $274 at list prices, 23% of all spend and 3.8 runs per chunk, and each read the project anew: $129 of 5-minute cache writes, $92 of output and $53 of cache reads. Today larv-review Β§3 β†’ "Principles" launches one auditor for the README's goals and code health, and one per file in `~/.claude/principles/` that applies. The merged auditor must find what the separate ones found: replay archived rounds with `review-replay`, and keep separate auditors where the merged one misses a πŸ”΄ or 🟑. Rename the report files, `principles--round-.md` today (Β§3 β†’ "Reports"), to one per round. ### 234. Report the routing figures in dollars, cache reads included, from the cost each archived run records. The routing figures count input, cache-written and output tokens, and leave out cache reads, which were 51% of the cost since 2026-10-21. So their tables rank the principles auditor above the worker, while in dollars the worker cost three times as much. Each archived worker transcript ends with a `cost-state` entry holding `totalCostUSD` and each model's cost, and each message's usage attributes the cost to a subagent type. The judge's runs record no cost in the archive: count them too, or say why not. The change touches `bin/routing_figures/measure.py`, which the comprehension seats found hard (item 139): make the places it touches easier to read. +### 236. Answer whether the principles audit keeps reading the whole project, or reads only the files the chunk changed and their callers, now that half of its πŸ”΄ and 🟑 findings name a file the chunk did not edit. + +Since 2026-10-21, 342 principles-auditor runs cost $274 at list prices, 23% of all spend, and 176 of their πŸ”΄ and 🟑 findings named a file: 83 a file the chunk edited, 90 another. `docs/decisions.md` β†’ `review: the principles audit runs on every chunk…` holds the whole-project audit valid while its findings are drift a chunk would otherwise merge, and calls a repeat a question on the audit's scope for the human. Reading only the changed files and their callers would cut most of the auditors' $129 of cache writes and drop the findings elsewhere, unless those repeat chunk after chunk: read a sample of the 90 before answering. Item 233 merges the auditors either way. + ### 226. Answer whether rule-hook's `run-heavy` rule should also catch a mutation run or docker build behind `uv run`, `poetry run`, `python3 -m`, `sudo`, `docker image build` and `docker compose up --build`, or narrow the `machine load:` decision's wording. Found by review of PR #370. Today `uv run mutmut run`, `poetry run mutmut run`, `python3 -m mutmut run`, `sudo docker build .`, `docker image build .` and `docker compose up --build` pass the rule, which `docs/decisions.md` β†’ `machine load: …` and `RULES["run-heavy"]` describe as blocking docker builds and mutation runs. The rule's own text says a gate script isn't checked since no program can tell it from a light one, so the human decides where the line sits. Say what the rule's "checked" text promises either way. Where the answer widens the rule, the change touches `heavy` in `bin/rule_hook/heavy_command.py`, which the comprehension seats found hard: make it easier to read. +### 235. Compare review rounds past each pass's first, unfinished verdicts, πŸ”΄, 🟑 and misread findings, and dollars per chunk, for the first 20 chunks whose worker ran under the 200k compaction window against the 20 before them, and file an item where any rose. + +`docs/decisions.md` β†’ `loop-claude: the worker's claude compacts its context above 200k tokens…` expects a saving of about 6% of all spend with no rise in these figures. Measure from loop-claude's archive as that decision did: rounds past each pass's first and the πŸ”΄, 🟑 and misread counts from the round commit titles, unfinished verdicts from the outcomes files, and dollars from each message's usage at list prices, cache reads included, which item 234 puts into the routing figures. A chunk ran under the window when its first worker started after that decision merged. + ### 59. Bound a run of unfinished verdicts on one chunk, so a worker and judge that disagree cannot cycle unattended without end. Raised by the product-owner review of PR #211. The resumed worker gets the judge's quote of the work remaining, but a worker that still thinks the chunk done can answer each cycle the same way, and each cycle costs a worker and a judge run (goal 1.4). @@ -386,7 +396,7 @@ The principles pass of PR #301 found that only `routed_by` in `bin/loop_claude/c ### 52. Record why this checkout lives in Claude Code's own directory, or move it out and link it in. -"One owner per value" and "Prefer the vendor-neutral option", in `principles/technical-principles.md`: git, Claude Code and loop-claude all write `~/.claude`, kept apart only by the `.gitignore` allowlist, and the repo's records live in a vendor directory. +"One owner per value" and "Prefer the vendor-neutral option", in `principles/technical-principles.md`: git, Claude Code and loop-claude all write `~/.claude`, kept apart only by the `.gitignore` allowlist, and the repo's records live in a vendor directory. Claude Code also loads `~/.claude/AGENTS.md`, this checkout's decision titles, as the user's instructions into every session of every project: 10.7k characters, about 2.7k tokens, in each of the 1,084 threads since 2026-10-21, about $25 of cache writes and reads at list prices, and a worker on another project reads this repo's decisions as if they held there. ### 170. Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 50 chunks have shipped under them, from how well L, E and I order their review rounds and πŸ”΄ findings.