codex - ✅(Solved) Fix Skipping MCP during codex CLI startup [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17143Fetched 2026-04-09 08:01:55
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1unlabeled ×1

PR fix notes

PR #18078: Fix MCP startup cancellation through app server

Description (problem / solution / changelog)

Addresses https://github.com/openai/codex/issues/17143

Problem: TUI interrupts without an active turn stopped cancelling slow MCP startup after routing through the app-server APIs.

Solution: Route no-active-turn interrupts through app-server as startup cancels, acknowledge them immediately, and emit cancelled MCP startup updates.

Testing: I manually confirmed that MCP cancellation didn't work prior to this PR and works after the fix was in place.

Changed files

  • codex-rs/app-server/src/codex_message_processor.rs (modified, +41/-10)
  • codex-rs/codex-mcp/src/mcp_connection_manager.rs (modified, +3/-2)
  • codex-rs/tui/src/app.rs (modified, +13/-5)
  • codex-rs/tui/src/app_server_session.rs (modified, +4/-0)
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.118.0

What subscription do you have?

Enterprise

Which model were you using?

gpt-5.4

What platform is your computer?

Mac OS

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

iTerm2

What issue are you seeing?

When Codex started with a slow or unreachable optional MCP server, pressing Esc in the TUI still flowed through the turn interrupt path. During startup there is no active turn, so the request was effectively a no-op and the app stayed blocked waiting for MCP initialization.

That made the bootstrap experience brittle for cases like VPN-gated internal MCPs: users could see startup continue to hang, but had no ergonomic way to skip the server for the current session.

What steps can reproduce the bug?

During codex startup have a slow/unreachable MCP. Pressing Esc keys does not skip the MCP initialization.

What is the expected behavior?

Skip the MCP initialization

Additional information

No response

extent analysis

TL;DR

Modify the Codex CLI to handle the Esc key press during startup by skipping MCP initialization when no active turn is present.

Guidance

  • Review the Codex CLI code to identify where the Esc key press is handled during startup and modify it to skip MCP initialization when no active turn is present.
  • Verify that the modification fixes the issue by reproducing the bug with a slow or unreachable MCP server and checking if pressing Esc skips the MCP initialization.
  • Consider adding a configuration option or flag to allow users to explicitly skip MCP initialization during startup.
  • Test the modification with different scenarios, such as VPN-gated internal MCPs, to ensure the fix is robust.

Example

No code snippet is provided as the issue does not contain enough information about the Codex CLI codebase.

Notes

The fix may require changes to the Codex CLI codebase, and the exact implementation details are not provided in the issue.

Recommendation

Apply workaround: Modify the Codex CLI to handle the Esc key press during startup, as upgrading to a fixed version is not mentioned in the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING