feat: raise agent iteration turn budgets (30/20/50 → 100/100/200) - #906
Merged
agentforce314 merged 1 commit intoAug 26, 2026
Merged
Conversation
Long multi-step agentic runs were hitting the turn ceilings and truncating real work. Raises SUBAGENT_DEFAULT_MAX_TURNS 30->100, DEFAULT_GOAL_MAX_TURNS 20->100, QueryConfig/FrozenQueryConfig.max_turns 50->200, and DEFAULT_MAX_TURNS 50->200. Independent of the compaction work in agentforce314#903; split out for separate review/revert.
Contributor
Author
|
Split out from #903 at review request — these five max-turn constant bumps are independent of the compaction work and are easier to review/revert on their own. Rationale and the full before→after table are in the PR description. |
Test Results 5 files 997 suites 27m 43s ⏱️ For more details on these failures, see this check. Results for commit 0e2c51d. |
Owner
|
LGTM. Thanks! |
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.
feat: raise agent iteration turn budgets (30/20/50 → 100/100/200)
Why
Split out from PR #903 (#903) at review request:
these constant bumps are independent of the compaction work and are easier
to review / revert on their own.
Real motivation: in practice, long multi-step agentic runs were hitting the
existing turn ceilings and truncating genuine work before it finished:
SUBAGENT_DEFAULT_MAX_TURNS30 → 100 — subagents (no explicit limit)aborted mid-task on multi-step work.
DEFAULT_GOAL_MAX_TURNS20 → 100 —/goalruns exhausted the budgetbefore completing multi-step tasks.
QueryConfig.max_turns(and frozen twin) 50 → 200 — query/agent loopscapped mid-run on longer sessions.
DEFAULT_MAX_TURNS50 → 200 — interactive session ceiling (shared with--max-turnsCLI flag), capped mid-task on long runs.These are 2–4x increases to iteration budgets. They are not required
by the cost-aware compaction path (that feature degrades gracefully when
pricing is unavailable and works at any budget); they simply give real
agentic work room to finish.
Changes
SUBAGENT_DEFAULT_MAX_TURNSsrc/agent/run_agent.pyDEFAULT_GOAL_MAX_TURNSsrc/goals/goals.pyQueryConfig.max_turnssrc/query/config.py(line 13)FrozenQueryConfig.max_turnssrc/query/config.py(line 44)DEFAULT_MAX_TURNSsrc/server/agent_server.pyVerification
Note for reviewers
These are pure constant bumps with no behavioral logic. If the larger
budgets are undesirable (e.g. cost/runaway-loop concerns), they revert
cleanly as a unit. Reverting this PR does not affect the compaction work
in #903.