stable-metadata git worker loops endlessly when workspace is not a git repo
Extension: openai.chatgpt-26.422.30944-win32-x64
Platform: Windows 11 x64
Subscription: Plus
What's happening
Opening Codex in a folder that isn't a git repo causes the extension to hammer stable-metadata on the git worker in a tight retry loop — no backoff, no stop. It runs the entire time the extension is open, including when idle between conversations.
My log had 23,846 of these in 13 minutes (~30/sec):
\\\\
[warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
\\
First: 2026-04-26 20:59:47.184 — Last: 2026-04-26 21:12:50.124
Log: %APPDATA%\Code\logs\<session>\window1\exthost\openai.chatgpt\Codex.log
Reproducing
Open VS Code + Codex with cwd pointing to a non-git directory. CPU stays elevated the whole session.
Confirmed fix
Running git init in the workspace root drops the error count to zero immediately (23,846 → 0 in the next session).
Expected
If the git worker can't find a repo, it should either skip entirely or back off — not spin at 30 req/sec for the whole session.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Log evidence — before and after
git init---
BEFORE (
20260426T194957session — no git repo in workspace)29,190
stable-metadataerrors out of 29,275 total log lines. Ran continuously for ~18 minutes with no user interaction.Rate: ~27/sec sustained. Sample showing ~10ms intervals:
First:
2026-04-26 20:59:47.184Last:
2026-04-26 21:17:46.160Duration: ~18 minutes, firing the entire time including idle periods between conversations.
---
AFTER (
20260426T211945session — aftergit initin workspace root)Zero errors. Fix confirmed reproducible.
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.