Skip to content

feat: add rules that limit image reads, bound delegated work, and finish background work - #87

Merged
N4M3Z merged 3 commits into
mainfrom
change/cd-run-rules
Nov 14, 2026
Merged

N4M3Z merged 3 commits into
mainfrom
change/cd-run-rules

Conversation

@abominable-intelligence

@abominable-intelligence abominable-intelligence commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Three core rules from the t3code/cd run review. One judge subagent read 59 screenshots 4,010 times. It took Claude Code's [media removed: request limit] marker for a failed render. After that, every request missed the cache, and that judge cost $1,032 of the run's $1,145.

  • LimitImageReads: read each image one time, keep a one-line note, and treat the marker as normal. Stop to decide after 20 image reads, and never read more than 100.
  • BoundDelegatedWork: every delegated brief gets a limit and a stop condition. The child stops on the third identical tool call.
  • FinishBackgroundWork: wait for background commands before the final report.

Release Notes

  • Add the LimitImageReads, BoundDelegatedWork, and FinishBackgroundWork rules to the core rune.

🤖 Generated with Claude Code

Note

Add rules to limit image reads, bound delegated work, and finish background work

  • LimitImageReads.md: read each image once, prefer contact sheets or key frames, record a one-line description instead of rereading, and reassess after 20 reads with a hard cap of 100 per task
  • BoundDelegatedWork.md: set input, tool-call, and time limits on delegated tasks, stop children after a third identical tool call, and report overruns before delegating again
  • FinishBackgroundWork.md: do not end a turn while a dependent background command is running; either wait and report its result, or stop it and disclose its log location and what remains unverified
  • Behavioral Change: agents now stop and ask the user how to continue when a task requires more than 100 image reads

Macroscope summarized ff6fbac.

Claude Opus 5.5 (claude-opus-5-5) added 3 commits November 9, 2026 18:32
A review session read 59 key frames 4,010 times in two hours and cost
$1,032 at list prices. Claude Code kept about 35 images in each request
and put "[media removed: request limit]" in place of the older ones.
The session took the marker for a failed render and read the frames
again, so every request wrote its whole context to the cache again.
The rule asks for one read of each image, notes in place of a second
read, contact sheets, and image limits in each brief that asks for
images.
A brief asked a child agent to view every key frame in a directory and
set no limit. The child ran for two hours, 191 requests, and 4,024 tool
calls while the parent waited. The same brief one round earlier took
11 requests and about 75 tool calls. A limit of 150 tool calls would
have stopped it after 19 requests and $11. The rule adds a limit, a
stop on repeated calls, and an overrun check to each delegation.
Three of five delegated implementers ended their turn while a
per-commit typecheck still ran in the background. Each sent a second
report about a minute later, and the parent checked the typecheck by
hand each time. The rule asks for a wait on each background command
before the final report.
@github-actions github-actions Bot added the size:small auto: changed-lines bucket label Nov 10, 2026
@github-actions

Copy link
Copy Markdown

review/correctness stood down on ff6fbac5: free lanes only: deterministic check quality is pending on this head. Apply review:runeseer to force a paid round.

@abominable-intelligence abominable-intelligence added the review:runeseer Summons the adjudicating correctness lane label Nov 10, 2026
@runeseer

runeseer Bot commented Nov 10, 2026

Copy link
Copy Markdown

review/correctness round 1 started on ff6fbac5 at ledger generation 2.

@runeseer

runeseer Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Runeseer review — clean

Looks good. The head is unchanged since the last review, the three rules stay prose-only inside the rule length limits, and the core and all casts pick them up through their globs.

  • No valid concerns from the other reviewers; the only open comment is a Codex status notice with no finding.
  • The Codex code and security reviews were still running on this head when this round closed.

No open findings · Reviewed ff6fbac5 · review run · $0.78 · 1m19s · 26 turns

@github-actions github-actions Bot removed the review:runeseer Summons the adjudicating correctness lane label Nov 10, 2026

@runeseer runeseer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earned approval: review/correctness returned a clean verdict for ff6fbac at ledger generation 2. Dismissed automatically on any new push or generation.

@N4M3Z
N4M3Z marked this pull request as ready for review November 11, 2026 00:12
@N4M3Z
N4M3Z self-requested a review as a code owner November 11, 2026 00:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T00:12:49.316069Z ff6fbac Draft marked ready
🔒 Security Review ✅ Completed 2026-11-11T00:14:19.560890Z ff6fbac Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runeseer

runeseer Bot commented Nov 11, 2026

Copy link
Copy Markdown

review/correctness round 2 started on ff6fbac5 at ledger generation 3.

@runeseer

runeseer Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Claude finished @N4M3Z's task in 1m 19s —— View job


Runeseer review — clean

Looks good. The head is unchanged since the last review, the three rules stay prose-only inside the rule length limits, and the core and all casts pick them up through their core/** and ** globs.

  • Read the diff for ff6fbac5
  • Judge the other lanes' findings
  • Recheck the ledger at generation 3
  • Write the verdict, findings, and summary files

No valid concerns from the other reviewers. The only open comment is a Codex status notice with no finding; the Codex code and security reviews were still running on this head when this round closed. The ledger carries no open threads and no finding from round 1.


No open findings · Reviewed ff6fbac5 · · change/cd-run-rules

@macroscopeapp

macroscopeapp Bot commented Nov 11, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved at ff6fbac

Macroscope's review found this PR approvable — Adds agent guidance to bound image reads and delegated work, and to finish or disclose background commands before reporting. These are limited workflow safeguards with explicit reporting of incomplete work and no direct infrastructure or customer-data changes.

Notes:

  • Macroscope's correctness review did not run, so approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@runeseer runeseer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earned approval: review/correctness returned a clean verdict for ff6fbac at ledger generation 3. Dismissed automatically on any new push or generation.

@abominable-intelligence abominable-intelligence added the review Summons the full ordered review sequence label Nov 11, 2026
@abominable-intelligence

Copy link
Copy Markdown
Collaborator Author

claude plugin eval on the three rules

I ran claude plugin eval (Claude Code 2.1.322) on a scratch plugin. A SessionStart hook in it loads the three rules from ff6fbac, and the eval compares it with its built-in no-plugin baseline. Each run gets a clean temporary home, so neither side loads any other rules or CLAUDE.md. Opus 5.5, 3 runs per case for each side, 24 runs, $4.10.

Case Rule With rules Baseline What changed
Write a subagent brief to check docs/ for broken links BoundDelegatedWork 1.00 0.33 All 3 baseline briefs had no numeric limit and no stop conditions. All 3 briefs with the rule had both, plus a report shape.
Find the first red frame in a 40-frame PNG recording LimitImageReads 1.00 1.00 With the rule: 0 image reads in 3 of 3 runs. In a kept trace, the model decoded the PNGs with a script. Baseline: a binary search with 6 to 8 image reads.
An image shows only [media removed: request limit], and the prompt gives the earlier note LimitImageReads 1.00 1.00 No difference. Neither side read the image again.
Run ./build.sh in the background and say whether it passed FinishBackgroundWork 1.00 1.00 Not a fair test: when the job ends, claude -p starts the model again, so both sides finish with the result. In one kept trace for each side, the first report with the rule said "still running", gave the log path, and said the result was not verified. The baseline said "I'll tell you once it finishes". Neither side waited before its first report.

Mean change: +0.17.

What this shows: BoundDelegatedWork has a clear effect. LimitImageReads cuts image reads. The media-removed case does not reproduce the real loop, because that needs about 35 images in context and the harness removing them. FinishBackgroundWork improves what the first report says, but the model still ended its turn and did not wait. The Runeseer note about its first sentence may be the reason.

Limits: Bash was available in every case, so both sides could use a script in the frames case. 3 runs for each side, one model (the original loop was Fable 5.1), and Haiku graded the LLM checks. The suite is outside the repo.

@N4M3Z
N4M3Z merged commit 4698928 into main Nov 14, 2026
51 of 58 checks passed
@N4M3Z
N4M3Z deleted the change/cd-run-rules branch November 14, 2026 21:04
@runewright

runewright Bot commented Nov 14, 2026

Copy link
Copy Markdown

Your first merged contribution here — welcome, @abominable-intelligence, and thank you. Every rune in this deck was reviewed the same way yours just was; may it be the first of many.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review Summons the full ordered review sequence size:small auto: changed-lines bucket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants