Repository navigation
Description
What version of the Codex App are you using?
26.901.31953 (build 7868)
What subscription do you have?
Paid ChatGPT subscription. This appears independent of subscription tier.
What platform is your computer?
macOS 26.7 (Build 25G224), arm64 (Apple Silicon)
What issue are you seeing?
Codex Desktop's Environment panel shows a large green/red “Changes” count in every existing conversation for a local project even after all changes have been committed and pushed, the working tree is clean, the branch exactly matches its upstream, the obsolete remote has been removed, and the app has been fully restarted and updated.
In this case the panel continued to show +20,669 -6,924. Git reported:
## main...gitea/main
and the branch was 0 ahead / 0 behind with empty staged, unstaged, and untracked diffs.
Read-only inspection of Codex's local state showed that existing conversations retained the Git SHA captured when each conversation was created. Different conversations in the same project stored many historical threads.git_sha values. A newly created conversation stored current HEAD, while older conversations continued comparing against their historical SHA after commit, push, app restart, and app update.
The only effective local workaround was to back up Codex's state database and manually update all conversation git_sha values for that project to current HEAD. Users should never need to modify Codex's internal SQLite state to make a Git status indicator reflect a clean repository.
This is especially misleading because the counter is labeled “Changes” and appears beside branch and commit/push controls. It looks like actionable current repository state, not an immutable diff from when each conversation happened.
What steps can reproduce the bug?
-
Open a local Git repository as a Codex project and create several conversations at commit A.
-
Make a substantial set of edits in one or more conversations.
-
Commit all changes as commit B and push B to the tracked upstream.
-
Verify that the worktree is clean and synchronized:
git status --short --branch ## main...origin/main git diff --stat (empty) git diff --cached --stat (empty) git rev-list --left-right --count origin/main...HEAD 0 0 -
Open conversations in the project that were created at commit A.
-
Observe that the Environment panel still shows the entire A-to-B addition/deletion count as “Changes.”
-
Fully quit and restart Codex Desktop, and update the app if an update is available.
-
Reopen those conversations and observe that the historical count remains.
-
Create a new conversation at commit B and observe that it uses B as its base, unlike the older conversations.
What is the expected behavior?
The Environment panel should represent current actionable Git state. Once changes are committed and the branch matches its upstream, it should show zero changes in every conversation for that project.
If Codex intentionally preserves a historical per-conversation comparison, it should not be labeled simply “Changes” beside current Git controls. It should be clearly labeled “Changes since this conversation started,” visually separated from working-tree status, and provide a supported action to advance/reset the comparison baseline after a commit or push.
Additional information
This is related to, but distinct from:
- Codex Desktop stale local changes persist after push — context switch no longer clears (only full restart works) #31528, where stale local changes clear after a full app restart. In this case a restart and app update do not clear the count because historical conversation SHAs persist.
- Codex Desktop native GitHub UI does not refresh in the background #30740, which mentions older thread rows retaining old
git_shavalues as a side observation in a broader native GitHub refresh report. This issue focuses specifically on the persistent Environment “Changes” counter across existing project conversations.
The underlying repository was healthy. Changing/removing remotes and resetting the tracked upstream did not affect the counter. The persisted per-conversation base SHA did.
Activity
CJavierSaldana commentedon Nov 3, 2026
We also encountered a similar misleading large Changes/Branch counter, including in a newly created Codex Cloud task. This differs from the older-conversation reproduction above: our read-only evidence points to a stale
origin/main, rather than a confirmed persisted per-conversation SHA. We are adding it as a related incident, without assuming the same internal cause.Observed in a newly created Codex Cloud task, viewed through the desktop app. Repository identifiers, commit hashes, source files, screenshots, task IDs, and session links are intentionally omitted.
Timeline and read-only findings (all timestamps UTC):
mainon GitHub, verified separately through the GitHub API. That main commit was dated 2026-10-31 13:28:46 UTC.origin/mainstill pointed to an older commit; its reflog entry was dated 2026-10-21 09:16:56 UTC.origin/mainwith HEAD yielded 773 files, +67,167 / -11,756, across 64 existing commits. Those commits were already present on the live GitHub main. This accounts for almost the entire displayed counter.Relevant official documentation:
Using Codex Cloud, says a new task gets a separate workspace and “does not recover another task’s uncommitted changes”.
Cloud environments, under “Reuse and update saved state,” explains that new tasks start from the published environment's prepared filesystem, while existing tasks continue with their own saved files. This describes isolated workspaces based on reusable setup; it does not promise a completely fresh Git clone for every task.
To be precise, we have not established that uncommitted files leaked between independent tasks. The verified finding is stale Git comparison metadata in a fresh cloud task. The resulting counter makes already-published history look like a large set of changes associated with the new task.
Expected behavior: initialize or refresh the relevant remote-tracking comparison reference when preparing a new cloud task, or clearly identify an outdated comparison base and separate that historical diff from actual working-tree changes.
The stale-reference aspect is also reported in #31534. It would help to distinguish the current task's changes, a historical conversation baseline, and a cached remote-branch baseline in the UI.