Record the Bash output ceiling and the transcript-read rule in the decision log

This commit is contained in:
2026-11-18 12:10:01 +01:00
parent c38030d638
commit 1ce01656c3
+14
View File
@@ -248,6 +248,20 @@ Hours. A chunk ran a median 0.7 hours from its first message to its last, one in
Valid while cache reads cost a twentieth of input and Claude Code's compaction keeps the worker's task.
## loop-claude: the worker's claude saves a long Bash result to a file, above 6,000 characters, and rule-hook refuses a Read of a session transcript
2026-11-18, the chunk that shipped the Bash ceiling. Applies project principle 1; serves goal 1.4.
loop-claude hands each worker's claude `BASH_MAX_OUTPUT_LENGTH=6000` (`worker_environment` in `bin/loop_claude/cycle/run.py`, the value in `bin/claude_code/output_limits.py`). Claude Code then saves a longer Bash result to a file under `~/.claude/projects/<project>/<session>/tool-results/` and hands the model the path and the first 2,000 characters, which a probe on 2026-11-17 confirmed. A subagent inherits the variable, so every reviewer the worker launches gets it too. The archive held 7,870 Bash results over 3,000 characters in workers (about $305 of carried context) and about $145 more in stability reviewers; a ceiling of 6,000 characters would have removed $228 of the workers', 10,000 characters $122.
rule-hook's `transcript-read` rule refuses a Read of a `.jsonl` file under `~/.claude/projects`: a session transcript holds every tool result of its session, and reading old ones cost $46. It doesn't refuse a Read of `tool-results/*.txt`, which the ceiling hands the model, and it checks no Grep or Bash command. It can't be overridden, since a Read carries no text for a marker.
The check, `review-replay stability claude-opus-5-5 --bash-ceiling` on 2026-11-18: 10 archived stability rounds holding 25 🔴 and 🟡 findings, replayed three times as archived and once under the ceiling. The three as archived found 17, 15 and 17 findings, and missed 1, 3 and 2 of those that both of the other two found. Under the ceiling the replay found 18, and missed 0 of the 14 that both of the first two found, so it passes (0 is no more than 3). Its archive is `replays/review-replay-stability-claude-opus-5-5-bash-ceiling-20261118T095822Z`. This is the check the decision of 2026-10-27 asked for after a 12k cap cost stability reviewers a finding inside the noise; the ceiling leaves a file to read.
Only the stability pass was replayed, since the archive's long Bash results are the workers' and the stability reviewers'. `--read-limit` runs the same replay for the Read limit (`CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS`); its hand-over waits for plan item 341.
Valid while Claude Code saves a Bash result over the ceiling to a file and hands the model its path, and a replay of the archived stability rounds under the ceiling keeps finding what the unchanged replays find.
## 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, in the forms its `checked` text in `bin/rule_hook/rules.py` lists. 2026-11-16, lilleman: rule-hook checks a run through `uv run`, `poetry run`, `sudo` and `doas` too, such as `uv run mutmut run` and `sudo docker build`, since project principle 4 has a program enforce a rule it can check. The 2026-11-04 note had let such forms pass until one became a problem. 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.