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 hangs when VS Code is launched from the desktop launcher (/usr/share/code/code) but works when started with code (/usr/bin/code) on Linux Mint #33108
Codex stays on the loading screen indefinitely when VS Code is started from the desktop launcher (or pinned icon).
However, if I start VS Code from a terminal using:
code
Codex works correctly.
This is reproducible.
What steps can reproduce the bug?
Install Visual Studio Code from the Microsoft Debian package.
Install the OpenAI ChatGPT extension (Codex).
Close VS Code completely.
Launch VS Code from the desktop launcher (or a panel shortcut) that executes:
Exec=/usr/share/code/code %F
Open the Codex view.
Result
Codex stays on the loading screen indefinitely.
The Codex output shows:
Activating Codex extension
Spawning codex app-server
Initialize received id=1
Close VS Code completely.
Start VS Code from a terminal:
code
Open the Codex view.
Result
Codex loads and works normally.
What is the expected behavior?
Codex should initialize and work regardless of whether VS Code is started from the desktop launcher or by running code from a terminal.
Additional information
After investigating, I found that the launch method is the only reproducible difference.
The desktop launcher starts VS Code with:
Exec=/usr/share/code/code %F
Running from the terminal uses the standard VS Code wrapper:
code
which resolves to:
/usr/bin/code -> /usr/share/code/bin/code
Changing my desktop launcher to:
Exec=/usr/bin/code %F
makes Codex work reliably.
This suggests there is a difference between launching VS Code through the Electron binary directly and launching it through the standard code wrapper.
I also ruled out:
corrupted ~/.codex
invalid config.toml
corrupted VS Code profile
corrupted extensions directory
interference from other installed extensions
Developer Tools repeatedly showed calls to loadLocalResource / readFileStream while Codex was stuck loading.
Reacted by Raman Sinclair, FinnJob, Gabriel Palassi and Jucielton José dos Santos
I reproduced the same issue on Ubuntu with the Codex VS Code extension 26.707.71524-linux-x64.
Symptoms
When VS Code is launched from the desktop/pinned launcher, Codex remains on
the loading logo indefinitely. In some cases, the VS Code renderer also
crashes with:
The window terminated unexpectedly
reason: 'crashed'
code: '135'
The desktop launcher was executing:
/usr/share/code/code
When VS Code is launched from a terminal using:
code .
Codex loads successfully.
code resolves through:
/usr/bin/code -> /usr/share/code/bin/code
Diagnostics
The Codex CLI works normally and is authenticated using ChatGPT.
In both the successful and failed cases, the Codex app-server starts and
receives initialization:
Activating Codex extension
Spawning codex app-server
Initialize received id=1
In the failed desktop-launch case, VS Code Developer Tools reports failures
loading local Codex webview assets:
Unable to preload CSS
Failed to load resource: net::ERR_FAILED
potential listener LEAK detected
The stack repeatedly contains:
doReadFileStream
readFileStream
loadResource
Affected URLs use the local VS Code webview resource scheme:
This suggests that launching the Electron binary directly has a different
environment or initialization path from launching through the official /usr/share/code/bin/code wrapper.
The immediate failure occurs in VS Code local Webview asset loading, not in
the Codex app-server or authentication layer.
Reacted by Sergei Lopatin, syselement, Jucielton José dos Santos and nyxrobotics
listener growth from 175 to 263, 350, 438, 526, and 614
The failed assets were present and readable on disk. Static inspection of this extension build's webview entry showed a startup dependency preload list containing 676 assets, which may explain why this launch-path difference becomes visible as resource/listener pressure.
Only change made
I installed user-level desktop-entry overrides that route both normal launches and URL handling through the wrapper:
I then refreshed the user desktop database, fully quit VS Code, and relaunched it from the application menu.
Codex now initializes normally, and the failure has not recurred during verification. I did not clear caches, reinstall or downgrade the extension, change authentication, change GPU settings, or modify the workspace.
This independently confirms that the workaround applies beyond Debian/Ubuntu and still applies to the newer extension/VS Code versions above. It also connects the launch-path issue here with the webview resource-failure signature in #32530 and the analogous investigation in posit-dev/positron#14889.
Closing in favor of #34308, which tracks the same packaged Linux desktop-entry versus VS Code CLI-wrapper launch failure. Your Mint report and the Ubuntu/Fedora confirmations are useful linked evidence for it. Please add any cases where that specific launcher comparison changes the result to #34308.
Activity
github-actions commentedon Jul 14, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Leaves2836 commentedon Jul 15, 2026
I reproduced the same issue on Ubuntu with the Codex VS Code extension
26.707.71524-linux-x64.Symptoms
When VS Code is launched from the desktop/pinned launcher, Codex remains on
the loading logo indefinitely. In some cases, the VS Code renderer also
crashes with:
The desktop launcher was executing:
When VS Code is launched from a terminal using:
Codex loads successfully.
coderesolves through:Diagnostics
The Codex CLI works normally and is authenticated using ChatGPT.
In both the successful and failed cases, the Codex app-server starts and
receives initialization:
In the failed desktop-launch case, VS Code Developer Tools reports failures
loading local Codex webview assets:
The stack repeatedly contains:
Affected URLs use the local VS Code webview resource scheme:
The failed Codex log never reaches:
When launched using
code ., it does reach those messages and the Codex UIloads successfully.
The following warnings occur in both the successful and failed runs, so they
do not appear to be the direct cause:
Controls performed
I ruled out:
A clean/isolated VS Code process worked, and the same normal profile and
extension directory also worked when VS Code was started using
code ..Workaround
I created a user-level desktop entry and changed its
Execentries from:to:
After completely terminating all existing VS Code processes and launching
from the updated desktop entry, Codex loads normally.
Commands used:
This suggests that launching the Electron binary directly has a different
environment or initialization path from launching through the official
/usr/share/code/bin/codewrapper.The immediate failure occurs in VS Code local Webview asset loading, not in
the Codex app-server or authentication layer.
vicevolf commentedon Jul 18, 2026
Confirmed on an independent Fedora setup that routing the desktop entry through the VS Code CLI wrapper resolves this failure.
Environment (sanitized)
[email protected]Failure signature
When the application launcher used the raw Electron binary:
Exec=/usr/share/code/code %Fthe Codex app-server started and completed initialization, but the webview did not finish bootstrapping. Developer Tools showed:
net::ERR_FAILEDUnable to preload CSSdoReadFileStream -> readFileStream -> loadResourcestacksThe failed assets were present and readable on disk. Static inspection of this extension build's webview entry showed a startup dependency preload list containing 676 assets, which may explain why this launch-path difference becomes visible as resource/listener pressure.
Only change made
I installed user-level desktop-entry overrides that route both normal launches and URL handling through the wrapper:
I then refreshed the user desktop database, fully quit VS Code, and relaunched it from the application menu.
Codex now initializes normally, and the failure has not recurred during verification. I did not clear caches, reinstall or downgrade the extension, change authentication, change GPU settings, or modify the workspace.
This independently confirms that the workaround applies beyond Debian/Ubuntu and still applies to the newer extension/VS Code versions above. It also connects the launch-path issue here with the webview resource-failure signature in #32530 and the analogous investigation in posit-dev/positron#14889.
etraut-openai commentedon Oct 13, 2026
(response from codex)
Closing in favor of #34308, which tracks the same packaged Linux desktop-entry versus VS Code CLI-wrapper launch failure. Your Mint report and the Ubuntu/Fedora confirmations are useful linked evidence for it. Please add any cases where that specific launcher comparison changes the result to #34308.