Skip to content

/mcp: "Loading MCP inventory" takes too long #16244

Closed

Description

@omermosko4

What version of Codex CLI is running?

codex-cli 0.117.0

What subscription do you have?

Enterprise

Which model were you using?

No response

What platform is your computer?

macOS 15.7.1 (Darwin arm64)

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

Superset

What issue are you seeing?

Running /mcp takes a long time to respond. While it is loading, Codex shows:
Loading MCP inventory
The message stays visible long enough that the command feels stuck or unusually slow.

What steps can reproduce the bug?

  1. Open Codex in a workspace with MCP configured.
  2. Run /mcp.
  3. Observe the delay before the command becomes usable.
  4. During the delay, Codex shows Loading MCP inventory.

What is the expected behavior?

/mcp should load much faster, or provide better progress feedback if inventory loading is expected to take noticeable time.

Additional information

No response

Activity

  1. added
    bug
    on Mar 30, 2026
  2. added
    CLI
    mcp
    TUI
    on Mar 30, 2026
  3. github-actions commented on Mar 30, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. removed
    CLI
    on Mar 30, 2026
  5. etraut-openai commented on Mar 30, 2026

    @etraut-openai
    Contributor

    How long of a delay do you see? How many MCP servers do you have installed?

    Do you suspect this is a regression? Does the same delay occur if you downgrade to 0.116.0?

  6. omermosko4 commented on Mar 30, 2026

    @omermosko4
    Author

    How long of a delay do you see? How many MCP servers do you have installed?

    Do you suspect this is a regression? Does the same delay occur if you downgrade to 0.116.0?

    I measured this more carefully:
    Environment:

    • codex-cli 0.117.0
    • macOS 15.7.1
    • 6 MCP servers

    What I found:

    • The non-interactive CLI path is fast: codex mcp list returns in ~60-90ms locally.
    • The slowdown seems specific to the TUI /mcp inventory path, not basic MCP config parsing.

    From the current session logs in ~/.codex/log/codex-tui.log:

    • around 2026-03-30T17:09:53.666Z / 17:09:54.687Z, MCP servers report ready
    • at 17:09:54.721Z - 17:09:54.722Z, Codex starts probing MCP inventory
    • at 17:09:56.728Z, MCP process-group cleanup is logged

    So for the current run, the /mcp inventory phase appears to take roughly 2.0s from the resource/template probing to cleanup, and about 3.0s end-to-end from first server-ready signal to cleanup.

    This also looks like a regression relative to older logs on the same machine:

    • March 25, 2026: op.dispatch.list_mcp_tools closed with time.idle=489ms
    • March 26, 2026: op.dispatch.list_mcp_tools closed with time.idle=472ms
  7. etraut-openai commented on Apr 6, 2026

    @etraut-openai
    Contributor

    Thanks for the bug report. This will be addressed in the next release.

  8. 14 remaining items

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

    TUIbugmcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions