Performance: high CPU utilization with IDE extension

Open 💬 26 comments Opened Mar 21, 2026 by scuall8907
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the IDE extension are you using?

VS Code extension openai.chatgpt 26.318.11754 (linux-x64)

What subscription do you have?

ChatGPT Pro

Which IDE are you using?

Codex in VS Code chat

What platform is your computer?

Linux x64 Code - OSS 1.112.0 stable

What issue are you seeing?

While using the Codex VS Code extension on Linux, one or more Electron processes (electron --type=zygote) go to very high CPU.

The strongest signal is this:
if I disable the openai.chatgpt extension, the hot Electron processes immediately stop / exit.

So the CPU runaway appears to be caused by the extension or by the extension-host / Electron interaction, not by project code.

I initially suspected a local sandbox wrapper, but I was later able to reproduce the same problem outside that wrapper on the same repository. So the sandbox does not appear to be required to trigger the bug.

What steps can reproduce the bug?

  1. Open a Linux workspace in Code - OSS.
  2. Use Codex chat for a few iterations.
  3. Observe one or more Electron --type=zygote processes going hot.
  4. Disable the openai.chatgpt extension.
  5. The hot Electron processes immediately stop.

This reproduces reliably for me on at least one medium/large repository.

What is the expected behavior?

If a feature is unsupported or a request fails, the extension should degrade gracefully and should not trigger a sustained high-CPU loop in Electron.

Additional information

Relevant observations:

  • Hot processes are Electron zygote processes.
  • The main thread of the hot process is the one burning CPU.
  • Disabling only openai.chatgpt immediately makes the hot processes go away.

I tested both without and with:

--enable-proposed-api openai.chatgpt

Results:

  1. Without --enable-proposed-api openai.chatgpt
  • renderer logs contain errors such as:
  • CANNOT USE these API proposals 'chatSessionsProvider, languageModelProxy'
  • chatSessions/newSession is a proposed menu identifier
  1. With --enable-proposed-api openai.chatgpt
  • those renderer errors disappear
  • normal registration appears instead
  • but the high CPU issue still reproduces

So enabling proposed APIs changes renderer behavior, but does not fix the main CPU runaway.

The log pattern that remains during the hot state is a very large flood of:

  • open-in-target not supported in extension

and also:

  • Received broadcast but no handler is configured method=thread-stream-state-changed

Representative stack path from the logs points into the extension and VS Code extension host IPC:

  • open-in-targets (...) /out/extension.js
  • handleVSCodeRequest (...)
  • extensionHostProcess.js
  • MessagePortMain

In one run, the Codex*.log files for the affected window contained roughly 13k repeated matches for this error family.

Most important final confirmation:
disabling only the openai.chatgpt extension immediately made the hot Electron processes go away.

Related issues that seem adjacent but not identical:

  • #3022
  • #6835
  • #7150
  • #7487

I can provide renderer/exthost/Codex logs if needed.

What steps can reproduce the bug?

I could not reduce this to a deterministic minimal sequence of clicks, but I can reproduce it with this workflow:

  1. Open a medium/large repository in Code - OSS on Linux.
  2. Start a Codex chat in the VS Code extension.
  3. Interact with the chat for a few turns.
  4. Let Codex make its first file modifications in the repository.
  5. After that point, it's very likely to have one Electron --type=zygote processes may get stuck at very high CPU usage and remain there.

For me, the problem tends to appear after the first successful file edit performed through Codex, never immediately at chat startup.

A strong confirmation step is:

  1. Disable the openai.chatgpt extension.
  2. The hot Electron processes stop immediately.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

26 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13717
  • #14657
  • #15330

Powered by Codex Action

Avi7ii · 4 months ago

also on macos

duncanmcl · 3 months ago

I had the same problem.

In my case, VS Code’s extension host eventually crashed and restarted. The crash artifacts point to a Node/V8 heap OOM (JavaScript heap out of memory / Ineffective mark-compacts near heap limit).

What I found locally:

  • extension host RSS was about 4.5 GB before crash
  • the OpenAI/Codex extension was repeatedly handling requests for vscode://codex/open-in-targets
  • the handler was throwing open-in-target not supported in extension
  • the error was being emitted/logged at very high rate

This looks related to #15397 too. That one seems to describe the same underlying issue from another angle.

teron131 · 3 months ago

Exactly the same issue. MacBook Activity Monitor shows one or two Code Helper Renderer spiking 80-200% CPU usage whenever the chat moves and renders. It gets several of this per sec in the logs: [warning] [IpcClient] Received broadcast but no handler is configured method=thread-stream-state-changed.

Not sure if it is a workaround. It seems to be a VS Code extension main problem. Using the Codex app with popup as side panel works effectively the same while the Codex Renderer seems to be quite normal sub 40% CPU usage.

zzzzquan · 3 months ago

same as me

<img width="548" height="338" alt="Image" src="https://github.com/user-attachments/assets/a40d9db7-5780-4e35-a0de-e64791e8f94f" />

DonThompson · 3 months ago

Same issue here, one prompt to the codex agent on Ubuntu 24.04 through VS Code and my fans spin up and won't stop until I kill the extension. Happens every single time.

DonThompson · 3 months ago

... and quick update. I rolled back to 0.4.69 and I haven't had a single problem since with the high cpu usage. Seems like something after that caused it.

JohnnyBill · 3 months ago

I have the same problem. I rolled back to 26.5313.41514, that version still works fine.

CPU usage also goes down again, when i click "new chat" in the extension. But when i switch back to the old one, one core goes back up to 100%. It's also the --type=zygote process for me.

Codex extension logs spam that error here:

2026-03-29 09:56:11.004 [error] Error fetching errorMessage="open-in-target not supported in extension" errorName=Error errorStack="Error: open-in-target not supported in extension\n\tat open-in-targets (/home/xxx/.vscode/extensions/openai.chatgpt-26.5325.31654-linux-x64/out/extension.js:255:22561)\n\tat W_.handleVSCodeRequest (/home/xxx/.vscode/extensions/openai.chatgpt-26.5325.31654-linux-x64/out/extension.js:255:27618)\n\tat Qw.fetch (/home/xxx/.vscode/extensions/openai.chatgpt-26.5325.31654-linux-x64/out/extension.js:214:1973)\n\tat t.handleMessage (/home/xxx/.vscode/extensions/openai.chatgpt-26.5325.31654-linux-x64/out/extension.js:230:65930)\n\tat ju.value (/home/xxx/.vscode/extensions/openai.chatgpt-26.5325.31654-linux-x64/out/extension.js:230:56238)\n\tat T._deliver (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:403:3043)\n\tat T.fire (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:403:3361)\n\tat RE.$onMessage (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:528:114051)\n\tat r._doInvokeHandler (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:407:154429)\n\tat r._invokeHandler (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:407:154177)\n\tat r._receiveRequest (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:407:152959)\n\tat r._receiveOneMessage (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:407:151972)\n\tat ju.value (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:407:149872)\n\tat T._deliver (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:403:3043)\n\tat T.fire (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:403:3361)\n\tat Xi.fire (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:405:8437)\n\tat ju.value (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:801:9911)\n\tat T._deliver (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:403:3043)\n\tat T.fire (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:403:3361)\n\tat Xi.fire (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:405:8437)\n\tat MessagePortMain.<anonymous> (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:801:8082)\n\tat MessagePortMain.emit (node:events:519:28)\n\tat MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2959)\n\tat Object.callbackTrampoline (node:internal/async_hooks:130:17)" url=vscode://codex/open-in-targets
snow212-cn · 3 months ago

Same problem still present in latest version, still not fixed, after so many weeks.

jeremiahodom · 3 months ago

I have the same problem, which version is the best now and doesn't have this bug?

JohnnyBill · 3 months ago

I just let codex fix the issue in the bundle, here is what it did. After that, CPU usage is back to normal.

Here is the exact workaround I applied. In the installed VS Code extension bundle /home/xxx/.vscode/extensions/openai.chatgpt-26.5401.11717-linux-x64/out/extension.js, I changed two request handlers that were hard-throwing this error: "open-in-targets":async()=>{throw new Error("open-in-target not supported in extension")}, "set-preferred-app":async()=>{throw new Error("open-in-target not supported in extension")} I replaced them with benign return values: "open-in-targets":async()=>({success:!1,unsupported:!0}), "set-preferred-app":async()=>({success:!1,unsupported:!0}) Backup of the original file is here: /home/johnny/.vscode/extensions/openai.chatgpt-26.5401.11717-linux-x64/out/extension.js.bak Why I changed it: - The extension was logging Error: open-in-target not supported in extension - Stack trace pointed into the bundled request dispatcher inside out/extension.js - The URI involved was vscode://codex/open-in-targets - The handler existed, but its implementation was just throw new Error(...) What this means for the bug report: - The extension currently registers open-in-targets and set-preferred-app requests in the desktop extension bundle, but in this build they are stubbed as hard throws instead of a graceful unsupported response. - That makes the extension surface an internal error instead of treating the feature as unavailable. - Returning a structured unsupported result avoids the runtime error and keeps the extension loadable.
piotrkacala · 3 months ago

Environment

  • Extension: openai.chatgpt 26.406.31014 (linux-x64)
  • IDE: VSCodium (Code - OSS fork)
  • Platform: Linux x64
  • Subscription: Plus

---

Summary

During any streaming response (even a single short sentence, no tools, no diffs, no agent mode), the extension continuously emits:

[IpcClient] Received broadcast but no handler is configured method=thread-stream-state-changed

at ~30–35 events per second.

This results in ~5 Mbit/s sustained log writes for the entire duration of the stream.

This issue is independent from open-in-targets failures (#16849).
That handler has been locally patched (async () => ({ targets: [] })) and those errors are fully resolved.
The warning flood persists unchanged.

Additionally, the workaround mentioned in other comments:

("set-preferred-app": async () => ({ success: false, unsupported: true }))

does NOT resolve this issue in this environment.

---

Steps to reproduce

  1. Launch VSCodium with openai.chatgpt extension enabled
  2. Send a minimal prompt (e.g. "Hello")
  3. While the response is streaming, monitor:

``text
openai.chatgpt/Codex.log
``

  1. Observe continuous warning spam (~30–35/s)

---

Key observations

  • The warnings begin immediately when the streaming spinner appears
  • They occur before any tokens are rendered
  • They are not related to tools, diffs, or response complexity

Important nuance (stream phases):

  • ❌ No warnings during "Thinking" / "Exploring" phases
  • ✅ Warnings start during loader + response rendering phase
  • ✅ Continue for the full duration of visible token streaming

This strongly suggests the issue is tied specifically to the response rendering / streaming phase, not earlier agent or reasoning stages.

---

Log sample

From a real session (2026-04-09 18:57):

2026-04-09 18:57:00.488 [warning] [IpcClient] Received broadcast but no handler is configured method=thread-stream-state-changed
2026-04-09 18:57:00.521 [warning] [IpcClient] Received broadcast but no handler is configured method=thread-stream-state-changed
...

Observed intervals: ~25–40 ms
→ ~30–35 events/sec

---

Impact

  • Continuous ~5 Mbit/s disk writes during streaming
  • Reproduces on every prompt
  • Likely contributes to:
  • high extension host CPU usage
  • unnecessary I/O load
  • degraded performance on Linux systems

---

Related issues

  • #15393 — Linux, high CPU, same warning flood
  • #16693 — macOS, high CPU, same warning
  • #13343 — Windows, streaming stall + same warning
  • #13583 — Windows, missing tool-step streaming + same warning

---

Hypothesis

Looks like thread-stream-state-changed events are emitted during the render phase without a registered consumer in this environment.

Taubore · 3 months ago

I have a similar problem. After a few back-and-forth prompts in the same conversation, the OpenAI ChatGPT/Codex VS Code extension starts using high CPU continuously.

CPU usage does not return to idle after the response is complete. VS Code keeps the machine hot and the fan running continuously until I fully close and reopen VS Code.

Steps to reproduce:

  1. Open VS Code with the OpenAI ChatGPT/Codex extension enabled.
  2. Start a conversation in the extension.
  3. Send a few back-and-forth prompts in the same conversation.
  4. After a few interactions, CPU usage stays high continuously.
  5. It does not stop on its own unless VS Code is closed and reopened.

Expected behavior:
CPU usage may spike while processing a prompt, but it should return to normal idle levels after the response is complete.

Actual behavior:
After a few prompts in the same conversation, CPU usage remains elevated indefinitely. The machine heats up and the fan keeps running until VS Code is fully closed and reopened.

Environment:

  • OS: Ubuntu 24.04 LTS
  • VS Code version: 1.115.0
  • Extension: openai.chatgpt
  • Extension version: 26.406.31014
piotrkacala · 3 months ago

Workaround for log spam (Linux, extension.js patch)

For anyone who just wants to silence the warning flood without waiting for an official fix — the warning is emitted in IpcClient.handleBroadcast when broadcastHandlers has no entry for the method and anyBroadcastHandlers is empty. A minimal patch adds a method-name guard before the logger.warning call:

# backup first
cp ~/.vscode-oss/extensions/openai.chatgpt-26.406.31014-linux-x64/out/extension.js \
   ~/.vscode-oss/extensions/openai.chatgpt-26.406.31014-linux-x64/out/extension.js.bak

# patch
sed -i 's/this\.anyBroadcastHandlers\.size===0&&this\.logger\.warning("Received broadcast but no handler is configured"/this.anyBroadcastHandlers.size===0\&\&e.method!=="thread-stream-state-changed"\&\&this.logger.warning("Received broadcast but no handler is configured"/g' \
  ~/.vscode-oss/extensions/openai.chatgpt-26.406.31014-linux-x64/out/extension.js

Adjust the extension version in the path to match your install. The patch survives until the extension auto-updates.

Note: this only silences the log spam — the broadcast is still unhandled, so it doesn't fix any underlying streaming/UI issue. It does stop the high-frequency disk writes caused by the log rotation.

Separate issue: even with the warning suppressed, the extension continues writing ~5 MiB/s to disk during model streaming responses. That is a different bug: #17320

Taubore · 3 months ago

Thanks to JohnnyBill and piotrkacala for the temporary workarounds.

I tested JohnnyBill’s patch that changes the open-in-targets / set-preferred-app handlers so they return an unsupported result instead of throwing, and I also tested piotrkacala’s patch that suppresses the thread-stream-state-changed warning flood.

On my side, using both together helps a lot and clearly reduces the severity of the problem, but it still does not fully resolve it.

So these are useful temporary mitigations...

For reference, anyone trying them should make sure to back up extension.js first and run the patch commands from the directory where that file is located.

JohnnyBill patch:

sed -i \
-e 's/"open-in-targets":async()=>{throw new Error("open-in-target not supported in extension")}/"open-in-targets":async()=>({success:!1,unsupported:!0})/g' \
-e 's/"set-preferred-app":async()=>{throw new Error("open-in-target not supported in extension")}/"set-preferred-app":async()=>({success:!1,unsupported:!0})/g' \
extension.js

piotrkacala patch:

sed -i 's/this\.anyBroadcastHandlers\.size===0&&this\.logger\.warning("Received broadcast but no handler is configured"/this.anyBroadcastHandlers.size===0\&\&e.method!=="thread-stream-state-changed"\&\&this.logger.warning("Received broadcast but no handler is configured"/g' extension.js
shijie-oai contributor · 3 months ago

Hi all! Thanks for all the information on investigation! I have a fix out for open-in-targets (related to https://github.com/openai/codex/issues/16849). Sorry about the delay here and we should have a vsce release this week to address that issue. I will also put up fixes for the other internal to make sure we can address all those performance issue. Again really appreciate all the feedback here!

zmn1cz8miplaye8z-boop · 3 months ago

Yup. Same issue here. That's how I found this thread. Using the codex extension 26.417.40842 and my laptop gets HOT.

This is ridiculous.

maxtymchenko · 3 months ago

Same on Windows 10 and latest VSCodium. Extension starts to consume CPU after 26.5401.11717.

PS freshly installed 26.5417.40842 seems does not fix this problem

Taubore · 3 months ago

The version just before 26.417.40842 had fixed the issue, but since the 26.417.40842 update, the CPU problem has returned and seems even worse than before.

The CPU usage spikes as soon as the extension is opened, without even needing to send a prompt.

On my side, I’m using the extension in VSCode on Ubuntu Linux.

snow212-cn · 2 months ago

With codex I confirm this is still reproducible as of April 24, 2026 on Windows with VS Code and the Codex extension 26.5422.21459. In my case, this does not look like the old open-in-targets/set-preferred-app throw loop anymore, because the current extension build appears to stub those calls instead of throwing.
However, high CPU is still happening due to a different event/retry storm. My Codex.log shows massive repetition of worker_rpc_response_error error={} method=stable-metadata workerId=git plus continuous [IpcClient] Received broadcast but no handler is configured method=thread-stream-state-changed warnings. In one session I saw ~33k stable-metadata errors and 400+ unhandled thread-stream-state-changed broadcasts. I also confirmed that codex.exe app-server --analytics-default-enabled itself becomes a CPU hotspot, so this is not just a renderer/UI issue. I locally reduced the problem by patching the extension to stop retrying failed stable-metadata requests, suppress the unhandled thread-stream-state-changed / query-cache-invalidate warning spam, and remove the persisted-state startup gate. That strongly suggests the current regression is caused by repeated Git metadata failures plus broadcast/log churn, not by a one-off machine-specific problem.

orionflame · 2 months ago

Seriously this is very concerning. Every time I leave codex on idle the CPU usage goes very high and my laptop fans are on max speed. This is not acceptable for product that runs on paid service.

I have to exit VS code to stop this nonsense.

VladiCz · 2 months ago

Codex VS Code extension is spamming Output panel with hundreds or thounsands of warning messages per second, new message every few microseconds. The number of warnings is too high, not throttled and possibly causing high CPU usage:

  1. Switch to output panel: CTRL+K CTRL+H or command >Output: Focus on Output view
  2. Select output type Codex from dropdown on the right
  3. Set Log level to Warning or info (If you set to Error or Off, the issue will persist but you will not see the warning output) .
  4. You will see thousands logged warnings being logged causing high CPU.
  5. Disabling the extension helps to stop it from excessive logging.
  6. same issue with Release version and Pre-release version Codex extension.

This is just small example of logs:
...
2026-04-27 10:09:46.637 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.646 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.651 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.661 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.667 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.674 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.682 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.689 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.691 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.702 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
2026-04-27 10:09:46.709 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git
...

environment:
Fedora 42
VS Code 1.117.0
tested Codex versions: 26.422.30944, 26.5422.30944 (Pre-release)

Proposed fix: throttle the logs to be issued once in a second instead of microseconds

nkawli · 2 months ago
Codex VS Code extension is spamming Output panel with hundreds or thounsands of warning messages per second, new message every few microseconds. The number of warnings is too high, not throttled and possibly causing high CPU usage: 1. Switch to output panel: CTRL+K CTRL+H or command >Output: Focus on Output view 2. Select output type Codex from dropdown on the right 3. Set Log level to Warning or info (If you set to Error or Off, the issue will persist but you will not see the warning output) . 4. You will see thousands logged warnings being logged causing high CPU. 5. Disabling the extension helps to stop it from excessive logging. 6. same issue with Release version and Pre-release version Codex extension. This is just small example of logs: ... 2026-04-27 10:09:46.637 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.646 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.651 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.661 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.667 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.674 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.682 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.689 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.691 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.702 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git 2026-04-27 10:09:46.709 [warning] worker_rpc_response_error error={} method=stable-metadata workerId=git ... environment: Fedora 42 VS Code 1.117.0 tested Codex versions: 26.422.30944, 26.5422.30944 (Pre-release) Proposed fix: throttle the logs to be issued once in a second instead of microseconds

Ref issue: https://github.com/openai/codex/issues/18515

Foxhoundn · 2 months ago

This is still ongoing, had to force-shutdown my laptop multiple times yesterday until I found this thread. I am on 26.429.30905.

Update: This is not just VSCode extension related (thought it was) - opening the Codex app does the same thing (only when VSCode is opened as well though)

gryphon2411 · 2 months ago

I’m seeing what looks like the same issue on Linux with a newer extension build, sharing only the deltas in case they help.

Environment:

  • VS Code 1.120.0
  • openai.chatgpt-26.513.21555-linux-x64
  • Ubuntu 24.04.4 LTS
  • Linux kernel 6.17.0-29-generic

What I’m seeing:

  • sustained CPU from a VS Code utility/extension-host process
  • codex app-server plus MCP helpers (chrome-devtools, tavily, context7) active underneath it
  • repeated log noise like thread-stream-state-changed and unsupported feature enablement auth_elicitation

Additional note:

  • earlier ENOSPC watcher failures were addressed by increasing fs.inotify.max_user_watches to 524288
  • after that, CPU is still elevated, with the remaining hot path centered around the Codex/extension-host side of VS Code

Happy to provide a trimmed log snippet if that would be useful.

btkh95 · 19 days ago

Still having this issue too