cmux mcp: terminals by tab or pane, waits on output, named missing fields, 'runs in cmux' (tool-evals round 3)
Summary
This is round 3 of the cmux MCP tool-eval hill climb. Round 2 (#28085) is merged, and this branch now contains feat-cmux-next (781b021). Every change below comes from an error seen in the eval panels, in tests/tool-evals.
cmux MCP (cmux-tui/crates/cmux-tui/src/cli/mcp*)
- A terminal named by its tab or pane.
terminal: "<tab name>",terminal: "tab_…"andterminal: "pane_…"now act on that tab's terminal, or on the terminal of the pane's shown tab.- A plain name resolves through
tab_list, in the call's session or the<session>:the name carries. It is used only when exactly one tab has that name. - A name given with a pane, screen or workspace resolves through
tab_get.
- A plain name resolves through
- Waits match output, not the typed command. When a
terminal_waitpattern also matches the command this server just typed in that terminal, the server waits for the pattern at the start of an output line. The result carries a note about the change. Before,cmd; echo DONEfollowed by a wait forDONEmatched the typed line at once. workspace_createholds a terminal by default. With noinitial_content, the new workspace holds a terminal, ascmux workspace createdoes. The field was required over MCP.- Missing fields are named. When a required field is missing, the error now names every missing field and its values. It used to say only "required parameter is missing".
- The instructions say the chat runs in cmux. The instructions and the
cmux_execdescription now say: a terminal, tab or workspace that the person asks for is a cmux one, made with these tools and not in the agent's own shell. GPT 6 Astra ran commands in its own shell. - Tool sheet text:
terminal_waitmatches the output line.- Split the pane for two terminals "side by side".
pane: "current"is the chat's own pane, not the right column.
cmux CLI (cli.rs): an old command, such as rename-workspace, workspace-action, list-workspaces, new-surface, new-pane or send, now prints the resource command to use.
cmux-tui-core (browser_providers.rs): the "no browser engine" error now tells the agent to stop and to ask the person to open the session in the cmux app. The old text said "launch cmux-browser", and agents then looked for other sessions' sockets.
Size: 8 files, about +400/−30 lines, including tests.
Changelog
Changed: cmux MCP finds a terminal by its tab or pane, waits for a command's output and not its echo, names missing fields, and tells agents that terminals and workspaces are made in cmux. Old cmux CLI commands now name their new form.
Testing
These tests run on the rbx builder at each commit. The results here are at 641e9d7, the merged branch:
cargo test -p cmux-tui --lib -- cli::mcp cli::beside: 151 passed.cargo test -p cmux-tui --lib -- upstream: 18 passed. This includes the 2048-character instructions check.cargo test -p cmux-tui --test cli -- caller_selector: 4 passed.cargo test -p cmux-tui --test cmux_surface -- classic: 2 passed. This includesa_classic_verb_names_its_resource_command, which runs the real binary.cargo test -p cmux-tui-core --lib browser_engine: 4 passed.- clippy with
-D warnings: 0 warnings.
Eval panel on 3756b59 (34 headless cases, 2 samples each, all agents under the live guard, daemons on rbx):
| Model | m1 (#28085) | r3m |
|---|---|---|
| Opus 5.5 | 34 | 34 (68/68) |
| Sonnet 5.5 | 34 | 34 (68/68) |
| Haiku 5.5 | 34 | 34 (68/68) |
| DeepSeek v4.1-flash | 33 | 34 |
| Gemini 4 Argon | 33 | 34 |
| Grok 4.7 | 31 | 34 |
| Kimi K3.1 Pro | 33 | 34 |
| Qwen 3.8 Max | 31 | 33 |
| MiniMax M3.1 Flash | 33 | 32 |
| Mistral Large 4 | 32 | 32 |
| GLM 5.3 FlashX | 28 | 32 |
| GLM 5.3 Prime | 30 | 31 |
Claude passes 204/204 samples, and the OpenRouter models pass 602/612.
Observed / Not run
- Observed: all of the above. Each new test fails without its change; the reviews confirmed this.
- Not run yet: the full panel on the merged branch is running. GPT 6 Astra through
codex app-serveris running on 54ad3fc. Results will be posted as a comment. - Not run: the app tier (browser, Markdown) and
--surface all/cli.
Reviews
Every commit had a correctness review by a subagent. Findings and fixes:
- Tab-name lookup:
- 855196f..091d22e:
cmux tab createwas suggested, which is not valid. Nowtab create terminal(33171b8). - 7bf826c: two doc comments were on the wrong items (0e22b3b). Known trade-off: a wait for text in the middle of an output line can now time out. The wait is bounded, and the result notes the change.
- 3756b59..641e9d7: no blocking findings.
- Name all missing fields in one error, and add the "runs in cmux" rule to the instructions without code mode (d6c269c).
- Not changed: a newer daemon that makes a field optional is still refused by an older server.
- Merge (781b021): nothing was lost from the base. The only base change in these files was
mod upstream_listing;from #27976.