Skip to content

feat(skills): ask for the max rollouts and leave steps unlimited by default in optimize - #681

Merged
nhungbi merged 1 commit into
strands-agents:mainfrom
liramon2:optimize-skill-rollouts
Nov 25, 2026
Merged

nhungbi merged 1 commit into
strands-agents:mainfrom
liramon2:optimize-skill-rollouts

Conversation

@liramon2

@liramon2 liramon2 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

The optimize skill's budget question now asks for the max rollouts the run may spend (default 500), and steps no longer default to 4: with no step limit, the skill passes no --max-iterations, and the search keeps proposing until what's left after the end phase's reserves can't score another candidate (stop_reason budget). This matches the CLI, where --max-rollouts defaults to 500 and --max-iterations to no limit.

Changes in .agents/skills/optimize/SKILL.md, step 5 and the places that show the budget:

  • Budget question. A new first setting, "Max rollouts", default 500. "Steps" defaults to no limit ("steps go on until the rollouts run out"); a number still sets --max-iterations, and 0 still measures only the current agent.
  • No estimate. The budget question and the review no longer show a rollout estimate. With no step limit, the run spends up to the max rollouts the user sets, so that number is the figure to show; an estimate on top of it repeated the cap. The formulas stay, for when the user asks how a setting relates to the max rollouts: rollouts per run, the least a run needs (the 0-step rollouts plus the end phase's re-run headroom, 2 × ceil(5% × cases × runs) per validation and test arm, as end_phase_reserve), and the steps that fit, ceil(floor(left ÷ (runs × train)) ÷ candidates), since the search stops when what's left can't pay for one candidate. With a tunable factory whose markers hold a choice(...) of 2 or more components, the default schedule is Nested and more steps fit.
  • Rules. The fixed 500 cap and "suggest fewer steps above it" are gone. The max rollouts must still cover the least a run needs, which the optimizer checks (it refuses less with exit 2), and a step limit above the steps that fit gets a note that the rollouts run out first. The review also says that with no step limit the run usually spends nearly all of the max rollouts, with a proposer call per step.
  • Build. --max-rollouts N is always passed; --max-iterations N only with a step limit.
  • The review's budget row, the progress example (each line's rollouts are that step's), and step 8's resume note are updated to match; the review's totals line is gone.

Related Issues

None.

Documentation PR

None.

Type of Change

New feature

Testing

Checked against src/strands_evals/cli/commands/optimize.py (--max-rollouts default 500, --max-iterations default no limit) and the optimizer's stop reasons (budget, iterations, exhausted). The skill wasn't run end to end in an agent session, and the repo's lint and CI checks weren't run locally.

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@liramon2
liramon2 deployed to auto-approve November 25, 2026 20:32 — with GitHub Actions Active
@liramon2
liramon2 force-pushed the optimize-skill-rollouts branch from 1ac64d0 to ea34140 Compare November 25, 2026 20:32
@github-actions github-actions Bot added enhancement New feature or request area-cli CLI commands (run, report, validate, diagnose) and console display labels Nov 25, 2026
@liramon2
liramon2 force-pushed the optimize-skill-rollouts branch from ea34140 to 34758f8 Compare November 25, 2026 20:38
@liramon2
liramon2 marked this pull request as ready for review November 25, 2026 20:41
@liramon2
liramon2 requested a review from a team as a code owner November 25, 2026 20:41
@liramon2
liramon2 requested a review from notowen333 November 25, 2026 20:41
@liramon2
liramon2 deployed to auto-approve November 25, 2026 20:46 — with GitHub Actions Active
poshinchen
poshinchen previously approved these changes Nov 25, 2026
@liramon2
liramon2 force-pushed the optimize-skill-rollouts branch 2 times, most recently from e2ba2bd to 9e4d93d Compare November 25, 2026 20:52
@liramon2 liramon2 changed the title feat(skills): ask for the most rollouts and leave steps unlimited by default in optimize feat(skills): ask for the max rollouts and leave steps unlimited by default in optimize Nov 25, 2026
@liramon2
liramon2 force-pushed the optimize-skill-rollouts branch from 9e4d93d to 97da4b7 Compare November 25, 2026 20:56
@liramon2
liramon2 deployed to auto-approve November 25, 2026 21:04 — with GitHub Actions Active

@nhungbi nhungbi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Assessment: Comment

The budget math matches end_phase_reserve and the optimizer's setup check. With the estimate gone, the open points are making the default spend visible and still warning when a step limit can't fit the max rollouts.

Review Categories
  • Defaults and cost: a default run can spend up to 500 rollouts plus a proposer round per step, and the review shows no figure beyond the cap.
  • Budget rules: an unreachable step limit is no longer flagged, and the on-request step count rounds up past what the search can afford and assumes every step tries candidates versions, which a Nested round's first step doesn't.
  • PR hygiene: the checklist is all unchecked, the skill wasn't run end to end, and the description doesn't explain why the estimate was dropped.

Comment thread .agents/skills/optimize/SKILL.md Resolved
Comment thread .agents/skills/optimize/SKILL.md Resolved
Comment thread .agents/skills/optimize/SKILL.md Resolved
@liramon2
liramon2 deployed to auto-approve November 25, 2026 21:20 — with GitHub Actions Active
@nhungbi
nhungbi merged commit 042b218 into strands-agents:main Nov 25, 2026
20 of 21 checks passed

This branch is waiting to be deployed

1 active and 1 waiting deployments
auto-approve — 61b5adc2 Deployed Nov 25, 2026 by liramon2 via Run integration tests #1292
manual-approval — 61b5adc2 Waiting Nov 25, 2026 by liramon2 via Trigger Strands Review #989
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-cli CLI commands (run, report, validate, diagnose) and console display enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants