Skip to content

events/stream drops --metadata from the stream request and its reconnects #3062

Done

Description

@cliffhall

Problem

events/stream drops --metadata from the stream request. Found by Copilot's review of the 2.17.0 milestone merge (#3061, r4717147304).

In core/cli/handlers/run-method.ts, the events/stream branch passes args.metadata only to resolveEventType, which is the events/list lookup. eventsStreamOutcome (core/cli/handlers/events.ts) takes only arguments and cursor. Its subscription engine, EventSubscriptionsState, has no metadata in EventSubscribeOptions, so it calls client.streamEvents without any.

So mcpdo @srv events/stream <type> --metadata key=value, and the one-shot CLI's --method events/stream --metadata …, send key on events/list but not on events/stream or any reconnect. events/poll forwards it correctly, and InspectorClient.streamEvents already accepts options.metadata.

Fix

Carry metadata through EventSubscribeOptions, store it with the subscription, and pass it on every request the engine makes for that subscription: the initial stream and every reconnect, plus the poll and webhook requests for consistency. Then have eventsStreamOutcome take metadata and run-method pass args.metadata to it.

Found during the 2.17.0 release (#3054); fixed on v2/main and re-merged per the release skill, 2c.

Activity

  1. added this to the v2.17.0 milestone on Nov 27, 2026
  2. added
    bug
    on Nov 27, 2026
  3. self-assigned this
    on Nov 27, 2026
  4. added
    v2
    on Nov 27, 2026
  5. cliffhall commented on Nov 27, 2026

    @cliffhall
    MemberAuthor

    Shipped in #3063; rides the 2.17.0 milestone merge (#3061).

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

Metadata

Metadata

Assignees

Labels

bugv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions