VS Code extension enters high-CPU retry loop on non-git workspace
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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗