Skip to content

perf(cli): stop eager MCP discovery from blocking agent-capable startup#35360

Closed
Sylw3ster wants to merge 1 commit into
NousResearch:mainfrom
Sylw3ster:perf/cli-mcp-background-startup-discovery
Closed

perf(cli): stop eager MCP discovery from blocking agent-capable startup#35360
Sylw3ster wants to merge 1 commit into
NousResearch:mainfrom
Sylw3ster:perf/cli-mcp-background-startup-discovery

Conversation

@Sylw3ster

Copy link
Copy Markdown
Contributor

What

CLI chat/oneshot startup no longer blocks on eager MCP discovery.

  • move MCP discovery for chat-style CLI startup to a shared background helper
  • skip duplicate launcher-side MCP startup for TUI/gateway/ACP/cron paths that already handle it
  • add a short bounded wait before the first tool snapshot so fast MCP servers still land without reintroducing hangs

Type

  • Bug fix
  • Tests

Changes

  • hermes_cli/main.py
  • hermes_cli/mcp_startup.py
  • cli.py
  • tests/hermes_cli/test_mcp_startup.py

How to Test

  • run hermes chat or hermes -z "hi" with a slow/dead configured MCP server; startup should no longer wait on MCP retries
  • run:
    • pytest -o addopts='' tests/hermes_cli/test_mcp_startup.py tests/tui_gateway/test_wait_for_mcp_discovery.py tests/hermes_cli/test_tui_resume_flow.py tests/cron/test_scheduler_mcp_init.py
    • pytest -o addopts='' tests/hermes_cli/test_startup_plugin_gating.py tests/hermes_cli/test_chat_skills_flag.py

91 passed

@alt-glitch alt-glitch added type/perf Performance improvement or optimization P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/mcp MCP client and OAuth labels May 30, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #35397. Your commit was cherry-picked onto current main with your authorship preserved in git log (commit 0c6e133). Thanks!

@teknium1 teknium1 closed this May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/mcp MCP client and OAuth type/perf Performance improvement or optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants