Windows 11: WebSocket fails, HTTPS fallback is reset with OS error 10054, and Codex CLI cannot complete any prompt

Open 💬 1 comment Opened Aug 5, 2026 by DBenS
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.146.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.6-sol medium

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

Powershell7 version 7.6.4

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1785931735s since unix epoch",
  "overallStatus": "fail",
  "codexVersion": "0.146.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "C:\\Users\\david\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\david\\.codex\\app-server-daemon",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\david\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\david\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "C:\\Users\\david\\.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": "C:\\Users\\david\\.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": "C:\\Users\\david\\.codex",
        "config.toml": "C:\\Users\\david\\.codex\\config.toml",
        "config.toml parse": "ok",
        "cwd": "C:\\Dev.MAUI-VS2026\\TAVDATA\\TAVDATA-CODEX",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "none",
        "feature flags enabled": "38",
        "log dir": "C:\\Users\\david\\.codex\\log",
        "mcp servers": "0",
        "model": "gpt-5.6-sol",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\david\\.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.53.0.windows.3",
      "details": {
        ".git entry": "file -> C:/Dev.MAUI-VS2026/TAVDATA/TAVDATA/.git/worktrees/TAVDATA-CODEX",
        "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
        "PATH git entries": "1",
        "git branch": "codex/ui",
        "git build options": "git version 2.53.0.windows.3; cpu: x86_64; built from commit: f8165afd89b0c190677a093f20894f5fce12f97a; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64/usr/bin/sh; rust: disabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.18.0; OpenSSL: OpenSSL 3.5.5 27 Jan 2026; zlib: 1.3.1; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
        "git exec path": "C:/Program Files/Git/mingw64/libexec/git-core",
        "git version": "git version 2.53.0.windows.3",
        "repo detected": "true",
        "repo root": "C:\\Dev.MAUI-VS2026\\TAVDATA\\TAVDATA-CODEX",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 68
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "C:\\Users\\david\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "current executable": "C:\\Users\\david\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "install context": "standalone (windows, package C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc, bin C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc\\codex-path)",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed by pnpm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 61
    },
    "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": "fail",
      "summary": "one or more required provider endpoints are unreachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ connect failed (required)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": "Check proxy, VPN, firewall, DNS, and custom CA configuration.",
      "durationMs": 57
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "warning",
      "summary": "Responses WebSocket failed; HTTPS fallback may still work",
      "details": {
        "DNS": "2 IPv4, 0 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake transport error": "network error: Foi forçado o cancelamento de uma conexão existente pelo host remoto. (os error 10054)",
        "model provider": "openai",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": "Check proxy, VPN, firewall, DNS, custom CA, and WebSocket policy support.",
      "durationMs": 155
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running standalone on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\david\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "install method": "standalone (windows, package C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc, bin C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc\\codex-path)",
        "platform": "windows-x86_64",
        "version": "0.146.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "C:\\Users\\david\\.codex\\packages\\standalone\\releases\\0.146.0-x86_64-pc-windows-msvc\\codex-path\\rg.exe",
        "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": "none",
        "execve wrapper helper": "none",
        "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": "C:\\Users\\david\\.codex (dir)",
        "active rollout files": "4 files, 10905465 total bytes, 2726366 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "C:\\Users\\david\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\david\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\david\\.codex\\log (dir)",
        "memories DB": "C:\\Users\\david\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "C:\\Users\\david\\.codex (dir)",
        "standalone release cache": "4 entries in C:\\Users\\david\\.codex\\packages\\standalone\\releases",
        "state DB": "C:\\Users\\david\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "C:\\Users\\david\\.codex\\thread_history_1.sqlite (missing)",
        "thread history DB integrity": "skipped (missing)"
      },
      "remediation": null,
      "durationMs": 181
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "warning",
      "summary": "rollout files and state DB thread inventory differ",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "4",
        "rollout DB active rows": "33",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "0",
        "rollout DB archived rows": "0",
        "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=33",
        "rollout DB rows": "33",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=33",
        "rollout DB stale row sample": [
          "C:\\Users\\david\\.codex\\sessions\\2026\\06\\23\\rollout-2026-06-23T22-25-34-019ef73b-86fc-7f00-bf7e-5c48030b98b2.jsonl",
          "C:\\Users\\david\\.codex\\sessions\\2026\\06\\23\\rollout-2026-06-23T22-29-28-019ef73f-196c-7bf0-8590-61eeed0b9d65.jsonl",
          "C:\\Users\\david\\.codex\\sessions\\2026\\06\\23\\rollout-2026-06-23T23-22-41-019ef76f-d42a-7101-9cca-bd326758aec9.jsonl",
          "C:\\Users\\david\\.codex\\sessions\\2026\\06\\23\\rollout-2026-06-23T23-29-13-019ef775-d01c-7743-9277-38ea72e042c2.jsonl",
          "C:\\Users\\david\\.codex\\sessions\\2026\\06\\23\\rollout-2026-06-23T23-32-25-019ef778-bd84-71e1-9a96-e4d5a454674f.jsonl"
        ],
        "rollout DB stale rows": "29"
      },
      "issues": [
        {
          "severity": "warning",
          "cause": "state DB rows point at missing or unusable rollout files",
          "measured": "29 stale rows",
          "expected": "every state DB rollout path is a file on disk",
          "remedy": null,
          "fields": []
        }
      ],
      "remediation": null,
      "durationMs": 21
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language pt-BR",
      "details": {
        "EDITOR": "not set",
        "VISUAL": "not set",
        "os": "Windows 10.0.26200 (Windows 11 Core) [64-bit]",
        "os language": "pt-BR",
        "os type": "Windows",
        "os version": "10.0.26200"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "color output": "enabled",
        "console input code page": "850",
        "console output code page": "850",
        "stderr console mode": "0x00000007 (VT processing: true)",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout console mode": "0x00000007 (VT processing: true)",
        "stdout is terminal": "true",
        "terminal": "unknown",
        "terminal size": "150x50"
      },
      "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": "TAVDATA-CODEX",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "warning",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.146.0",
        "check for update on startup": "true",
        "last checked at": "2026-08-05T00:16:48.237955500Z",
        "latest version probe": "curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - A fun��o de revoga��o n�o p�de verificar a revoga��o do certificado.",
        "update action": "standalone installer",
        "version cache": "C:\\Users\\david\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 237
    }
  }
}

What issue are you seeing?

Summary

Codex CLI starts successfully and recognizes my authenticated ChatGPT Plus account, but it cannot complete even a simple prompt.

The WebSocket transport fails first. Codex then falls back to HTTPS, but the HTTPS stream is also disconnected with Windows socket error 10054.

This makes Codex CLI effectively unusable.

Environment

  • Codex CLI: 0.146.0
  • Operating system: Windows 11 x64, build 26200
  • Shell: PowerShell 7
  • Subscription: ChatGPT Plus
  • Model: gpt-5.6-sol, reasoning medium
  • Installation method: official Codex PowerShell installer
  • Network: regular residential connection, without a configured proxy
  • VPN: not in use
  • Codex directory:
C:\Dev.MAUI-VS2026\TAVDATA\TAVDATA-CODEX

Current authentication status

Codex recognizes my account successfully:

Account: ChatGPT Plus
Model: gpt-5.6-sol
Permissions: Workspace (Ask for approval)

Authentication was restored using a previously backed-up auth.json.

I will not include the file or any token information because it contains sensitive credentials.

MCP error during startup

Every time Codex starts, it also reports:

MCP client for `codex_apps` failed to start: MCP startup failed:
handshaking with MCP server failed: Send message error Transport

Client error: HTTP request failed:
error sending request for url
(https://chatgpt.com/backend-api/ps/mcp)

MCP startup incomplete (failed: codex_apps)

What steps can reproduce the bug?

Steps to reproduce

  1. Open PowerShell 7.
  2. Navigate to a normal local Git project.
  3. Run:
codex
  1. Enter a simple read-only prompt, for example:
Analyze the current project structure and list the projects in the solution.
Do not modify any files.

Actual result

Codex displays:

Falling back from WebSockets to HTTPS transport.
stream disconnected before completion:
Foi forçado o cancelamento de uma conexão existente pelo host remoto.
(os error 10054)

It then terminates the turn with:

Conversation interrupted - tell the model what to do differently.
Something went wrong? Hit `/feedback` to report the issue.

The problem occurs even with a simple prompt that only reads the local project.

Related OAuth problem

Before restoring the backed-up auth.json, I was unable to log in again after logging out.

Both regular login and device authentication failed with:

Token exchange error: error sending request for url
(https://auth.openai.com/oauth/token)

Error logging in:
Token exchange failed: error sending request for url
(https://auth.openai.com/oauth/token)

The OAuth problem occurred with both Codex CLI 0.146.0 and 0.145.0, including after a clean reinstall.

Restoring a previous auth.json allowed Codex to recognize the account again, but it did not resolve the WebSocket, HTTPS streaming, or codex_apps transport failures.

Troubleshooting already performed

  • Reinstalled Codex CLI through the official installer.
  • Tested Codex CLI 0.146.0.
  • Tested Codex CLI 0.145.0.
  • Restored a known previously working auth.json.
  • Confirmed that the account is recognized as ChatGPT Plus.
  • Confirmed that DNS resolution works.
  • Confirmed that TCP port 443 is reachable.
  • Confirmed that the relevant URLs are reachable through the browser and PowerShell.
  • Confirmed that no WinHTTP proxy is configured.
  • Confirmed that no HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY environment variables are configured.
  • Confirmed that the Windows date and time are correct.
  • Tested a clean reinstall without deleting project data.
  • Tested both standard OAuth login and codex login --device-auth.

Important observation

The following three Codex-originated HTTPS or WebSocket operations have failed on the same machine:

  1. OAuth token exchange with:
https://auth.openai.com/oauth/token
  1. codex_apps MCP initialization with:
https://chatgpt.com/backend-api/ps/mcp
  1. The normal Codex response stream, first over WebSockets and then over HTTPS fallback.

Browser and PowerShell HTTPS access work normally on the same machine.

This suggests that the problem may involve the HTTP/WebSocket client or TLS/network transport used internally by Codex on Windows, rather than general internet connectivity.

What is the expected behavior?

Expected result

Codex should either:

  1. complete the response using WebSocket transport; or
  2. successfully continue through the HTTPS fallback.

A WebSocket failure should not make the entire CLI unusable when HTTPS fallback is available.

Additional information

Additional information

I can provide sanitized logs or run diagnostic commands requested by the maintainers.

I will not publish:

  • auth.json;
  • OAuth callback URLs;
  • access or refresh tokens;
  • account identifiers;
  • full session credentials.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 22 days ago

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

  • #36059

Powered by Codex Action