cmux mcp: agents open in their own workspace, Chief in the task's workspace; workspace evals

LA
4d ago
+321-31

Summary

Agents open their splits, files, diffs and pages in their own workspace, and Chief opens a task's things in that task's workspace (Lawrence 2026-11-02: "when there are a ton of workspaces, agents ... should open it in the same workspace ... careful with chief as well"). Also the r17 instruction changes (panes and columns are cmux objects; open names its pane). It contains #29080 until that lands.

  • Untargeted viewers go beside the caller. An MCP app_file_open, diff viewer or tab_new_browser call with no target went to the app's focused pane, which with many workspaces is often another workspace. It now goes through open's placement beside the caller, when the app places the caller in a pane (db021ca, c1ee0b7). A pathless diff names the chat's folder.
  • Chief: "workspace of the task". In a Chief turn (CMUX_CALLER_HOME_CHAT=1), the open and cmux_exec descriptions say that a request with a workspace's name in it, or about its project, agent, server or files, opens in that workspace in the background, and Chief names the workspace. Only a request with no workspace opens beside Chief. The rule is not in the instructions, which would pass 2048 characters with it (30a49d8, ec6f6b4, a82b64b, af0e5f6; the rule starts each description).
  • Evals. tests/tool-evals/cases/workspace.ndjson: 17 cases in a session of 6 workspaces where the person looks at another one (terminals, splits, files, diffs, sites, browser tabs, an asked-for other workspace, and Chief docked left). New checks stayed_in_workspace and new_panes. The stand-in app now opens an untargeted action in the focused pane and refuses unknown arguments, as the app does (it had hidden the leak).

Results (Claude CLI, MCP code mode, 2 samples per case, median per task)

RunModelPassLeaksTokensSeconds
Before (r17d, 14 cases)Opus 5.527/28077k18.6
Before (r17d, 14 cases)Sonnet 5.524/28057k10.8
Before (r17d, 3 Chief task cases)Opus 5.54/6292k27.8
Before (r17d, 3 Chief task cases)Sonnet 5.52/6457k17.7
After (r18e, 17 cases)Opus 5.534/34078k20.5
After (r18e, 17 cases)Sonnet 5.531/34257k12.9
After (r18f, 7 Chief cases)Opus 5.514/14078k14.9
After (r18g = head af0e5f6, 7 Chief cases)Opus 5.514/14067k16.7
After (r18f, 7 Chief cases)Sonnet 5.514/14058k12.8
After (r18g = head af0e5f6, 7 Chief cases)Sonnet 5.514/14077k13.8

Changelog

  • Changed: an agent's untargeted file, diff or page opens beside its chat in its own workspace, and Chief opens a task's things in that task's workspace.

Observed / Not run

  • Red (rbx cargo test --locked -p cmux-tui --lib -- <filter>): e7bda04 an_untargeted_viewer_from_a_chat_opens_beside_it failed; effd0f1 the Chief test failed; 8ced5fd chief_tools_open_in_the_workspace_of_the_task, an_untargeted_viewer_from_a_chat_opens_beside_it and an_untargeted_diff_names_the_chat_folder failed.
  • Red at 14b2987: chief_tools_open_in_the_workspace_of_the_task and an_untargeted_diff_names_the_chat_folder failed.
  • Green at af0e5f6 (and before at a82b64b): cli::mcp cli::beside 193 passed; --test cli caller_selector 4 passed; clippy -D warnings 0; cmux_surface classic and browser_engine passed.
  • Observed: the eval results above (stand-in app, daemons and MCP on rbx).
  • Not run: GPT 6 Astra and GPT 6.1 Sol (Codex through the subrouter fails, manaflow-ai/subrouter#640). A tagged app dogfood. The app's own placement for a plain terminal that runs cmux file open with no target (Swift, ControlRouter.placeBesideCaller) is not changed here.