fix: default max_rounds to 0 (unlimited)#540
Merged
Merged
Conversation
The previous default of 16 rounds silently killed agent turns mid-task. The agent would hit the cap while still working, return stopReason=max_turn_requests, and the harness would treat it as a successful completion. From the user's perspective the agent just stopped responding with no error. Real-world tasks routinely exceed 16 tool calls — even basic code exploration burns 10+ rounds before the agent can act. The harness already enforces its own idle timeout (default 320s) and hard timeout (default 3600s), which are the appropriate safety valves. Set to 0 (unlimited) to match the harbor benchmark configuration and let the harness timeouts govern turn duration.
wesbillman
reviewed
May 11, 2026
| base_url, | ||
| anthropic_api_version: env_or("ANTHROPIC_API_VERSION", "2023-06-01"), | ||
| max_rounds: parse_env("SPROUT_AGENT_MAX_ROUNDS", 16)?, | ||
| max_rounds: parse_env("SPROUT_AGENT_MAX_ROUNDS", 0)?, |
wesbillman
approved these changes
May 11, 2026
This was referenced May 28, 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.
Problem
SPROUT_AGENT_MAX_ROUNDSdefaults to 16. When the agent hits this cap mid-task, it returnsstopReason: "max_turn_requests"and the harness treats it as a successful completion. From the user's perspective, the agent silently stops responding — no error, no indication anything went wrong.Real-world tasks routinely exceed 16 tool calls. Even basic code exploration (reading files, searching, orienting) burns 10+ rounds before the agent can act on what it found.
Fix
Default
max_roundsto0(unlimited), matching the harbor benchmark configuration (--ae "SPROUT_AGENT_MAX_ROUNDS=0").The harness already enforces idle timeout (default 320s) and hard timeout (default 3600s), which are the appropriate safety valves for runaway agents — not a round counter.
Changes
config.rs: defaultSPROUT_AGENT_MAX_ROUNDSfrom16→0README.md: update docs to reflect new default