Skip to content

everything: cancelled long-running operation delays stdio shutdown #4846

Description

@anilloutombam

Version

@modelcontextprotocol/server-everything 2026.8.31
Node.js 26.5.0
macOS arm64

Reproduction

  1. Start the Everything server over stdio.
  2. Call trigger-long-running-operation with duration 2 and steps 4.
  3. Cancel the request after 400 ms.
  4. Call echo on the same session.
  5. Close the client with a 400 ms cleanup limit.

Observed

The operation timed out at about 403 ms and echo succeeded on the same session. Client cleanup then exceeded 400 ms.

This reproduced three times. Normal stdio cleanup passed when no operation was cancelled. The equivalent Streamable HTTP test also cleaned up normally.

The long-running tool waits on timers and does not check request cancellation, so the handler can continue after the client cancels it.

Expected

The demonstration operation should stop after cancellation so stdio shutdown is not delayed by the original timer loop.

Report

The commands and test results are in anilloutombam/mcp-failure-lab#89: anilloutombam/mcp-failure-lab#89

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions