[Windows][WSL] Codex Desktop WSL agent completes with last_agent_message:null and no assistant response
Summary
Codex Desktop on Windows fails when the agent environment is set to WSL. New tasks appear to run for a long time, then the Codex Desktop UI shows a request timeout. The Windows-side session log later records task_complete with last_agent_message:null, but there is no agent_message or final_answer.
The same account, model, and WSL environment work correctly through Codex CLI. Switching Codex Desktop from WSL agent mode to Windows native agent mode also makes the Desktop app work again.
This suggests the issue is isolated to the Codex Desktop → WSL agent/runtime integration path.
Environment
- OS: Windows 11
- WSL: WSL2
- Model:
gpt-5.5 - Plan: Plus
- Codex CLI session log reports
cli_version:0.140.0 - Codex Desktop WSL-agent session log reports
cli_version:0.140.0-alpha.2 - Codex Desktop agent environment that fails: WSL
- Codex Desktop agent environment that works: Windows native
- Network: WSL can reach the Windows host proxy on port
10808; Codex CLI works from WSL.
Expected Behavior
When Codex Desktop is configured to use WSL as the agent environment, sending a minimal prompt such as:
Reply only with ok. Do not run commands.
should return:
ok
The session log should contain an agent_message or final_answer.
Actual Behavior
Codex Desktop stays in a running/thinking state for a long time. The UI eventually shows a request timeout. The Windows-side session log later records task_complete, but last_agent_message is null, and no assistant response appears in the UI.
Example from a failing Windows-side Codex Desktop WSL-agent session log:
{"timestamp":"2026-06-16T17:31:37.960Z","type":"event_msg","payload":{"type":"task_started","turn_id":"019ed17d-1c4d-7ef2-a91f-661a543ad388","started_at":1781631097,"model_context_window":258400,"collaboration_mode_kind":"default"}}
{"timestamp":"2026-06-16T17:31:53.003Z","type":"event_msg","payload":{"type":"user_message","client_id":"8c7477b9-5485-4cd1-b3e8-9dd2b966eb0d","message":"Reply only with ok. Do not run commands.\n","images":[],"local_images":[],"text_elements":[]}}
{"timestamp":"2026-06-16T17:49:04.053Z","type":"event_msg","payload":{"type":"task_complete","turn_id":"019ed17d-1c4d-7ef2-a91f-661a543ad388","last_agent_message":null,"completed_at":1781632144,"duration_ms":1041779}}
Another failing run showed the same pattern:
{"timestamp":"2026-06-16T17:24:53.323Z","type":"event_msg","payload":{"type":"task_started","turn_id":"019ed176-eb37-7b53-b188-691d0db4ce02","started_at":1781630693,"model_context_window":258400,"collaboration_mode_kind":"default"}}
{"timestamp":"2026-06-16T17:24:58.548Z","type":"event_msg","payload":{"type":"user_message","client_id":"3995799f-e0d3-41c1-a7eb-3ed6fefda576","message":"Reply only with ok.\n","images":[],"local_images":[],"text_elements":[]}}
{"timestamp":"2026-06-16T17:44:15.186Z","type":"event_msg","payload":{"type":"task_complete","turn_id":"019ed178-bb5e-78a3-84cf-28b353075d8b","last_agent_message":null,"completed_at":1781631855,"duration_ms":1039344}}
In both failing Desktop WSL-agent runs:
- The UI eventually shows a request timeout.
task_startedis present.user_messageis present.task_completeis eventually present in the log.last_agent_messageisnull.- No
agent_messageis present. - No
final_answeris present. - The logged task duration is around 17 minutes.
Control: WSL CLI Works
From the same WSL environment, Codex CLI works normally. A minimal prompt returns ok in about 3 seconds.
WSL CLI session log excerpt:
{"timestamp":"2026-06-16T17:23:49.846Z","type":"event_msg","payload":{"type":"user_message","message":"Reply only with ok.","images":[],"local_images":[],"text_elements":[]}}
{"timestamp":"2026-06-16T17:23:52.824Z","type":"event_msg","payload":{"type":"agent_message","message":"ok","phase":"final_answer","memory_citation":null}}
{"timestamp":"2026-06-16T17:23:52.824Z","type":"response_item","payload":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"ok"}],"phase":"final_answer"}}
{"timestamp":"2026-06-16T17:23:52.869Z","type":"event_msg","payload":{"type":"task_complete","turn_id":"019ed175-f7a5-7b11-943f-c691a3294553","last_agent_message":"ok","completed_at":1781630632,"duration_ms":3068,"time_to_first_token_ms":2897}}
Control: Windows Native Agent Works
If I change Codex Desktop's agent environment from WSL to Windows native, Codex Desktop starts working again.
This indicates that the following are functional:
- Account authentication
- Model access
- Codex Desktop installation
- General network access
- The Windows Desktop UI when using the Windows native agent
- Codex CLI from WSL
Reproduction Steps
- Open Codex Desktop on Windows.
- Set the agent environment to WSL.
- Create a new thread.
- Send the following prompt:
Reply only with ok. Do not run commands.
- Observe that Codex Desktop remains running/thinking for a long time.
- The UI eventually shows a request timeout.
- Check the Windows-side session log under:
C:\Users\<USER>\.codex\sessions\<YYYY>\<MM>\<DD>\
- The log eventually contains
task_complete, butlast_agent_messageisnull, and there is noagent_messageorfinal_answer.
Notes
The issue does not reproduce in WSL Codex CLI. It also does not reproduce when Codex Desktop is switched to Windows native agent mode.
The failing path appears to be specific to Codex Desktop's WSL agent/runtime integration.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗