High CPU and repeated upload activity when adding a non-git project to the sidebar
Resolved 💬 0 comments Opened Apr 21, 2026 by xiaozuoyou Closed Apr 21, 2026
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:
- Create a local project folder that is not a git repository.
- Open Codex app.
- Add that folder as a project from the sidebar.
- 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.
- Codex starts showing repeated
Not a git repositoryerrors fromworkerId=git, repeated background activity, and sustained high CPU in multiple renderer processes. - Run
git initinside that same project directory. - 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 initin 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=gitmethod=stable-metadataerrorMessage="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.