Codex Desktop Windows: Git controls missing when thread git metadata is not backfilled for a valid local repo

Open 💬 5 comments Opened Jun 26, 2026 by Norton-Jul

What version of the Codex App are you using?

Codex Desktop 26.623.3763.0 on Windows.

What issue are you seeing?

For an existing local workspace thread, the right-side project/source panel does not show local Git controls such as local changes, branch state, commit, or push. The panel only shows the source/GitHub area.

The local repository itself is valid. Running Git from the same workspace directory succeeds and shows a clean branch tracking origin:

git status --short --branch
## main...origin/main

git rev-parse --show-toplevel
<workspace-root>

git remote -v
origin <github-remote-url> (fetch)
origin <github-remote-url> (push)

GitHub CLI is also installed, authenticated, and usable.

Additional diagnostic evidence

The local Codex state_5.sqlite threads table has Git metadata columns:

git_sha
git_branch
git_origin_url

For the affected current thread, the row has:

cwd = <workspace-root>
git_branch = main
git_sha = NULL
git_origin_url = NULL

So Codex Desktop appears to know the branch but has not backfilled the commit SHA or origin URL for the thread, even though Git can read them correctly from the same directory. The UI appears to hide commit/push controls when git_origin_url is missing.

Other threads in the same local Codex state database do have complete Git metadata, for example:

git_branch = main
git_sha = <sha>
git_origin_url = <github-remote-url>

This suggests a thread Git metadata refresh/backfill issue rather than a global Git or GitHub CLI installation problem.

What steps can reproduce the bug?

  1. Open an existing Codex Desktop thread whose cwd is, or later becomes, a valid local Git repository.
  2. Verify terminal Git commands can read branch, SHA, and origin from the same cwd.
  3. Open the right-side source/project panel.
  4. Observe that commit/push/local Git controls are missing.
  5. Inspect the thread row in state_5.sqlite and observe git_origin_url / git_sha are empty despite a valid repo.

This may be more likely for long-running threads, or threads created before the repository was initialized or pushed, because the Git metadata does not appear to refresh later.

Expected behavior

Codex Desktop should refresh Git metadata for a thread when the cwd is a valid Git repository, especially after the thread is reopened or Codex Desktop is restarted. The UI should not permanently hide local Git controls just because git_origin_url was empty when the thread was first created.

Actual behavior

The thread remains stuck without commit/push controls even after the repository is valid, synced with origin, and Codex Desktop has been restarted.

Related issues

Possibly related but not identical:

  • #17726
  • #24484
  • #29402
  • #29911

View original on GitHub ↗

5 Comments

Norton-Jul · 2 months ago

Additional datapoint after updating/restarting Codex Desktop:

  • Codex Desktop version now shows 26.623.5175.0 on Windows.
  • The right-side panel no longer shows the full Environment Info section at all. It only shows a Sources card with the GitHub/source icon.
  • This is not limited to one repository according to local observation; the visible environment controls are missing across projects/threads.
  • Local terminal Git remains normal for the affected workspace (git status --short --branch shows the branch tracking origin cleanly).
  • The current affected thread still has git_branch = main but git_sha = NULL and git_origin_url = NULL in state_5.sqlite.
  • Other historical threads in the same local database have complete Git metadata, so this looks like an inconsistent Desktop thread metadata/UI state issue rather than GitHub CLI or Git installation failure.

Also searched public issues for environment info missing, source only panel, and commit push not showing desktop, but did not find an exact duplicate.

Norton-Jul · 2 months ago

Update after additional local diagnostics:

After mitigating the non-ASCII Windows username path issue, new threads now correctly persist Git metadata in state_5.sqlite.

For a newly created thread in the affected repo:

  • git_branch is populated
  • git_sha is populated
  • git_origin_url is populated

The previous EPERM mkdir C:\Users\����� errors no longer appear in the latest logs.

However, Codex Desktop still renders only the Sources section in the right panel. Environment Info / Changes / Branch / Commit or Push controls are still hidden across all projects and new threads.

I also tried:

  • resetting state_5.sqlite
  • clearing selected global UI state
  • clearing Chromium profile UI caches
  • restarting Codex Desktop
  • creating a new thread

The issue persists even though Git metadata is now present in the local state database. This suggests the remaining problem is likely in the Desktop UI rendering / feature surface / feature flag layer, not Git detection itself.

Norton-Jul · 2 months ago

This appears related to #30336 and especially #30344.

In my case, Git metadata is already populated in local state, but Codex Desktop still only renders the Sources section and hides the Environment Info / Git controls.

Norton-Jul · 1 month ago

Update after final local diagnostics (Windows, all repositories affected):

Current environment

  • Codex Desktop package: 26.707.3748.0
  • Desktop app-server client version in logs: 26.707.31428
  • Bundled Codex CLI: 0.144.0-alpha.4
  • Windows 11 build: 10.0.26200
  • Git: 2.54.0.windows.1

Scope has expanded

This is no longer limited to one old thread or one repository. The native Git UI fails across all tested local Git repositories and tasks on this machine.

In the representative repository, the right-side Environment Info panel may render the Git controls (Changes / Local / main / Commit or push), but the Changes view does not consume or display the actual local diff. "Generate commit message" also fails.

CLI evidence from the same workspace

git status --porcelain=v1
 M README.md

git diff --numstat
1       0       README.md

git rev-parse --show-toplevel
D:/ai_agent_project/<redacted-project>

git branch --show-current
main

git rev-parse HEAD
<valid SHA>

git remote get-url origin
<valid GitHub origin>

There are no remaining Git permission warnings. Git CLI, branch, HEAD, diff, and origin are all healthy.

Codex state evidence

The active user thread row in state_5.sqlite still contains:

git_branch = main
git_sha = NULL
git_origin_url = NULL
source = vscode

At the same time, older threads and recent threads from another repository can contain complete Git metadata, confirming that the database schema and Git installation are functional. The affected Desktop task does not refresh/backfill SHA and origin even when CLI Git succeeds from the identical cwd.

Local causes ruled out

  • Restarted Codex Desktop repeatedly
  • Tested multiple repositories and accounts/tasks
  • Rebuilt/reset local state DB with backup
  • Verified all Codex SQLite databases pass integrity checks
  • Verified Git PATH, branch, HEAD, origin, and diff
  • Removed a global-ignore permission warning by moving core.excludesFile to an accessible path; CLI output is now clean, but Desktop behavior is unchanged
  • Tested proxy/config isolation; this does not explain failure to read the local diff
  • No project-level config.toml dependency: all repositories are affected

This now appears to be a Codex Desktop Git metadata refresh/UI synchronization regression rather than a repository-specific backfill edge case.

Possibly related: #30344, #30484, #30659.

Please investigate the Desktop path that populates threads.git_sha / threads.git_origin_url and the native Changes panel from local Git status.

Norton-Jul · 1 month ago

Update: the native Git UI is now visible, but the Commit/Push flow still fails before commit-message generation. This is not a missing-UI symptom and not a GitHub push/auth failure.

Current environment

  • Windows 11 build 10.0.26200
  • Microsoft Store package: OpenAI.Codex_26.715.8383.0
  • Desktop client version in logs: 26.715.61943
  • Git for Windows: 2.54.0.windows.1

User-visible failure

Clicking the native Commit/Push action shows the localized error equivalent to:

Unable to generate commit message

Manual Git commands in the same repository work, and a manual commit/push through Git CLI has succeeded. Rebooting Windows and restarting Codex do not provide a durable fix.

Desktop log evidence

At the time of the UI failure, the Desktop log records the local Git status request being cancelled before execution:

2026-07-22T03:07:10.847Z warning [git]
git.command.complete
aborted=true
failureReason=abortedBeforeStart
requestKind=status-summary
source=local_conversation_git_actions
subcommand=status
success=false

The command family is the normal local change-collection path (git status --porcelain). Since the status/diff collection does not complete, commit-message generation has no input.

The same session also recorded:

git remote show origin
failureReason=timed_out
durationMs=10005
requestKind=default-branch
source=startup_prefetch

Process evidence

A process snapshot found 22 live git.exe processes launched by Codex-related command paths. Several had remained alive for more than 40 minutes. Commands included:

git.exe -c core.hooksPath=NUL -c core.fsmonitor=false status --porcelain
git.exe -c core.hooksPath=NUL -c core.fsmonitor=false rev-parse HEAD
git.exe -c core.hooksPath=NUL -c core.fsmonitor=false remote -v
git.exe config --null --get core.fsmonitor

A current status --porcelain process was directly under the live Codex app-server process, with another Git child beneath it. These are read-only metadata/status commands, yet they remain blocked.

This does not prove that Git for Windows itself is the root cause. The stronger hypothesis is a Codex Desktop Git-worker/process-lifecycle problem: command scheduling, cancellation, pipe handling, or child-process cleanup. The stuck Git processes appear to be a direct symptom and possible amplifier.

This now closely matches:

  • #34614 — same Desktop client and Store package versions; duplicate/stuck Git child processes
  • #17229 — repeated git status and orphaned git.exe / conhost.exe
  • #29408 — stuck Git polling in Windows multi-repo workspaces
  • #33264 — orphaned Git processes persisting in newer Windows builds

There is currently no confirmed official workaround. Killing leaked Git processes or restarting the app only clears transient state; the processes can accumulate again after Codex reopens projects.

Please investigate the Windows Desktop Git worker path used by local_conversation_git_actions, especially cancellation before spawn and cleanup of git.exe descendants.