gemini-cli - 💡(How to fix) Fix Consider bumping default timeout and turn limit for generalist subagent [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25768Fetched 2026-04-22 08:03:19
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
issue_type_added ×1labeled ×1
RAW_BUFFERClick to expand / collapse

What would you like to be added?

The generalist subagent currently has a maxTimeMinutes of 10, and maxTurns of 20, as defined here: https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/agents/generalist-agent.ts#L65

I suggest to reconsider the default values for the generalist subagent, and to increase the timeout to at least 60 minutes (I'd even prefer 2-3 hours), as well as increasing the number of turns to at least ~100 (if not closer to 500).

Why is this needed?

The length of tasks that today's LLMs (including Gemini 3 Flash and 3.1 Pro) can reliably complete has grown significantly over previous model generations. Hence, it is now common to delegate tasks that take on the order of hours to Gemini CLI.

The current time and turn limit is very very short for complex research and coding tasks. This causes Gemini CLI to fail on such tasks whenever the default subagents are being used. Other harnesses, such as Claude Code, can run the default general-purpose subagents for many hours without any problems.

Additional context

No response

extent analysis

TL;DR

Increase the maxTimeMinutes and maxTurns values for the generalist subagent to accommodate longer task durations.

Guidance

  • Review the current values of maxTimeMinutes (10) and maxTurns (20) in the generalist-agent.ts file and consider increasing them to at least 60 minutes and 100 turns, respectively.
  • Evaluate the performance of the generalist subagent with the proposed increased values to ensure they meet the requirements of complex research and coding tasks.
  • Consider the trade-offs between increasing the timeout and turn limits, as longer durations may impact system resources and responsiveness.
  • Research other harnesses, such as Claude Code, to understand their approaches to handling long-running tasks with default subagents.

Example

No code snippet is provided, as the issue focuses on configuration changes rather than code modifications.

Notes

The suggested changes are based on the assumption that the current values are too low for the increasingly complex tasks that the generalist subagent is expected to handle. However, the optimal values may vary depending on the specific use cases and system constraints.

Recommendation

Apply workaround: Increase the maxTimeMinutes and maxTurns values for the generalist subagent, as the current defaults are too restrictive for complex tasks.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Consider bumping default timeout and turn limit for generalist subagent [1 participants]