Skip to content

fix: default max_rounds to 0 (unlimited)#540

Merged
tlongwell-block merged 1 commit into
mainfrom
fix/agent-default-max-rounds-unlimited
May 11, 2026
Merged

fix: default max_rounds to 0 (unlimited)#540
tlongwell-block merged 1 commit into
mainfrom
fix/agent-default-max-rounds-unlimited

Conversation

@tlongwell-block
Copy link
Copy Markdown
Collaborator

Problem

SPROUT_AGENT_MAX_ROUNDS defaults to 16. When the agent hits this cap mid-task, it returns stopReason: "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_rounds to 0 (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: default SPROUT_AGENT_MAX_ROUNDS from 160
  • README.md: update docs to reflect new default

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.
@tlongwell-block tlongwell-block enabled auto-merge (squash) May 11, 2026 20:02
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)?,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

😂

@tlongwell-block tlongwell-block merged commit d953d0e into main May 11, 2026
15 checks passed
@tlongwell-block tlongwell-block deleted the fix/agent-default-max-rounds-unlimited branch May 11, 2026 20:09
tlongwell-block added a commit that referenced this pull request May 11, 2026
…lassification

* origin/main:
  fix: default max_rounds to 0 (unlimited) (#540)
  feat(desktop): channel templates — reusable project settings (#538)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants