Answer stability round 1: 0 🔴, 2 🟡 (0 misread); refuse a change whose variable the environment holds, and pin the refusal's path
This commit is contained in:
@@ -45,16 +45,19 @@ replay, and runs no SubagentStart hook there. So the replay without CLAUDE.md tu
|
||||
instruction files off in its settings and opens the prompt with what the hook hands a reviewer, and
|
||||
closes it with the header's line on the project principles.
|
||||
|
||||
--bash-ceiling and --read-limit run the same comparison for the output limits loop-claude hands the worker's
|
||||
claude, which a subagent inherits (bin/claude_code/output_limits.py): the replay with the change starts under
|
||||
BASH_MAX_OUTPUT_LENGTH, which saves a longer Bash result to a file and hands the reviewer its path and the
|
||||
first 2,000 characters, or under CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS, which fails a Read of more tokens
|
||||
than that. It passes where it missed no more of the findings both of the first two found than the most an
|
||||
unchanged replay missed. It doesn't count what the replays read: each run's stream, with every tool result,
|
||||
is in the archive.
|
||||
--bash-ceiling and --read-limit run the same comparison for two limits on what one tool result adds to a
|
||||
claude's context, which a subagent inherits (bin/claude_code/output_limits.py). loop-claude hands the worker's
|
||||
claude the Bash ceiling, and doesn't hand it the Read limit yet. The replay with --bash-ceiling starts under
|
||||
BASH_MAX_OUTPUT_LENGTH=6000, which saves a Bash result of more than 6,000 characters to a file and hands the
|
||||
reviewer its path and the first 2,000 characters. The replay with --read-limit starts under
|
||||
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS=5000, which fails a Read of more than 5,000 tokens. The replay with
|
||||
the limit passes where it missed no more of the findings both of the first two found than the most an
|
||||
unchanged replay missed. The tool doesn't count what the replays read: each run's stream, with every tool
|
||||
result, is in the archive. It refuses to run where its own environment already holds the variable, since the
|
||||
replays as archived would inherit it.
|
||||
|
||||
It keeps each run, a reviewer's tool calls included, and the report it prints in loop-claude's archive, in
|
||||
replays/review-replay-<pass>-<model>[-<flag without its dashes>]-<UTC stamp>/ under ~/.claude/loop-claude-transcripts
|
||||
replays/review-replay-<pass>-<model>[-<flag without its leading dashes>]-<UTC stamp>/ under ~/.claude/loop-claude-transcripts
|
||||
or $LOOP_CLAUDE_TRANSCRIPTS. A run's .jsonl file starts with a line holding claude's arguments, working
|
||||
directory, prompt, exit code and stderr, then holds claude's stream-json output; result.md holds the report.
|
||||
|
||||
@@ -96,6 +99,9 @@ def main(argv: list[str], env: typing.Mapping[str, str], home: pathlib.Path, eff
|
||||
if isinstance(read, int):
|
||||
return read
|
||||
reviewed, project, change = read
|
||||
# The replays as archived start under this environment too, so a change it already holds would reach all four.
|
||||
if change and (inherited := [name for name in change.env if name in env]):
|
||||
return failed(TOOL, f"the replays as archived would inherit {', '.join(inherited)} from this environment, and the comparison needs them without it: unset it and run again")
|
||||
rounds = archived_rounds(REVIEWERS[reviewed], project.model, archive_root(home, env), home)
|
||||
if isinstance(rounds, Failure):
|
||||
return failed(TOOL, rounds.reason)
|
||||
|
||||
Reference in New Issue
Block a user