Repository navigation
Description
What version of the Codex App are you using?
- Affected Microsoft Store/MSIX package:
OpenAI.Codex 26.1106.6628.0(x64). - Bundled Linux CLI:
0.167.0-alpha.4.1. - Previously working package:
26.1103.7773.0; its retained Linux runtime reports0.167.0-alpha.3.2. - Versions above were obtained from the installed package and executable, since the affected app initially could not pass startup.
What subscription do you have?
Not included; the failure occurs before the CLI executable starts.
What platform is your computer?
- Windows 10 x64, build
19045.7807. - WSL
3.0.5.0, Ubuntu24.04.5 LTS, kernel6.18.58.1-microsoft-standard-WSL2. - The Windows drive is mounted through DrvFS with
metadata,umask=22,fmask=11. - Desktop setting:
runCodexInWindowsSubsystemForLinux = true.
What issue are you seeing?
After updating, the desktop app is blocked by:
Organization settings could not be loaded
Native Windows mode works. With WSL selected, the startup log repeatedly reports:
Desktop startup policy read failed attempt=1 phase=policy-read reason=protocol retrying=false
The immediate failure is local executable launch, not an unsuccessful organization-settings network request. The preliminary startup check selects the packaged Linux executable directly from:
C:\Program Files\WindowsApps\OpenAI.Codex_26.1106.6628.0_x64__2p2nqsd0c76g0\app\resources\codex
WSL sees this file with mode 0444. Executing it returns:
exit status: 126
stdout: empty
stderr: bash: .../app/resources/codex: Permission denied
The desktop then attempts to parse the empty stdout as startup JSON and surfaces the generic organization-settings error.
What steps can reproduce the bug?
- On the environment above, use the affected Store/MSIX package with WSL selected and no
CODEX_CLI_PATHoverride. - Launch the desktop app.
- Observe the organization-settings dialog and
phase=policy-read reason=protocol. - Inspect and execute the installed Linux binary from a WSL shell:
src='/mnt/c/Program Files/WindowsApps/OpenAI.Codex_26.1106.6628.0_x64__2p2nqsd0c76g0/app/resources/codex'
stat -c '%a %n' "$src"
"$src" app-server --print-startup-config
printf 'exit=%s\n' "$?"On this installation, the mode is 444 and execution fails with exit 126.
Control test: copy the current package's codex and codex-code-mode-host into a user-owned directory, verify their SHA-256 hashes against the package, and grant executable permission. The copied CLI successfully completes the startup-settings check with exit 0 and valid JSON containing appServerVersion and configRequirements, using the same configuration and network setup.
Selecting this verified copy through CODEX_CLI_PATH also allows the actual desktop app to launch. Its log then records:
Codex CLI initialized
app_server_connection.state_changed ... initialized=true ... next=connected
The desktop UI was confirmed to open without the startup error.
What is the expected behavior?
The WSL startup-settings check should execute a verified, executable copy of the matching bundled Linux CLI. It should reuse the normal relocation/cache mechanism where execution from the protected package is unavailable.
A process that never starts should produce an actionable executable-launch error, including exit status and suitable stderr, rather than a generic organization/network error.
Additional information
Installed desktop-code diagnosis
Static inspection of the installed app.asar identifies the relevant path in:
.vite/build/early-bootstrap-133-d277c7adebbd24e5.js: preliminary policy check..vite/build/early-bootstrap-824-40bb0536d97ca2c2.js: startup command preparation and runtime resolution.
The following is equivalent pseudocode with descriptive variable names:
// Policy check creates a non-null startupCommand:
resolveTransport({
...options,
startupCommand: { args: ["--print-startup-config", /* client info */] }
});
// WSL resolver:
includeRuntime = options.startupCommand == null;
// Bundled executable resolver:
windowsDestinationPath =
includeRuntime === false
? null
: join(windowsCodexHome, "bin", "wsl", executableName);
// Relocation runs only when a destination was supplied.
// Otherwise the original packaged file is returned if it exists.Consequently, the preliminary policy check skips relocation and selects WindowsApps/.../resources/codex. The later, ordinary app-server path still enables relocation, but cannot be reached until that check passes. The candidate-file check verifies existence/file type, not Linux executability.
The prior working version's log shows it launching a relocated runtime under:
%USERPROFILE%\.codex\bin\wsl\7076a964b43922ce\codex
That retained executable has mode 0744. For the current package, the descriptor-derived normal WSL CLI directory is dda21de2dbbd1cc1; it was absent before the workaround allowed startup to proceed.
Distinction from encrypted-resource copy failures
This is related to #36777 and #38696, but the observed mechanism here differs from ERROR_ENCRYPTION_FAILED:
- The current packaged Linux CLI has Windows attribute
Archive, notEncrypted. - Copying the current packaged binaries succeeds and their hashes match.
- The failing preliminary path explicitly bypasses copying and attempts direct execution.
#56197 also contains reports of phase=policy-read reason=protocol, but this reproduction has empty stdout and exit 126, rather than shell text contaminating JSON.
PR #55300 introduced --print-startup-config. It is relevant context for the one-shot command; it does not by itself establish where the desktop relocation regression was introduced.
Verified local workaround and suggested fix
A user-level launcher now looks up the currently registered app package, verifies and stages its Linux binaries into an executable WSL cache, then executes that matching CLI. The desktop starts successfully through this launcher. It does not change WindowsApps files/permissions or bypass the policy check.
An upstream fix could preserve WSL CLI relocation/reuse for the preliminary startup check while continuing to skip unnecessary runtime initialization. A regression test should cover a readable but non-executable packaged Linux binary and verify that both the preliminary check and normal WSL app-server startup succeed with the matching relocated runtime.
Activity
piterskiy commentedon Nov 12, 2026
I'm seeing the same failure on the same build.
Environment
Behavior
[desktop] runCodexInWindowsSubsystemForLinux = falsethe app starts normally.Ruled out
notifyentry in config.toml (the Computer Use hook) did not change anything.Ayoro commentedon Nov 12, 2026
Confirmed independently on another installation of the same Store/MSIX package,
OpenAI.Codex 26.1106.6628.0(x64), with bundled Linux CLI0.167.0-alpha.4.1and Ubuntu 24.04 on WSL2.This completely blocked WSL-mode startup. The Chinese dialog says “无法加载组织设置” and suggests checking the network/proxy/firewall or signing out, which sent troubleshooting in the wrong direction.
Observed evidence:
Desktop startup policy read failed attempt=1 phase=policy-read reason=protocol retrying=false.app/resources/codexthrough WSL fails withPermission denied, exit code 126, and empty stdout.appServerVersion: "0.167.0-alpha.4.1"andconfigRequirements.requirements.c3dea068c8794f1764051c1fd182ff0524352bbddf2f2638e72386b9b7b74368.startupCommandresults inincludeRuntime=false, thenwindowsDestinationPath=null, so the preliminary policy check skips relocation. Empty stdout is subsequently categorized as a protocol error.End-to-end workaround confirmed: stage the matching
codexandcodex-code-mode-hostin a user-owned directory, set a process-localCODEX_CLI_PATHoverride, and launch the desktop in WSL mode. Logs showspawnCommand=wsl.exewith the staged executable, followed byinitialized=true ... next=connected. The affected user then confirmed their actual desktop session opened successfully.One additional workaround pitfall: directly launching
WindowsApps/.../app/ChatGPT.exevia WindowsProcess.Startfailed with Win32 error 5 (Access denied) on this machine. The package's registered execution alias,%LOCALAPPDATA%\Microsoft\WindowsApps\chatgpt-desktop.exe, worked withUseShellExecute=falseand the child-process environment override. This was a separate issue in our temporary launcher, not an additional claim about the original startup failure.Please retain executable relocation for the preliminary WSL policy check and report local launch failures accurately instead of implying an organization/network/authentication problem. A packaged-app regression test covering a readable but non-executable Linux binary would catch this. No WindowsApps permissions, organization policies, or installed package contents were changed in our workaround.
arniksup commentedon Nov 12, 2026
Independent confirmation: same regression on Windows + Ubuntu 24.04 WSL2, workaround successful
@zg-alexey @Ayoro thanks for your help!
I can confirm the same issue on another Windows installation. The workaround described here successfully restored Codex Desktop without reinstalling the application, resetting configuration, or clearing authentication data.
Environment
OpenAI.Codex 26.1106.6628.0(x64)26.1103.4239.0Observed failure
After a computer restart, Codex Desktop stopped launching and displayed:
The Desktop logs repeatedly reported:
Root-cause verification
I tested the Linux executable bundled with the current MSIX package:
Actual result:
This exactly matches the executable-permission and startup policy failure described in the original report.
Successful workaround
codexandcodex-code-mode-hostfrom the current MSIX package to a user-owned directory under.codex/bin/wsl/.chmod 755.cmp.app-server --print-startup-configsuccessfully.CODEX_CLI_PATHto the copied executable for the launching process.chatgpt-desktop.exeexecution alias.Result: Codex Desktop started successfully in WSL mode.
No modifications to the protected
WindowsAppsdirectory were necessary. Existing projects, configuration, and authentication data were preserved.This independently confirms that the regression affects MSIX
26.1106.6628.0and that staging the matching Linux binaries in an executable user-owned directory is an effective workaround.Thanks to @zg-alexey for the detailed root-cause investigation and @Ayoro for the additional confirmation and launcher workaround details. Your findings saved me a lot of unnecessary troubleshooting!
Looking forward to an upstream fix that preserves the WSL executable relocation mechanism during the preliminary startup policy check.
archon810 commentedon Nov 12, 2026
OpenAI keeps breaking this. Do they not have any tests? This is ridiculous.
archon810 commentedon Nov 12, 2026
Confirmed on another setup, with the workaround working end to end.
Environment
26.1106.6628.0(x64), bundled Linux CLI0.167.0-alpha.4.1/mnt/cmounted as plain DrvFS withoutmetadata. The packaged binary still shows up as444there, while files copied to my profile show as executable.[desktop] runCodexInWindowsSubsystemForLinux = trueSame failure
Desktop startup policy read failed attempt=1 phase=policy-read reason=protocol retrying=falsestaton.../OpenAI.Codex_26.1106.6628.0_x64__2p2nqsd0c76g0/app/resources/codexreturns444. Running it returnsPermission denied, exit126.codexSHA-256 isC3DEA068C8794F1764051C1FD182FF0524352BBDDF2F2638E72386B9B7B74368, matching @Ayoro's.Workaround (no changes to WindowsApps)
codexandcodex-code-mode-hostfromapp\resources\to%USERPROFILE%\.codex\bin\wsl\manual-26.1106.6628.0\, thenchmod 755. Verify the SHA-256 hashes match.codex app-server --print-startup-configfrom that copy returns exit 0 and{"appServerVersion":"0.167.0-alpha.4.1","configRequirements":{...,"requirements":null}}.chatgpt-desktop.exeexecution alias, withCODEX_CLI_PATHset for that process only. Use the Windows path to the staged file. The app wraps it inwsl.exeitself; the log showsruntimeSource=overrideandspawnCommand=wsl.exe.Launcher I use from a desktop shortcut. It skips the override when the installed version no longer matches, so it won't pin a stale CLI after the fix ships:
Result:
initialize_handshake_result ... outcome=success,initialized=true ... next=connected, and existing WSL projects loaded normally.+1 to fixing the preliminary policy check so it keeps WSL relocation. The real error (exit 126 /
EACCES) should also show up in the dialog instead of the generic organization/network message. That message sent me down the proxy and firewall path first.mpwillia401 commentedon Nov 13, 2026
Additional reproduction: Oracle Linux 9.5 / WSL2 — startup-policy CLI override ignored
I independently reproduced this issue with:
19045.64663.0.5.0, Oracle Linux9.5(WSL2)26.1106.6628.00.167.0-alpha.4.1Observed behavior
When
[desktop] runCodexInWindowsSubsystemForLinux = true, the application displays “Organization settings could not be loaded.” Its startup log reports:Process Monitor evidence
The desktop launches WSL for startup-policy initialization with an absolute
--cdpointing intoapp/resources, then runs the packaged Linux CLI from:The directory itself is accessible from WSL (
wsl.exe ... --cd <resources> --exec /usr/bin/pwdsucceeds). However, this bundledcodexappears in Oracle Linux as-r--r--r--(mode0444), and executing it gives Permission denied, exit code 126.Working-copy verification
I copied both
codexandcodex-code-mode-hostto a Linux-native directory,/home/opc/.codex/bin/wsl/chatgpt-desktop-test/, verified SHA-256 hashes matching the original binaries, and set mode0755on both copies. The copied CLI reportscodex-cli 0.167.0-alpha.4.1and successfully completesapp-server --print-startup-configwith exit code0.Override verification
I then launched the desktop through its Windows registered execution alias with a process-scoped:
A second Process Monitor capture confirmed this variable was present in the launched ChatGPT process environment. Nonetheless, the failing WSL startup-policy command still explicitly invokes the non-executable WindowsApps copy rather than the working CLI override. WSL-mode startup remains blocked; Windows Native mode works.
Suggested fix
Stage the bundled Linux CLI in an executable WSL location before the preliminary startup-policy read, or honor the CLI override in that initialization path. Ideally surface the underlying executable permission error instead of the generic organization-settings error.
This report concerns only
openai/codex; no changes to other repositories are required.mitkodotcom commentedon Nov 13, 2026
Confirmed regression in Codex Desktop 26.1111.2228.0 — WSL workaround successful
I can confirm that the issue persists in the newer Microsoft Store/MSIX version 26.1111.2228.0 on Windows 10.
Observed behavior:
CODEX_CLI_PATHwas unset at Process, User, and Machine scopes.CodexSandboxService.OpenAI.Codexdid not help.runCodexInWindowsSubsystemForLinuxtofalseallowed Desktop to start normally.Root-cause verification:
The bundled Linux executable at:
has permissions
0444under WSL. Attempting to execute it returnsPermission denied.Successful workaround:
codexandcodex-code-mode-hostbinaries from the installed MSIX package into a user-owned directory.chmod 755).CODEX_CLI_PATHpointing to the copied executable.Codex Desktop started successfully. The active WSL process table confirmed:
This independently confirms that the regression remains present in 26.1111.2228.0, and that the executable-relocation workaround is effective with this version.
No reinstall, configuration reset, or changes to the protected WindowsApps directory were needed.
piggei commentedon Nov 13, 2026
Confirmed on Windows 10 + WSL2 — bundled Linux binary lacks execute permissions
I can confirm this issue on Codex Desktop 26.1106.6628.0, running on Windows 10 with WSL2 (Ubuntu 22.04).
After several recurring startup failures, I performed an extensive investigation using PowerShell, WSL, and Microsoft Sysinternals Process Monitor.
The findings strongly indicate a packaging/launcher regression rather than a WSL configuration or authentication problem.
Environment
26.1106.6628.00.167.0-alpha.4.1runCodexInWindowsSubsystemForLinux = true1. Startup failure
Codex Desktop fails to start with the organization settings error.
The desktop logs consistently report:
Disabling the WSL backend allows Desktop to start, but this is not an acceptable long-term solution for workflows that depend on native Linux repositories, tools, and build environments.
2. Actual launcher command captured
Using Process Monitor, I confirmed that Desktop attempts to execute the bundled Linux binary directly from the WindowsApps installation directory:
The launcher uses
wsl.exe -d Ubuntu-22.04 --cd ... --exec /usr/bin/bash -lc ...and invokes this binary with:3. Bundled binary is not executable from WSL
The bundled binary is readable, but WSL reports:
Attempting to execute it directly produces:
The binary has the following properties:
4. Identical binary works after copying to Linux
I copied the exact same binary to the native Ubuntu filesystem and assigned executable permissions.
The SHA256 hashes matched.
The copied binary then worked correctly:
This strongly supports the conclusion that the executable permissions or launch location are responsible for the failure.
5. Other components were independently verified
The following checks succeeded:
initialize.configRequirements/read.The backend itself is operational when launched from an executable location.
6. Workarounds attempted
I also tried:
wsl --shutdown.codexandcodex-code-mode-host.CODEX_CLI_PATHoverride.None restored WSL-backed Desktop startup.
The application repair left the bundled binary with permissions
444.The
CODEX_CLI_PATHattempt did not resolve the preliminary policy-read failure. I have not conclusively verified whether the override was inherited and honored by that specific startup phase.7. Impact
This is particularly disruptive for developers who use Codex Desktop as their primary interface to repositories hosted inside WSL.
I routinely work across multiple Git repositories, branches, and worktrees, with Linux-native tooling and GitHub integration.
Switching to the Windows backend is only a partial workaround and does not provide equivalent Linux execution behavior.
The recurring startup regressions have also required substantial troubleshooting time, interrupting ongoing development work.
Requested fix
Could the Desktop launcher ensure that the bundled Linux executable is staged in an executable location before the initial policy/configuration read?
Alternatively, could the WSL bootstrap consistently honor a supported CLI path override, including during the preliminary
--print-startup-configphase?It would also be helpful if the startup error reported the underlying
Permission deniedfailure rather than the generic organization-settings message.The key finding is reproducible: the bundled binary fails with permissions
444, while a SHA256-identical copy with executable permissions runs successfully.I can provide additional Process Monitor traces and diagnostic output if useful.
Kun-xui commentedon Nov 14, 2026
Independent confirmation + an alternative fix that does not need
CODEX_CLI_PATHConfirmed the same mechanism on Windows 10 19045 x64 / WSL2 Ubuntu with both
26.1106.6628.0and26.1111.2228.0, on a default DrvFS mount (without themetadataoption). The packaged ELFs ship read-only (Archiveattribute, TrustedInstaller-owned), so DrvFS derives mode444, and even root cannot execute a file that has no execute bit at all:Workaround B: make the packaged ELFs executable in place (no copy, no env var)
Since DrvFS without
metadataderives the mode from the read-only attribute, clearing that attribute is enough — the policy check then executes the packaged binary successfully and the stock configuration works again:Result: mode flips to
555(r-xr-xr-x),.../resources/codex --versionexecutes under WSL, and the app starts in WSL mode withrunCodexInWindowsSubsystemForLinux = true— zeropolicy read failedlines, app-server connects throughwsl.exenormally. Verified end-to-end on26.1111.2228.0. File content is untouched, so MSIX integrity/validation is unaffected; only the owner and the read-only attribute change.Caveat: this variant only helps on default mounts where the mode is derived from the read-only attribute. On mounts with
metadataplus an exec-maskingfmask(like the reporter'sumask=22,fmask=11), theCODEX_CLI_PATHworkaround from the issue body is the right one — the two approaches are complementary.Why the failure looks intermittent across the linked issues
The early-bootstrap distro lookup runs concurrently with the policy check. When WSL is cold,
wsl.exe --statuscan take seconds (we observed a 3 s timeout in the desktop log), the lookup returns nothing and the policy check falls back to the Windows binary — which succeeds. Once WSL is warm the lookup returns instantly, the check takes the broken WSL path and every launch fails. This matches the "worked right after the update / broke after a reboot / rollback fixed it" patterns reported in #61024, #61088 and #61214, and explains why rolling back only appears to help.On the fix
+1 to reusing the relocation cache for the policy check —
includeRuntimeshould not depend onstartupCommand == null; the relocated copy is content-hashed and already chmod'd0777, and the ordinary app-server path proves that route works. Independently, surfacing the child exit status/stderr instead of the generic organization-settings dialog would save people a lot of proxy-debugging time — the current dialog sends users hunting for network problems that do not exist.Spuzy24 commentedon Nov 17, 2026
Still reproducing on 26.1111.2228.0 (checked 2026-11-17), independently root-caused to the same code path
Environment
OpenAI.Codex 26.1111.2228.0(x64); bundled Linux CLI0.169.0-alpha.11.119045.64563.0.5.0, kernel6.18.58.1-microsoft-standard-WSL2, Ubuntu24.04.4 LTS(default distro, systemd enabled)/mnt/cis the default DrvFS mount (nometadataoption)runCodexInWindowsSubsystemForLinux = true;CODEX_CLI_PATHnot setTimeline
26.1111.2228.0at 17:02 UTC already failed, and every launch since then has failed:runCodexInWindowsSubsystemForLinux = falsethe app starts normally. Switching it back totruebrings the dialog back every time.What I measured (read-only, from WSL)
cmpequal; the VS Code extension ships the same0.169.0-alpha.11.1) answers the exact startup command with exit 0 and valid JSON:0.169.0and0.167.1answer the same way. The result is also the same with the flags the desktop app adds (-c features.code_mode_host=true -c features.windows_sandbox_service=true) and withCODEX_HOMEpointed at the Windows.codexfolder.wsl.exe -d Ubuntu-24.04 -- bash -lic 'echo MARK'prints onlyMARK.%USERPROFILE%\.codex\bin\wsl\still contains only the copy from the previous package (7076a964b43922ce/codex→codex-cli 0.167.0-alpha.3.2, dated 2026-11-09). No new hash folder was created for26.1111.2228.0, because the failing check comes before the normal app-server path that would relocate the binary.The code path is unchanged in 26.1111.2228.0
The installed
app.asarof this build still has the logic described in the issue body:startupCommand(--print-startup-config,--startup-client-info), which setsincludeRuntime = (startupCommand == null) = false.windowsDestinationPathbecomesnullwhenincludeRuntime === false, so relocation is skipped and the original…\WindowsApps\…\resources\codexpath is returned.JSON.parseon the empty stdout, throwsreason: "protocol", and shows the generic organization-settings dialog.Impact
For WSL-based development, Windows mode is not a real workaround. WSL mode is what makes the VS Code extension sessions inside WSL show up in the desktop app, and what lets the mobile app connect to those sessions remotely. While this bug is open, the desktop app is only usable in a mode that doesn't serve that use case.
Two UX points that made this harder to diagnose
exit 126. Showing the child's exit status and stderr (or at least "the Codex runtime could not be started") would save users from hunting network problems that don't exist.--startup-sign-out) through the same broken launch path. The dialog comes back immediately, so the button looks like it does nothing.+1 to the fix proposed above: let the preliminary startup check reuse the WSL relocation cache instead of making it depend on
startupCommand == null. A regression test with a readable but non-executable packaged Linux binary would also catch this. WSL-mode startup has now broken twice in about a month (see #54478, fixed around 2026-10-31).piggei commentedon Nov 20, 2026
Follow-up: issue persists in 26.1111.9664.0 — Windows execute permission already present
Following up on my previous report, I can confirm that the issue still occurs with Codex Desktop 26.1111.9664.0 on Windows 10 and WSL2 (Ubuntu 22.04).
I also investigated the proposed workaround involving the Windows
Read-onlyattribute. My findings differ from that case.Both bundled Linux executables have only the
Archiveattribute, with noRead-onlyflag:Both files are owned by
NT AUTHORITY\SYSTEM, and their inherited Windows ACLs already include execute permission forBUILTIN\Users:My account belongs to
BUILTIN\Users, and both files can be read successfully from Windows.However, WSL still reports:
The current bundled
codexexecutable is 294,427,960 bytes.The Windows drive is mounted through DrvFs/9p without explicit Unix metadata support.
This suggests that the problem is not necessarily caused by the Windows
Read-onlyattribute or a missing Windows execute ACE. There may be an issue with how executable permissions are exposed through DrvFs for these packaged files.I have deliberately avoided changing ownership or ACLs inside
WindowsApps, since the required Windows execute permissions are already present.Could the Desktop WSL bootstrap stage the bundled Linux executables in an executable location before the initial policy read, rather than invoking them directly from
WindowsApps?This would avoid relying on the Unix permissions exposed by DrvFs and should provide a more robust solution across Windows configurations.