codex - 💡(How to fix) Fix VS Code extension enters high-CPU retry loop on non-git workspace [2 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#19327Fetched 2026-04-25 06:11:38
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2closed ×1cross-referenced ×1

Error Message

Two VS Code renderer processes were repeatedly around or above 100% CPU:

Code Example

git -C /Users/<user>/Documents/non-git-folder rev-parse --show-toplevel
fatal: not a git repository (or any of the parent directories): .git

---

Code Helper (Renderer) ... ~110% CPU
Code Helper (Renderer) ... ~110% CPU

---

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

---

~/Library/Application Support/Code/logs/<session>/window1/exthost/openai.chatgpt/Codex.log

---

webview/assets/use-git-stable-metadata-CeSRUp9M.js
RAW_BUFFERClick to expand / collapse

What happened?

The Codex VS Code extension appears to enter a high-CPU retry loop when the current VS Code window is opened on a file/folder that is not inside a Git repository.

Environment

  • Extension: openai.chatgpt 26.5422.21459 darwin-arm64
  • Host: VS Code on macOS arm64
  • Codex app-server command: /Users/<user>/.vscode/extensions/openai.chatgpt-26.5422.21459-darwin-arm64/bin/macos-aarch64/codex app-server --analytics-default-enabled

Reproduction context

I opened a standalone file in VS Code outside any Git repository, for example:

/Users/<user>/Documents/non-git-folder/example.md

That directory is not a Git repository:

git -C /Users/<user>/Documents/non-git-folder rev-parse --show-toplevel
fatal: not a git repository (or any of the parent directories): .git

With the Codex sidebar/webview active, VS Code started consuming sustained high CPU.

Observed behavior

Two VS Code renderer processes were repeatedly around or above 100% CPU:

Code Helper (Renderer) ... ~110% CPU
Code Helper (Renderer) ... ~110% CPU

The extension log continuously emitted this message every few milliseconds:

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

The log path was:

~/Library/Application Support/Code/logs/<session>/window1/exthost/openai.chatgpt/Codex.log

The log had already rotated through multiple 5 MB files with hundreds of thousands of repeated lines.

Expected behavior

If the current workspace/path is not a Git repository, the Git metadata worker should treat that as a terminal/no-op state, or retry with backoff, instead of continuously retrying and driving the webview renderer CPU usage.

Additional notes

The relevant webview code appears to call the Git worker method stable-metadata from:

webview/assets/use-git-stable-metadata-CeSRUp9M.js

Closing/reloading the Codex webview or disabling the extension stops the CPU burn.

extent analysis

TL;DR

The Codex VS Code extension can be fixed by modifying the Git metadata worker to handle non-Git repository paths with a backoff retry or terminal state.

Guidance

  • Investigate the stable-metadata method in webview/assets/use-git-stable-metadata-CeSRUp9M.js to understand the current retry logic.
  • Consider implementing an exponential backoff strategy for retrying Git metadata requests to prevent high CPU usage.
  • Verify that the extension correctly handles non-Git repository paths by checking the worker_rpc_response_error log messages and CPU usage.
  • Temporarily disable the extension or close the Codex webview to mitigate the CPU burn until a fix is implemented.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The fix may require modifications to the extension's Git metadata worker and retry logic, which could have implications for other features or workflows.

Recommendation

Apply a workaround by disabling the extension or closing the Codex webview when working outside a Git repository, as this is a temporary solution to prevent high CPU usage until the underlying issue is addressed.

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…

FAQ

Expected behavior

If the current workspace/path is not a Git repository, the Git metadata worker should treat that as a terminal/no-op state, or retry with backoff, instead of continuously retrying and driving the webview renderer CPU usage.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING