Skip to content

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

Closed as duplicate

Description

@janbugel

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.

Activity

  1. added
    bugSomething isn't working
    extensionIssues related to the VS Code extension
    windows-osIssues related to Codex on Windows systems
    on Apr 26, 2026
  2. janbugel commented on Apr 26, 2026

    @janbugel
    Author

    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.

  3. igorkuznecov commented on Apr 29, 2026

    @igorkuznecov

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions