Keep the user's MCP servers away from swarm harnesses, count every refusal a session met, and ask status again when a read fails
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Review of 711 against its issue (Spec) and AGENTS.md with spec §7 (Standards). - Claude Code now runs with `--strict-mcp-config` and pi with `--no-mcp` (both in the installed `--help`: Claude Code 2.1.293, pi 1.1.0). Without them, a live probe showed wren's Claude Code loading the user's `playwright` and `claude.ai Claude Docs` servers, and pi offering the user's `mcp__convex` tool: the user's accounts in a fictional contributor's harness, against the issue's anti-jobs (no credential beyond the person's token; the zero-install path is git plus the CLI). With the flags, the init line lists no MCP server and pi's tools list no MCP tool; both still print a session id and settle. Amp's own settings file and OpenCode's hidden config folder already keep the user's servers out. - `packages/config/test/swarm.test.ts` (702's dry-run row) gains the two flags: its golden string is the plan's printed start command, which these drivers produce. - The loop counted only the latest answer's refusals, but the brief tells the agent to read status and push again, so one session can push several answers before it settles. `readStatus` now returns every answer to the ask, oldest first, and `afterSettle` counts the refusals of every answer not yet judged and marks them all judged, while it still acts on the latest. - `awaitSettledOutcome` asks a failing status read again up to five times, `pollMs` apart, before the run fails (`STATUS_RETRIES`): one dropped request among a run's hundreds of reads no longer ends a contributor's run as `failed`. - Tests (`swarm-loop.test.ts`, 15 to 18): one session that pushed a refused, a refused and a landed answer gives `landed`, 1 attempt, `{OutOfScope: 1, StaleBase: 1}`; a status read that prints no envelope is asked again 5 s later and the run lands; a pi run whose last response failed (`stopReason` `error`) while pi exits 0 is `failed` with no nudge, saying why. The first two and the golden argv failed by assertion first; the pi case passed at once and was seen to fail by assertion with the `error` stop reason planted out of the parser. - Left for 799, as the builder wrote under the issue's Comments: `scripts/swarm.ts` should pass `project: options.project` to `runAgent`.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+159 added−35 removed
- tests:+98 added−2 removed
- other:+61 added−33 removed