You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please explain the motivation behind the feature request.
Subagents have a default max_turns limit of 25. Complex tasks (e.g., multi-file implementations with build/test verification) can exceed this limit, causing the subagent to stop with "I've reached the maximum number of actions I can do without user input."
Currently, the only way to configure this is via the GOOSE_SUBAGENT_MAX_TURNS environment variable, which:
Requires external setup before running goose
Applies globally to all subagents
Cannot be shared as part of a recipe
Describe the solution you'd like
Add max_turns field to:
Settings struct in crates/goose/src/recipe/mod.rs - for top-level recipe configuration
SubagentSettings struct in crates/goose/src/agents/subagent_tool.rs - for per-subagent configuration
Setting GOOSE_SUBAGENT_MAX_TURNS=50 in shell config. This works but is not portable across machines or shareable in recipes.
Additional context
Related: #3938 requested max turns for subagents but was closed before implementation. Since then, SubagentSettings was added with provider, model, temperature - adding max_turns would complete this.
Relevant code:
crates/goose/src/agents/subagent_task_config.rs - defines DEFAULT_SUBAGENT_MAX_TURNS (25) and reads env var
crates/goose/src/agents/subagent_tool.rs - apply_settings_overrides would need to handle max_turns
I have verified this does not duplicate an existing feature request
Please explain the motivation behind the feature request.
Subagents have a default max_turns limit of 25. Complex tasks (e.g., multi-file implementations with build/test verification) can exceed this limit, causing the subagent to stop with "I've reached the maximum number of actions I can do without user input."
Currently, the only way to configure this is via the
GOOSE_SUBAGENT_MAX_TURNSenvironment variable, which:Describe the solution you'd like
Add
max_turnsfield to:Settingsstruct incrates/goose/src/recipe/mod.rs- for top-level recipe configurationSubagentSettingsstruct incrates/goose/src/agents/subagent_tool.rs- for per-subagent configurationThis would allow recipes to specify:
And subagent tool calls to override:
{ "settings": { "model": "claude-haiku-4-5@20251001", "max_turns": 30 } }Describe alternatives you've considered
Setting
GOOSE_SUBAGENT_MAX_TURNS=50in shell config. This works but is not portable across machines or shareable in recipes.Additional context
Related: #3938 requested
max turnsfor subagents but was closed before implementation. Since then,SubagentSettingswas added withprovider,model,temperature- addingmax_turnswould complete this.Relevant code:
crates/goose/src/agents/subagent_task_config.rs- definesDEFAULT_SUBAGENT_MAX_TURNS(25) and reads env varcrates/goose/src/agents/subagent_tool.rs-apply_settings_overrideswould need to handlemax_turnsI have verified this does not duplicate an existing feature request