You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): wire existing terminal-agent list and send commands - #29207
cmux terminal list --agents and cmux terminal <id> send --text ... are implemented in cli/terminal_talk.rs, but the main cmux dispatcher never calls that module's run handler. The existing MCP tools agents_terminal_list and agents_terminal_send reach it directly. An agent following the advertised CLI examples therefore falls into the generic resource parser instead.
This PR routes just those two terminal-agent verbs to their existing owner before generic command parsing, including the term alias. All other terminal commands and --help keep their previous routing. It adds a subprocess regression that checks the shipped binary reaches the specialist send and list --agents argument validators and that terminal help still succeeds.
First change is a test-only commit, then the two-file routing fix. No new execution engine or API.
Changelog
Fixed:cmux terminal list --agents and cmux terminal <id> send reach the existing agent-terminal handlers.
Observed / Not run
Observed (source/diff inspection):feat-cmux-next at 07088897284b6637a4ddb5763e06ca1601d4aae2, current source and exact GitHub compare of b7a5371a819a0d7fa89191296ee2efa022dc41ff vs base. The diff contains one dispatcher line, one narrow router and one regression test (three files, +40/-0). Other terminal verbs retain the normal parser. Issue background: SW-10, CLI parity #23026.
Not run: Rust builds, cargo test, live terminal-agent send, hosted verification and platform CI. This chat's environment has read/write GitHub access but no Rust compiler, cmux checkout, or hosted runner. The test-first commit was authored before the fix; its expected red result is inferred, not observed. Keep this PR draft pending a focused hosted test on the exact head and review.
Suggested focused verification:./scripts/verify-cmux-tui-hosted.sh --filter terminal_agent_list_and_send_reach_their_cli_handlers on an approved cmux Testbox; then cargo test -p cmux-tui terminal_talk on the hosted runner. Review the fix on the pushed SHA.
Out of scope: durable whole-send retry IDs, separately documented at #23026.
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes cmux terminal list --agents and cmux terminal <id> send falling into the generic resource parser instead of reaching the existing terminal-agent CLI handlers.
Routes just those two terminal-agent verbs (plus the term alias) to terminal_talk's parser before generic command parsing; all other terminal commands and --help keep their previous routing.
Adds a subprocess regression test that verifies the shipped binary reaches the specialist argument validators for send and list --agents and that terminal help still succeeds.
Written for commit b7a5371. Summary will update on new commits.
Closing as superseded: feat-cmux-next already routes these verbs. status::run_args, the last handler in the cli::run chain, sends the terminal scope through terminal_talk::run before terminal_wait (in place since 17d3718, "terminal send and terminal list --agents, as CLI and Chief MCP tools"). None of the handlers between agents and status match terminal.
Evidence: this PR's red-first test (terminal_agent_list_and_send_reach_their_cli_handlers, f5d4929), cherry-picked onto feat-cmux-next with no routing change, passes on the fleet Linux pool (cargo test -p cmux-tui --test cli_audit terminal_agent_list_and_send: 1 passed). The new run_if_requested would add a second entry point for the same verbs that could drift from the first. If the binary-level test is wanted as a guard, it can land on its own.
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
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.
What changes
cmux terminal list --agentsandcmux terminal <id> send --text ...are implemented incli/terminal_talk.rs, but the maincmuxdispatcher never calls that module'srunhandler. The existing MCP toolsagents_terminal_listandagents_terminal_sendreach it directly. An agent following the advertised CLI examples therefore falls into the generic resource parser instead.This PR routes just those two terminal-agent verbs to their existing owner before generic command parsing, including the
termalias. All other terminal commands and--helpkeep their previous routing. It adds a subprocess regression that checks the shipped binary reaches the specialistsendandlist --agentsargument validators and that terminal help still succeeds.First change is a test-only commit, then the two-file routing fix. No new execution engine or API.
Changelog
cmux terminal list --agentsandcmux terminal <id> sendreach the existing agent-terminal handlers.Observed / Not run
Observed (source/diff inspection):
feat-cmux-nextat07088897284b6637a4ddb5763e06ca1601d4aae2, current source and exact GitHub compare ofb7a5371a819a0d7fa89191296ee2efa022dc41ffvs base. The diff contains one dispatcher line, one narrow router and one regression test (three files, +40/-0). Other terminal verbs retain the normal parser. Issue background: SW-10, CLI parity #23026.Not run: Rust builds,
cargo test, live terminal-agent send, hosted verification and platform CI. This chat's environment has read/write GitHub access but no Rust compiler, cmux checkout, or hosted runner. The test-first commit was authored before the fix; its expected red result is inferred, not observed. Keep this PR draft pending a focused hosted test on the exact head and review.Suggested focused verification:
./scripts/verify-cmux-tui-hosted.sh --filter terminal_agent_list_and_send_reach_their_cli_handlerson an approved cmux Testbox; thencargo test -p cmux-tui terminal_talkon the hosted runner. Review the fix on the pushed SHA.Out of scope: durable whole-send retry IDs, separately documented at #23026.
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes
cmux terminal list --agentsandcmux terminal <id> sendfalling into the generic resource parser instead of reaching the existing terminal-agent CLI handlers.termalias) toterminal_talk's parser before generic command parsing; all other terminal commands and--helpkeep their previous routing.sendandlist --agentsand that terminal help still succeeds.Written for commit b7a5371. Summary will update on new commits.