SAP / SAP/cloud-sdk-python

MCP tool listing hangs indefinitely when server is unresponsive

Aperta
#313 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@thiagob ci sta già lavorando.

Dal 14/9/2026.

bug
Lingua principale
Python
Stelle
28
Fork
42
Merge medio
2g 13h
PR unite (30g)
35

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.