Custom provider reports initialized Model Context Protocol servers as uninitialized
Environment
- Codex command-line interface:
codex-cli 0.146.0 - Subscription: Pro Lite
- Model:
gpt-5.6-sol - Operating system: macOS 26.5.2 on arm64
- Terminal: iTerm2 3.6.11
codex doctor --summary --ascii reports 17 successful checks, 1 idle check, 0 warnings, and 0 failures. The WebSocket connectivity check receives HTTP status 101. All configured provider endpoints are reachable. Authentication is configured. The Model Context Protocol (MCP) configuration is valid.
Observed Behavior
A custom model provider with supports_websockets = false makes the terminal interface report that Model Context Protocol (MCP) startup was interrupted. The warning identifies MCP servers as uninitialized after the servers completed their initialization handshakes.
One direct-endpoint run produced the following warning:
MCP startup interrupted. The following servers were not initialized:
chrome_devtools, codex_apps, context7, drawio, playwright
The server list varies between runs because the warning occurs at different points in the startup sequence. Before Codex displays the warning, the Codex log contains Service initialized as client for servers named in the warning.
Reproduction
- Configure at least one Model Context Protocol (MCP) server.
- Authenticate Codex with ChatGPT.
- Start Codex with a direct custom provider that disables WebSockets.
``bash``
codex --no-alt-screen \
-c 'model_provider="direct_http_test"' \
-c 'model_providers.direct_http_test.name="direct-http-test"' \
-c 'model_providers.direct_http_test.base_url="https://chatgpt.com/backend-api/codex"' \
-c 'model_providers.direct_http_test.wire_api="responses"' \
-c 'model_providers.direct_http_test.requires_openai_auth=true' \
-c 'model_providers.direct_http_test.supports_websockets=false'
- Wait for MCP startup.
The direct custom provider connects to the standard ChatGPT Codex endpoint.
Expected Behavior
The model provider's Responses transport setting should not invalidate successful Model Context Protocol (MCP) initialization handshakes. An MCP server that returns a successful initialization response should remain ready. Codex should not report the server as uninitialized.
Controlled Comparison
The two control runs use the same authentication and Model Context Protocol (MCP) configuration as the reproduction.
| Provider configuration | supports_websockets | MCP startup result |
| --- | --- | --- |
| Direct custom provider | true | Startup completes without the warning |
| Built-in provider | Not configured | Startup completes without the warning |
4 Comments
I’m seeing the same false “uninitialized” warning without a custom provider.
Environment:
gpt-5.6-sol, reasoning effortmaxcodex doctor --json, run outside the restricted sandbox, reported:The TUI displayed:
However, the logs showed successful initialization for all five servers before later startup rounds were cancelled. I then made a read-only tool call through each listed
server from the same thread, and all five succeeded.
This suggests the false “uninitialized” status is not limited to custom providers or
supports_websockets = false. It also occurs with the built-in provider and workingWebSockets.
I can reproduce this false "uninitialized" warning on native Windows with the built-in OpenAI provider.
Environment
0.146.010.0.26200, x647.6.4in Windows Terminalgpt-5.6-solObserved behavior
The TUI displayed:
The warning did not correspond to four process or handshake failures:
context7,node_repl, andprojectatlaswere all launched as child processes and remained running.codex mcp listandcodex mcp getshowed the three configured stdio servers enabled.startup_timeout_sec = 60; Node REPL hadstartup_timeout_sec = 120. The TUI emitted the cancellation-style warning before either configured timeout elapsed.This appears consistent with the other reports here: a successful or still-viable server is presented as uninitialized after its startup round is cancelled or the TUI loses/settles startup-status events. In
rust-v0.146.0,finish_mcp_startup_after_lag()classifiesStartingor missing statuses as cancelled, andAppServerEvent::Laggedinvokes that path:The second concurrent CLI session may increase event or process pressure, but it does not look like the root cause: no server reported a concrete resource-conflict failure, and unrelated servers were cancelled together.
Expected behavior
Servers that have initialized successfully should remain
Ready. Event-consumer lag, a refresh, or another concurrent Codex session should not downgrade ready servers or report them as uninitialized. If status delivery is incomplete, the TUI should resynchronize from the connection manager before producing the warning.In-product feedback
Submitted through Codex
feedback/uploadwith logs excluded.Tracking thread ID:
019fb74a-1cb9-76b3-80f2-e97a37d5910fAdditional data point from Windows: I can reproduce the same
MCP startup interruptedwarning on codex-cli 0.146.0 using the standard OpenAI configuration (not a custom provider).The TUI reported
analytics-mcp,context7,mobile-mcp, andnext-devtoolsas not initialized. However, the log from that same TUI process records successfulService initialized as clienthandshakes for all four within about five seconds of launch. The same four also initialized successfully again during a later thread resume.A
codex execsmoke test that temporarily marked all four servers asrequired=truealso completed successfully. This is consistent with a startup-status/reporting race rather than necessarily a per-server timeout or handshake failure.This differs from the custom-provider reproduction in this issue, so I am offering it as an additional data point rather than evidence of a confirmed common root cause. I can provide a redacted trace if helpful.
I reproduced the same stale “uninitialized” warning with the built-in provider, so the trigger is not limited to a custom provider with WebSockets disabled.
Environment:
Observed TUI warning:
Relevant log timeline (2026-08-14 KST):
This looks like the warning snapshot races late successful initialization and/or diagnostic-task teardown. The servers are usable after the warning.
I uploaded the session logs and redacted diagnostics through /feedback. Uploaded thread:
01a00072-ab92-7bb0-821a-5ac612c1bb09.