Repository navigation
budget: reviewers and the final gate get the contract copy in their host worktree; live run 17 - #24
Merged
Merged
Conversation
…ost worktree (3 of run 17's 6 blocks); run 17 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QxyVf3NgwsgRyYpBgDDTC
adeelahmad
pushed a commit
that referenced
this pull request
Oct 18, 2026
…n/ (master red after #23 met #24) #24 added a case expecting the copy at .agentic/task.env; #23 moved the worktree markers to .aladdin/. budget already writes through _paths.marker_dir, so only the test's expected path was stale. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
adeelahmad
added a commit
that referenced
this pull request
Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Before: on Claude Code the host creates a sub-agent's worktree at dispatch, so
budget hookcopies the supervisor's task contract into it on the worker's first tool call, andselfcheckthere finds the task. Only the three workers (RED, SCAFFOLD, GREEN) took that path; the structural reviewer and the final gate went through the observe-only metering and never got the copy. Every reviewer's first self-check therefore blocked "STORY_DIR unset" until it guessed the contract by hand: 2, 1 and 3 blocks in live runs 15, 16 and 17.After: the observe path also finds the agent's worktree and copies the contract when the dispatch prompt names a task, and the observed role's state records its task, attempt and story dir. Nothing about metering changes: observe-only roles are still never told or stopped. ROADMAP M0.8 and OVERVIEW record live run 17 (13/13, 12m58s, $0.95, 2 supervisor wakes, 0 plugin-source reads, 6 blocks).
How: a new case in
scripts/test/budget-roles.test.py(a structural reviewer dispatched into a host worktree gets the copy and its state names the task) written first and failing, then ~10 lines inplugin/bin/budget'sobserve. All budget tests andmake cipass locally.Generated by Claude Code