codex - 💡(How to fix) Fix Codex App: non-git saved workspace roots can trigger renderer high CPU and Git warning loops [1 comments, 2 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#19115Fetched 2026-04-24 06:00:40
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

Fix Action

Workaround

Locally I mitigated it by making every saved workspace root a valid Git repo or removing it from Codex App.

RAW_BUFFERClick to expand / collapse

Environment

  • Codex desktop app: 26.417.41555 (1858)
  • Subscription: ChatGPT Plus
  • Model: gpt-5.4
  • Platform: macOS 26.5 (25F5058e), Apple Silicon

What happened

If Codex App has a saved workspace root that is a real directory but not a Git repository, the app can get into a high-CPU loop.

In my case:

  • two Codex Helper (Renderer) processes each sat around 110% CPU in Activity Monitor
  • logs were flooded with repeated Git metadata failures
  • renderer sampling was hot in Electron/V8 JS execution and microtask processing, not blocked on I/O

I also saw a related failure path where a workspace value of literal ~ was passed into Git worktree discovery and kept producing:

  • failed to list worktrees for dir=~
  • Failed to resolve origin for workspace

Repro

  1. Save one or more workspace roots in Codex App that are directories but not Git repositories.
  2. Keep Codex App running with background refresh / workspace metadata refresh active.
  3. Watch Activity Monitor and Codex desktop logs.

Example roots that reproduced this for me:

  • /Users/sky/develop/source/todo-list-app
  • /Users/sky/1data/source/control

Expected

  • Non-git workspace roots should be treated as a cheap negative result.
  • The app should not retry aggressively enough to burn renderer CPU.
  • Literal ~ should never be passed into Git worktree resolution as a real directory.
  • Removing or fixing a saved workspace root should stop the bad refresh loop immediately.

Evidence

  • In the bad state I saw over 100000 repeated stable-metadata / Not a git repository warnings in one log set.
  • Representative warnings:
    • warning [electron-message-handler] worker_rpc_response_error ... method=stable-metadata ... errorMessage="Not a git repository"
    • warning [git-origins] failed to list worktrees for dir=~
    • warning [git-origin-and-roots] Failed to resolve origin for workspace
  • After I either removed the bad root or ran git init in every saved root, the warnings stopped and renderer CPU dropped back to normal.

Workaround

Locally I mitigated it by making every saved workspace root a valid Git repo or removing it from Codex App.

Implementation clue

From inspecting the packaged desktop app JS, one workspace-refresh path appears to special-case ~, but a Git origin / worktree resolution path still tries to resolve ~ directly and logs repeated failures. The retry / refresh behavior also seems too aggressive when stable-metadata returns Not a git repository.

extent analysis

TL;DR

The issue can be fixed by modifying the Codex App to handle non-Git repository directories as a cheap negative result and avoiding aggressive retries.

Guidance

  • Verify that the issue is caused by a saved workspace root being a directory but not a Git repository by checking the Codex App logs for repeated Not a git repository warnings.
  • To mitigate the issue, ensure all saved workspace roots are valid Git repositories or remove them from the Codex App.
  • Investigate the stable-metadata method to determine why it returns Not a git repository and adjust the retry logic to avoid burning renderer CPU.
  • Review the Git origin and worktree resolution paths to prevent passing literal ~ as a real directory.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The provided information suggests that the issue is related to the Codex App's handling of non-Git repository directories and aggressive retries. However, without access to the app's codebase, it's difficult to provide a definitive fix.

Recommendation

Apply a workaround by ensuring all saved workspace roots are valid Git repositories or removing them from the Codex App, as this has been shown to stop the bad refresh loop and reduce renderer CPU usage.

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