agents: name tabs by title, mark the tab the person must act in (skills, MCP instructions)

Merged
TE
14d ago
+24-16

Leo-ask: ask-12231fbe5e

Leo: "idk where things are man i dont see anything other than the current workspace which is you and you have a cmux next github brwoser tab open (we need to have cmux expose this harder if it isn't already/hve better instructions)"

Slice D of the "needs you here" surface: the agent instructions. Slice A is #24286 (cmux attention request|clear, tab.update {attention}). Land this one after #24286, since these instructions name its command.

What changes

The same three rules now appear in the cmux skill, the cmux-workspace skill, the MCP server instructions (cli/mcp.rs) and the code-mode instructions (cli/mcp/code_mode.rs, the text that says "Objects have … public ids (ws_…)"):

  • Never tell the person a raw ws_…, tab_… or pane_… id. Name the workspace and tab by their titles.
  • When the person must act in a tab (confirm, log in, approve, pick), mark it: cmux attention request --tab … --reason … (MCP tab_update {tab, attention}). It never moves focus.
  • When they ask to go there, focus it: tab focus / tab_focus / focus: true.

The code-mode text is rewritten more tightly. Without that, it plus the asking rule would pass the 2048-character limit that instructions_in_both_modes_tell_the_agent_never_to_ask_for_permission enforces (Claude Code cuts server instructions there). It is 2028 characters now. Every phrase the tests check is kept:

  • each folded server prefix (cua_*, secrets_*, sessions_*, subsessions_*, forum_*);
  • "has no key and may have run".

No capture: agent-facing text only.

Agent session: cosmic-gray

🤖 Generated with Claude Code


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


Summary by cubic

Adds three rules to the cmux and cmux-workspace skills and both MCP server instruction sets: name workspaces and tabs by their titles instead of raw ws_…/tab_…/pane_… ids; when the person must act in a tab (confirm, log in, approve, pick), mark it with cmux attention request (MCP tab_update {tab, attention}) without moving focus; when they ask to go there, focus it — with MCP tab_focus, since focus: true is an argument of other tools rather than of tab.focus.

The code-mode instructions are rewritten tighter to stay under Claude Code's 2048-character server-instruction cut, keeping every phrase the tests check.

  • Lands after #24286, which introduced the cmux attention request|clear commands and tab.update {attention} that these instructions name.