Paste an error to match it against the wiki. / 粘贴报错后自动匹配。
Error text / 报错原文
code=3221225477Most recent error: write EPIPEMost recent error: None
What it means
The Windows desktop app exits before the UI is usable. Reports connect this code with native process startup, sandbox initialization, or Windows environment issues.
Most common causes
- WSL installed but no Linux distro configured
- Sandbox mode mismatch on native Windows
- Packaged app resource or permission initialization failure
- Corrupt local app state after upgrade
Fastest fix
- Install and configure a WSL distro, or switch to native sandbox mode if documented for your build
- Restart Windows after install or Store update
- Launch from a clean user profile to isolate state
- Check .codex logs and state files for the first failing subsystem
Safe fix
- Keep Codex updated from the official channel
- Avoid running the desktop app as a mismatched local Administrator account unless required
- Back up .codex state before deleting caches
- Report exact app version and Windows build with logs
What not to do
- Do not remove random WindowsApps permissions manually
- Do not delete the whole user profile
- Do not disable system security features to make the app launch
How to confirm the fix
Run the smallest reproducible command first, then retry the agent task only after authentication, quota, and tool discovery are stable.
Get-AppxPackage OpenAI.Codex | Select Name, Version, InstallLocation wsl -l -v Get-ChildItem $env:USERPROFILE\.codex -Force
Related errors
- CreateProcessWithLogonW failed: 5 - Codex Windows sandbox →
- SetNamedSecurityInfoW failed: 5 - Codex WindowsApps ACL sandbox failure →
- MCP auth session does not refresh - Codex OAuth →
- Codex desktop unresponsive with long threads and MCP auto-start duplicates →
- You've hit your session limit / weekly limit - Claude Code →
- Prompt is too long - Claude Code context window →