Skip to content

fix(cli): wire existing terminal-agent list and send commands - #29207

Closed
teamleaderleo wants to merge 3 commits into
feat-cmux-nextfrom
sw10/terminal-talk-cli-route-20261031
Closed

teamleaderleo wants to merge 3 commits into
feat-cmux-nextfrom
sw10/terminal-talk-cli-route-20261031

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

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.


View with [code]smith Autofix with [code]smith
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.

View guided diff Turn on auto-fix

@blacksmith-sh

blacksmith-sh Bot commented Oct 31, 2026

Copy link
Copy Markdown

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)/
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)
View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)/
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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 branch was previously deployed

3 inactive deployments
ci-routing-agent — b7a5371a Deployed Oct 31, 2026 by github-actions[bot] via cmux-next macOS placement #53745
artifacts — b7a5371a Deployed Oct 31, 2026 by teamleaderleo via publish tree-addressed cmux-tui #88925
sentry-dsyms — b7a5371a Deployed Oct 31, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #88925
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant