[Windows][WSL] Codex Desktop WSL agent completes with last_agent_message:null and no assistant response

Open 💬 2 comments Opened Jun 16, 2026 by MicroYui
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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_started is present.
  • user_message is present.
  • task_complete is eventually present in the log.
  • last_agent_message is null.
  • No agent_message is present.
  • No final_answer is 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

  1. Open Codex Desktop on Windows.
  2. Set the agent environment to WSL.
  3. Create a new thread.
  4. Send the following prompt:
Reply only with ok. Do not run commands.
  1. Observe that Codex Desktop remains running/thinking for a long time.
  2. The UI eventually shows a request timeout.
  3. Check the Windows-side session log under:
C:\Users\<USER>\.codex\sessions\<YYYY>\<MM>\<DD>\
  1. The log eventually contains task_complete, but last_agent_message is null, and there is no agent_message or final_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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

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

  • #27274
  • #27240

Powered by Codex Action

MicroYui · 2 months ago

I checked the suggested duplicates. This looks closely related to #27240 and possibly related to #27274, but I am not closing this yet because my case has an additional session-log signal:

  • Codex Desktop UI eventually shows a request timeout.
  • The Windows-side session log later records task_complete.
  • last_agent_message is null.
  • There is no agent_message or final_answer.
  • WSL Codex CLI works normally from the same WSL environment.
  • Switching Codex Desktop to Windows native agent mode also works.

So the failure appears to be in the Codex Desktop WSL agent/runtime path, but specifically manifests as a timeout plus task_complete with no assistant output. Happy for maintainers to mark this as a duplicate if it is the same root cause.