VS Code Codex panel intermittently stuck loading on Linux: local webview assets fail with net::ERR_FAILED
What version of the IDE extension are you using?
26.707.41301
What subscription do you have?
Pro x5
Which IDE are you using?
VS Code 1.128.0
What platform is your computer?
Ubuntu 26.04 LTS, x86_64 / Linux 7.0.0-27-generic x86_64
What issue are you seeing?
The Codex sidebar intermittently remains stuck on its loading logo. The bundled Codex app-server process starts, but the VS Code webview fails to load many JavaScript and CSS assets from the locally installed extension.
The DevTools console reports a rapidly increasing number of listeners while VS Code attempts to load local webview resources. The listener count grows from 175 to 615, followed by many service-worker failures:
potential listener LEAK detected, having 175 listeners already
potential listener LEAK detected, having 263 listeners already
potential listener LEAK detected, having 351 listeners already
potential listener LEAK detected, having 439 listeners already
potential listener LEAK detected, having 527 listeners already
potential listener LEAK detected, having 615 listeners already
The FetchEvent for "<URL>" resulted in a network error response: insufficient resources.
GET https://file+.vscode-resource.vscode-cdn.net/<HOME>/.vscode/extensions/openai.chatgpt-26.707.41301-linux-x64/webview/assets/codex-api-B_J9YqQM.js net::ERR_FAILED
The relevant stack repeatedly goes through:
doReadFileStream @ fileService.ts
readFileStream @ fileService.ts
loadLocalResource @ resourceLoading.ts
loadResource @ webviewElement.ts
Restarting the Codex extension does not reliably recover the panel. Fully restarting VS Code sometimes fixes it temporarily, but the failure returns on a later launch. Uninstalling and reinstalling the Codex extension did not prevent recurrence.
What steps can reproduce the bug?
- Start VS Code on Linux.
- Open the Codex sidebar.
- The Codex logo remains in the loading state indefinitely.
- Open
Help: Toggle Developer Tools. - Observe repeated failures loading local
vscode-resourceassets and a continuously increasing listener count. - Close the Codex panel, restart the extension, and reopen the panel. The failure remains intermittent.
What is the expected behavior?
The Codex webview should load its bundled assets and display the sidebar without repeated full VS Code restarts.
Additional information
This appears to involve VS Code's local webview resource loader or its service worker rather than authentication or the Codex app-server. The webview starts, then local extension chunks fail to load and the resource-loading listeners grow without being released.
Possibly related to #9615, although that report is on Windows and does not include this Linux insufficient resources / local asset-loading signature.
The attached log excerpt is sanitized. Local username and project paths were removed:
codex-vscode-sanitized-log.txt
11 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I think I have the same issue: "The Codex sidebar intermittently remains stuck on its loading logo" on Linux.
Same issue here
Clearing the codex cache and switching to an older version (
openai.chatgpt@26.623.101652) worked for meI reproduced this on Fedora Linux 44 (Wayland, x86_64) with:
1.128.0(fc3def6774c76082adf699d366f31a557ce5573f)26.707.41301I instrumented the actual child
active-frameof the Codex webview through the Chrome DevTools Protocol, rather than using extension activation as the pass/fail signal.Exact failure
On a failed launch, the child frame remains at the static startup loader:
The Codex app-server still starts and responds to
initialize, but React never replaces the loader. An instrumented webview reload captured this exception:At the same time, dozens of bundled JS and CSS resources fail with
net::ERR_FAILED, including:The extension host then reports:
What I ruled out
CacheStorageis not reliable.The VS Code service-worker cache contained 735 current-version Codex resources and 720 resources from the previous extension version. VS Code revalidates cached webview resources through the host, so the cache does not eliminate the request fan-out.
A direct 735-resource parallel-fetch probe produced two useful control results:
This suggests that the large preload fan-out exposes an intermittent VS Code webview resource-bridge failure, but fan-out alone is not deterministic.
Secondary Linux resource issue
During one hard-hang reproduction, Codex also logged:
The per-user inotify instance quota was exactly exhausted (
128/128). Raisingfs.inotify.max_user_instancesto 1024 removes this secondary failure, but the startup spinner still reproduced with only67/128instances in use. It is therefore an amplifier, not the sole cause.Verified Codex-side mitigation
The generated
preload-helper-CQB7nEpd.jssynchronously creates preload links for every JS and CSS dependency passed to it. I locally changed only this helper to:modulepreloadlinks. The realimport()still loads all application modules.load/errorhandlers before appending the link.No authentication, app-server, API, or application logic was changed.
Verification against the same real profile and normal desktop startup path:
The Codex-side fixes I would recommend are:
modulepreloadfan-out in the VS Code webview build.vite:preloadErrorfires.The current behavior turns one transient local-resource failure into an unrecoverable infinite spinner with no visible error.
Same thing with 26.707.71524 (VS Code 1.128.1)
System:
Kernel: 7.1.3-1-default arch: x86_64 bits: 64
Desktop: KDE Plasma v: 6.7.2 (Wayland)
Distro: openSUSE Tumbleweed 20260714
I can reproduce the same webview resource-load failure on a different path: the Codex Settings panel, not just the main sidebar.
Environment
Windows_NT 10.0.26200)1.128.1, commit5264f2156cbcd7aea5fd004d29eaa10209155d66, Electron42.5.0openai.chatgpt-26.707.71524-linux-x64Settings-specific trigger
The main Codex sidebar can be usable, but opening the profile-menu gear / Codex Settings creates a separate custom
WebviewPanelthat frequently remains on the centered Codex logo for a long time. VS Code also shows its yellow "window is not responding" prompt. On some attempts the Settings page eventually renders without any configuration change, which points to a resource-loading stall rather than permanently invalid Settings state.The bundled app-server starts and initializes; this failure occurs before the Settings webview completes normal frontend bootstrap.
DevTools evidence
The VS Code renderer DevTools repeatedly reported:
The corresponding stack originates from the
vscode-webview://...frame forextensionId=openai.chatgptand itspostMessageresource-loading path.There is also a separate CSP error for an embedded
data:font/woff2font (font-src 'self' https://*.vscode-cdn.net). It appears to be a packaging/CSP defect, but the main sidebar can render with the same stylesheet, so I do not think it is the primary cause of the stall.Why Settings makes the failure much easier to trigger
I inspected the installed Settings route bundle. Its lazy import passes 174 dependencies to the generated Vite preload helper. That helper synchronously appends a preload link for every dependency before resolving the import. In a Remote-SSH window, each local extension asset travels through the VS Code webview resource bridge, matching the
readFileStream -> loadLocalResource -> loadResourcestack above.This looks consistent with the bounded-concurrency / reduced-speculative-preload mitigation described in the preceding comment. It is not an app-server crash or an authentication failure.
No remote hostname, user path, workspace name, session content, or credentials are included here.
I add this problem, And after a lot of troubleshooting, I found out that the codex extension has more than 4k .js files on webview/assets
$HOME/.vscode/extensions/openai.chatgpt-<version>-linux-x64/webview/assetsit solved with
ulimit -n 10000.try this
pkill -9 code; pkill -9 Code; ulimit -n 10000; code --new-windowif doesn't work try a higher value.
if it works use. to make it permanent.
then reboot the machine.
Deterministic confirmation on Kubuntu 26.04 KDE Wayland, VS Code 1.129.1 (8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8), Codex extension 26.715.31925.
The graphical session has the documented systemd RLIMIT_NOFILE default of soft 1024 / hard 524288. A direct /usr/share/code/code launch gives zygotes/renderers a soft limit of 1024. Codex then fails after the listener count increases from 175 to 615, followed by:
FetchEvent ... insufficient resources
net::ERR_FAILED
for Codex webview JavaScript and CSS assets.
The failure is caused by the Codex webview’s thousands of chunks/resource requests exhausting the low-limit renderer during its startup burst. The client-status-changed warning is incidental.
I also traced the VS Code startup ordering:
03:58:55.721 zygote A execs with soft limit 1024
03:58:55.723 zygote B execs with soft limit 1024
03:58:55.803 browser main raises itself 1024 → 8192
03:58:55.812 Node raises browser main 8192 → 524288
Renderers fork from the already-created 1024-limit zygotes, so the later changes to the browser process do not affect them.
Two confirmed workarounds:
Fully exit every VS Code process, verify pgrep -x code produces no output, then launch the official deb build through its CLI bootstrap:
code
The CLI runs the binary in Node mode first. Node raises the limit to 524288 before starting graphical Electron, so the zygotes/renderers inherit the higher value. This will not help if code merely connects to an already-running low-limit instance.
Start graphical VS Code with an explicit per-application limit:
(ulimit -Sn 65536 && exec /usr/share/code/code)
This worked consistently. For a graphical launcher, the equivalent command is:
/usr/bin/prlimit --nofile=65536:524288 -- /usr/share/code/code %F
Running the direct launch under strace also makes Codex work while the renderers remain at 1024, confirming that slowing the startup burst reduces peak resource concurrency rather than changing the limit.
Please reduce/bundle the number of webview chunks and lazy-load or cap concurrent resource loading. The extension should not depend on unusually high renderer FD limits to boot successfully.
https://github.com/openai/codex/issues/32530#issuecomment-5012908167
This worked perfectly for me! Thanks @a-bentofreire
I am able to consistently get it working with
ulimit -n 10000Yes, can confirm the ulimit issue. That also explains why this https://github.com/openai/codex/issues/33108#issuecomment-4977999621 workaround works.
/usr/share/codestarts vs code with hard limit, not soft.on linux, processes have soft and hard limit.. they can raise their soft limit.. the problem is
/usr/share/codewill launch chrome that will raise the limit for the process, but after the extensions have been loaded (which inherit the unraised soft limit of 1024)when
codeis run, it starts node first which increases the soft limit before running/usr/share/code, so it will unblock the file read burst