[Windows Desktop 26.721.3996.0] codex.exe 0xc0000409 crash triggered by Git repository detection; hiding .git prevents it
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- git, rust
- Domain
- desktop, devtools, operating-systems
Research direction
Start by reproducing the crash with .git present and absent, then inspect the git-repo-watcher activity and the reported Windows WER minidumps. Compare behavior for unborn and valid HEAD repositories, including the non-ASCII paths described. Done means Git repository detection and watching no longer terminate codex.exe, and errors are handled without a native crash.
Written by the indexing model from the issue text.
Description
Version
- Microsoft Store package:
OpenAI.Codex_26.721.3996.0_x64__2p2nqsd0c76g0 - An earlier same-day package,
26.721.3404.0, also crashed. - The regression began immediately after the July 24 update.
- User configuration was unchanged/default.
Platform
- Windows x64
- Native local projects (not WSL)
- Exact Windows build was not collected
Summary
After the update, the native codex.exe process repeatedly hard-crashes when a local project is recognized as a Git repository. A controlled A/B test with two separate projects shows that the visibility of the .git directory deterministically changes the outcome:
.gitpresent: Codex crashes..gitrenamed so Codex cannot detect it: Codex remains usable..gitrestored: the crash returns.
This reproduced with either repository by itself, so it is not limited to multi-repository interaction.
Reproduction / controlled tests
- Close Codex completely.
- Open a local project that contains a
.gitdirectory. - Launch Codex and resume normal project use.
codex.exeexits with a native Windows crash.- Close Codex and rename
.gitto a non-Git name such as.git.codex-disabled. - Relaunch Codex and use the same project: the crashes stop.
- Restore the directory name to
.git: the crash returns.
This was tested independently on two local repositories.
Both repositories initially had zero commits, but that was ruled out as the direct cause:
- An empty initial commit was created in each repository.
git rev-list --all --countreturned1for each repository.git rev-parse --verify HEADreturned a valid commit hash for each repository.- Codex still crashed with
.gitpresent.
Therefore this is not only an unborn-HEAD / zero-commit problem. The remaining common factors include Git repository detection/watching, Japanese (non-ASCII) project paths, and repositories with no tracked files beyond an empty initial commit.
Windows Error Reporting evidence
Repeated failures on 26.721.3996.0:
Faulting application: codex.exe
Faulting module: codex.exe
Exception code: 0xc0000409
Fault offset: 0x000000000d3e12f1
Fast-fail parameter (P10): 7
The same signature occurred repeatedly at approximately 15:44, 16:46, and 17:22 local time. Windows reported the same failure bucket hash for these events.
The earlier 26.721.3404.0 package also crashed with 0xc0000409, at fault offset 0x000000000d3ee081.
Relevant app-log observations
Before applying the workaround, the logs repeatedly showed Git repository watcher activity, including:
info [git-repo-watcher] Starting git repo watcher
warning [git] git.command.complete ... subcommand=rev-parse ... exitCode=128
The rev-parse failures were observed while the repositories still had unborn HEADs. Making both HEADs valid did not prevent the native crash, so those command failures are not the sole cause.
Expected behavior
Codex should not terminate the native process when detecting or watching a valid Git repository. Any watcher, path, encoding, or repository-state error should be isolated and surfaced gracefully.
Current workaround
Rename .git so Codex does not detect the project as a Git repository. This makes the app usable again, but disables Git-aware Codex features for those projects.
Possibly related issues
- #31989 — Windows
codex.exe0xc0000409native crashes - #34473 — Windows Git scanner retry loop triggered by an unresolvable
.gitpath - #27120 — Windows Desktop exits during background Git work
This report appears distinct because the crash is reproducibly toggled by hiding/restoring .git, persists after HEAD becomes valid, and reproduces with either repository independently.
Privacy / diagnostics
Project names, user name, and local paths have been sanitized. Windows WER generated minidumps on the affected machine; they can be provided through a private channel if maintainers request them.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·