codex - 💡(How to fix) Fix Renderer process stuck in infinite microtask loop, consuming 100–180% CPU and disconnecting Remote SSH sessions [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#19097Fetched 2026-04-24 06:01:04
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
1
Author
Timeline (top)
commented ×2labeled ×2cross-referenced ×1

The extension's webview renderer process enters an infinite microtask loop upon startup, pinning one or more CPU cores at 100–180% indefinitely. The process is not terminated when the ChatGPT panel is closed. The resulting CPU starvation causes VS Code windows to become unresponsive and crash, which in turn terminates any active Remote SSH sessions.


Error Message

Secondary error present in renderer logs during the same sessions:

Root Cause

The extension's webview renderer process enters an infinite microtask loop upon startup, pinning one or more CPU cores at 100–180% indefinitely. The process is not terminated when the ChatGPT panel is closed. The resulting CPU starvation causes VS Code windows to become unresponsive and crash, which in turn terminates any active Remote SSH sessions.


RAW_BUFFERClick to expand / collapse

What version of the IDE extension are you using?

26.417.40842, 26.5417.40842

What subscription do you have?

plus

Which IDE are you using?

VS Code

What platform is your computer?

Darwin 24.5.0 arm64 arm

What issue are you seeing?

Summary

The extension's webview renderer process enters an infinite microtask loop upon startup, pinning one or more CPU cores at 100–180% indefinitely. The process is not terminated when the ChatGPT panel is closed. The resulting CPU starvation causes VS Code windows to become unresponsive and crash, which in turn terminates any active Remote SSH sessions.


What happens

After opening the ChatGPT panel, a Code Helper (Renderer) process enters a tight Promise microtask loop that never yields. The loop runs regardless of whether the panel is visible or actively used.

Observed CPU usage (Activity Monitor):

<img width="418" height="134" alt="Image" src="https://github.com/user-attachments/assets/6ed4fdcf-06db-4c11-aa9b-091afc4e40a0" />

Both high-CPU renderers shared the same --vscode-window-config UUID, confirming they belong to the same VS Code window hosting the extension's webview.

sample output for PID 46571 (3-second sample, 2126 total samples):

2026 / 2126 samples stuck in: v8::MicrotasksScope::PerformCheckpoint v8::MicrotasksScope::~MicrotasksScope v8::Function::NewInstanceWithSideEffectType ... (repeating indefinitely)

The process never voluntarily yields control.

Secondary error present in renderer logs during the same sessions:

PendingMigrationError: navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator

This suggests the extension's webview code assumes a browser environment inside a Node.js context, which may be related to the runaway behavior.


Key observations

  • Closing the ChatGPT panel in the UI does not terminate the renderer process — it continues spinning at full CPU
  • Manually killing the process via kill <pid> causes VS Code to immediately spawn a replacement that exhibits the same behavior, confirming the loop is triggered at initialization, not by user interaction
  • Removing the extension entirely drops all Code Helper (Renderer) CPU usage from ~300% combined back to normal background levels (~10–15% total)

Impact on Remote SSH

VS Code's Remote SSH connection is hosted inside the local VS Code window process. When that window becomes unresponsive due to CPU starvation, the Remote SSH session terminates — dropping all open terminals and unsaved state on the remote machine. This is the primary user-visible symptom: unexplained, recurring Remote SSH disconnections.

What steps can reproduce the bug?

  1. Install extension version 26.417.40842 on macOS Apple Silicon
  2. Open the ChatGPT panel in VS Code
  3. Open Activity Monitor → CPU tab, filter by "Code Helper (Renderer)"
  4. Observe one or more processes consuming >100% CPU continuously
  5. Close the ChatGPT panel — processes remain and continue consuming CPU
  6. Leave VS Code open for an extended period — the window eventually becomes unresponsive or crashes

What is the expected behavior?

The extension's renderer process should consume negligible CPU when idle and should be fully terminated when its UI panel is closed.

Additional information

No response

extent analysis

TL;DR

The issue can likely be mitigated by updating the extension to a version that properly handles the microtask loop and navigator context.

Guidance

  • Verify that the issue is specific to the mentioned extension version (26.417.40842 and 26.5417.40842) and platform (Darwin 24.5.0 arm64 arm) to ensure the fix is targeted.
  • Investigate the PendingMigrationError related to the navigator being a global in Node.js, as this might be contributing to the runaway behavior.
  • Consider temporarily removing the extension to prevent CPU starvation and Remote SSH disconnections until a fix is available.
  • Review the extension's code for any potential issues with microtask handling and Node.js context assumptions.

Example

No specific code example can be provided without access to the extension's source code, but the issue seems related to incorrect handling of microtasks and navigator context.

Notes

The provided information suggests a specific issue with the extension's renderer process, but without access to the code or more detailed debugging information, the root cause and fix might require further investigation.

Recommendation

Apply workaround: Remove the extension until a fixed version is available, as this immediately drops CPU usage to normal levels and prevents Remote SSH disconnections.

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