feat: host-selected agent loop budget (--max-model-turns) recorded in the Run manifest - #70
Merged
Merged
Conversation
…-max-model-turns) Workspace discovery runs had a fixed 8 model turns / 16 calls / 8 planned steps / 8 tool calls. On expharness (09-29~30) 3 of 96 agentic candidate runs ended as PAUSED reason=quiescent at that bound; one had just passed its own check on turn 8. Resume could not help because the budget is recorded in the manifest and verified against the run state. - run --max-model-turns <TURNS> (1..=4096): model calls, planned steps and tool calls scale 2:1:1 like workspace_discovery; the context bound is unchanged - the budget is written into the manifest at run creation, so resume and verify_manifest_state keep it; runs without the option keep the built-in budget - refused (exit 64, before state) for single-shot runs, which have no agent loop to extend - advertised in run --help as XGENY_RUN_BUDGET=manifest-model-turns-v1 for host detection Tests: manifest ratio/bounds/round trip, budget selection, help marker, clap bounds, manifest record through a real run. cargo test -p xgeny-cli and clippy -D warnings pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Workspace discovery runs had a hardcoded budget of 8 turns / 16 calls / 8 steps / 8 tool calls. On expharness, 3 of 96 agentic candidate runs (09-29~30) ended as
PAUSED reason=quiescentat this bound; one of them had passed its self-check on turn 8. Resume cannot extend the budget, because it is recorded in the manifest andverify_manifest_statechecks it.What
run --max-model-turns <TURNS>(1..=4096). Calls, planned steps and tool calls scale 2:1:1, the same ratio asworkspace_discovery. The context bound is unchanged.run --helpadvertises it asXGENY_RUN_BUDGET=manifest-model-turns-v1.Branched from ae7ffe8 (the currently deployed binary) so it can ship without #69.
Tests
cargo test -p xgeny-cliandcargo clippy -p xgeny-cli --all-targets -- -D warningspass. New tests cover manifest ratio, bounds and round trip; budget selection; the help marker; clap bounds; and the manifest record through a real run.🤖 Generated with Claude Code