MCP tool listing hangs indefinitely when server is unresponsive

Abierto
#313 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@thiagob ya está trabajando en esto.

Desde el 14/9/2026.

  • #319 de @wangzhengzhuo05 — cerrado sin fusionar

Evaluación

Este issue todavía no se ha evaluado.

Descripción

bug
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

Lenguaje dominante
Python
Estrellas
29
Forks
45
Merge medio
2 d 4 h
PR fusionados (30 d)
51

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SAP/cloud-sdk-python

Todos los issues de SAP/cloud-sdk-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.