Skip to content

Codex App for Windows fail to startup in WSL Agent mode #17254

Open

Description

@lifei

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

26.406.31014

What subscription do you have?

free

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

When using the setting "runcodexinwindowssubsystemforlinux": true, the app always stuck in the login UI.

I have to modify the file $env:USERPROFILE\.codex\.codex-global-state.json to remove the following code:
"runcodexinwindowssubsystemforlinux": true.

It fails to startup in VSCode extension too.

What steps can reproduce the bug?

  1. Go to settings page, switch Agent environment to Windows Subsystem for Linux.
  2. Exit the App and restart it.
  3. Stuck in the login UI.
  4. open $env:USERPROFILE\.codex\.codex-global-state.json, and remove the following code:
    "runcodexinwindowssubsystemforlinux": true
  5. Open the App again, and it runs fine.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Apr 9, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    on Apr 9, 2026
  3. lifei commented on Apr 9, 2026

    @lifei
    Author

    when stuck in the login UI, can not login or enter key, no any response.

  4. lifei commented on Apr 12, 2026

    @lifei
    Author
    2026-04-12 22:19:41.087 [info] Activating Codex extension
    2026-04-12 22:19:41.087 [info] [CodexMcpConnection] Spawning codex app-server
    2026-04-12 22:19:41.087 [info] [wsl] eligible distro list listResult="Ubuntu\npodman"
    2026-04-12 22:19:41.087 [info] [spawn-codex-process] Spawning codex process inside WSL
    2026-04-12 22:19:41.087 [info] [spawn-codex-process] WSL command command="wsl.exe -d Ubuntu --cd /mnt/d/Code/self-projects/liruixin.net -- /usr/bin/bash -lc /usr/bin/env 'PATH=/mnt/c/Users/lifei/.vscode/extensions/openai.chatgpt-26.409.20454-win32-x64/bin/linux-x86_64:$PATH' RUST_LOG=warn CODEX_INTERNAL_ORIGINATOR_OVERRIDE=codex_vscode /home/linuxbrew/.linuxbrew/bin/codex app-server --analytics-default-enabled"
    2026-04-12 22:19:41.087 [info] [IpcRouter] I am the router
    2026-04-12 22:19:41.087 [info] [IpcRouter] I am the router
    2026-04-12 22:19:41.087 [error] [CodexMcpConnection] cli: message="your 131072x1 screen size is bogus. expect trouble"
    2026-04-12 22:19:41.087 [warning] [IpcClient] Received broadcast but no handler is configured method=client-status-changed
    2026-04-12 22:19:42.231 [warning] [CodexMcpConnection] cli: message="codex_core::plugins::startup_sync: startup remote plugin sync failed; will retry on next app-server start error=chatgpt authentication required to sync remote plugins; api key auth is not supported"
    2026-04-12 22:19:42.598 [info] [CodexMcpConnection] Initialize received id=CodexWebviewProvider.webview:14e65bf5-4cda-41ca-9fa6-ea39d148d11b
    2026-04-12 22:19:42.599 [warning] [CodexMcpConnection] Dropping MCP message received before initialization
    2026-04-12 22:19:42.642 [info] [CodexMcpConnection] Initialize received id=CodexWebviewProvider.webview:db37607d-9a6f-48d8-9f75-7d0bdc960773
    2026-04-12 22:19:42.642 [warning] [CodexMcpConnection] Dropping MCP message received before initialization
    2026-04-12 22:19:51.953 [warning] [CodexMcpConnection] cli: message="codex_core::plugins::manager: failed to warm featured plugin ids cache error=failed to send remote plugin sync request to https://chatgpt.com/backend-api/plugins/featured: error sending request for url (https://chatgpt.com/backend-api/plugins/featured?platform=codex)"
    
  5. lifei commented on Apr 12, 2026

    @lifei
    Author

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

    I have review both two issues above. I think either of them is a duplicate.

  6. zerebos commented on Apr 29, 2026

    @zerebos

    I am also running into this. I tried moving my .codex folder over from windows to WSL since the docs say they should be identical but that didn't work. I also tried running and logging in via CLI in WSL first before launching codex to make sure at least the auth was there but it still lead to this broken Codex state.

  7. klockk commented on May 8, 2026

    @klockk

    Same issue for me... codex cli works in WSL, $CODEX_HOME set to my windows home .codex folder so they are in sync..
    Change the agent to WSL and all I get on restart is a login window that stalls if I re-enter my API key and click continue.....
    Only way to fix is kill and set runcodexinwindowssubsystemforlinux=false... 👎

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 appbugSomething isn't workingwindows-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