codex - 💡(How to fix) Fix High CPU and repeated upload activity when adding a non-git project to the sidebar [1 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#18826Fetched 2026-04-22 07:52:03
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2closed ×1cross-referenced ×1

Error Message

[electron-message-handler] worker_rpc_response_error errorMessage="Not a git repository" errorName=Error errorStack="Error: Not a git repository\n at <anonymous>:2:1271\n at Set.forEach (<anonymous>)\n at IpcRenderer.i (<anonymous>:2:1259)\n at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:45997)\n at Object.onMessage (node:electron/js2c/sandbox_bundle:2:122179)" method=stable-metadata workerId=git I also sampled two hot renderer processes. Both showed the same hotspot pattern in Electron/V8 startup/runtime code, including:

v8::Context::FromSnapshot v8::ScriptCompiler::ScriptStreamingTask::Run temporal_rs_PlainTime_second The issue stopped after either:

removing the affected old threads/projects from Codex, or running git init inside the affected project directory

Root Cause

Notes:

  • This did not reproduce in every non-git directory, so persisted session/project state may be part of the trigger.
  • I do not currently have a session id / token limit / context window record for this issue, because the bug appears tied to the desktop app project/sidebar state rather than a single model request.

Code Example

[electron-message-handler] worker_rpc_response_error errorMessage="Not a git repository" errorName=Error errorStack="Error: Not a git repository\n    at <anonymous>:2:1271\n    at Set.forEach (<anonymous>)\n    at IpcRenderer.i (<anonymous>:2:1259)\n    at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:45997)\n    at Object.onMessage (node:electron/js2c/sandbox_bundle:2:122179)" method=stable-metadata workerId=git
I also sampled two hot renderer processes. Both showed the same hotspot pattern in Electron/V8 startup/runtime code, including:

v8::Context::FromSnapshot
v8::ScriptCompiler::ScriptStreamingTask::Run
temporal_rs_PlainTime_second
The issue stopped after either:

removing the affected old threads/projects from Codex, or
running git init inside the affected project directory
RAW_BUFFERClick to expand / collapse

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

26.417.41555 (1858)

What subscription do you have?

pro

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

When I add a local folder as a project in the Codex app sidebar, Codex may enter a bad state if that folder is not a git repository.

Observed behavior:

  • repeated background upload / sync activity
  • sustained high CPU usage
  • multiple Codex Helper (Renderer) processes stay above 100% CPU
  • the app becomes laggy

Relevant repeated log error:

[electron-message-handler] worker_rpc_response_error errorMessage="Not a git repository" errorName=Error errorStack="Error: Not a git repository\n    at <anonymous>:2:1271\n    at Set.forEach (<anonymous>)\n    at IpcRenderer.i (<anonymous>:2:1259)\n    at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:45997)\n    at Object.onMessage (node:electron/js2c/sandbox_bundle:2:122179)" method=stable-metadata workerId=git
I also sampled two hot renderer processes. Both showed the same hotspot pattern in Electron/V8 startup/runtime code, including:

v8::Context::FromSnapshot
v8::ScriptCompiler::ScriptStreamingTask::Run
temporal_rs_PlainTime_second
The issue stopped after either:

removing the affected old threads/projects from Codex, or
running git init inside the affected project directory

What steps can reproduce the bug?

Repro steps:

  1. Create a local project folder that is not a git repository.
  2. Open Codex app.
  3. Add that folder as a project from the sidebar.
  4. Use the project normally for some time. In my case, this was more likely to happen in a long-lived project / session state rather than immediately in every fresh folder.
  5. Codex starts showing repeated Not a git repository errors from workerId=git, repeated background activity, and sustained high CPU in multiple renderer processes.
  6. Run git init inside that same project directory.
  7. The repeated errors and high CPU stop.

Notes:

  • This did not reproduce in every non-git directory, so persisted session/project state may be part of the trigger.
  • I do not currently have a session id / token limit / context window record for this issue, because the bug appears tied to the desktop app project/sidebar state rather than a single model request.

What is the expected behavior?

Codex should handle non-git project folders gracefully.

Expected behavior:

  • if a folder is not a git repository, Codex should either skip git metadata collection or show a single non-blocking warning
  • it should not continuously retry git-related work
  • it should not trigger repeated background upload/sync activity
  • it should not cause sustained high CPU usage in renderer processes

Additional information

Environment:

  • Codex app version observed locally: 26.417.40842
  • macOS: 15.7.4
  • Apple Silicon
  • login mode: API key login

Important observations:

  • clearing old threads/projects in Codex made the issue disappear
  • git init in the affected directory also made the issue disappear
  • removing cache directories alone did not fix it
  • the problem appeared to involve old persisted thread/project state plus a non-git directory
  • multiple renderer processes were hot at the same time, while logs repeatedly showed:
    • workerId=git
    • method=stable-metadata
    • errorMessage="Not a git repository"

My current hypothesis: Codex repeatedly retries git metadata collection for a non-git project directory without backing off or treating that state as normal, and that retry loop causes renderer churn and high CPU.

extent analysis

TL;DR

Running git init inside the affected project directory or removing the non-git project from Codex may resolve the issue of repeated background upload/sync activity and high CPU usage.

Guidance

  • The issue seems to be triggered by adding a non-git repository as a project in the Codex app, which causes repeated attempts to collect git metadata.
  • To verify the issue, monitor CPU usage and background activity after adding a non-git project and check for repeated Not a git repository errors in the logs.
  • Removing the affected project from Codex or running git init in the project directory may mitigate the issue.
  • It's essential to investigate how Codex handles non-git project folders and consider implementing a mechanism to skip git metadata collection or display a non-blocking warning in such cases.

Example

No code snippet is provided as the issue seems to be related to the Codex app's behavior and configuration rather than a specific code snippet.

Notes

The issue may not be reproducible in every non-git directory, and persisted session/project state might be a contributing factor. Further investigation is needed to determine the root cause and develop a permanent fix.

Recommendation

Apply the workaround by running git init in the affected project directory or removing the non-git project from Codex, as this has been shown to resolve the issue in the reported cases. A more permanent solution would require modifications to the Codex app to handle non-git project folders more robustly.

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 High CPU and repeated upload activity when adding a non-git project to the sidebar [1 participants]