VS Code extension: high renderer CPU in non-git workspace caused by repeated git stable-metadata worker loop
What version of the IDE extension are you using?
openai.chatgpt 26.5406.31014
What subscription do you have?
Plus
Which IDE are you using?
Visual Studio Code 1.115.0
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
When I open the Codex extension in a folder that is not a Git repository, VS Code starts using noticeably high CPU in the renderer/window process, even while idle.
After profiling the Codex webview frame in DevTools, I found that the issue is caused by a repeated worker-response loop coming from the Git worker.
The repeated message is:
{
"type": "worker-response",
"workerId": "git",
"response": {
"id": "ac5ec350-67f7-4d5b-9f27-6087a627a2eb",
"method": "stable-metadata",
"result": {
"type": "error",
"error": {
"message": "Not a git repository"
}
}
}
}
This seems to cause a message/timer storm inside the Codex webview and increases CPU usage in VS Code window/frame processes.
What steps can reproduce the bug?
- Open VS Code.
- Open a folder that is not a Git repository.
- Open the Codex extension panel/sidebar.
- Leave the panel open, even without actively using it.
- Observe increased CPU usage in VS Code window/frame processes.
I verified this by profiling the Codex webview frame in DevTools.
I also tested a workaround:
- after running
git initin the same folder, - reopening/reloading VS Code,
- and opening Codex again,
the CPU usage dropped close to zero.
This makes the issue reproducible and strongly suggests that the non-git workspace state is triggering the loop.
What is the expected behavior?
If the opened folder is not a Git repository, the extension should handle that state gracefully.
It should not repeatedly request git stable metadata, spam worker responses, or cause high renderer CPU usage while idle.
Additional information
_No response_
Showing cached comments. Read the full discussion on GitHub ↗
11 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I'm experiencing this too, on linux (opened a duplicate https://github.com/openai/codex/issues/17730).
After running
git init .the load immediately drops, no reload or restart required.Load is normal in other existing git dirs.
Had this issue on windows, clicked initialize repo and the load immediately dropped. Thanks!
Adding a Windows-specific variant that may help narrow this down.
For me this was version-sensitive:
Environment:
The repeating log line was the same one discussed here:
worker_rpc_response_error error={} method=stable-metadata workerId=git
What seems worth adding is that I could reproduce closely related failure states beyond just a plain non-git folder:
HEAD)safe.directory/ dubious ownership on WindowsIn my testing,
git initalone was not always sufficient.The loop only stopped reliably after the workspace had both:
safe.directory)HEADexistsThat suggests the eventual fix should probably treat all of these as stable non-fatal metadata states, not just:
HEADis unborn/missingsafe.directory/ ownership checksThis feels closely related to
#19326, but with the additional Windowssafe.directoryangle.I’m seeing what looks like a related issue on macOS with the latest VS Code extension.
Environment
openai.chatgpt@26.422.309441.117.0arm6426.4.1build25E25325.4.0arm64git statusworks.What I see
When I open Codex / ChatGPT in VS Code, the Codex Output panel starts logging repeated Git worker warnings (and the CPU usage reaches 130% in the Code Helper (plugin) process):
Then I also see repeated
403 Forbiddenfetch errors to this endpoint:When I open or use a chat, the Output panel is also flooded with IPC warnings like:
These warnings appear repeatedly while the conversation is active / streaming.
Example logs
On opening a chat:
While chatting / streaming:
Notes
The chat itself still appears to work, but the Output panel gets noisy with repeated warnings/errors. This seems related to this issue because of the repeated
stable-metadataGit worker warnings, but in my case I also consistently see theces/v1/rgstr403 Forbiddenerrors and the repeated IPCthread-stream-state-changed/thread-read-state-changedwarnings.----
The chat itself still appears to work in some cases, but the Output panel gets noisy with repeated warnings/errors. This seems related to this issue because of the repeated
stable-metadataGit worker warnings, but in my case I also consistently see theces/v1/rgstr403 Forbiddenerrors and the repeated IPCthread-stream-state-changed/thread-read-state-changedwarnings.Also, some older chats no longer open correctly. When I try to open them, the chat appears to stay stuck in a loading/thinking state, while the Output panel keeps logging this warning indefinitely:
I put together a small public workaround repo for this
stable-metadatanon-git loop:https://github.com/igorkuznecov/patch-codex-extension
What it does:
stable-metadatapath returnsnullinstead of a hard errorstable-metadatarequests resolve tonullinstead of feeding the loop.stable-metadata.bakbackupsCurrent version of the script patches all installed
openai.chatgpt-*versions it finds under~/.cursor/extensionsor~/.vscode/extensions, which turned out to matter when multiple extension versions are present.Tested locally on Cursor extension builds:
openai.chatgpt-26.422.62136-darwin-arm64openai.chatgpt-26.422.71525-darwin-arm64The patch script is here:
patch-codex-stable-metadata.shUsage:
Then reload the editor window.
This is only a local workaround, not an upstream fix, but it stopped the renderer/log loop in my repro.
Solved for Me
Problem gone for me after 05/02/26 9:01 AM, last Git warning logged and CPU load normal.
Didn't update Codex extension or VS Code, so fix may have been somewhere else. I see some other warnings which could be coming from some quick fix, but anyway, CPU is normal. There was a Codex Extension 26.429.30905 update waiting, but problem was gone before installing it.
I did install Codex App yesterday for testing, and it didn't have the excessive CPU load. I switched to VS Code Codex and problem persisted, so I think it's not that App installation fixed anything.
@etraut-openai, wouldn't say this is performance.
This is a bug. not some slow code.
It looks like the issue has indeed been resolved. I’ve been monitoring this for about a week, and during that time I haven’t seen any more freezes or excessive CPU usage in VS Code. Previously, the issue would occur almost immediately, but now everything is working normally, even with the Codex panel open in a non-Git workspace.
Thanks—it looks like the fix worked.
I can confirm this issue still exists on my side.
I just hit the same problem: there was a storm of
workerId=gitmessages, and after runninggit initin that folder the problem disappeared.System:
Codex version:
VSCodium version:
I can confirm that this still exists for me.
Codex version: 26.602.40724
VS Code About page:
Version: 1.123.0
Commit: 6a44c352bd24569c417e530095901b649960f9f8
Date: 2026-06-03T11:29:03+02:00
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Linux x64 6.17.0-119029-tuxedo