Repository navigation
Upwork MCP startup fails with "Unexpected response type" before tool discovery on Windows #41437
Description
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:
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 addconfiguration; - 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.
Activity
oudouusa commentedon Aug 29, 2026
I can reproduce this on WSL2/Linux as well, so it does not appear to be Windows-specific.
Environment
0.150.1https://mcp.upwork.com/mcpI captured the authenticated MCP responses.
initializesucceeds with protocol2025-06-18, and the server reportsenvoy-ai-gateway v1.1.0. The following list calls also return their expected data:tools/list: 30 toolsresources/list: 1 resourceresources/templates/list: 0 templatesHowever, all three result objects include this metadata:
{ "ttlMs": 0, "cacheScope": "" }The MCP caching schema permits
cacheScopevalues of"public"or"private"; an empty string is invalid. Codex 0.150.1 usesrmcp 3.1.3, whoseCacheScopeenum accepts only those values. Consequently, the otherwise-valid list result cannot deserialize asListToolsResult/ListResourcesResult, falls through to a generic result variant, and Codex reportsUnexpected response type.This is consistent with the failure occurring after OAuth and
initialize, but before tool discovery. Reauthentication does not fix it.Possible fixes:
"private"for authenticated responses), or omit the cache metadata when using the negotiated older protocol.No Upwork write actions were performed during this diagnostic, and no credentials or session identifiers are included here.
ishto7 commentedon Sep 2, 2026
I can reproduce this on macOS as well, using the Codex desktop app on a local Mac.
Environment
0.152.126.831.21537https://mcp.upwork.com/mcpSanitized app log
The failure occurs during startup before tool discovery. In a separate authenticated probe,
initializereturned a valid JSON response andtools/listreturned a valid SSE response containing the Upwork tools, including the samettlMs: 0/cacheScope: ""metadata described above.No credentials, access tokens, usernames, local paths, thread IDs, or Upwork write actions are included or were used.
ismail-rt commentedon Sep 2, 2026
I can reproduce this on macOS with Codex CLI
0.151.0and the Codex desktop app.OAuth against
https://mcp.upwork.com/mcpsucceeds.codex mcp login upworkcompletes, andcodex mcp listshows the server asenabledwithAuth: OAuth. A new Codex thread still has 0 Upwork tools.This matches the earlier root cause:
initializesucceeds, buttools/list/resources/list/resources/templates/listinclude:{ "ttlMs": 0, "cacheScope": "" }ttlMs: 0is valid.cacheScope: ""is not. SEP-2549 only allows"public","private", or omitting the field. Codex pinsrmcp = 3.1.3, and that crate'sCacheScopeenum cannot deserialize the empty string, so the otherwise valid list result falls throughServerResult's untaggedCustomResultvariant. Codex then reportsUnexpected response typeand never imports the tools.Re-login and a full app restart do not fix it. The stored OAuth tokens are fine; tool discovery is what fails.
Codex does not accept external code PRs, so I opened the client-side compatibility fix against
rmcp:modelcontextprotocol/rust-sdk#1241
That change treats an exact empty
cacheScopeas omitted on list and read results, while still rejecting unknown or whitespace values. Afterrmcpships it, Codex would still need to bump the pinnedrmcpversion.The durable server-side fix is for Upwork to send
"private"or omitcacheScopeon authenticated list responses.coktale commentedon Sep 4, 2026
Confirming the same pre-discovery failure on macOS:
https://mcp.upwork.com/mcpcodex mcp login upworkcompletes successfullyserverInfois null and tools, resources, and resource templates are emptyA transient test with
mcp_2026_07_28changed the failure toHTTP 400: missing session ID; the setting was not persisted. Upwork’s documentedexperimental_use_rmcp_clientsetting is rejected as an unknown feature in this build.This confirms the zero-tool/pre-discovery symptom is not limited to Windows. No Upwork write action, message, saved job, or proposal submission occurred.
prins1bap-ui commentedon Sep 9, 2026
Confirmed the same failure pattern from the current ChatGPT Upwork integration, not just Codex CLI/Desktop.
ChatGPT reproduction
plugin_asdk_app_6a75165ed2d8819182548553aa4cb6d5Immediately after successful OAuth, the first authenticated read (
list_accounts) causes the Upwork tool surface to become disabled with no usable account response. A separate authenticated read path using a previously known freelancer organization context (get_organization) reproduced the same failure, so this is not specific to thelist_accountsfunction.I also tested the Upwork control-plane read for tool presentation mode (
set_tool_modeaction=get). It fails at the same boundary.Stronger no-org control
A further read-only control materially narrows this:
get_tool_help({"tool_name":"find_jobs"})also immediately disables the Upwork tool surface. That method requires no freelancer org UID, Connects, proposal data, marketplace job ID, or account lookup. The host returns only:The Upwork tool has been disabled. Do not send any more messages to Upwork.So the failure is not dependent on account discovery, principal/org binding, marketplace retrieval, or a specific business API. It occurs before ordinary Upwork tool execution can return data, consistent with the MCP response/import/session layer.
This lines up with the upstream
cacheScope: ""evidence already documented in this issue and inmodelcontextprotocol/rust-sdk#1241: OAuth/initialize can succeed, but malformed list-result cache metadata prevents strict clients from importing/using the otherwise-present tools.A client-side compatibility fix is currently open at:
modelcontextprotocol/rust-sdk#1241
Server-side, the durable fix remains for
https://mcp.upwork.com/mcpto emitcacheScope: "private"or omitcacheScopeinstead of returning an empty string on authenticated list responses.Documentation/rollout inconsistency
There is also a current product-documentation mismatch worth noting. Upwork's official MCP page advertises direct ChatGPT Developer Mode setup against
https://mcp.upwork.com/mcpand says custom MCP connectors are available on Plus/Pro/Team/Business/Enterprise. OpenAI's current Developer Mode help page says full custom MCP/developer mode is web-only and available to Business and Enterprise/Edu (with narrower Pro support noted separately), while this Plus account already has the OpenAI-curated Upwork plugin installed from the directory. This may indicate the Upwork/ChatGPT rollout surfaces are not aligned.OpenAI support cases 14667036/14667065/14667236 and Upwork MCP support request #55494650 have the same sanitized evidence.
No Upwork write actions, proposal submissions, Connects spend, credentials, access tokens, user names, or account identifiers are included in this report.
coktale commentedon Sep 10, 2026
Since the problem is on Upwork side, I decided to email request directly to mcp-support@upwork.com
Go on and send your problems too!
coktale commentedon Sep 12, 2026
Upwork support replied it is fixed now, and I could re-connect via MCP and get data!
zhujian0805 commentedon Sep 20, 2026
Same problem for my existing MCP servers. any update on this?