Skip to content

[BUG] Agent loop hang ong mcp tool use exception at streamable_http #894

@jeffjen

Description

@jeffjen

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

1.8.2

Python Version

3.13

Operating System

public.ecr.aws/docker/library/python:3.13-slim

Installation Method

pip

Steps to Reproduce

  1. Configure agent with MCPClient with streamable_http
  2. Start agent prompt with stream_async
  3. Abort MCP Server sse stream mid stream (unexpected error from MCP Server)
  4. Observe exception log reported from https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/streamable_http.py#L184-L187
  5. Agent hangs forever

Expected Behavior

  1. Bubble exception to allow exception capture, or retry tool use

Actual Behavior

  1. Agent hangs forever

Additional Context

No response

Possible Solution

No response

Related Issues

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions