fix: preserve hermes mcp add command routing - #17294
Closed
asdigitos wants to merge 5 commits into
Closed
Conversation
- keep the top-level mcp subcommand from being clobbered by --command - read the new mcp_stdio_command parser dest with back-compat fallback - add regression tests for parser routing and stdio command handling
This was referenced May 1, 2026
Contributor
|
The mcp dispatch fix here is now shipped in #21204 (commit 4f364c4). Your PR actually identified this bug earliest of the three duplicates (Apr 29) — thank you for that. The four other commits on this branch are unrelated to the mcp dispatch bug and we'd love to review them, but they need to be separate PRs:
Closing this one because the titular mcp fix is redundant, but please file one PR per commit above (or one "slack send_message target handling" PR for the three Slack fixes + a separate tool-registry-cache PR). Happy to review as soon as you split them. If you'd rather we salvage the four directly and credit you, just leave a comment here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermes mcp add ...from falling back into chat/TUI when--commandis omittedmcp_stdio_commandand keep a back-compat fallback incmd_mcp_addRoot cause
mcp adddefined--commandon the same argparse destination used by the top-level subparser (args.command). When--commandwas omitted for URL-based servers, argparse overwrote the top-levelmcpcommand withNone, so Hermes treated the invocation like barehermesand launched chat.Test Plan
source venv/bin/activate && pytest -q tests/hermes_cli/test_argparse_flag_propagation.py tests/hermes_cli/test_mcp_config.py