Skip to content

MCP TypeScript SDK requestId 0 cancellation candidate #51

Description

@serejaris

Upstream

Status

COMMENT-FIRST / candidate.

Six-subagent cycle 21 found this as the only new candidate not clearly duplicate-covered, assigned, or already occupied.

Parent gate:

  • upstream issue is open;
  • no assignee;
  • no labels;
  • PR search for 2115 OR _oncancel OR oncancel OR requestId 0 OR cancellation resource leak returned empty;
  • repo contribution guide asks contributors to comment before starting work to avoid duplicate effort.

Regression card

Contract: cancellation notifications must abort the matching in-flight request even when requestId is 0.

Expected pre-fix failure: a cancellation notification with params.requestId = 0 does not abort the stored controller.

Expected post-fix pass: the controller for request id 0 is aborted with the provided reason.

Likely patch surface:

  • packages/core/src/shared/protocol.ts
  • _oncancel

Likely test surface:

  • protocol cancellation tests under packages/core

Next action

Post upstream test-plan comment and wait for maintainer signal / assignment before coding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions