codex - 💡(How to fix) Fix Codex App enters high CPU loop when project list contains non-git entries [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#19201Fetched 2026-04-24 05:58:53
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1

Error Message

  • Error: Not a git repository

Fix Action

Fix / Workaround

Workaround:

Code Example

[electron-message-handler] worker_rpc_response_error errorMessage="Failed to resolve git root: spawn ENOTDIR" ... method=stable-metadata workerId=git

---

[git] git.command.complete ... command="git rev-parse --show-toplevel" ... failureReason=spawnFailed
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.422.20832 (2025)

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Darwin 25.2.0 arm64 arm

What issue are you seeing?

Codex App can enter a high CPU loop when the project list contains entries that are not valid Git repositories. In my case, two Codex Helper (Renderer) processes were each using around 110–120% CPU even when the app window was basically idle.

The issue appeared to be tied to project metadata / Git resolution. Logs repeatedly showed Git worker errors such as:

  • Error: Not a git repository
  • Failed to resolve git root: spawn ENOTDIR
  • repeated git rev-parse --show-toplevel calls from the stable-metadata Git worker

One of the affected project entries was a non-Git project, and one path was also represented by a macOS Finder alias, which may have made the behavior worse.

After I removed all projects from Codex that were not backed by a real Git repository and restarted the app, CPU usage returned to normal.

What steps can reproduce the bug?

  1. Open Codex App on macOS.
  2. Add one or more projects that are not valid Git repositories.
  3. Restart Codex App or let it sit while it resolves project metadata.
  4. Observe Activity Monitor and logs.

Observed behavior:

  • multiple Codex Helper (Renderer) processes consume very high CPU at idle
  • logs repeatedly show Git worker / stable-metadata errors
  • repeated Git command attempts continue in a loop instead of failing gracefully

What is the expected behavior?

Codex App should handle non-Git project entries gracefully. Expected behavior:

  • if a project is not a Git repository, metadata resolution should fail once and stop retrying aggressively
  • non-Git folders should not cause renderer CPU loops
  • the app should remain idle when no active work is being done

Additional information

Relevant logs included messages like:

[electron-message-handler] worker_rpc_response_error errorMessage="Failed to resolve git root: spawn ENOTDIR" ... method=stable-metadata workerId=git

and repeated entries like:

[git] git.command.complete ... command="git rev-parse --show-toplevel" ... failureReason=spawnFailed

I also sampled the hot renderer processes and the stacks pointed into Electron / V8 JavaScript execution rather than normal idle rendering, which suggests a retry loop in the app logic.

Workaround:

  • remove all projects from Codex that are not backed by a real Git repository
  • restart the app

After doing that, CPU usage returned to normal.

extent analysis

TL;DR

Remove non-Git projects from Codex App to prevent high CPU usage caused by repeated Git resolution attempts.

Guidance

  • Verify that all projects in Codex App are valid Git repositories to prevent the issue.
  • Check the project list for any entries that may be represented by macOS Finder aliases, as these may exacerbate the problem.
  • If a project is not a Git repository, consider removing it from Codex App or finding an alternative way to handle non-Git projects.
  • Monitor CPU usage and logs after removing non-Git projects to ensure the issue is resolved.

Example

No code snippet is provided as the issue is related to project configuration and Git repository validation.

Notes

The provided workaround suggests that removing non-Git projects from Codex App can resolve the issue, but it may not be a long-term solution. The app should ideally handle non-Git project entries gracefully without causing high CPU usage.

Recommendation

Apply the workaround by removing non-Git projects from Codex App, as it is a straightforward and effective way to prevent high CPU usage caused by repeated Git resolution attempts.

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 enters high CPU loop when project list contains non-git entries [1 comments, 2 participants]