Skip to content

Bug: Codex startup blocks on MCP/App connector initialization, causing very slow launches #24397

Open

Description

@coderZoe

What version of Codex CLI is running?

codex-cli 0.133.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5 xhigh

What platform is your computer?

Darwin 24.6.0 arm64 arm

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

Ghostty zsh

Codex doctor report

What issue are you seeing?

Codex startup becomes very slow when MCP servers, Apps/Connectors, or browser-related plugins are configured. It appears that
Codex eagerly initializes/checks MCP and connector state during session startup, even when those tools are not used in the
session.

This affects the basic launch experience. In my case, after removing/disabling the MCP/browser/apps startup path from my
default config, Codex startup became effectively instant, which strongly suggests the delay is caused by eager MCP/App
initialization.

I also saw startup errors like:

MCP client for codex_apps failed to start
MCP startup incomplete (failed: codex_apps)
token_invalidated
status: 401

A remote connector token being invalid should not slow down or pollute startup for a normal local coding session where that
connector is not used.

What steps can reproduce the bug?

  1. Configure MCP/browser/app-related tools, for example:

[mcp_servers.chrome-devtools]
type = "stdio"
command = "npx"
args = ["-y", "chrome-devtools-mcp@latest", "--autoConnect"]

[mcp_servers.node_repl]
command = "/Applications/Codex.app/Contents/Resources/node_repl"
startup_timeout_sec = 120

  1. Enable Browser / Computer Use plugins and Apps/Connectors.
  2. Start a normal Codex session that does not need browser automation or any external connector.
  3. Observe that startup is slower and may show MCP/App connector initialization errors.
  4. Remove the MCP servers and disable Apps/Browser/Computer Use from the default startup config.
  5. Start Codex again. Startup becomes effectively instant.

Current workaround is to keep a fast default config and use a separate profile when browser/MCP tools are needed, for example:

codex --profile-v2 with-browser-mcp resume --last

But this is cumbersome because I must know in advance that MCP will be needed, restart/resume with a different profile, and
the already-started session cannot discover/connect to the MCP server on demand.

What is the expected behavior?

Codex should not block startup on MCP/App connector initialization unless that tool is required immediately.

Expected behavior:

  1. Start the Codex session quickly.
  2. Do not launch stdio MCP servers during startup unless explicitly configured as required/eager.
  3. Do not validate remote App/Connector auth during startup unless the connector is actually used.
  4. Make MCP/App capabilities discoverable without paying full startup/handshake cost.
  5. Start and handshake with the MCP server only on first actual tool use.
  6. If MCP startup/auth fails, surface the error at tool-use time, not every Codex launch.

This would avoid slow startup for normal coding sessions while still allowing browser/MCP tools to be used when needed.

Additional information

Environment:

Codex CLI/App version: 0.133.0-alpha.1
Platform: macOS arm64
Shell: zsh

This feels like a startup performance bug rather than a feature request, because configured but unused tools can make every
Codex launch slower and noisier.

Activity

  1. added
    CLIIssues related to the Codex CLI
    mcpIssues related to the use of model context protocol (MCP) servers
    app-serverIssues involving app server protocol or interfaces
    on May 25, 2026
  2. codeugar commented on May 26, 2026

    @codeugar

    Additional in-app feedback report for the same startup slowdown: feedback receipt 019e5dfd-e7ef-7303-bdc6-1f96cf71fa01.

    The user reports that the Codex App is slow every time it starts/runs. This appears to match the MCP/App connector eager initialization startup-delay path described in this issue. No additional public logs beyond the submitted in-app feedback receipt.

  3. dwo commented on Jul 17, 2026

    @dwo

    I traced a similar macOS/TUI resume stall to repeated reqwest::Client construction in the HTTP MCP and OAuth-discovery paths.

    With five HTTP MCPs configured on CLI 0.144.5:

    • session_init.auth_mcp: 5.7s
    • first frame: 6.9s
    • without those MCPs: 0.95s

    I prototyped a fix with Codex: on current main with the same MCPs, auth_mcp took 1ms and the first frame 1.44s.

    Would maintainers be interested in this approach? dwo@b02ca11

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 CLIapp-serverIssues involving app server protocol or interfacesbrowserbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions