Skip to content

The simpleStreamableHttp example client call tool(second) always timeout(reconnect)~ #396

Closed

Description

@cnych

Describe the bug

simpleStreamableHttp The client calls the tool normally for the first time, and the second time will time out. This is because the code initialized by the client is as follows:

// src/examples/client/simpleStreamableHttp.ts#L340
const onLastEventIdUpdate = (event: string) => {
notificationsToolLastEventId = event;
};
const result = await client.request(request, CallToolResultSchema, {
resumptionToken: notificationsToolLastEventId, 
onresumptiontoken: onLastEventIdUpdate
});

If the value of resumptionToken is not empty, the GET request will be called in the StreamableHTTPClientTransport, and the request will be replayed. This should be a scenario where the client interrupts and needs to reconnect. ResumptionToken should be configured.

Activity

  1. added
    bug
    on Apr 24, 2025
  2. added this to the twr milestone on May 1, 2025
  3. self-assigned this
    on May 1, 2025
  4. bhosmer-ant commented on May 27, 2025

    @bhosmer-ant
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions