codex - 💡(How to fix) Fix VS Code extension: high renderer CPU in non-git workspace caused by repeated git stable-metadata worker loop [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17394Fetched 2026-04-11 06:16:47
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1

Error Message

"type": "error", "error": {

Root Cause

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.

Fix Action

Fix / Workaround

I also tested a workaround:

  • after running git init in the same folder,
  • reopening/reloading VS Code,
  • and opening Codex again,
RAW_BUFFERClick to expand / collapse

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?

  1. Open VS Code.
  2. Open a folder that is not a Git repository.
  3. Open the Codex extension panel/sidebar.
  4. Leave the panel open, even without actively using it.
  5. 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 init in 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

extent analysis

TL;DR

The issue can be mitigated by initializing a Git repository in the folder before opening the Codex extension in VS Code.

Guidance

  • The repeated worker-response loop from the Git worker is likely caused by the Codex extension not handling non-Git repositories correctly, leading to high CPU usage.
  • To verify the issue, profile the Codex webview frame in DevTools and observe the repeated "worker-response" messages with a "Not a git repository" error.
  • Initializing a Git repository in the folder using git init before opening the Codex extension can serve as a temporary workaround to reduce CPU usage.
  • The extension should be updated to handle non-Git repositories gracefully and avoid the repeated requests for Git stable metadata.

Example

No code snippet is provided as the issue is related to the extension's behavior and not a specific code block.

Notes

The provided workaround may not be suitable for all users, especially those who do not intend to use Git in their project. A permanent fix would require updating the Codex extension to handle non-Git repositories correctly.

Recommendation

Apply workaround: Initialize a Git repository in the folder before opening the Codex extension, as it has been shown to reduce CPU usage to near zero. This is a temporary solution until the extension is updated to handle non-Git repositories correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix VS Code extension: high renderer CPU in non-git workspace caused by repeated git stable-metadata worker loop [1 comments, 2 participants]