Codex Desktop Review uses Git empty tree as diff target on Windows/WSL
Summary
Codex Desktop on Windows with WSL mode enabled can show extremely large bogus Review diffs because the Review summary runs git diff against Git's empty tree object (4b825dc642cb6eb9a060e54bf8d69288fbee4904) instead of the current working tree / HEAD.
This makes the Review pane report the whole repository as deleted and can make the app very slow.
Environment
- Product: Codex Desktop
- Windows package observed:
OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0 - Platform: Windows 11 + WSL
- Codex config:
runCodexInWindowsSubsystemForLinux = trueintegratedTerminalShell = "wsl"- Reinstall/reset attempted:
- Microsoft Store uninstall/reinstall
- Full user-state reset / reinstall
- Issue reproduced after reset
Symptoms
- Review pane shows tens or hundreds of thousands of deleted lines.
- The reported deletion count matches a diff against Git's empty tree, not the real working tree diff.
- App responsiveness becomes very poor while Review is open / computing summaries.
- Local Git status does not match the Review pane magnitude.
Example 1:
Codex Review: ~25k deleted lines
Local reproduction:
git diff --shortstat origin/main 4b825dc642cb6eb9a060e54bf8d69288fbee4904
116 files changed, 25065 deletions(-)
The actual branch diff in that repo was much smaller:
git diff --shortstat origin/main HEAD
17 files changed, 1109 insertions(+), 61 deletions(-)
Example 2:
Codex Review: ~150k deleted lines
Local reproduction:
git diff --shortstat HEAD 4b825dc642cb6eb9a060e54bf8d69288fbee4904
512 files changed, 156757 deletions(-)
The working tree in that repo did not have such a diff:
git status --short --branch
## master...origin/master
?? .agents/
?? .codex
?? tmp/
Local log evidence
The fresh Codex Desktop log shows Review summary invoking Git with the empty tree object as the right-hand side:
warning [git] git.command.complete aborted=true allowedNonZeroExitCodes=0,1 argsCount=11
command="git -c diff.mnemonicPrefix=false -c diff.noprefix=false -c core.quotePath=false -c core.hooksPath=/dev/null -c core.fsmonitor= diff --no-ext-diff --no-textconv --color=never --src-prefix=a/ --dst-prefix=b/ bf21ca3074bd18f25ed7836fc9f36206df143c2b 4b825dc642cb6eb9a060e54bf8d69288fbee4904 --find-renames --numstat -z"
cwd=/mnt/c/<redacted>/agentic-tool-monitor
requestKind=review-summary
In this repo:
git rev-parse origin/main
bf21ca3074bd18f25ed7836fc9f36206df143c2b
So Codex appears to compare origin/main to the empty tree, producing a "delete the entire repo" diff.
Additional WSL / watcher evidence
The same session logs also show the Windows-side git watcher trying to watch WSL /mnt/c/... paths via Node fs.watch, which fails with ENOENT:
warning [git-repo-watcher] Failed to watch git path
errorMessage="ENOENT: no such file or directory, watch '/mnt/c/<redacted>/agentic-tool-monitor/.git'"
path=/mnt/c/<redacted>/agentic-tool-monitor/.git/HEAD
This may be related to the Review metadata becoming stale or incomplete under Windows + WSL path handling.
Expected behavior
- Review summary should compare the intended base commit/branch against the current working tree, index, or HEAD.
- It should not use
4b825dc642cb6eb9a060e54bf8d69288fbee4904unless the repository is actually unborn / initial commit / intentionally comparing against an empty tree. - Windows Desktop should not attempt to watch
/mnt/c/...paths with Windows Nodefs.watch; paths should be normalized or watched inside the WSL context.
Actual behavior
- Review summary compares a real branch commit to the empty tree.
- Review shows the whole repository as deleted.
- App becomes very slow while the huge bogus diff is computed.
- Full reinstall/reset does not resolve the issue.
Related issues found
This appears related to, but more specific than:
- #13721 - Review pane can show diffs that Git does not see on Windows/WSL.
- #24178 / #24364 - Windows/WSL path identity and migration issues affecting Desktop state/session behavior.
I did not find an existing issue that specifically captures requestKind=review-summary invoking git diff <base> 4b825dc642cb6eb9a060e54bf8d69288fbee4904.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗