gemini-cli - 💡(How to fix) Fix GEMINI.md discovery fails on Case-sensitive filesystems (macOS APFS)

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…

Root Cause

Technical Root Cause Analysis: The discovery logic likely uses a lowercase string (gemini.md) when calling fs.stat() or similar system calls. On case-sensitive volumes, this fails to match the standard GEMINI.md filename. It also affects "Just-In-Time" context loading.

RAW_BUFFERClick to expand / collapse

What happened?

CLI Version: 0.41.2 OS: macOS (Darwin) 25.4.0 Filesystem: APFS (Case-sensitive)

Problem: The CLI fails to automatically discover and load instructions from GEMINI.md (uppercase) files in both the global home directory (~/.gemini/GEMINI.md) and the local project root. Commands like /memory show return "Memory is currently empty" despite the files being present.

Steps to Reproduce:

  1. Use a macOS volume formatted as APFS (Case-sensitive).
  2. Create ~/.gemini/GEMINI.md with some instructions.
  3. Start gemini and run /memory show. (Result: Empty)
  4. Rename the file to ~/.gemini/gemini.md (lowercase).
  5. Run /memory reload then /memory show. (Result: Instructions loaded)

Expected Behavior: The CLI should prioritize GEMINI.md (all caps) as the standard filename for instructions, as documented, even on case-sensitive filesystems.

Technical Root Cause Analysis: The discovery logic likely uses a lowercase string (gemini.md) when calling fs.stat() or similar system calls. On case-sensitive volumes, this fails to match the standard GEMINI.md filename. It also affects "Just-In-Time" context loading.

What did you expect to happen?

I expected the CLI to automatically discover and load the GEMINI.md file (uppercase) on startup, as this is the documented standard filename. Since GEMINI.md is the industry-standard casing for instructional files (similar to README.md), the discovery logic should successfully stat and read the file regardless of whether the filesystem is case-sensitive or case-insensitive. Specifically, /memory show should have displayed the contents of the root GEMINI.md and ~/.gemini/GEMINI.md without requiring a rename to lowercase.

Client information

  • CLI Version: 0.41.2
  • Git Commit: b0c7a1722
  • Operating System: darwin v25.4.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 320.7 MB
  • Terminal Name: Unknown
  • Terminal Background: #212734
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

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 GEMINI.md discovery fails on Case-sensitive filesystems (macOS APFS)