MCP tool listing hangs indefinitely when server is unresponsive
@thiagob đang làm issue này rồi.
Từ ngày 14/9/2026.
- Ngôn ngữ chính
- Python
- Star
- 28
- Fork
- 42
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 35
Mô tả
Describe the Bug
Issue
When listing MCP tools, if the MCP server is unresponsive or is throwing some error, session.initialize()
gets stuck indefinitely/keeps retrying instead of failing fast.
Likely cause: session.initialize() in /agentgateway/_lob.py (lines 350
and 482) has no deadline at the MCP protocol level. While self._config.timeout
(default 60 s) is passed down to httpx.AsyncClient, it only bounds individual
HTTP chunk reads — SSE keep-alives from the server continuously reset this timer,
so the call never actually times out.
Steps to Reproduce
Try listing tools from an MCP server that isn't working or is unreachable. The AGW client keeps retrying until the upstream request times out
Expected Behavior
It should retry once or twice and then error out
Screenshots
No response
Used Versions
https://github.tools.sap/agent-extensibility/extensibility-agent/blob/main/requirements.txt
Code Examples
# Your code here
Stack Trace
No response
Log File
Log file
...Affected Development Phase
Development
Impact
Blocked
Timeline
This is a requirement for EAC
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.