[extension] Runaway rg processes + high CPU/RAM after extension update
What version of the Codex App are you using (From “About Codex” dialog)?
26.5304.20706
What subscription do you have?
ChatGPT PRO
What platform is your computer?
Linux 6.17.0-14-generic x86_64 x86_64; VS Code 1.110.0 (Snap); Ubuntu 24.04.4 LTS
What issue are you seeing?
Summary
After updating the Codex VS Code extension to 26.5304.20706, VS Code intermittently spawns runaway ripgrep (rg) processes and CPU usage becomes very high. In severe cases, RAM usage grows and VS Code can crash.
Environment
- VS Code: 1.110.0 (Snap)
- Codex extension: 26.5304.20706
- OS: Ubuntu 24.04.4 LTS
- Kernel: Linux 6.17.0-14-generic x86_64
Reproduction steps
- Open VS Code with a normal workspace (~10k files).
- Work normally with the Codex extension enabled.
- After some time, CPU rises and many
rgprocesses appear.
Observed behavior
- Repeated
rgcommand launched by extension-host:
/snap/code/.../@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git --glob-case-insensitive --ignore-file-case-insensitive --no-ignore-parent --follow --no-config
cwdfor thosergprocesses is/home/<user>.- Frequent log errors:
local-environments is not supported in the extensionReceived broadcast but no handler is configured method=thread-stream-state-changeddatabase is lockedCodex process errored: Codex process is not available- CPU remains high and VS Code becomes unstable.
Expected behavior
No runaway rg spawning and stable CPU/RAM usage during normal usage.
Temporary workaround
A local guard that kills runaway rg children reduces RAM blowups, but this does not fix the root cause.
What steps can reproduce the bug?
- Start VS Code with the Codex extension enabled (version 26.5304.20706).
- Open a regular workspace (about ~10k files, mixed source/docs/logs).
- Open Codex chat panel and use it normally (ask questions, read files, continue conversation).
- Wait a few minutes; in some sessions it happens quickly after reconnect/reload.
- Observe process list:
- many
rgchild processes are spawned by VS Code extension-host - command pattern:
/snap/code/.../@vscode/ripgrep/bin/rg --files --hidden --case-sensitive --no-require-git --glob-case-insensitive --ignore-file-case-insensitive --no-ignore-parent --follow --no-config
- cwd observed for runaway scans:
/home/<user>
- CPU rises significantly; RAM can grow until VS Code becomes unstable or crashes.
Related recurring errors seen in extension logs:
local-environments is not supported in the extensionReceived broadcast but no handler is configured method=thread-stream-state-changeddatabase is lockedCodex process is not available
What is the expected behavior?
- Codex extension should not spawn runaway ripgrep scans outside the intended workspace scope.
- CPU and RAM usage should remain stable during normal Codex usage.
- No repeated extension-host error loops.
- VS Code should remain responsive and not crash.
Additional information
Environment:
- VS Code: 1.110.0 (Snap)
- Codex extension: 26.5304.20706
- OS: Ubuntu 24.04.4 LTS
- Kernel: Linux 6.17.0-14-generic x86_64
Temporary mitigation used locally:
- A guard process that kills runaway
rgchildren reduced RAM blowups, but this is only a workaround and not a root-cause fix.
Notes:
- The issue became noticeable again after updating the OpenAI/Codex extension.
- This report intentionally redacts all personal/project identifiers.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for linking #13583 and #13343.
I reviewed both. They are related by symptoms (
thread-stream-state-changed/ streaming warnings), but this appears to be a different failure mode in our case, so I believe this should stay open as related-not-duplicate.Our environment:
What is different here:
rgspawning from the extension host withcwd=/home/<redacted-user>(outside the active workspace scope)thread-stream-state-changed ... no handlerlocal-environments is not supported in the extensiondatabase is lockedCodex process is not availableTemporary mitigation:
rgpattern prevents RAM exhaustion, but this is only a workaround.Happy to provide redacted logs/process snapshots if useful.
Do you suspect (or even better, have evidence) that this is a regression? If so, do you happen to know the exact version when this started? Can you confirm by rolling back to the previous version and verifying that it doesn't happen there?
Thanks for the follow-up. Sharing technical details with all user/project identifiers redacted.
Environment
openai.chatgpt-26.5304.20706,openai.chatgpt-26.304.20706(and release channel package0.4.79installed)Observed failure mode
rgspawning from VS Code utility process.code --type=utility --utility-sub-type=node.mojom.NodeService->codex app-server->rgrgcommand:rg --files --hidden --case-sensitive --no-require-git --glob-case-insensitive --ignore-file-case-insensitive --no-ignore-parent --follow --no-configrgrun withcwd=$HOME(outside active workspace scope), causing large scans and sustained CPU.Repeated logs during spikes
local-environments is not supported in the extensionReceived broadcast but no handler is configured method=thread-stream-state-changedopen-in-target not supported in extensionsqlx::query: slow statement ...)Regression status
26.5304.20706.26.304.20706still reproduces in our environment.We are now validating with clean A/B runs (single extension version active + fresh VS Code start).
Current mitigation (workaround only)
rgwithcwd=$HOMEkeeps the machine stable.rg/minute, confirming sustained runaway spawning.Thanks for the follow-up. We do suspect a regression.
What we observed:
openai.chatgpt-26.304.20706(VS Code extension), we intermittently see runawayrgspawns and high CPU/RAM.rg --files --hidden --no-ignore-parent --follow --no-confignode.mojom.NodeService$HOMEinstead of the opened workspace.PromptFilesLocatorfailures for agent/prompt patterns underfile:///home/<user>and repeated stream-state warnings.Why we think this is extension-side:
Mitigation/workaround (local):
$HOME-wide probing.cwdin local extension runtime (temporary patch).rgbursts while investigating.Current status:
Suggested fix direction:
$HOMEfallback for locator scans.I also see the same since switching to Codex VS Code extension. I notice because the system (M2 Max Mac) grinds to a halt, and then I am sure to find dozens/hundreds of "rg" processes in Activity Manager:
<img width="1512" height="887" alt="Image" src="https://github.com/user-attachments/assets/3a6e82c2-7048-41b4-a638-fa136d8645f1" />
Potentially related: https://github.com/openai/codex/issues/10846
I checked again because this keeps slowing my PC down to a halt. @etraut-openai would be great if this could be looked into – it's making it almost impossible to use the Codex VS Code extension for me, which seems to be the culprit here. Is this the right repo to report issues for that?
I analyzed it with Codex (in the terminal) and it recommended disabling Codex (in VS Code) 🫠
Codex says it's literally a skill issue – there's hundreds of rg processes running against the "openai-curated" skills.
...and this sounds like a reasonable analysis too:
EDIT: I got it patched locally, and so far the issue doesn't happen anymore. Codex said:
github/<revision>/....
on disk are under fb0a1837....
Codex.log
extension.js, in the recommended-skills code, which returns absolute asset paths under a
specific cache revision.
read-file-binary tries a direct absolute-path read, then wrongly falls back to workspace.findFiles("**/
<absolute path>").
Potential cause:
@pc-oai I see you closed this, great! But what PR/change fixed it, could you link that here? Thank you!