You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex extension makes VS Code extremely slow and overheats my computer #3022
1. Install Codex VS Code extension
2. Open a medium-sized project (JavaScript/TypeScript in my case)
3. Start coding → after a few minutes the editor becomes very slow, with high CPU usage
4. Computer fans turn on, system overheats
What is the expected behavior?
Codex should run smoothly like other coding assistants (e.g., Copilot, ChatGPT integration) without causing noticeable slowdowns or overheating.
What do you see instead?
• VS Code becomes sluggish after Codex starts suggesting completions
• High CPU usage (Codex process spikes)
• Fans spin up and laptop overheats
Additional information
Other assistants (Copilot, ChatGPT) do not show the same performance issues on my machine, so this seems specific to Codex.
Reacted by Jonathan, Chris Yang, maciejrrr, Tebriz Tagiev, distbit, Donnie Thomas, Chris Piasecki, init5, texliao, G Lewis and 28 more
Note: I noticed that when running tests directly from Codex, the processes don’t finish properly because multiple Node.js executions remain open. After I killed those processes manually, everything went back to normal.
+1
My MacBook's power consumption went crazy just from installing the extension. Even though I was using Codex with the CLI, my VS Code was using three times more power than without the extension.
Large monorepo, M4 Pro, there is a 0.5-1s lag using the VS Code text editor after installing codex after every click / highlight of text, rendering productive work almost impossible
Version: 0.5.35 (pre-release)
Also noticing "Code Helper (Renderer)" taking 50%+ CPU but cannot say if this is new right now.
+1
i though it was my laptop, in a way it was because of CPU usage but then upgraded to BEAST CPU and guess what, same issue after some chatting and implementations
It lags the longer the chat back and forth is, the higher the lag is.
Deffo probably something wrong with either how large text is rendered/handled or something weird in the way its structured.
Yes, long contexts cause severe lag for me on Linux with VS Code from the AUR. There have been a handful of updates come through but none of them have addressed this.
But then again OpenAI is only a small company... /s
+1
In JetBrains IDE, its the same problem. Ram and CPU are filling up and IDE is responding extremely slow, if Codex is reading files, and the bigger the file, the exponentually longer it takes to read the file. If it read every file, it works nicely again tho.
Yeah, for me, I get very large delays when switching between threads. It seems to be an issue related to the fact that the entire thread seems to be loaded in, rather than just the last part. Cursor's own AI chat system loads only the most recent messages, and hydrates as one scrolls up.
I had this problem until I switched from Intel MacBook to Apple Silcon. Hasn't happened since. Unless you reload a long chat, it causes VSCode to stop responding a few times, and have to click keep waiting.
Yeah, that reloading a long chat is the exact problem that I'm having. It isn't a deal-breaker, but it makes navigating between long chat sessions quite excruciating. It would be fixed by just loading the last part of the chat and hydrating as you scroll, the way Cursor does.
I have a problem with codex on Windows 10. Never had before but lately I have this problem and it is very hard to work. It usually slows down when start to read big files. The CPU go high, Pycharm start to eat all the RAM that it can and if clicking on Expand, I can see that it reads the file on small chunks and very very slow.
Sometimes that helps me is stopping it (it will stop in one minute because IDE is completely inaccessible), and I ask it to continue from the point where it stopped.
Update: After upgrading it started to be way better
For me codex is crashing the VSCode all the time. Did the crash log analysis with Claude, and here's the summary:
Primary cause:Copilot Chat listener/document model leak (renderer-side)
Every time Copilot Chat invokes a tool (read_file,apply_patch, etc.), it calls$tryOpenDocumentandvie._createModifiedFileEntry, which creates text editor models (WF/LYe/Bu) with event listeners thatare never disposed. This is a renderer-process leak — itsurvives extension host restarts.
Timeline from the log:
Time
Listener count
Note
19:52:03
175 → 200
Growing
20:00:05
224
Copilot Chat active
20:01:33
244
Still growing
20:01:44
—
InstantiationService disposed (Copilot Chat tool stream on dead service)
After a codex prompt has finished, I get very high cpu activity, with a baseline around 5% to 40% cpu usage per physical core. It does not seem to stop after the promt and there is nothing else running on the machine.
Follow up since the last time, its seems the main cause is either the code blocks inside the chat section or the terminal runs, because i can go for hours in normal conversation with thousands of token generated but as soon as it start generating code it lags out, when i close an re-open VS code then because all the code blocks are gone then it will works with no problems
Facing the same issue. As soon as I start the VS Code extension and ask anything, the CPU usage jumps to 100% and the fan throttles heavily. This is strange, as I didn’t experience this earlier. Also the thing is when is running the cpu spikes and when is done working then the cpu usage goes down. For long task it just makes it very inconvenient.
Why does EVERY OpenAI tool on MacOS consume massive amounts of CPU when completely idle? Like, it's not even funny, it's pathetic. I've never encountered a worse experience in this regard.
OpenAI may have the best AI engineers in the world but their consumer facing software developers are a laughingstock. Congratulations guys. You have the easiest engineering job at OpenAI and you're blowing it.
+1
I’m seeing very high CPU usage (~150%+) in Visual Studio Code when the Codex extension is enabled.
The load is mainly from window / Code Helper (Renderer), not extension host
My Mac gets very hot and fans spin up quickly
Disabling Codex immediately brings CPU back to normal
It doesn’t seem tied to a specific file — feels like something is continuously running in the renderer (possibly context scanning or UI updates).
I found a way to mitigate the issue I was hitting.
As of version 26.415.20818, simply enabling the extension could keep CPU usage at 150%+ continuously, even when I was not actively doing anything. By comparison, the standalone Codex CLI did not show the same behavior. Because of that, I suspected the problem was in the VS Code frontend extension rather than in Codex itself.
I used Codex to debug some of the built bundle files and apply an experimental fix. In my case, it significantly reduced CPU usage to under 10%, and the temperature / fan noise issue went away as well. I also did not notice any obvious loss of core Codex extension functionality, although there may still be side effects.
The basic workflow was:
cd ~/.vscode/extensions/openai.chatgpt-{version}
use an AI CLI tool and provide the following prompt
Below is the prompt I exported, followed by the main solution ideas suggested by the AI.
Suggested Prompt For AI Coding Tools
Investigate high CPU usage in the VS Code renderer for the Codex/OpenAI extension webview.
Assume the issue is primarily in the webview frontend, not the extension host.
Focus on these classes of problems:
- query polling
- refetchOnWindowFocus / background refetch
- broad global subscriptions
- cross-webview query invalidation broadcasts
- high-frequency streaming flushes
- immediate or near-immediate scheduler loops such as setTimeout(0), microtask storms, or requestAnimationFrame-heavy refresh loops
Goal:
- reduce sustained renderer CPU usage
- prefer event-driven refresh over polling where possible
- batch frontend updates more aggressively
- accept some loss of UI immediacy if needed
Please:
1. identify the hottest renderer-side refresh loops
2. reduce or disable unnecessary polling
3. disable or narrow global invalidation fan-out
4. reduce streaming flush frequency
5. slow down or coarsen the internal query scheduler if it is creating a steady batch storm
6. clearly document user-visible tradeoffs
Summary
The high CPU issue was not primarily in the extension host. It was in the webview renderer.
The main problem was overly aggressive frontend synchronization:
frequent query invalidation
broad global subscriptions
background/window-focus refetches
cross-webview query-cache broadcasts
high-frequency streaming state flushes
an internal query scheduler that used immediate or near-immediate re-scheduling
This created sustained renderer load in Code Helper (Renderer), especially in the Codex webview.
What Was Changed
The following experimental patches were applied directly to the built webview bundles:
Activity
ysm-dev commentedon Sep 4, 2025
+1
devflorez commentedon Sep 4, 2025
Note: I noticed that when running tests directly from Codex, the processes don’t finish properly because multiple Node.js executions remain open. After I killed those processes manually, everything went back to normal.
maciejrrr commentedon Sep 4, 2025
+1
My MacBook's power consumption went crazy just from installing the extension. Even though I was using Codex with the CLI, my VS Code was using three times more power than without the extension.
tebriz91 commentedon Sep 5, 2025
+1 same issue while using Codex extension in VSCode both on MacBook Air M1 and on PC with WSL2
kulashaker30 commentedon Oct 9, 2025
+1
journeytosilius commentedon Oct 21, 2025
+1
AndreasFinke commentedon Nov 4, 2025
+1
Large monorepo, M4 Pro, there is a 0.5-1s lag using the VS Code text editor after installing codex after every click / highlight of text, rendering productive work almost impossible
Version: 0.5.35 (pre-release)
Also noticing "Code Helper (Renderer)" taking 50%+ CPU but cannot say if this is new right now.
Have not tried smaller repo.
joudjun commentedon Nov 18, 2025
+1
icarus10149 commentedon Dec 11, 2025
+1
resolved by deleting extension
AymanAitAhmed commentedon Feb 7, 2026
+1
i though it was my laptop, in a way it was because of CPU usage but then upgraded to BEAST CPU and guess what, same issue after some chatting and implementations
SheruShafiq commentedon Feb 11, 2026
+1
It lags the longer the chat back and forth is, the higher the lag is.
Deffo probably something wrong with either how large text is rendered/handled or something weird in the way its structured.
bjm9991 commentedon Feb 13, 2026
Yes, long contexts cause severe lag for me on Linux with VS Code from the AUR. There have been a handful of updates come through but none of them have addressed this.
But then again OpenAI is only a small company... /s
Teppo7 commentedon Feb 16, 2026
+1
In JetBrains IDE, its the same problem. Ram and CPU are filling up and IDE is responding extremely slow, if Codex is reading files, and the bigger the file, the exponentually longer it takes to read the file. If it read every file, it works nicely again tho.
michaeltyson commentedon Feb 18, 2026
Yeah, for me, I get very large delays when switching between threads. It seems to be an issue related to the fact that the entire thread seems to be loaded in, rather than just the last part. Cursor's own AI chat system loads only the most recent messages, and hydrates as one scrolls up.
FriedCircuits commentedon Feb 18, 2026
I had this problem until I switched from Intel MacBook to Apple Silcon. Hasn't happened since. Unless you reload a long chat, it causes VSCode to stop responding a few times, and have to click keep waiting.
michaeltyson commentedon Feb 18, 2026
Yeah, that reloading a long chat is the exact problem that I'm having. It isn't a deal-breaker, but it makes navigating between long chat sessions quite excruciating. It would be fixed by just loading the last part of the chat and hydrating as you scroll, the way Cursor does.
alexkingdom commentedon Feb 20, 2026
I have a problem with codex on Windows 10. Never had before but lately I have this problem and it is very hard to work. It usually slows down when start to read big files. The CPU go high, Pycharm start to eat all the RAM that it can and if clicking on Expand, I can see that it reads the file on small chunks and very very slow.
Sometimes that helps me is stopping it (it will stop in one minute because IDE is completely inaccessible), and I ask it to continue from the point where it stopped.
Update: After upgrading it started to be way better
avalanche-tm commentedon Mar 12, 2026
For me codex is crashing the VSCode all the time. Did the crash log analysis with Claude, and here's the summary:
Primary cause: Copilot Chat listener/document model leak (renderer-side)
Every time Copilot Chat invokes a tool (
read_file,apply_patch, etc.), it calls$tryOpenDocumentandvie._createModifiedFileEntry, which creates text editor models (WF/LYe/Bu) with event listeners that are never disposed. This is a renderer-process leak — it survives extension host restarts.Timeline from the log:
PS: not sure if it's all codex fault but the VSCode has become unusable when debugging nextjs application at the same time
MarcusKNielsen commentedon Mar 26, 2026
+1
After a codex prompt has finished, I get very high cpu activity, with a baseline around 5% to 40% cpu usage per physical core. It does not seem to stop after the promt and there is nothing else running on the machine.
AymanAitAhmed commentedon Apr 5, 2026
Follow up since the last time, its seems the main cause is either the code blocks inside the chat section or the terminal runs, because i can go for hours in normal conversation with thousands of token generated but as soon as it start generating code it lags out, when i close an re-open VS code then because all the code blocks are gone then it will works with no problems
abhii-roy commentedon Apr 7, 2026
+1
Facing the same issue. As soon as I start the VS Code extension and ask anything, the CPU usage jumps to 100% and the fan throttles heavily. This is strange, as I didn’t experience this earlier. Also the thing is when is running the cpu spikes and when is done working then the cpu usage goes down. For long task it just makes it very inconvenient.
codex vs-code extension: 26.5401.11717
macOS 26.3.1
Visual Studio Code: Version: 1.114.0
m-thomson commentedon Apr 13, 2026
+1
Why does EVERY OpenAI tool on MacOS consume massive amounts of CPU when completely idle? Like, it's not even funny, it's pathetic. I've never encountered a worse experience in this regard.
OpenAI may have the best AI engineers in the world but their consumer facing software developers are a laughingstock. Congratulations guys. You have the easiest engineering job at OpenAI and you're blowing it.
qaz2810714 commentedon Apr 18, 2026
+1
I’m seeing very high CPU usage (~150%+) in Visual Studio Code when the Codex extension is enabled.
The load is mainly from window / Code Helper (Renderer), not extension host
My Mac gets very hot and fans spin up quickly
Disabling Codex immediately brings CPU back to normal
It doesn’t seem tied to a specific file — feels like something is continuously running in the renderer (possibly context scanning or UI updates).
qaz2810714 commentedon Apr 18, 2026
I found a way to mitigate the issue I was hitting.
As of version
26.415.20818, simply enabling the extension could keep CPU usage at150%+continuously, even when I was not actively doing anything. By comparison, the standalone Codex CLI did not show the same behavior. Because of that, I suspected the problem was in the VS Code frontend extension rather than in Codex itself.I used Codex to debug some of the built bundle files and apply an experimental fix. In my case, it significantly reduced CPU usage to under
10%, and the temperature / fan noise issue went away as well. I also did not notice any obvious loss of core Codex extension functionality, although there may still be side effects.The basic workflow was:
cd ~/.vscode/extensions/openai.chatgpt-{version}Below is the prompt I exported, followed by the main solution ideas suggested by the AI.
Suggested Prompt For AI Coding Tools
Summary
The high CPU issue was not primarily in the extension host. It was in the webview renderer.
The main problem was overly aggressive frontend synchronization:
This created sustained renderer load in
Code Helper (Renderer), especially in the Codex webview.What Was Changed
The following experimental patches were applied directly to the built webview bundles:
Reduced
telepathy-permissionsrefresh aggressivenesscodex-app-server-connection-changedDisabled global live subscriptions for recent conversations
addAnyConversationCallbackaddAnyConversationMetaCallbackDisabled cross-webview query invalidation broadcast
query-cache-invalidatequery-cache-invalidateReduced streaming UI flush frequency
Reworked the internal query/state scheduler
setTimeout(..., 50)batchingRemoved several constant polling queries
primary-runtime-update-statusambient-suggestions-generation-statuseschild-processesThese were changed from interval-driven refresh to action/event-driven refresh where possible.
Result
This significantly reduced renderer CPU usage.
Across multiple traces, the hot path moved from:
TimerFireRunMicrotasksEe -> batch -> #s -> fetch/onPause/onSubscribeto much lower and more manageable renderer activity.
In short:
setTimeout(0)/ immediate scheduling storm was a major contributorTradeoffs / Side Effects
These changes are intentionally biased toward lower CPU, not maximum UI immediacy.
Possible side effects:
Important Note
This was an experimental patch applied to compiled bundle files, not a clean source-level refactor.
It demonstrates a likely correct direction for an upstream fix: