Skip to content

Codex Desktop creates .git directories in non-repository workspace folders, breaking Windows Git overlay icons #32577

Closed as duplicate

Description

@terryyan2024

What version of the Codex App are you using (From “About Codex” dialog)?

26.707.31428

What subscription do you have?

ChatGPT Pro X20

What platform is your computer?

windows and mac

What issue are you seeing?

Environment:

  • Windows 11 / Windows 10.0.26200
  • Codex desktop app: OpenAI.Codex_26.707.3748.0_x64
  • Codex CLI: 0.142.3
  • Git: 2.53.0.windows.2
  • Explorer Git overlay provider: TortoiseGit

Problem:
Codex Desktop may create .git directories in the selected workspace folder or subfolders even when the selected workspace is not intended to be a Git repository root.

Our workspace layout is category-based, for example:

D:\WorkspaceRoot
ProjectA
ProjectB
ProjectC\

Each project has its own repository boundary or may be managed separately. D:\WorkspaceRoot itself is not always intended to be treated as a Git repository root.

Observed behavior:

  • Codex creates .git directories under workspace/category folders.
  • Some of these .git directories are empty, but Explorer/TortoiseGit still treats them as Git roots.
  • This breaks Git overlay icons for the real project folders.
  • Removing the extra .git directory restores expected overlay behavior, but Codex may recreate it later.

Expected behavior:
Codex should not initialize or create .git directories automatically in a user-selected workspace unless the user explicitly requests Git initialization.

Suggested behavior:

  • Detect existing Git repositories without creating .git.
  • If no Git repo exists, run in non-Git workspace mode.
  • If Git initialization is needed, ask for confirmation first.
  • Provide a setting to disable automatic Git initialization entirely.

Impact:
This breaks Windows Explorer/TortoiseGit status overlays and makes unrelated project folders appear as part of the wrong Git repository.

What steps can reproduce the bug?

Codex Desktop may create .git directories in the selected workspace folder or subfolders even when the selected workspace is not intended to be a Git repository root.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jul 12, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    on Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions