OpenAI Codex · tool · fg-0504

Codex starts the first turn without tools from a slow MCP server

If you see Tools from an MCP server are missing on the first prompt but appear later, the cause and the fix for OpenAI Codex are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Tools from an MCP server are missing on the first prompt but appear laterAn MCP server launched through npx or docker times out on first start
Cause
When building the initial tool catalog, Codex waits only mcp_optional_startup_grace_ms, 1000 ms by default, for optional servers, and each server gets startup_timeout_sec, 10 seconds by default.
Fix
Raise startup_timeout_sec for slow servers, mark servers the task depends on as required, or set the grace to 0 to wait for each server's own timeout.
Apply
# ~/.codex/config.toml mcp_optional_startup_grace_ms = 0 [mcp_servers.docs] command = "npx" args = ["-y", "docs-mcp"] startup_timeout_sec = 30 required = true
Affected
Codex CLI, IDE extension, and ChatGPT desktop app, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun