Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tui_gateway/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3512,7 +3512,8 @@ def _schedule_mcp_late_refresh(sid: str, agent) -> None:

The agent snapshots ``agent.tools`` once at build time and never re-reads
the registry (run_agent/agent_init). ``_make_agent`` briefly joins the
background MCP discovery thread (``wait_for_mcp_discovery``, ~0.75s) so
background MCP discovery thread (``wait_for_mcp_discovery``, bounded by the
``mcp_discovery_timeout`` config value, default 1.5s) so
already-spawning servers land in that snapshot — but a server that takes
longer than the bound to connect (common for an HTTP MCP server on first
connect) lands *after* the agent is built. Its tools are then absent from
Expand Down
Loading