Skip to content

fix(tui_gateway): skip MCP discovery in dashboard mode - #60592

Closed
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:liuhao/cron-bugfix-60572-dashboard-mcp-skip
Closed

fix(tui_gateway): skip MCP discovery in dashboard mode#60592
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:liuhao/cron-bugfix-60572-dashboard-mcp-skip

Conversation

@liuhao1024

@liuhao1024 liuhao1024 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

The dashboard UI (hermes dashboard) loads profile configs for display
but does not run agents, so it does not need MCP servers. Skip discovery
when HERMES_SERVE_HEADLESS is unset (dashboard mode) to avoid spawning
duplicate MCP server processes when both gateway and dashboard are running
against the same profile.

Fixes NousResearch#60572
@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/dashboard Web dashboard / control panel UI (dashboard/, landing) tool/mcp MCP client and OAuth P3 Low — cosmetic, nice to have labels Jul 8, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for tracing the dashboard/WebSocket MCP startup path.

Automated hermes-sweeper review found that the duplicate-discovery guarantee is already implemented on current main:

  • hermes_cli/mcp_startup.py:27-50 uses a process-wide lock and _mcp_discovery_started guard; every caller after the first returns before a second discovery thread can be created.
  • hermes_cli/main.py:12150-12168 deliberately starts that same shared discovery for the dashboard's agent-backed /api/ws path, with coverage in tests/hermes_cli/test_dashboard_unified_launch.py:194-234.
  • The dashboard is not view-only: hermes_cli/web_server.py:15505-15531 routes its Chat-tab /api/ws endpoint to tui_gateway.ws.handle_ws.

The competing-fix discussion on #60602 was also considered. Since current main already prevents duplicate MCP server startup through the shared idempotent helper, this PR's additional mode gate is redundant. Closing as implemented on main.

@teknium1 teknium1 closed this Jul 10, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/dashboard Web dashboard / control panel UI (dashboard/, landing) comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main tool/mcp MCP client and OAuth type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants