SAP / SAP/cloud-sdk-python

MCP tool listing hangs indefinitely when server is unresponsive

オープン
#313 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@thiagob がすでに取り組んでいます。

2026年9月14日 から。

bug
主要言語
Python
スター
28
フォーク
42
平均マージ
2日 13時間
マージ済み PR(30日)
35

説明

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

v0.49.1

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。