Codex CLI feedback: recurring WSL instability / interop breakage

Open 💬 2 comments Opened Jun 25, 2026 by gpoumarat

What version of Codex CLI is running?

codex-cli 0.142.2

What subscription do you have?

Plus

Which model were you using?

gpt--

What platform is your computer?

Linux DESKTOP-4HLQHAQ 6.18.33.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Fri Jun 5 01:12:21 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

What terminal emulator and version are you using (if applicable)?

wsl

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1782388920s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.142.2",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/home/pouma/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/home/pouma/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/home/pouma/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/home/pouma/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/home/pouma/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "/home/pouma/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "/home/pouma/.codex",
        "config.toml": "/home/pouma/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/home/pouma",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, terminal_resize_reflow, sqlite, memories, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, plugin_sharing, image_generation, resize_all_images, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, auto_compaction, remote_compaction_v2, workspace_dependencies",
        "feature flag overrides": "memories=true",
        "feature flags enabled": "34",
        "log dir": "/home/pouma/.codex/log",
        "mcp servers": "0",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "/home/pouma/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.43.0",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/usr/bin/git",
        "PATH git #2": "/bin/git",
        "PATH git entries": "2",
        "git build options": "git version 2.43.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh",
        "git exec path": "/usr/lib/git-core",
        "git version": "git version 2.43.0",
        "repo detected": "true",
        "repo root": "/home/pouma",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 171
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/home/pouma/.local/bin/codex",
        "PATH codex #2": "/home/pouma/.local/bin/codex",
        "PATH codex #3": "/home/pouma/.nvm/versions/node/v22.21.1/bin/codex",
        "PATH codex entries": "3",
        "current executable": "/home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/bin/codex",
        "install context": "standalone (unix, package /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl, bin /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/bin, resources /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/codex-resources, path /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/codex-path)",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 186
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "no MCP servers configured",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "<https://chatgpt.com/backend-api/> reachable (HTTP 404)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 158
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 1057
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running standalone on linux-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "/home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/bin/codex",
        "install method": "standalone (unix, package /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl, bin /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/bin, resources /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/codex-resources, path /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/codex-path)",
        "platform": "linux-x86_64",
        "version": "0.142.2"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl/codex-path/rg",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "/home/pouma/.codex/tmp/arg0/codex-arg0xhEa16/codex-linux-sandbox",
        "execve wrapper helper": "/home/pouma/.codex/tmp/arg0/codex-arg0xhEa16/codex-execve-wrapper",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "/home/pouma/.codex (dir)",
        "active rollout files": "41 files, 38120490 total bytes, 929768 average bytes",
        "archived rollout files": "2 files, 1123161 total bytes, 561580 average bytes",
        "goals DB": "/home/pouma/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/home/pouma/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/home/pouma/.codex/log (dir)",
        "memories DB": "/home/pouma/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/home/pouma/.codex (dir)",
        "standalone release cache": "2 entries in /home/pouma/.codex/packages/standalone/releases",
        "state DB": "/home/pouma/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 1297
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "41",
        "rollout DB active rows": "41",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "2",
        "rollout DB archived rows": "2",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=43",
        "rollout DB rows": "43",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=40, vscode=3",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 641
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language C",
      "details": {
        "EDITOR": "not set",
        "LANG": "C.UTF-8",
        "VISUAL": "not set",
        "os": "Ubuntu 24.4.0 (noble) [64-bit]",
        "os language": "C",
        "os type": "Ubuntu",
        "os version": "24.4.0"
      },
      "remediation": null,
      "durationMs": 6
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "DISPLAY": "present",
        "WAYLAND_DISPLAY": "present",
        "WSL_DISTRO_NAME": "present",
        "WSL_INTEROP": "present",
        "WT_SESSION": "present",
        "color output": "enabled",
        "effective locale": "C.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "Windows Terminal",
        "terminal size": "109x26"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "git repo root",
        "terminal title project value": "pouma",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.142.2",
        "check for update on startup": "true",
        "last checked at": "2026-06-25T11:21:02.166074564Z",
        "latest version": "0.142.2",
        "latest version status": "current version is not older",
        "update action": "standalone installer",
        "version cache": "/home/pouma/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 178
    }
  }
}

What issue are you seeing?

Date: 2026-06-25
User environment: Windows host + Ubuntu 24.04 WSL2
Codex CLI version: 0.142.2
Codex install: standalone Linux x86_64 under /home/pouma/.codex/packages/standalone/releases/0.142.2-x86_64-unknown-linux-musl

Summary

Codex CLI usage appears to correlate with recurring WSL instability on this machine. The practical symptom is that WSL becomes unreliable enough that the user has to run wsl --shutdown from Windows to recover the session.

This is not just a slow command or normal network failure. During the current failure state, WSL-to-Windows interop commands fail immediately:

$ wsl.exe --version
<3>WSL (3 - ) ERROR: UtilBindVsockAnyPort:309: socket failed 1

$ powershell.exe -NoProfile -Command "[System.Environment]::OSVersion.VersionString"
<3>WSL (3 - ) ERROR: UtilBindVsockAnyPort:309: socket failed 1

This suggests a WSL interop/vsock failure after or during Codex CLI activity.

Environment details

$ codex --version
WARNING: proceeding, even though we could not create PATH aliases: Read-only file system (os error 30)
codex-cli 0.142.2
$ uname -a
Linux DESKTOP-4HLQHAQ 6.18.33.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Fri Jun 5 01:12:21 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/version
Linux version 6.18.33.1-microsoft-standard-WSL2 (root@5e53d226653e) (gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.41) #1 SMP PREEMPT_DYNAMIC Fri Jun 5 01:12:21 UTC 2026

Current .wslconfig:

[wsl2]
memory=16GB
processors=16
swap=8GB
networkingMode=nat
localhostForwarding=true
pageReporting=false

What steps can reproduce the bug?

Uploaded thread: 019efeb1-328c-7df2-9189-1c0f2df2cc56

What is the expected behavior?

No crash when i want to use codex cli in wsl
It's unusable. I took a paid subscription and i can't use it properly. I'll return on Claude code if it persists

Additional information

_No response_

View original on GitHub ↗

2 Comments

Nicolas0315 · 2 months ago

A useful next split here is whether ordinary Linux-side commands still work at the failure point and only WSL-to-Windows interop/vsock calls fail. If this reproduces again before wsl --shutdown, a minimal sanitized capture like this would help separate Codex child-process/resource pressure from a host WSL interop failure:

date -Is
cat /proc/sys/fs/file-nr
ps -eo pid,ppid,stat,comm,args | grep -E 'codex|node|bash|sh' | grep -v grep
timeout 5s codex --version
timeout 5s wsl.exe --version
timeout 5s powershell.exe -NoProfile -Command '[System.Environment]::OSVersion.VersionString'

Please avoid pasting environment variables, auth files, full shell history, or unredacted logs. The key distinction is whether Codex/Linux process activity is also wedged, or whether Linux remains healthy while Windows interop calls immediately fail with UtilBindVsockAnyPort.

MisterRound · 1 month ago

There is a deterministic Codex sandbox failure that produces this exact WSL
error, so UtilBindVsockAnyPort alone is not sufficient evidence that the WSL
VM or host interop service has become unstable.

Current main installs a restricted Linux seccomp policy that unconditionally
denies connect, allows socket() only for AF_UNIX, and returns EPERM for
matches:

WSL's Windows-executable interop path uses AF_VSOCK. I can reproduce the split
reliably in a current WSL-backed Codex task:

restricted Codex child: socket(AF_UNIX)  -> succeeds
restricted Codex child: socket(AF_VSOCK) -> EPERM
restricted Codex child: cmd.exe /d /c ver
  -> UtilBindVsockAnyPort:309: socket failed 1

same AF_VSOCK probe outside the Codex sandbox -> succeeds
same cmd.exe command outside the sandbox      -> succeeds

This also fits the doctor data in this issue: sandbox.helpers reports both
the filesystem and network sandbox as restricted. Provider reachability in
codex doctor does not prove that a later shell child has network syscalls;
the shell child receives the seccomp policy separately.

The decisive discriminator is therefore where the failing probe runs:

  1. If wsl.exe --version or powershell.exe ... fails only as a Codex-managed

sandboxed tool call but succeeds directly in an ordinary WSL terminal (or
as an explicitly approved unsandboxed Codex call), this is the Codex
sandbox/WSL-interop incompatibility. Restarting WSL is unnecessary.

  1. If the same minimal command also fails directly in the ordinary user WSL

terminal, that is a distinct host-level WSL failure and the process/resource
capture requested above remains useful.

Related history: #8322 is the older sandbox-specific report, and #4385 was
closed without a fixing PR even though later comments continued to reproduce
the problem.

A product fix should route WSL-to-Windows process creation through a constrained
native broker or an explicit approval boundary outside the Linux network
filter. Simply allowing AF_VSOCK in the restricted filter is not sufficient
(connect is also denied) and would need a careful security design.