Skip to content

Codex Desktop Changes counter persists across old project conversations after commit, push, and restart #42775

Open

Description

@ts

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?

  1. Open a local Git repository as a Codex project and create several conversations at commit A.

  2. Make a substantial set of edits in one or more conversations.

  3. Commit all changes as commit B and push B to the tracked upstream.

  4. 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
    
  5. Open conversations in the project that were created at commit A.

  6. Observe that the Environment panel still shows the entire A-to-B addition/deletion count as “Changes.”

  7. Fully quit and restart Codex Desktop, and update the app if an update is available.

  8. Reopen those conversations and observe that the historical count remains.

  9. 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:

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

  1. added
    bug
    app
    session
    on Sep 4, 2026
  2. CJavierSaldana commented on Nov 3, 2026

    @CJavierSaldana

    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):

    • Task created: 2026-11-03 06:59:27 UTC.
    • Shortly after starting, the Branch counter showed +67,285 / -11,761.
    • The task's checked-out HEAD matched the live main on GitHub, verified separately through the GitHub API. That main commit was dated 2026-10-31 13:28:46 UTC.
    • However, the workspace's origin/main still pointed to an older commit; its reflog entry was dated 2026-10-21 09:16:56 UTC.
    • Comparing the stale origin/main with 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.
    • The configuration files we inspected had modification times around 2026-11-03 07:04:01–07:04:54 UTC, after task creation. We do not have a working-tree snapshot from the exact instant the task was created.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions