Windows Codex Desktop exits after bundled executable relocation fails through a broken Junction
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing desktop runtime initialization and the bundled executable relocation path described by the mkdir_destination ENOENT logs. Reproduce with %LOCALAPPDATA%\OpenAI\Codex pointing to a missing Junction target, then verify that initialization detects the invalid path and reports an actionable error or uses a valid runtime without entering the downstream browser and IPC failure state.
Written by the indexing model from the issue text.
Description
Environment
- OS: Windows 11 Home, x64
- Windows version/build:
10.0.26200/26200 - Codex Desktop version:
26.814.5167.0 - Architecture: x64
- Installation: Microsoft Store / MSIX
- Package:
OpenAI.Codex_26.814.5167.0_x64__2p2nqsd0c76g0
Summary
Codex Desktop repeatedly exited/reset while initializing the local environment.
The filesystem investigation found that:
%LOCALAPPDATA%\OpenAI\Codex
was a Windows Junction pointing to:
E:\Codex\app-runtime
but that target directory no longer existed.
As a result, Codex could not create/relocate its bundled executable into:
%LOCALAPPDATA%\OpenAI\Codex\bin
The logs show ENOENT during mkdir_destination, followed by a missing bundled Electron Codex runtime, then browser/sidebar lifecycle failure, IPC EPIPE, and app-server shutdown.
Relevant log sequence
Codex successfully accessed the configured bundled plugin marketplace first:
bundled_plugins_runtime_marketplace_reused
plugin_marketplace_add_succeeded
Then it failed relocating the bundled executable:
bundled_executable_relocation_failed
destinationPath=C:\Users\HP\AppData\Local\OpenAI\Codex\bin
errorCode=ENOENT
operation=mkdir_destination
originalError={"errno":-4058,"code":"ENOENT","syscall":"mkdir","path":"C:\\Users\\HP\\AppData\\Local\\OpenAI\\Codex\\bin"}
executableName=codex.exe
sourcePath=C:\Program Files\WindowsApps\OpenAI.Codex_26.814.5167.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
Immediately afterwards:
bundled_plugins_reconcile_failed
Missing bundled Electron Codex runtime required to sync Chrome plugin app server
Shortly later:
[browser-sidebar-manager] IAB_LIFECYCLE route window is not live
[IpcRouter] Socket error errorCode=EPIPE errorMessage="write EPIPE"
[AppServerConnection] Stopping app-server transport
The app-server connection then transitioned from connected to disconnected.
Filesystem investigation
PowerShell showed:
Name : Codex
FullName : C:\Users\HP\AppData\Local\OpenAI\Codex
Attributes : Directory, ReparsePoint
PSIsContainer : True
LinkType : Junction
Target : {E:\Codex\app-runtime}
The Junction target was missing:
Test-Path "E:\Codex\app-runtime"
Result:
False
Manual creation through the Junction also failed:
mkdir "%LOCALAPPDATA%\OpenAI\Codex\bin"
Result:
The system cannot find the path specified.
Workaround tested
Recreating the missing Junction target and bin directory:
New-Item -ItemType Directory -Force "E:\Codex\app-runtime\bin"
Afterwards both checks returned True:
Test-Path "E:\Codex\app-runtime\bin"
Test-Path "$env:LOCALAPPDATA\OpenAI\Codex\bin"
This confirms that the broken Junction was the direct cause of the ENOENT path failure. Final confirmation that the application no longer exits is still being tested.
Expected behavior
If %LOCALAPPDATA%\OpenAI\Codex is a Junction/reparse point whose target no longer exists, Codex Desktop should detect the invalid runtime path and either:
- repair/recreate the runtime directory safely,
- fall back to a valid local runtime directory, or
- show a clear actionable error identifying the unavailable runtime path.
It should not continue into an invalid runtime state and eventually terminate/reset through browser/IPC/app-server failure.
Actual behavior
Codex repeatedly attempts bundled executable relocation, receives ENOENT while creating %LOCALAPPDATA%\OpenAI\Codex\bin, then reports a missing bundled runtime and subsequently loses the browser/sidebar and app-server IPC connection. The user-facing result is an unexplained Codex Desktop exit/reset.
Suggested hardening
During runtime initialization, Codex could explicitly validate %LOCALAPPDATA%\OpenAI\Codex for:
- reparse points / Junctions,
- whether the target exists,
- whether the destination is writable,
- and whether
bincan be created.
If invalid, reporting the actual Junction target and failing gracefully would make this issue much easier to diagnose.
Additional note
It is not yet known whether this Junction was originally created by Codex, by an earlier migration/configuration operation, or manually during previous setup. Regardless of origin, Codex Desktop currently does not handle a broken runtime Junction gracefully.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·