Skip to content

MCP: connections remain failed after laptop sleep/wake #57015

Closed as duplicate

Description

@simPod

Description

I closed my laptop while an MCP request was in progress. After waking it and restoring network access, several MCP servers showed Error and did not automatically reconnect.

For cloudflare-builds, the details showed:

Status: failed
Configuration: mcp.servers.cloudflare-builds
Error: Request timed out

I expect enabled MCP servers to recover from temporary connection loss without reconnecting each one manually.

Could OpenCode retry failed connections with backoff after sleep or network interruption? Disabled or manually disconnected servers should stay disconnected. Recovery should not automatically replay interrupted tool calls, since they might already have completed.

Steps to reproduce

  1. Connect to a remote MCP server.
  2. Start an MCP request.
  3. Close the laptop while the request is active.
  4. Wake the laptop and restore network access.
  5. Observe the failed MCP connection.

This describes the observed sequence; repeatability has not yet been checked.

OpenCode version

v2.0.32

Operating System

macOS

Terminal

iTerm2

Activity

  1. opencode-agent commented on Oct 19, 2026

    @opencode-agent
    Contributor

    Thanks for the clear report! I think this is a duplicate of #52237: remote MCP servers on macOS end up failed: Request timed out after sleep/wake and are never retried until the service restarts.

    Possible duplicates and closely related items, ordered from most to least likely:

    Until that's resolved, you can reconnect a server manually from /mcps, or run opencode service restart to bring them all back.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. opencode-agent commented on Oct 20, 2026

    @opencode-agent
    Contributor

    Closing this as a duplicate of #52237. That issue covers the same problem: remote MCP servers stay failed: Request timed out after sleep/wake and are never retried. We waited a day in case your case was different, and there's been no reply, so please follow #52237 for updates. Open PR #54378 adds reconnect with backoff for failed servers. Until then, you can reconnect a server from /mcps or run opencode service restart. If your problem turns out to be different, reply here and we can reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions