codex - 💡(How to fix) Fix Codex App Git diff panel shows all repository files as deleted even though local and origin branches are identical [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20753Fetched 2026-05-03 04:46:12
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Code Example

+0 -54,540
main -> origin/main

---

git status --porcelain=v1 --branch --untracked-files=all

---

## main...origin/main

---

git diff --shortstat
git diff --cached --shortstat
git diff --shortstat HEAD origin/main

---

git rev-parse main origin/main

---

a20326600185bcc23357a9ca580a700c8e289aa5
a20326600185bcc23357a9ca580a700c8e289aa5

---

git rev-parse main^{tree}
git rev-parse origin/main^{tree}

---

8abde62245d1a3a2e0a2c71094fc0cac0db0be56
8abde62245d1a3a2e0a2c71094fc0cac0db0be56

---

/home/po120/Git/OmniGrimoire

---

git rev-parse --git-dir

---

.git

---

git worktree list --porcelain

---

worktree /home/po120/Git/OmniGrimoire
HEAD a20326600185bcc23357a9ca580a700c8e289aa5
branch refs/heads/main

---

git config --get-regexp '^branch\.main\.|^remote\.origin\.'

---

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

---

git ls-remote origin refs/heads/main

---

a20326600185bcc23357a9ca580a700c8e289aa5	refs/heads/main
RAW_BUFFERClick to expand / collapse

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?

  1. Open the repository in Codex App.
  2. Open the right-side Git/diff panel.
  3. Compare main -> origin/main.
  4. Observe that the panel shows a large deletion count, for example +0 -54,540.
  5. Open any file in the diff view.
  6. 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.

extent analysis

TL;DR

The Codex App Git/diff panel issue may be resolved by checking the repository configuration and ensuring that the comparison tree is correctly materialized.

Guidance

  • Verify that the repository path and .git directory are correctly configured and accessible by the Codex App.
  • Check the remote configuration using git config --get-regexp '^branch\.main\.|^remote\.origin\.' to ensure that the origin/main branch is correctly set up.
  • Run git ls-remote origin refs/heads/main to confirm that the remote repository is reachable and the main branch is correctly referenced.
  • Try resetting the Codex App's Git panel or restarting the app to see if the issue persists.

Example

No code snippet is provided as the issue seems to be related to the Codex App's UI rendering and Git configuration.

Notes

The issue may be specific to the Codex App's implementation and not a general Git issue, as the Git CLI commands do not show any differences. Further investigation into the Codex App's configuration and repository settings may be necessary to resolve the issue.

Recommendation

Apply workaround: Try resetting the Codex App's Git panel or restarting the app to see if the issue persists, and verify the repository configuration to ensure that the comparison tree is correctly materialized.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex App Git diff panel shows all repository files as deleted even though local and origin branches are identical [1 participants]