Skip to content

Windows Codex Desktop WSL/Ubuntu mode broken + local sessions not shown after update #28523

Open

Description

@nathan-verdeyme

What version of the Codex App are you using (From “About Codex” dialog)?

26.609.71450

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

I am seeing two related issues after recent Codex Desktop Windows updates, but the most urgent one is the Ubuntu/WSL integration.

My main development environment is Ubuntu through WSL. My repositories are inside WSL, and Codex Desktop Windows previously needed to work with those WSL folders. Since the update, WSL mode has been broken or unstable, which blocks my normal workflow.

Main urgent issue: WSL / Ubuntu mode is broken

When WSL mode was enabled in Codex Desktop, the app failed to start or failed to locate the CLI.

Previous WSL-related error:

Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.

At one point, Codex Desktop also tried to use the packaged Windows binary from:

C:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources\codex.exe

This caused access/permission issues because WindowsApps is protected.

I had to disable WSL mode temporarily just to make the desktop app start again, but this is not a real fix because my repositories and workflow are inside Ubuntu/WSL.

Secondary issue: local chats are not displayed in the sidebar

After the same update and recovery attempts, my Codex Desktop sidebar still only shows 2 chats, even though the local session files exist.

Current local state:

C:\Users\<USER>\.codex\sessions = 89 files
C:\Users\<USER>\.codex\archived_sessions = 0 files

I successfully unarchived all archived sessions:

codex unarchive: 72 success / 0 failures

However, Codex Desktop still does not show these chats in the UI/sidebar. The archived chats page says there are no archived chats, but the normal sidebar still only shows 2 chats.

Previous SQLite/database errors

After the update, I also got this error:

Codex cannot access its local database.
failed to initialize sqlite state runtime under C:\Users\<USER>\.codex
migration 1 was previously applied but has been modified

When clicking “Back Up and Rebuild”, Codex also failed because it tried to create a backup directory inside WindowsApps:

Recovery failed: EPERM: operation not permitted, mkdir 'C:\Program Files\WindowsApps\OpenAI.Codex_26.609.9530.0_x64__...\app\db-backups'

So I currently have two problems:

  1. Most urgent: Codex Desktop Windows cannot reliably work with Ubuntu/WSL anymore.
  2. The app does not reindex/display my existing local sessions even though the .jsonl session files are present.

What steps can reproduce the bug?

I cannot provide my private session files publicly, but these are the steps that led to the issue:

  1. Use Codex Desktop on Windows with WSL/Ubuntu enabled.

  2. Keep projects/repositories inside Ubuntu/WSL.

  3. Update Codex Desktop from Microsoft Store to version 26.609.9530.0.

  4. Try to launch Codex Desktop with WSL mode enabled.

  5. The app fails with:

    Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
    
  6. Disable WSL mode so the desktop app can start.

  7. After the update, the local SQLite database also fails with:

    migration 1 was previously applied but has been modified
    

_. Click “Back Up and Rebuild”.
9. The rebuild fails because the app tries to write a backup inside WindowsApps:

```text
EPERM: operation not permitted, mkdir 'C:\Program Files\WindowsApps\OpenAI.Codex_...\app\db-backups'
```
  1. Manually move aside broken SQLite files and let Codex recreate the SQLite folder.

  2. Run codex unarchive on all archived sessions.

  3. codex unarchive succeeds:

    72 success / 0 failures
    
  4. Confirm local session files exist:

    C:\Users\<USER>\.codex\sessions = 89 files
    C:\Users\<USER>\.codex\archived_sessions = 0 files
    
  5. Open Codex Desktop again.

Actual result: the Desktop sidebar still only shows 2 chats, and WSL mode still cannot be used safely for my Ubuntu-based repositories.

I am not attaching my .codex folder, auth.json, or .jsonl session files because they contain private code, local paths, and conversation content.

What is the expected behavior?

The expected behavior is:

  1. Codex Desktop Windows should work correctly with Ubuntu/WSL projects.

  2. If WSL mode is enabled, Codex Desktop should either:

    • correctly detect and use the Codex CLI installed inside Ubuntu/WSL, or
    • correctly bridge to the WSL environment without trying to execute a WindowsApps binary from Linux/WSL.
  3. Windows Desktop and WSL CLI should not corrupt or conflict with each other’s SQLite state database.

  4. Codex Desktop should safely recover/rebuild its local SQLite state without trying to write backup files inside the protected WindowsApps installation directory.

  5. Codex Desktop should reindex and display existing local session files from:

    C:\Users\<USER>\.codex\sessions
    
  6. If codex unarchive succeeds for archived sessions, the UI/sidebar should show those restored chats.

  7. The app should not show only 2 chats when 89 local session .jsonl files exist and archived sessions are empty.

Additional information

  1. Is there a known fix coming for Codex Desktop Windows WSL/Ubuntu mode?
  2. Should Windows Desktop and WSL CLI use separate CODEX_HOME directories to avoid SQLite migration conflicts?
  3. Is there a safe way to restore WSL mode without breaking the local SQLite state database?
  4. Is there a supported command to force Codex Desktop to reindex existing .jsonl sessions from C:\Users\<USER>\.codex\sessions?
  5. Is the Back Up and Rebuild button supposed to write backups inside WindowsApps? It currently fails with EPERM.

I can provide sanitized logs and screenshots, but I cannot publicly attach my .codex folder, auth.json, or session .jsonl files because they may contain private source code, repository paths, and conversation content.

Activity

  1. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    app-serverIssues involving app server protocol or interfaces
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on Jun 16, 2026
  2. wangchenxudev commented on Jul 23, 2026

    @wangchenxudev

    Hi, I encountered the same issue and found a workaround that resolved it in my case.
    Codex Desktop had been installed on a non-system drive through the Microsoft Store. After uninstalling it and reinstalling the same version on the default system drive (C:), WSL mode started working normally. I did not need to reinstall Codex inside WSL or configure CODEX_CLI_PATH.
    This may be caused by Codex Desktop not correctly handling the application path when the MSIX package is installed on a non-system drive.
    I hope this is helpful. Please let me know whether reinstalling it on C: works for you as well—or whether the issue still persists afterward.

  3. LiYang-cyber commented on Jul 30, 2026

    @LiYang-cyber

    嗨,我也遇到了同样的问题,不过我在自己的情况下找到了一种解决方法。Codex Desktop 是通过 Microsoft Store 安装在一个非系统驱动器上的。卸载后,将同一版本重新安装到默认的系统驱动器 C 中,之后 WSL 模式就能正常工作了。我无需在 WSL 中重新安装 Codex,也无需配置 CODEX_CLI_PATH。 这可能是由于 Codex Desktop 在将 MSIX 包安装在非系统驱动器上时,未能正确处理应用程序的路径问题所导致的。 希望这个建议能有所帮助。请告诉我,将软件重新安装到 C 盘后是否也出现了同样的问题?或者之后问题是否仍然存在。

    yes, same on C

  4. LyonWu21 commented on Aug 19, 2026

    @LyonWu21

    In Codex 26.814.41407, this issue still exists.

    I solved this after I installed Codex on the system drive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingsessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions