Skip to content

Gemini CLI loads both GEMINI.md and gemini.md on case-insensitive filesystems, duplicating context #19904

Closed

Description

@vektorich

What happened?

On a case-insensitive filesystem (macOS/Darwin), the Gemini CLI appears to be searching for both GEMINI.md and gemini.md during context initialization. Because the filesystem is case-insensitive, both paths resolve to the exact same physical file.

As a result, the CLI loads the same instructional context twice into the model's prompt, wasting context window space.

Technical Evidence:
Running ls -lai in the root directory confirms that both names point to the same inode:

1 65116059 -rw-r--r-- 1 user group 10933 16 Feb 15:59 gemini.md
2 65116059 -rw-r--r-- 1 user group 10933 16 Feb 15:59 GEMINI.md
Attempting to ignore the duplicate via .geminiignore (adding gemini.md) did not resolve the issue.

What did you expect to happen?

The loader should deduplicate files based on their device/inode ID to avoid this redundancy on case-insensitive systems.

Client information

  • CLI Version: 0.29.5
  • Git Commit: 2ef872e
  • Session ID: e1271f57-9a91-4673-a40e-cc2da331b334
  • Operating System: darwin v22.17.0
  • **Sandbox E

Login information

No response

Anything else we need to know?

No response

Activity

  1. added
    status/need-triageIssues that need to be triaged by the triage automation.
    area/coreIssues related to User Interface, OS Support, Core Functionality
    on Feb 22, 2026
  2. Nixxx19 commented on Feb 22, 2026

    @Nixxx19
    Contributor

    mhm, interesting, will look at this

  3. Sunzzx commented on Feb 22, 2026

    @Sunzzx

    /assign

  4. gemini-cli commented on Feb 22, 2026

    @gemini-cli
    Contributor

    👋 @Sunzzx, you've been assigned to this issue! Thank you for taking the time to contribute. Make sure to check out our contributing guidelines.

  5. yoganand560 commented on Feb 22, 2026

    @yoganand560

    /assign

  6. gemini-cli commented on Feb 22, 2026

    @gemini-cli
    Contributor

    @yoganand560 Thanks for taking interest but this issue is already assigned. We'd still love to have you contribute. Check out our Help Wanted list for issues where we need some extra attention.

  7. Nixxx19 commented on Feb 22, 2026

    @Nixxx19
    Contributor

    hey @Sunzzx, i was already working on this and have nearly completed a PR. would it be okay if i continue and submit it? happy to collaborate if needed, thanks!

  8. Sunzzx commented on Feb 22, 2026

    @Sunzzx

    hey @Sunzzx, i was already working on this and have nearly completed a PR. would it be okay if i continue and submit it? happy to collaborate if needed, thanks!

    sure mate , you can go ahead with it , let me know if you face any issue in the process and need help , goodluck

  9. Nixxx19 commented on Feb 22, 2026

    @Nixxx19
    Contributor

    thank you so much @Sunzzx, @vektorich just created the PR #19915, with the fix, please do check It out and let if know if you have any suggestions, thank you again!

  10. added
    help wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!
    priority/p2Important but can be addressed in a future release.
    and removed
    status/need-triageIssues that need to be triaged by the triage automation.
    on Feb 26, 2026
  11. Nixxx19 commented on Mar 4, 2026

    @Nixxx19
    Contributor

    @scidomino I spoke with @Sunzzx earlier and he was okay with me working on this issue. would it be possible to assign me to it so the PR #19915 can be reviewed? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.type/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions