Skip to content

fix(mcp): continue after deferred startup failure#2541

Open
lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/issue-2343-mcp-timeout
Open

fix(mcp): continue after deferred startup failure#2541
lihailong00 wants to merge 1 commit into
MoonshotAI:mainfrom
lihailong00:codex/issue-2343-mcp-timeout

Conversation

@lihailong00

@lihailong00 lihailong00 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • prevent an optional/background MCP startup failure from aborting the interactive turn
  • catch only MCPRuntimeError at the deferred wait boundary
  • keep unexpected loader errors visible

Reproduction and verification

A real KimiToolset regression test deterministically failed on current main when its background MCP task raised MCPRuntimeError. After the fix:

  • uv run pytest tests/core/test_kimisoul_mcp.py tests/core/test_load_agent.py -q — 16 passed
  • targeted Ruff and Pyright — passed

This revives #2355, which was closed during contributor backlog cleanup rather than after a technical rejection.

Closes #2343


Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP 连接超时导致整个 CLI 不可用 || MCP connection timeout causes the entire CLI to be unavailable

1 participant