gemini-cli - 💡(How to fix) Fix gemini-cli is failing to persist the user selection [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#26267Fetched 2026-05-01 05:52:58
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Error Message

Error message is attached below:

Code Example

Researching failure handling mechanisms: Researching existing retry and settings mechanisms to design the interactive failure handling system.

    SearchText  'max_retries|retry_limit|retry_count'Found 100 matches (limited)
ReadFile  rust/.../src/settings/mod.rs
ReadFile  rust/.../nodes/handlers/retry.rs
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓  Enter Plan Mode Designing a self-healing interactive failure handling system for LLM errors, including auto-retry with configurable limits and user decision memory … │
│                                                                                                                                                                          │
Switching to Plan mode: Designing a self-healing interactive failure handling system for LLM errors, including auto-retry with configurable limits and user decision     │
│ memory across request/session/global scopes.                                                                                                                             
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Failed to persist policy for enter_plan_mode

---

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓  Enter Plan Mode Designing a self-healing interactive failure handling system for errors, including auto-retry with configurable limits and user decision memory … │
│                                                                                                                                                                          │
Switching to Plan mode: Designing a self-healing interactive failure handling system for errors, including auto-retry with configurable limits and user decision     │
│ memory across request/session/global scopes.                                                                                                                             
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

☑ policy for enter_plan_mode persisted
RAW_BUFFERClick to expand / collapse

What happened?

Given gemini-cli (while worked on my request) asked to allow to switch to Plan mode, when I selected allow for all sessions, then gemini-cli failed to persist the selection.

Error message is attached below:

  Researching failure handling mechanisms: Researching existing retry and settings mechanisms to design the interactive failure handling system.

  ✓  SearchText  'max_retries|retry_limit|retry_count' → Found 100 matches (limited)
  ✓  ReadFile  rust/.../src/settings/mod.rs
  ✓  ReadFile  rust/.../nodes/handlers/retry.rs
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓  Enter Plan Mode Designing a self-healing interactive failure handling system for LLM errors, including auto-retry with configurable limits and user decision memory … │
│                                                                                                                                                                          │
│ Switching to Plan mode: Designing a self-healing interactive failure handling system for LLM errors, including auto-retry with configurable limits and user decision     │
│ memory across request/session/global scopes.                                                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

✕ Failed to persist policy for enter_plan_mode

What did you expect to happen?

Policy section for all future sessions is persisted successfully, something like:

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓  Enter Plan Mode Designing a self-healing interactive failure handling system for errors, including auto-retry with configurable limits and user decision memory … │
│                                                                                                                                                                          │
│ Switching to Plan mode: Designing a self-healing interactive failure handling system for errors, including auto-retry with configurable limits and user decision     │
│ memory across request/session/global scopes.                                                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

☑ policy for enter_plan_mode persisted

Client information

  • CLI Version: 0.40.0
  • Git Commit: 3d5bdc052
  • Session ID: ff1da397-67de-4c55-b358-c5b567148e4d
  • Operating System: darwin v24.12.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 399.4 MB
  • Terminal Name: Unknown
  • Terminal Background: #212734
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

This issue repeats in new sessions, stays after re-login, update, reset.

extent analysis

TL;DR

The issue is likely due to a failure in persisting the policy for entering Plan mode, and a workaround may involve checking the settings mechanisms and retry limits.

Guidance

  • Review the settings/mod.rs and retry.rs files to understand the current implementation of retry mechanisms and settings.
  • Investigate the max_retries, retry_limit, and retry_count variables to see if they are being used correctly.
  • Check if there are any existing issues or open pull requests related to persisting policies for Plan mode.
  • Consider testing the allow for all sessions option in a different environment or with a different set of configurations to isolate the issue.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The issue seems to be related to the gemini-cli tool and its ability to persist policies for Plan mode. The error message suggests that there is a failure in persisting the policy, but the exact cause is unclear.

Recommendation

Apply workaround: The issue is likely related to a specific configuration or setting, and applying a workaround such as checking the settings mechanisms and retry limits may help 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