Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Antigravity Global Rules and Gemini CLI Global Context Both Write to ~/.gemini/GEMINI.md Causing Configuration Conflicts #16058

@Shallow-dusty

Description

@Shallow-dusty

What happened?

When using both Antigravity IDE and Gemini CLI on the same system, their global configuration files conflict because both tools are hardcoded to use the exact same file path: ~/.gemini/GEMINI.md.

Observed Behavior:

  1. Antigravity IDE automatically creates/modifies ~/.gemini/GEMINI.md when users click "+ Global" to add global rules
  2. Gemini CLI reads and potentially modifies the same ~/.gemini/GEMINI.md file for global context
  3. Configuration pollution occurs: Instructions meant for one tool leak into the other, causing:
    • Unexpected AI behavior in both tools
    • User confusion about which tool modified the file
    • Need for manual workarounds (e.g., adding warning comments to separate configurations)

Evidence from My System:

After using both tools, my ~/.gemini/GEMINI.md file (2904 bytes) contains mixed content from both applications. I had to manually add this line to prevent confusion:

- The 'antigravity' folder and its `mcp_config.json` are strictly for the
  Antigravity IDE environment, NOT the Gemini CLI. The CLI uses the `extensions/`
  directory and `settings.json`. Do not attempt to sync, mix, or treat
  Antigravity's MCPs (like Sequential Thinking or Linear) as 'missing' from the CLI.

This workaround shouldn't be necessary if the tools used separate configuration files.

What did you expect to happen?

Each tool should use independent configuration paths to avoid conflicts:

Proposed Solution:

Option 1: Antigravity uses a subdirectory (Recommended)

~/.gemini/GEMINI.md                      ← Gemini CLI only
~/.gemini/antigravity/RULES.md           ← Antigravity only (new path)

Option 2: Antigravity uses its own top-level directory

~/.gemini/GEMINI.md                      ← Gemini CLI
~/.antigravity/GEMINI.md                 ← Antigravity (matches ~/.antigravity/ convention)

Benefits:

  • ✅ No configuration pollution between tools
  • ✅ Clear separation of concerns
  • ✅ Consistent with existing subdirectory pattern (~/.gemini/antigravity/mcp_config.json)
  • ✅ Backward compatible: existing ~/.gemini/GEMINI.md stays for Gemini CLI

Client information

│ About Gemini CLI │
│ │
│ CLI Version 0.23.0 │
│ Git Commit 3ff0558
│ Model auto-gemini-3 │
│ Sandbox no sandbox │
│ OS win32 │
│ Auth Method OAuth │
│ User Email [email protected]

Login information

Google Account

Anything else we need to know?

Evidence of Hardcoded Paths

1. Antigravity IDE Hardcodes ~/.gemini/GEMINI.md

Official Documentation:

File System Evidence:
On my Windows system, Antigravity stores its configuration under ~/.gemini/antigravity/:

C:\Users\{username}\.gemini\
├── GEMINI.md                    ← SHARED FILE (conflict point)
├── antigravity/
│   ├── mcp_config.json
│   ├── conversations/
│   ├── brain/
│   └── global_workflows/

2. Gemini CLI Hardcodes ~/.gemini/GEMINI.md

Official Documentation:

File System Evidence:
Gemini CLI uses the root ~/.gemini/ directory for its core configurations:

C:\Users\{username}\.gemini\
├── GEMINI.md                    ← SHARED FILE (conflict point)
├── settings.json
├── oauth_creds.json
├── extensions/
└── tmp/

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitytype/bug🔒 maintainer only⛔ Do not contribute. Internal roadmap item.

    Type

    No fields configured for Bug.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions