gemini-cli - 💡(How to fix) Fix Bug Report: Global Configuration Serialisation Failure [1 comments, 2 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#25429Fetched 2026-04-15 06:44:36
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Code Example

> /about
# paste output here

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                 │
About Gemini CLI│                                                                                                                                                                                                                 │
CLI Version                                                             0.38.0Git Commit                                                              3f0873a83                                                                                                                               │
Model                                                                   Auto (Gemini 3)Sandbox                                                                 no sandbox                                                                                                                              │
OS                                                                      linux                                                                                                                                   │
Auth Method                                                             Signed in with Google (kurokirasama@gmail.com)Tier                                                                    Gemini Code Assist in Google One AI Pro│                                                                                                                                                                                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RAW_BUFFERClick to expand / collapse

What happened?

Even when settings appear to be active in the current session (or even persist across restarts like "Compact Tool Output"), a manual inspection of the ~/.gemini/settings.json file reveals that the changes are never actually written to the disk.

Settings NOT found in settings.json (i did not do an exhaustive search, so there could be others):

  • compact tool output
  • hide sandbox status
  • use alternate screen buffer
  • render process
  • terminal buffer
  • incremental rendering
  • screen reader mode
  • ide mode
  • compress compression threshold
  • enable git worktrees
  • memory manager agent
  • use the generalist profile to manage agent context
  • enable context management
  • topic & update narration

A search of the entire ~/.gemini/ directory (including state.json and projects.json) confirmed that keywords like "compact," "render," and "incremental" do not appear in any configuration file, despite being enabled in the UI.

What did you expect to happen?

Every setting change made through the CLI should be serialized to the global ~/.gemini/settings.json file (or the active project-level .gemini/settings.json) immediately upon being set.

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about
# paste output here

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                 │
│ About Gemini CLI                                                                                                                                                                                                │
│                                                                                                                                                                                                                 │
│ CLI Version                                                             0.38.0                                                                                                                                  │
│ Git Commit                                                              3f0873a83                                                                                                                               │
│ Model                                                                   Auto (Gemini 3)                                                                                                                         │
│ Sandbox                                                                 no sandbox                                                                                                                              │
│ OS                                                                      linux                                                                                                                                   │
│ Auth Method                                                             Signed in with Google ([email protected])                                                                                          │
│ Tier                                                                    Gemini Code Assist in Google One AI Pro                                                                                                 │
│                                                                                                                                                                                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
</details>

Login information

google account

Anything else we need to know?

The only setting that appears to correctly map and write to the JSON file is enable session cleanup (mapped to general.sessionRetention.enabled). All other verified changes seem to exist only in the application's active memory or are being read from a non-standard/hidden location that is not the documented settings.json.

extent analysis

TL;DR

The issue can be mitigated by investigating the application's code to identify where the settings are being stored and ensuring they are written to the settings.json file as expected.

Guidance

  • Review the Gemini CLI code to determine how settings are being stored and serialized to files, focusing on the differences between enable session cleanup and other settings.
  • Investigate the possibility of a non-standard or hidden location being used to store settings, as hinted by the fact that some settings seem to persist across restarts.
  • Verify that the settings.json file is being properly read and written by the application, and that there are no permissions issues preventing the file from being updated.
  • Consider adding logging or debugging statements to the application to track where and how settings are being stored, to help identify the root cause of the issue.

Example

No specific code example can be provided without access to the Gemini CLI codebase, but a potential approach could involve adding debug logging to the setting storage and retrieval functions to identify where the data is being stored.

Notes

The issue seems to be specific to the Gemini CLI application and its handling of settings, so any solution will depend on the specifics of the application's code and behavior. Without access to the code, it's difficult to provide a more detailed fix.

Recommendation

Apply workaround: Investigate and modify the application's code to ensure settings are properly written to the settings.json file, as this seems to be the root cause of 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

gemini-cli - 💡(How to fix) Fix Bug Report: Global Configuration Serialisation Failure [1 comments, 2 participants]