Skip to content

fix(mcp): MCP servers cannot block interaction in interactive mode - #3521

Open
meowgorithm wants to merge 3 commits into
mainfrom
u-cant-block-me-mcp
Open

fix(mcp): MCP servers cannot block interaction in interactive mode#3521
meowgorithm wants to merge 3 commits into
mainfrom
u-cant-block-me-mcp

Conversation

@meowgorithm

Copy link
Copy Markdown
Member

This improves UX around slow MCPs in interactive sessions.

  • If we're in interactive mode, skip MCP resources, don't wait for MCPs resources to be available before sending messages. Users can look at the sidebar or overlay to for MCP servers to come online before sending messages
  • If we're in non-interactive mode, always wait for MCP resources to be available before sending messages

The interactive coordinator gated every run on mcp.WaitForInit, which
waits for every configured MCP server to finish connecting. Sending a
prompt before init completed — typically the first message in a session
— froze the UI spinner for the duration of the slowest server's connect
timeout (10s by default, up from 120s before #3509), making Crush feel
broken on startup.

Build the tool list from whatever is registered at send time instead.
Servers still connecting publish EventToolsListChanged when ready and
their tools appear on the next run; the TUI already surfaces per-server
status so nothing fails silently. The non-interactive path (crush run)
still waits explicitly in App.RunNonInteractive before starting work —
there the user has no status UI and expects the full tool palette, so
waiting once up front is correct.

💘 Generated with Crush

Assisted-by: Crush:kimi-k3
Interactive sessions no longer freeze while MCP servers are still
connecting: prompts send immediately and tools from late servers appear
on subsequent turns. One-shot non-interactive runs still wait, bounded
by each server's connect timeout, so their tool palette is complete.

💘 Generated with Crush

Assisted-by: Crush:anthropic/claude-opus-5
Makes it possible to tell from the debug logs which configured server is
slow to start, instead of only learning that one failed.

💘 Generated with Crush

Assisted-by: Crush:anthropic/claude-opus-5
@meowgorithm meowgorithm changed the title U cant block me mcp fix(mcp): MCP servers cannot block interaction in interactive mode Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant