stable-metadata git worker loops endlessly when workspace is not a git repo

Resolved 💬 3 comments Opened Apr 26, 2026 by janbugel Closed Apr 26, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #19644
  • #19642
  • #18775
  • #19327
  • #18331

Powered by Codex Action

janbugel · 4 months ago

Log evidence — before and after git init

---

BEFORE (20260426T194957 session — no git repo in workspace)

29,190 stable-metadata errors out of 29,275 total log lines. Ran continuously for ~18 minutes with no user interaction.

Rate: ~27/sec sustained. Sample showing ~10ms intervals:

2026-04-26 20:59:47.184 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 20:59:47.196 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 20:59:47.221 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 20:59:47.244 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 20:59:47.255 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
...
2026-04-26 21:02:36.071 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 21:02:36.081 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 21:02:36.090 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
...
2026-04-26 21:17:46.144 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 21:17:46.160 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git

First: 2026-04-26 20:59:47.184
Last: 2026-04-26 21:17:46.160
Duration: ~18 minutes, firing the entire time including idle periods between conversations.

---

AFTER (20260426T211945 session — after git init in workspace root)

stable-metadata errors: 0
Total log lines: 735

Zero errors. Fix confirmed reproducible.

igorkuznecov · 4 months ago

I put together a small public workaround repo for this stable-metadata non-git loop:

https://github.com/igorkuznecov/patch-codex-extension

What it does:

  • patches the extension host bundle so the non-git stable-metadata path returns null instead of a hard error
  • patches the webview asset so failed stable-metadata requests resolve to null instead of feeding the loop
  • creates .stable-metadata.bak backups
  • includes a restore script
  • uses MIT license

Current version of the script patches all installed openai.chatgpt-* versions it finds under ~/.cursor/extensions or ~/.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-arm64
  • openai.chatgpt-26.422.71525-darwin-arm64

The patch script is here:

  • patch-codex-stable-metadata.sh

Usage:

bash patch-codex-stable-metadata.sh ~/.cursor/extensions
# or
bash patch-codex-stable-metadata.sh ~/.vscode/extensions

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.