Skip to content

Codex IDE extension causes 100% Code Helper (Renderer) CPU in non-git folders due to git stable-metadata retry loop #19644

@snz2

Description

@snz2

What version of the IDE extension are you using?

openai.chatgpt@26.422.30944

What subscription do you have?

yes

Which IDE are you using?

VS Code

What platform is your computer?

macos

What issue are you seeing?

When opening the Codex IDE extension in a folder that is not a Git repository, the VS Code process Code Helper (Renderer) immediately jumps to around 100% CPU and stays there.

This happens even when I do not run any prompt or perform any action inside Codex. Simply opening the Codex IDE/webview is enough to trigger it.

The issue appears to be caused by the Codex git worker repeatedly failing the stable-metadata RPC call in a tight loop.

Codex logs repeatedly show:

worker_rpc_response_error error={} method=stable-metadata workerId=git

Example from the log:

2026-04-26 14:49:13.530 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 14:49:13.540 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-26 14:49:13.550 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git

In my case, the log repeated this hundreds of times within a few seconds.

VS Code DevTools Performance also showed repeated renderer/webview message activity around:

webviewElement.ts
overlayWebview.ts
mainThreadWebviews.ts
rpcProtocol.ts
postMessage / setTimeout

Closing the Codex webview immediately stops the CPU usage.

A workaround is to run git init in the opened folder. As soon as .git is created, CPU usage returns to normal. Interestingly, after Codex stabilizes, removing .git with rm -rf .git does not immediately make the CPU spike return.

This suggests Codex enters a bad initialization/retry loop when started in a non-git folder. Creating .git once breaks the loop.

What steps can reproduce the bug?

  1. Create or open any folder that is not a Git repository:

    mkdir /tmp/codex-nongit-repro
    cd /tmp/codex-nongit-repro
    code .
  2. Open the Codex IDE extension / ChatGPT Codex panel in VS Code.

  3. Observe macOS Activity Monitor.

  4. Code Helper (Renderer) jumps to around 100% CPU and stays there.

  5. Check the Codex extension logs:

    grep -RniE "worker_rpc_response_error|stable-metadata|workerId=git" \
      ~/Library/Application\ Support/Code/logs/*/window*/exthost/openai.chatgpt/Codex*.log | tail -200
  6. The logs repeatedly show:

    worker_rpc_response_error error={} method=stable-metadata workerId=git
    
  7. Run this in the same folder:

    git init
  8. CPU usage immediately returns to normal.

  9. Optionally remove .git:

    rm -rf .git
  10. CPU does not immediately spike again after the loop has been broken.

What is the expected behavior?

Codex should handle non-git folders without entering a high-CPU retry loop.

If the opened workspace is not a Git repository, Codex should either:

- skip git metadata collection,
- return a stable "not a git repository" state,
- or retry with throttling/backoff.

Opening Codex in a non-git folder should not cause `Code Helper (Renderer)` to stay at 100% CPU.

### Additional information

This appears to be specifically related to non-git workspaces.

Observed behavior:

```text
non-git folder
→ open Codex IDE webview
→ repeated worker_rpc_response_error method=stable-metadata workerId=git
→ Code Helper (Renderer) 100% CPU
→ run git init
→ CPU immediately normalizes
→ remove .git
→ CPU does not immediately spike again

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionperformance

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions