Claude Code. Any Model. The most powerful AI coding agent now speaks every language.
feat(mcp): list resize in the contract capabilities
Jack Rudenkoab2334508ea8
diff --git a/ai-docs/architecture/mcp-sessions.md b/ai-docs/architecture/mcp-sessions.mdindex 330fb1a1..de782462 100644--- a/ai-docs/architecture/mcp-sessions.md+++ b/ai-docs/architecture/mcp-sessions.md@@ -51,7 +51,7 @@ A refusal is an `invalid_args` error before any credential work. `create_sessionargument becomes `--agent <name>`; an unknown name is refused by the child itself (FAILED`agent_rejected`), so claudish runs no agent probe of its own.-**A session is created in this order**: the flag check, `assertMagmuxAvailable` (magmux ≥ 0.14.0,+**A session is created in this order**: the flag check, `assertMagmuxAvailable` (magmux ≥ 0.15.0,else `Error: magmux_unavailable: …`), credential pre-hydration, the parent session read, a panereservation (`Error: pane_limit: …` past 48 live panes per user), `prompt.md`, `spawn.json`, then thepane. `create_session` returns `{session_id, state}` once the pane exists, without waiting for boot.@@ -334,7 +334,9 @@ pending?}`: the size actually set after clamping to 80–500 × 24–200, and thredraw at that size has landed, so a capture with that `since_seq` already sees it. Their errorsare a JSON `ContractError`; `resize` is the only verb that emits the two codes it added,`resize_unsupported` (the magmux has no `resize` op) and `delivery_unavailable` (magmux refused, or-the pane is unreachable). `team` gains the same verbs as modes (`list`, `status`, `capture`,+the pane is unreachable). `capabilities` lists `resize` since the pin moved to magmux 0.15.0, the+first release with the op; the per-pane check of magmux's `verbs` stays as the defence against a+binary that passes the version floor but lacks the op. `team` gains the same verbs as modes (`list`, `status`, `capture`,`cancel`, `resize`). Why the size is the viewer's and what resizing costs the screen heuristics:`pane-session.md`, "Terminal size".diff --git a/docs/usage/mcp-server.md b/docs/usage/mcp-server.mdindex ddfd85d1..1ef05d3c 100644--- a/docs/usage/mcp-server.md+++ b/docs/usage/mcp-server.md@@ -13,7 +13,7 @@ The server exposes **15 tools** across four groups: low-level (3), agentic (3),Every `team` slot and every `create_session` session is a real, interactive Claude Code sessionrunning your model, inside its own headless [magmux](magmux.md) pane. That needs:-- **magmux 0.14.0 or newer.** It is bundled with the npm package on macOS and Linux; otherwise+- **magmux 0.15.0 or newer.** It is bundled with the npm package on macOS and Linux; otherwiseinstall it with `brew install MadAppGang/tap/magmux`. Without it, `team(mode:"run")`,`create_session` and the CLI's `claudish team` / `--team` refuse with`Error: magmux_unavailable: …` instead of falling back to anything else.@@ -440,8 +440,9 @@ Set a session's terminal size. The child gets a real resize signal and Claude Conew width; the next `capture_session` reports the new `cols`/`rows` under a new `seq`. Allowed inevery state, mid-turn included. When several callers resize the same session, the last one wins.-Needs a magmux new enough to resize a headless pane (MIN_MAGMUX_VERSION, the release that ships-the `resize` verb); with an older one the call answers `resize_unsupported`.+Needs magmux 0.15.0 or newer, the first release that resizes a headless pane. `list_sessions` and+`team` list `resize` in `capabilities`. If magmux lacks the `resize` verb, the call answers+`resize_unsupported`.**Parameters:**- `session_id` (required) - Session ID from `create_session`@@ -670,7 +671,7 @@ CLAUDISH_MCP_TOOLS=session OPENROUTER_API_KEY=sk-or-v1-... claudish --mcp**Check magmux** (needed by `team` and sessions):```bash-magmux --version # 0.14.0 or newer+magmux --version # 0.15.0 or newer```---@@ -683,7 +684,7 @@ magmux --version # 0.14.0 or newer**Rate limits:** OpenRouter has rate limits. Heavy parallel usage might hit them.-**Platforms:** `team` and sessions need magmux 0.14.0+ and run on macOS and Linux only; Windows is not supported for them.+**Platforms:** `team` and sessions need magmux 0.15.0+ and run on macOS and Linux only; Windows is not supported for them.---diff --git a/packages/cli/src/mcp-blackbox/channel-sessions.blackbox.test.ts b/packages/cli/src/mcp-blackbox/channel-sessions.blackbox.test.tsindex c1ef3071..ea04f019 100644--- a/packages/cli/src/mcp-blackbox/channel-sessions.blackbox.test.ts+++ b/packages/cli/src/mcp-blackbox/channel-sessions.blackbox.test.ts@@ -31,7 +31,7 @@ useBlackboxEnv();const T_TEST = 90_000;type Json = Record<string, unknown>;-const CAPABILITIES = ["list", "status", "cancel", "capture", "capture_since_seq", "capture_spans"];+const CAPABILITIES = ["list", "status", "cancel", "capture", "capture_since_seq", "capture_spans", "resize"];const SLOT_STATES = ["STARTING","RUNNING",diff --git a/packages/cli/src/mcp-blackbox/team-contract.blackbox.test.ts b/packages/cli/src/mcp-blackbox/team-contract.blackbox.test.tsindex 00e9720e..304c2b24 100644--- a/packages/cli/src/mcp-blackbox/team-contract.blackbox.test.ts+++ b/packages/cli/src/mcp-blackbox/team-contract.blackbox.test.ts@@ -34,7 +34,7 @@ type Json = Record<string, unknown>;/* ─────────────── literals from the frozen contract (§8 Types) ─────────────── */-const CAPABILITIES = ["list", "status", "cancel", "capture", "capture_since_seq", "capture_spans"];+const CAPABILITIES = ["list", "status", "cancel", "capture", "capture_since_seq", "capture_spans", "resize"];const SLOT_STATES = ["STARTING","RUNNING",diff --git a/packages/cli/src/mcp-blackbox/tool-surface.blackbox.test.ts b/packages/cli/src/mcp-blackbox/tool-surface.blackbox.test.tsindex 5c59818b..c23650ee 100644--- a/packages/cli/src/mcp-blackbox/tool-surface.blackbox.test.ts+++ b/packages/cli/src/mcp-blackbox/tool-surface.blackbox.test.ts@@ -24,7 +24,7 @@ useBlackboxEnv();type Json = Record<string, unknown>;const keys = (v: unknown): string[] => Object.keys(v as Json).sort();-const CAPABILITIES = ["list", "status", "cancel", "capture", "capture_since_seq", "capture_spans"];+const CAPABILITIES = ["list", "status", "cancel", "capture", "capture_since_seq", "capture_spans", "resize"];// REQ-15: literal sorted sets from architecture-contracts.md, not from implementation.const ALL_TOOLS = [diff --git a/packages/cli/src/pane/contract.ts b/packages/cli/src/pane/contract.tsindex 05bd3dce..cb133a20 100644--- a/packages/cli/src/pane/contract.ts+++ b/packages/cli/src/pane/contract.ts@@ -11,7 +11,7 @@export const CONTRACT_VERSION = 1;-/** v1 announces exactly these. */+/** v1 announces exactly these. `resize` is additive: it needs magmux >= 0.15.0. */export const CAPABILITIES = ["list","status",@@ -19,6 +19,7 @@ export const CAPABILITIES = ["capture","capture_since_seq","capture_spans",+ "resize",] as const;export interface ContractMeta {