gemini-cli - 💡(How to fix) Fix Maximum number of turns and their `setting.json` file that doesn't exist [1 comments, 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#25889Fetched 2026-04-24 06:13:32
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
commented ×1labeled ×1
RAW_BUFFERClick to expand / collapse

What happened?

The bug is happening at Gemini CLI v0.39.0 — there is this annoying message:

"ℹ The session has reached the maximum number of turns: 25. Please update this limit in your setting.json file."

I've searched for the setting.json file, and it doesn't exist. Only settings.json. Probably the code are searching for a file that doesn't exist and putting a fallback value instead.

NOTE: I've already edited my Maximum number of turns from running /settings on Gemini CLI (valued at -1), and this still doesn't work.

What did you expect to happen?

Follows the settings.json file on .gemini directory OR, for fallback, the /setting configuration inside CLI.

Client information

I do not want to share this, thanks. Running on Windows.

Login information

Google Account.

Anything else we need to know?

No response

extent analysis

TL;DR

The issue can likely be resolved by renaming the settings.json file to setting.json to match the expected filename.

Guidance

  • Verify that the settings.json file is located in the correct directory (.gemini) and contains the expected configuration.
  • Check the Gemini CLI documentation to see if there are any specific instructions for configuring the setting.json file.
  • Try renaming the settings.json file to setting.json to see if this resolves the issue.
  • If the issue persists, try setting the Maximum number of turns value to a specific number (e.g. 50) instead of -1 to see if this makes a difference.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

The issue may be due to a simple filename mismatch, but it's possible that there are other configuration issues at play. Renaming the file is a low-risk change that can help determine if this is the root cause.

Recommendation

Apply workaround: rename the settings.json file to setting.json, as this is a simple and low-risk change that may resolve the issue.

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