Codex App Git diff panel shows all repository files as deleted even though local and origin branches are identical
What version of the Codex App are you using (From “About Codex” dialog)?
26.429.30905
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64; repository opened from WSL2: Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64
What issue are you seeing?
The Codex App Git/diff panel incorrectly shows the repository as having a massive deletion diff.
In the right-side Git panel, the branch comparison shows:
+0 -54,540
main -> origin/main
What steps can reproduce the bug?
- Open the repository in Codex App.
- Open the right-side Git/diff panel.
- Compare
main -> origin/main. - Observe that the panel shows a large deletion count, for example
+0 -54,540. - Open any file in the diff view.
- Observe that the entire file content is shown as red deletions.
I tried restarting Codex App and refreshing the panel, but the issue still appears.
Git CLI shows no actual diff:
git status --porcelain=v1 --branch --untracked-files=all
Output:
## main...origin/main
git diff --shortstat
git diff --cached --shortstat
git diff --shortstat HEAD origin/main
All three commands produce no output.
git rev-parse main origin/main
Output:
a20326600185bcc23357a9ca580a700c8e289aa5
a20326600185bcc23357a9ca580a700c8e289aa5
git rev-parse main^{tree}
git rev-parse origin/main^{tree}
Output:
8abde62245d1a3a2e0a2c71094fc0cac0db0be56
8abde62245d1a3a2e0a2c71094fc0cac0db0be56
<img width="609" height="1008" alt="Image" src="https://github.com/user-attachments/assets/79741c0d-fb3a-43a7-9959-c6d9cbafee08" />
What is the expected behavior?
The Codex App Git/diff panel should show no file changes when main and origin/main point to the same commit/tree.
It should not render every file as deleted when Git CLI reports no diff.
Additional information
This repository was originally created/cloned outside Codex App, likely from VS Code, but it is a normal Git repository.
The repository path is:
/home/po120/Git/OmniGrimoire
The .git path is a normal directory:
git rev-parse --git-dir
Output:
.git
The repository is not a linked worktree:
git worktree list --porcelain
Output:
worktree /home/po120/Git/OmniGrimoire
HEAD a20326600185bcc23357a9ca580a700c8e289aa5
branch refs/heads/main
Remote configuration:
git config --get-regexp '^branch\.main\.|^remote\.origin\.'
Output:
remote.origin.url https://github.com/Lianye-Scythe/OmniGrimoire.git
remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
branch.main.remote origin
branch.main.merge refs/heads/main
Remote check:
git ls-remote origin refs/heads/main
Output:
a20326600185bcc23357a9ca580a700c8e289aa5 refs/heads/main
This looks like the Codex App UI may be failing to read or materialize one side of the comparison tree, causing the diff view to render every file as deleted.
6 Comments
I am seeing the same issue in Codex Desktop App.
Environment
/home/wangtao/code/express-ai-engineering-suitemasterorigin/masterSymptom
The Codex Review/Git diff panel shows a very large diff:
Codex Desktop App.
Environment
/home/kan/project/testmasterorigin/masterSame problem
Codex Desktop App.
Environment
Platform: Windows + WSL2
Repository path: /home/nine/ws/system
Branch: main
Remote branch: origin/main
Same problem
I am seeing what looks like the same bug, but with an important difference from the original report.
Environment
C:\Users\WojtekA.INSOLUTIONS\Documents\Obsidian\Work/mnt/c/Users/WojtekA.INSOLUTIONS/Documents/Obsidian/WorkSymptom
In the Codex Desktop Git/diff panel, the branch comparison shows a huge diff, currently around:
+1930 -411233main -> origin/mainThe UI also highlights
.gitignorein the diff panel and shows a small per-file diff there (for example.gitignore +0 -32), but Git CLI does not show a real.gitignorediff.The panel also shows:
Large diff detected — showing one file at a timeWhat Git CLI shows
Both Windows Git and WSL Git show the same sane repository state.
Windows PowerShell
git statusRepo is on
main, ahead oforigin/mainby 2 commits, with a small normal working tree:WSL
git statusSame result as Windows.
So this does not appear to be a case where Windows Git and WSL Git disagree. They agree with each other, and both disagree with the Codex Desktop UI.
Important detail
This repo is opened from the Windows filesystem, not from a WSL
/home/...path.That may mean this is not only a “repo hosted inside WSL” problem. It may be a broader Desktop diff/caching/path-resolution issue in Windows + WSL agent mode.
What I already verified
git statusis correctgit statusis correctgit diff/git diff --shortstatfrom CLI do not show anything close to the huge deletion count shown by the UI.gitignoreis not actually modified according to Git CLISuspicion
This looks like a Codex Desktop UI/state/cache bug rather than a real repository diff.
Possibly relevant:
C:If useful, I can also provide:
git statusoutputI confirm this happens after fixing codex WSL environment by setting CODEX_HOME to
$HOME/.codexwithin WSLI pushed a candidate fix here: https://github.com/yeager/codex/compare/main...yeager:codex:fix/app-git-diff-identical-tree-empty
It adds a defensive fast path in
codex-git-utils: when the selected remote base andHEADresolve to the same tree andgit status --porcelain=v1 --untracked-files=allis clean,gitDiffToRemotereturns an empty diff without materializing a patch. The existing diff path is preserved when tracked or untracked changes exist.Tested with:
I tried to open the PR directly from the fork, but GitHub returned:
yeager does not have the correct permissions to execute CreatePullRequest.