Repository navigation
A mission's stop at a spend cap is a ledger row, so a clone stays stopped (M9.24) - #98
Merged
Merged
Conversation
…pped (M9.24) The first STOP_BUDGET tick now records mission.budget_exhausted in the ledger (once per mission content) instead of the run log, and tick stops on that row whatever the checkout's token ledger says, until a raised cap changes the content. This closes M9.24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aw6CiQcdpzdzZZXKf8WbUM
adeelahmad
marked this pull request as ready for review
October 20, 2026 09:39
adeelahmad
pushed a commit
that referenced
this pull request
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012rsDo9GYzNx8tXucywZHnA # Conflicts: # CHANGELOG.md # docs/ROADMAP.md # plugin/bin/_mission.py
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: when a mission hit its token or USD cap,
aloop mission tickreturnedSTOP_BUDGET, but that stop lived only in the checkout's token ledger and run log. On a fresh clone (or after.aladdinwas deleted), the spend read 0, and the loop started handing out work again under the same approved mission.After: the first
STOP_BUDGETtick writes amission.budget_exhaustedrow to the hash-chained mission ledger, once per mission content (keyed by the mission doc's sha256). Tick stops on that row whatever the local spend says. The stop is lifted only when the human approves a changed mission, such as a raised cap, because that changes the content hash.How:
mission.budget_exhaustedjoinsLEDGER_EVENTSinplugin/bin/_mission.py.tick.facts()collects the rows intof["stops"]by sha.rules()stops when either the live budget is exhausted or a stop row exists for the current mission sha.record()writes the row only when there is none yet for that sha. ROADMAP marks M9.24 done, TRACKING shows it as IMPLEMENTED_TESTED, and CHANGELOG and the mission README are updated.Evidence
scripts/test/mission-tick.test.pysection 30 (check 31):STOP_BUDGETand exactly one ledger row (rolemission-loop, sha = the mission digest, tokens 1100).rm -rf .aladdinthe tick is stillSTOP_BUDGETwith 0 local tokens.make pycheckandscripts/check-tracking.py(84 requirements).Generated by Claude Code