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
OpenAI Codex fails to initialize when Positron is started from the Linux desktop launcher but works when started through /usr/bin/positron on Ubuntu 26.04 LTS #14889
The Codex extension is installed and authenticated.
The Codex backend process starts successfully, but the Codex panel remains stuck on the OpenAI logo.
The codex process is running normally.
Describe the issue
Codex fails to initialize when Positron is started from the desktop launcher.
However, starting Positron via /usr/bin/positron makes Codex initialize correctly.
The problem can be reproduced repeatedly by switching only the launch method.
The problem appeared only recently. I had been using Positron and the OpenAI Codex extension previously without this behavior. I noticed it after recent updates of Positron and/or the OpenAI extension, although I cannot determine which update introduced the regression.
Steps to reproduce
Install Positron on Ubuntu 26.04.
Install the OpenAI Codex extension.
Start Positron from the desktop launcher (gtk-launch positron or the KDE application launcher).
Open the Codex panel.
Observed:
Codex remains stuck on the OpenAI logo.
Then modify the launcher from
Exec=/usr/share/positron/positron %F
to
Exec=/usr/bin/positron %F
Restart Positron.
Codex now initializes correctly.
The behaviour is reproducible by switching between these two launcher commands.
Expected behavior
Codex should initialize correctly regardless of whether Positron is started from the desktop launcher or from the command line.
Additional information
Developer Tools report errors such as:
ElectronWebviewElement.loadResource(...)
potential listener LEAK detected
Failed to load resource: net::ERR_FAILED
The FetchEvent returned a network error response: insufficient resources
Linux resource limits are normal:
Max open files: 524288
Positron process: ~165 open file descriptors
Codex process: ~52 open file descriptors
The /usr/bin/positron wrapper executes:
ELECTRON_RUN_AS_NODE=1 "$ELECTRON""$CLI""$@"
whereas the desktop launcher starts
/usr/share/positron/positron
directly.
I do not know whether this difference is expected, but changing the launcher to use /usr/bin/positron completely resolves the issue on my system.
changed the title [-]OpenAI Codex fails to initialize when Positron is started from the Linux desktop launcher but works when started through /usr/bin/positron[/-][+]OpenAI Codex fails to initialize when Positron is started from the Linux desktop launcher but works when started through /usr/bin/positron on Ubuntu 26.04 LTS[/+]on Jul 15, 2026
Thanks for the detailed report, especially for narrowing it down to the launch method. That distinction is really useful and points at a specific mechanism.
The two launch paths give Positron a different process environment. The desktop launcher runs the raw Electron binary (/usr/share/positron/positron), and in that case Positron spawns your login shell and merges its environment (from ~/.bashrc, ~/.zshrc, ~/.profile, etc.) into the app, including into extension host and webviews. The /usr/bin/positron wrapper instead launches through the CLI, which sets VSCODE_CLI=1 and causes Positron to skip that shell-environment resolution and keep the clean desktop-session environment. So the Codex panel works only on the path that does not pull in your login-shell environment.
The webview errors you're seeing (FetchEvent returned a network error response: insufficient resources and net::ERR_FAILED on loadResource) are the Codex webview's internal resource loading failing. The usual cause of that kind of failure, gated on which environment the app inherited, is a proxy or CA-related variable coming from your shell profile: HTTP_PROXY / HTTPS_PROXY / NO_PROXY, or NODE_EXTRA_CA_CERTS / NODE_OPTIONS.
Could you help us confirm which variable is responsible? A couple of things that would pin it down:
With Positron started from the desktop launcher (the failing case), run this and paste the output:
Then do the same with Positron started via /usr/bin/positron (the working case) and paste that too, so we can see the difference.
If you're comfortable sharing it, the relevant lines from your shell profile that set any of those variables would help.
As a quick check on the theory, if you launch the desktop entry with --force-disable-user-env (edit the launcher Exec to /usr/share/positron/positron --force-disable-user-env %F), does Codex initialize correctly? That flag tells Positron to skip the login-shell environment entirely, so if it fixes things it confirms the problem is a variable coming from your shell profile.
Thanks for your explanation. I carried out the tests you suggested.
After fully exiting Positron between each test, I obtained the following results:
/usr/share/positron/positron: Codex worked 2 times out of 10.
/usr/share/positron/positron --force-disable-user-env: Codex worked 3 times out of 10.
/usr/bin/positron: Codex worked 10 times out of 10.
So, on my machine, --force-disable-user-env does not make Codex start reliably. The /usr/bin/positron launcher is the only one that has worked consistently so far.
I could not run the exact renderer command you provided because:
pgrep -f 'positron.*--type=renderer'
returns no PID on my system.
I therefore checked the environment of the main Positron process instead.
With /usr/share/positron/positron, the command returned nothing.
With /usr/bin/positron, it returned only:
VSCODE_CLI=1
I did not find any matching proxy, Node options, custom CA, or npm configuration variable in either case.
Please let me know if there is another process or command you would like me to inspect.
Thank you for the careful comparison. The results actually point away from my original theory, because --force-disable-user-env skips the shell-environment resolution just like the /usr/bin/positron path does, yet only the CLI path is reliable, so an inherited shell variable is not the cause. The intermittent pattern (2/10, 3/10, 10/10) plus the insufficient resources and net::ERR_FAILED errors look instead like a startup race in the webview resource loader.
From what I can tell, this does not appear to be specific to Positron. The same symptom is reported against stock VS Code on Ubuntu 26.04 with the Codex extension, with an identical fingerprint (the climbing "listener LEAK detected" count, then insufficient resources and net::ERR_FAILED on local webview assets):
Seems like this is not something specific that Positron is doing. Two things that would help confirm and possibly resolve it for you:
Does the same stuck-on-logo behavior happen if you install the Codex extension in regular VS Code on this machine? If so, that confirms the upstream origin.
/usr/bin/code:
Codex initialized successfully 10 times out of 10.
/usr/share/code/code:
Codex initialized successfully only 3 times out of 10.
The failures show the same symptoms as in Positron: the Codex panel remains stuck and the local webview resources fail to load.
This confirms that the problem is reproducible in stock VS Code on the same Ubuntu 26.04 machine and is not specific to Positron. It also reproduces the same distinction between the CLI wrapper and the raw Electron binary:
CLI launch is reliable.
Direct binary launch is intermittent.
For Positron, launching it through /usr/bin/positron has initialized Codex successfully in all my repeated tests, so I now have a reliable workaround.
For my own use, this workaround is sufficient. I would prefer not to clear the Positron webview cache unless that additional test would still be useful for diagnosing the upstream issue.
Activity
[-]OpenAI Codex fails to initialize when Positron is started from the Linux desktop launcher but works when started through /usr/bin/positron[/-][+]OpenAI Codex fails to initialize when Positron is started from the Linux desktop launcher but works when started through /usr/bin/positron on Ubuntu 26.04 LTS[/+]juliasilge commentedon Jul 16, 2026
Thanks for the detailed report, especially for narrowing it down to the launch method. That distinction is really useful and points at a specific mechanism.
The two launch paths give Positron a different process environment. The desktop launcher runs the raw Electron binary (
/usr/share/positron/positron), and in that case Positron spawns your login shell and merges its environment (from~/.bashrc,~/.zshrc,~/.profile, etc.) into the app, including into extension host and webviews. The/usr/bin/positronwrapper instead launches through the CLI, which setsVSCODE_CLI=1and causes Positron to skip that shell-environment resolution and keep the clean desktop-session environment. So the Codex panel works only on the path that does not pull in your login-shell environment.The webview errors you're seeing (
FetchEvent returned a network error response: insufficient resourcesandnet::ERR_FAILEDonloadResource) are the Codex webview's internal resource loading failing. The usual cause of that kind of failure, gated on which environment the app inherited, is a proxy or CA-related variable coming from your shell profile:HTTP_PROXY/HTTPS_PROXY/NO_PROXY, orNODE_EXTRA_CA_CERTS/NODE_OPTIONS.Could you help us confirm which variable is responsible? A couple of things that would pin it down:
With Positron started from the desktop launcher (the failing case), run this and paste the output:
Then do the same with Positron started via
/usr/bin/positron(the working case) and paste that too, so we can see the difference.If you're comfortable sharing it, the relevant lines from your shell profile that set any of those variables would help.
As a quick check on the theory, if you launch the desktop entry with
--force-disable-user-env(edit the launcherExecto/usr/share/positron/positron --force-disable-user-env %F), does Codex initialize correctly? That flag tells Positron to skip the login-shell environment entirely, so if it fixes things it confirms the problem is a variable coming from your shell profile.chemometrician commentedon Jul 17, 2026
Thanks for your explanation. I carried out the tests you suggested.
After fully exiting Positron between each test, I obtained the following results:
/usr/share/positron/positron: Codex worked 2 times out of 10./usr/share/positron/positron --force-disable-user-env: Codex worked 3 times out of 10./usr/bin/positron: Codex worked 10 times out of 10.So, on my machine,
--force-disable-user-envdoes not make Codex start reliably. The/usr/bin/positronlauncher is the only one that has worked consistently so far.I could not run the exact renderer command you provided because:
pgrep -f 'positron.*--type=renderer'returns no PID on my system.
I therefore checked the environment of the main Positron process instead.
With
/usr/share/positron/positron, the command returned nothing.With
/usr/bin/positron, it returned only:VSCODE_CLI=1I did not find any matching proxy, Node options, custom CA, or npm configuration variable in either case.
Please let me know if there is another process or command you would like me to inspect.
juliasilge commentedon Jul 17, 2026
Thank you for the careful comparison. The results actually point away from my original theory, because
--force-disable-user-envskips the shell-environment resolution just like the/usr/bin/positronpath does, yet only the CLI path is reliable, so an inherited shell variable is not the cause. The intermittent pattern (2/10, 3/10, 10/10) plus theinsufficient resourcesandnet::ERR_FAILEDerrors look instead like a startup race in the webview resource loader.From what I can tell, this does not appear to be specific to Positron. The same symptom is reported against stock VS Code on Ubuntu 26.04 with the Codex extension, with an identical fingerprint (the climbing "listener LEAK detected" count, then
insufficient resourcesandnet::ERR_FAILEDon local webview assets):Seems like this is not something specific that Positron is doing. Two things that would help confirm and possibly resolve it for you:
chemometrician commentedon Jul 17, 2026
Thank you. I have now reproduced the same issue in regular VS Code using a clean temporary profile containing only the Codex extension.
Both launch methods used exactly the same directories:
--user-data-dir /tmp/vscode-codex-test/data
--extensions-dir /tmp/vscode-codex-test/extensions
Results:
/usr/bin/code:
Codex initialized successfully 10 times out of 10.
/usr/share/code/code:
Codex initialized successfully only 3 times out of 10.
The failures show the same symptoms as in Positron: the Codex panel remains stuck and the local webview resources fail to load.
This confirms that the problem is reproducible in stock VS Code on the same Ubuntu 26.04 machine and is not specific to Positron. It also reproduces the same distinction between the CLI wrapper and the raw Electron binary:
For Positron, launching it through /usr/bin/positron has initialized Codex successfully in all my repeated tests, so I now have a reliable workaround.
For my own use, this workaround is sufficient. I would prefer not to clear the Positron webview cache unless that additional test would still be useful for diagnosing the upstream issue.
juliasilge commentedon Jul 17, 2026
No need from our end! Let us know if you have further questions 🙌