Skip to content

Upwork MCP startup fails with "Unexpected response type" before tool discovery on Windows #41437

Description

@crain-ai-works

What version of Codex CLI is running?

codex-cli 0.150.1

What subscription do you have?

ChatGPT Pro

Which model were you using?

gpt-5.6-sol, xhigh reasoning

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

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

Windows PowerShell 5.1.19041.7663 | Host: ConsoleHost 5.1.19041.7663

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1787960228s since unix epoch",
  "overallStatus": "warning",
  "codexVersion": "0.150.1",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "C:\\Users\\crain\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\crain\\.codex\\app-server-daemon",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\crain\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\crain\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "C:\\Users\\crain\\.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\\crain\\.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\\crain\\.codex",
        "config.toml": "C:\\Users\\crain\\.codex\\config.toml",
        "config.toml parse": "ok",
        "cwd": "C:\\Users\\crain",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "none",
        "feature flags enabled": "46",
        "log dir": "C:\\Users\\crain\\.codex\\log",
        "mcp servers": "3",
        "model": "gpt-5.6-sol",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\crain\\.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "desktop.app.version": {
      "id": "desktop.app.version",
      "category": "desktop",
      "status": "ok",
      "summary": "the desktop application is installed",
      "details": {
        "log directory": "$HOME\\AppData\\Local\\Codex/Logs",
        "running": "true",
        "version": "26.825.3734.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "desktop.app_server.handshake": {
      "id": "desktop.app_server.handshake",
      "category": "desktop",
      "status": "ok",
      "summary": "the desktop app-server initialized successfully",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "desktop.security.enforcement": {
      "id": "desktop.security.enforcement",
      "category": "desktop",
      "status": "ok",
      "summary": "no locally visible recent Codex security enforcement was found",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.51.0.windows.2",
      "details": {
        "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
        "PATH git entries": "1",
        "git build options": "git version 2.51.0.windows.2; cpu: x86_64; built from commit: ade1f1c136682d1bed178d573dc4dc40dca11623; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64-build-installers/usr/bin/sh; feature: fsmonitor--daemon; libcurl: 8.16.0; OpenSSL: OpenSSL 3.5.3 16 Sep 2025; 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.51.0.windows.2",
        "repo detected": "false",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 97
    },
    "git.worktree.dev_drive": {
      "id": "git.worktree.dev_drive",
      "category": "git",
      "status": "ok",
      "summary": "no Git worktree is active",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "C:\\Users\\crain\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "current executable": "C:\\Users\\crain\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "install context": "standalone (windows, package C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-x86_64-pc-windows-msvc, bin C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-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": 81
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "3",
        "disabled servers": "1",
        "stdio servers": "2",
        "streamable_http servers": "1"
      },
      "remediation": null,
      "durationMs": 222
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "managed proxy": "not configured",
        "proxy env vars": "none",
        "respect system proxy": "disabled"
      },
      "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 inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)",
        "desktop assets CDN": "https://persistent.oaistatic.com/codex-app-prod/<redacted> reachable (HTTP 200)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 176
    },
    "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",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 667
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running standalone on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\crain\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "install method": "standalone (windows, package C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-x86_64-pc-windows-msvc, bin C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-x86_64-pc-windows-msvc\\codex-path)",
        "platform": "windows-x86_64",
        "version": "0.150.1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "C:\\Users\\crain\\.codex\\packages\\standalone\\releases\\0.150.1-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",
        "denied-read restrictions": "false",
        "execve wrapper helper": "none",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted",
        "sandbox backend": "elevated",
        "sandbox provisioning": "complete"
      },
      "remediation": null,
      "durationMs": 2
    },
    "security.endpoint": {
      "id": "security.endpoint",
      "category": "security",
      "status": "warning",
      "summary": "endpoint protection detected; Codex exclusions are unverified",
      "details": {
        "Codex exclusions": "not verified",
        "endpoint products": "Microsoft Defender",
        "exclusion targets": "signed Codex app; codex.exe; codex-windows-sandbox-setup.exe; codex-command-runner.exe; codex-code-mode-host.exe"
      },
      "issues": [
        {
          "severity": "warning",
          "cause": "Microsoft Defender can interfere with Codex. Verify Codex exclusions.",
          "measured": "not verified",
          "expected": "Codex application and helper exclusions",
          "remedy": "Microsoft Defender: Add a certificate or executable-path exclusion for Codex and its helpers. If Attack Surface Reduction blocks Codex, add a rule exclusion. If Controlled Folder Access blocks Codex, allow the app.",
          "fields": [
            "Codex exclusions"
          ]
        }
      ],
      "remediation": "ask your security administrator to verify Codex exclusions and required helper allowances",
      "durationMs": 20
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\crain\\.codex (dir)",
        "active rollout files": "433 files, 3068000782 total bytes, 7085452 average bytes",
        "archived rollout files": "22 files, 9743582 total bytes, 442890 average bytes",
        "goals DB": "C:\\Users\\crain\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\crain\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\crain\\.codex\\log (dir)",
        "memories DB": "C:\\Users\\crain\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "queue DB": "C:\\Users\\crain\\.codex\\queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "C:\\Users\\crain\\.codex (dir)",
        "standalone release cache": "3 entries in C:\\Users\\crain\\.codex\\packages\\standalone\\releases",
        "state DB": "C:\\Users\\crain\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "C:\\Users\\crain\\.codex\\thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 1842
    },
    "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": "433",
        "rollout DB active rows": "433",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "22",
        "rollout DB archived rows": "22",
        "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=455",
        "rollout DB rows": "455",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "subagent:other=206, subagent:thread_spawn=145, vscode=101, cli=3",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 508
    },
    "system.disk": {
      "id": "system.disk",
      "category": "disk",
      "status": "ok",
      "summary": "sufficient free disk space (13.8 GiB)",
      "details": {
        "CODEX_HOME available": "13.8 GiB",
        "failure threshold": "1.0 GiB",
        "warning threshold": "5.0 GiB",
        "worktree available": "13.8 GiB"
      },
      "remediation": null,
      "durationMs": 0
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-US",
      "details": {
        "EDITOR": "not set",
        "VISUAL": "not set",
        "os": "Windows 10.0.19045 (Windows 10 Pro) [64-bit]",
        "os language": "en-US",
        "os type": "Windows",
        "os version": "10.0.19045"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "color output": "disabled (stdout is not a terminal)",
        "console input code page": "437",
        "console output code page": "437",
        "stderr console mode": "0x00000007 (VT processing: true)",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout console mode": "unavailable",
        "stdout is terminal": "false",
        "terminal": "unknown",
        "terminal size": "120x50"
      },
      "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": "cwd",
        "terminal title project value": "crain",
        "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.150.1",
        "check for update on startup": "true",
        "desktop application": "OpenAI.Codex",
        "desktop latest build": "26.825.4187.0",
        "desktop update status": "available",
        "last checked at": "2026-08-28T10:32:27.540755Z",
        "latest version": "0.150.1",
        "latest version status": "current version is not older",
        "update action": "standalone installer",
        "version cache": "C:\\Users\\crain\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 378
    }
  }
}

What issue are you seeing?

The official Upwork MCP server fails during Codex CLI startup before any tools are discovered.

Configured MCP server:

https://mcp.upwork.com/mcp

OAuth authorization completes in the browser. However, when a fresh Codex session starts, Codex reports:

MCP client for upwork failed to start:
MCP startup failed: Unexpected response type

MCP startup incomplete (failed: upwork)

Running /mcp verbose shows:

  • upwork: failed (0 tools)
  • Auth: OAuth
  • Tools: none
  • Resources: none
  • Resource templates: none

I reproduced this using both a project-scoped configuration and Upwork's documented CLI setup:

codex mcp add upwork --url https://mcp.upwork.com/mcp

I also disconnected the existing Upwork OAuth clients, removed the Codex MCP registration, recreated a single connection, completed OAuth again, and started a fresh Codex process. The same startup failure remained.

Other configured tool providers initialize normally, including codex_apps and node_repl.

The failure occurs before tool discovery or any Upwork tool invocation. No proposal, message, profile update, contract action, financial action, or Connects spend occurred.

What steps can reproduce the bug?

Uploaded thread: 01a04a9d-bf9c-7010-a066-316080d71277

What is the expected behavior?

Codex should complete the OAuth-authenticated MCP handshake with the official Upwork server, discover the available Upwork tools, and show the server as connected with more than zero tools when /mcp is run.

A failure in an unsupported response should identify the handshake stage and unexpected response variant rather than returning only the generic message "Unexpected response type."

Additional information

Official MCP server:
https://mcp.upwork.com/mcp

Codex CLI version:
0.150.1

Transport:
Remote Streamable HTTP MCP

Authentication:
OAuth 2.1 / dynamic client registration

The failure occurs during MCP startup before tools are discovered. This differs from related issues involving Unexpected response type during a later tools/call response after tool discovery, such as #29002, #33404, and #41280.

The following have already been attempted:

  • project-scoped MCP configuration;
  • official global codex mcp add configuration;
  • OAuth logout and reauthorization;
  • revocation of existing Upwork connected services;
  • complete MCP registration removal and recreation;
  • fresh Codex processes;
  • minimal configuration;
  • trace-level diagnostic capture.

Other MCP/tool providers in the same Codex session initialize successfully.

No Upwork write action occurred.

Image

upwork_mcp_issue_fields.txt

upwork_mcp_reproduction_steps.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serverswindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions