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
What version of the IDE extension are you using?
26.707.71524-linux-x64
What subscription do you have?
ChatGPT Plus
Which IDE are you using?
Visual Studio Code 1.128.0
What platform is your computer?
Linux 6.17.0-40-generic x86_64 x86_64
What issue are you seeing?
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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗