Skip to content

streamText hanging in a multi-turn MCP session #538

@kamal

Description

@kamal

Potentially related to #127, but I observe a consistent behavior where my chat session will hang after ai-sdk streamText performs the fifth request in the "same turn". If I leave it for a while, eventually the call will continue and complete.

Initially, I thought I was being rate limited by Anthropic. To mitigate this, I added the option to disable parallel tool calls, in an effort to slow it down but that didn't help.

Now I'm suspecting if what I'm seeing is due to the Simultaneous open connections limit. I'm wondering if MCP tool calls are not cleanly releasing their connections.

I do not experience the same issue when running the dev server on my local machine.

Metadata

Metadata

Assignees

Labels

mcpIssues related to MCP functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions