openai / openai/codex

Codex Desktop fails to create new chats in WSL mode: invalid transport in `mcp_servers.codex_app`

Open
#40,881 29 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app app-server bug mcp windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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

26.820.7780.0

What subscription do you have?

Plus

What platform is your computer?

Windows x64

What issue are you seeing?

Codex Desktop fails to create a new chat when the Agent Environment is configured to run in WSL.

The UI shows:

failed to load configuration: invalid transport in mcp_servers.codex_app

The user config does not contain an [mcp_servers.codex_app] section.

The issue only occurs when:

runCodexInWindowsSubsystemForLinux = true

Switching it to false and restarting Codex Desktop makes chat creation work again.

What steps can reproduce the bug?
  1. Run Codex Desktop on Windows with WSL2 (Ubuntu 24.04).

  2. Configure Codex Desktop to use WSL:

[desktop]
integratedTerminalShell = "wsl"
runCodexInWindowsSubsystemForLinux = true

  1. Fully restart Codex Desktop.

  2. Try to create a new chat.

  3. Chat creation fails with:

failed to load configuration: invalid transport in mcp_servers.codex_app

  1. Change:

runCodexInWindowsSubsystemForLinux = false

  1. Fully restart Codex Desktop and create a new chat.

The chat is created successfully when WSL mode is disabled.

The problem is consistently reproducible.

What is the expected behavior?

Codex Desktop should create a new chat normally when WSL is selected as the Agent Environment.

The WSL app-server should start and the internal codex_app MCP server should be configured with a valid transport.

Additional information

Environment:

  • Codex Desktop: 26.820.7780.0
  • Windows x64
  • WSL2
  • Ubuntu 24.04

When WSL mode is enabled, Codex Desktop successfully starts the WSL app-server:

/mnt/c/Users//.codex/bin/wsl//codex
-c features.code_mode_host=true
app-server
--analytics-default-enabled

Relevant environment of that process:

CODEX_HOME=/mnt/c/Users//.codex
CODEX_SQLITE_HOME=/root/.codex/sqlite
HOME=/root
CODEX_INTERNAL_ORIGINATOR_OVERRIDE=Codex Desktop

The user config does NOT contain:

[mcp_servers.codex_app]

The bundled codex-app-tools package does contain a desktop-mcp.json defining the codex_app MCP server.

It ships both Unix and Windows launchers:

scripts/launch_codex_app_tools_mcp
scripts/launch_codex_app_tools_mcp.cmd

As a diagnostic test, I changed the bundled codex_app MCP definition from the Windows launcher (cmd.exe / .cmd) to the Unix launcher (/bin/sh).

The change persisted after restarting Codex Desktop, but the exact same error still occurred:

failed to load configuration: invalid transport in mcp_servers.codex_app

I also tested with:

[plugins."codex-app-tools@openai-bundled"]
enabled = false

The same error still occurs.

This suggests that the failure happens while Codex Desktop constructs/translates/injects the internal mcp_servers.codex_app configuration for the WSL app-server, rather than while launching the MCP process itself.

The issue disappears completely when:

runCodexInWindowsSubsystemForLinux = false

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how WSL app-server startup constructs or injects the internal mcp_servers.codex_app configuration. Inspect the bundled codex-app-tools desktop-mcp.json and its scripts/launch_codex_app_tools_mcp and scripts/launch_codex_app_tools_mcp.cmd launchers. Done means creating a new chat succeeds with runCodexInWindowsSubsystemForLinux enabled and the internal server uses a valid transport.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop-dev, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.