3f19df2a5b
MCP tools connected and enabled but never surfaced into the agent's session toolset on the desktop app + dashboard WebUI (#51587). There are two independent background MCP discovery thread owners by surface: tui_gateway.entry (stdio 'hermes --tui') and hermes_cli.mcp_startup (desktop app + dashboard WS sidecar via tui_gateway/ws.py, and 'hermes dashboard'). The late-refresh scheduler gates on tui_gateway.entry.mcp_discovery_in_flight(), which read ONLY the entry thread global. On the desktop/dashboard surfaces that global is None, so a server slower than the bounded build-time wait never triggered a late refresh and its tools stayed invisible for the whole session. Make mcp_discovery_in_flight() / join_mcp_discovery() consult BOTH thread owners. Adds the matching in-flight/join helpers to hermes_cli.mcp_startup and has tui_gateway.entry delegate to them as a second owner.