Claude Code. Any Model. The most powerful AI coding agent now speaks every language.
refactor(mcp): read the magmux minimum in help text from MIN_MAGMUX_VERSION
Jack Rudenko50850fab6173
diff --git a/packages/cli/src/mcp-server.ts b/packages/cli/src/mcp-server.tsindex f4d1f33a..b096d036 100644--- a/packages/cli/src/mcp-server.ts+++ b/packages/cli/src/mcp-server.ts@@ -44,6 +44,7 @@ import { inMcpSession } from "./pane/child-env.js";import {ContractErrorException,type FailureReason,+ MIN_MAGMUX_VERSION,SLOT_STATES,type SlotState,TERMINAL_STATES,@@ -459,7 +460,7 @@ export const NEXT_STEP: Record<FailureReason, string> = {"the child never read all of its task file — check that its agent or tool flags allow " +"Read and that the model can call tools; `what` says which lines were read",child_exited: "read the evidence screen, then retry or drop the model",- pane_lost: "magmux died — check `magmux --version` ≥ 0.15.1 and retry",+ pane_lost: `magmux died — check \`magmux --version\` ≥ ${MIN_MAGMUX_VERSION} and retry`,blocked:"the child asked a question team cannot answer — make the prompt self-contained or use " +"create_session",@@ -1950,7 +1951,7 @@ function defineTools(sessionManager: SessionManager, nested: boolean): ToolDefin"it in its own headless magmux pane. Returns at once with state STARTING; nothing is " +"pushed while it runs: poll list_sessions (about once every 10 s) for its state, then " +"call get_output once it is COMPLETED. With a prompt it is one-shot (it ends when that turn " +- "settles); without one it is interactive and waits for send_input. Needs magmux >= 0.15.1 " ++ `settles); without one it is interactive and waits for send_input. Needs magmux >= ${MIN_MAGMUX_VERSION} ` +"(darwin and linux).",inputSchema: {type: "object",diff --git a/packages/cli/src/pane/index.ts b/packages/cli/src/pane/index.tsindex e5857da8..5e88d0fc 100644--- a/packages/cli/src/pane/index.ts+++ b/packages/cli/src/pane/index.ts@@ -21,6 +21,7 @@ export {assertMagmuxAvailable,flagsRemoveRead,MagmuxUnavailableError,+ MIN_MAGMUX_VERSION,SOCK_ROOT,sockRootFor,} from "./pane-launch.js";diff --git a/packages/cli/src/team-cli.ts b/packages/cli/src/team-cli.tsindex 22db32c9..e9834807 100644--- a/packages/cli/src/team-cli.ts+++ b/packages/cli/src/team-cli.ts@@ -1,7 +1,7 @@import { readFileSync } from "node:fs";import { join } from "node:path";import { assertNotNested } from "./pane/child-env.js";-import { installPaneShutdownHooks } from "./pane/index.js";+import { MIN_MAGMUX_VERSION, installPaneShutdownHooks } from "./pane/index.js";import {type TeamRunOptions,type TeamStatus,@@ -88,7 +88,7 @@ Options (run / run-and-judge):--timeout <secs> Grid modes only: magmux's own per-pane timeout (default: 300).json mode has no deadline — nothing kills a working model.json mode runs each model as an interactive pane in a headless- magmux (>= 0.15.1; darwin and linux).+ magmux (>= ${MIN_MAGMUX_VERSION}; darwin and linux).--grid Show all models in a magmux grid with live output + status bar--mode <m> run only: json (default, panes), default (the grid, as --grid)or interactive (as --interactive)diff --git a/packages/cli/src/team-orchestrator.ts b/packages/cli/src/team-orchestrator.tsindex e4429bcc..7712d029 100644--- a/packages/cli/src/team-orchestrator.ts+++ b/packages/cli/src/team-orchestrator.ts@@ -1139,7 +1139,7 @@ function assertValidRequirePattern(pattern: string | undefined): void {/*** The pre-spawn refusals of a team run, in the order the MCP `run` handler applies them* BEFORE `setupSession` writes anything (§4.1): the caller's flags (D18), a prompt that- * cannot be delivered with those flags (§2.3 rule 4), magmux present (≥ 0.15.1), no+ * cannot be delivered with those flags (§2.3 rule 4), magmux present (≥ `MIN_MAGMUX_VERSION`), no* ACTIVE run at the path, and room under the per-user pane limit. Each throws an Error* whose message starts with its code (`invalid_args:`, `magmux_unavailable:`,* `pane_limit:`). `startModels` repeats them, so the CLI gets the same checks.