Swarm v0.5.0
The drive release: Swarm doesn't just watch agents now — it starts them, in a claimed worktree, and brokers what they're allowed to do. Plus the coordination primitives that make an autonomous run safe to leave alone: leases that renew themselves, gates that gate, and a handoff the next session reads on its own.
Added
swarm run— spawn an agent on a task.swarm run --task login-form --prompt "…"claims the task and the daemon startsclaude -pin its worktree with stream-json on both ends. Steer it withswarm run send, stop it withswarm run stop(stdin closed, then the process registry's pid-based TERM/KILL — never by pattern), list withswarm run ls. The session shows in Fleet as ▶ spawned and is ingested like any other; every finished turn is arun.resultevent with cost and turns (M3.1).- Run from the dashboard — Ready (or held) task rows on the Board get a Run action: a drawer with the prompt prefilled from the task, permission mode, model and max turns (⌘⏎ to submit). The spawned session opens with a stdin box to steer it and a Stop button (M3.3).
- Permission broker — a
swarm runagent's tool-permission prompts go through the same rules as your interactive sessions: a ruledenyauto-denies with the reason, an unflagged tool auto-allows so the agent can make progress, and anything the rules markaskis held and surfaced on the session as an Allow / Deny card. No blocking on a terminal you can't see. Uses--permission-prompt-tool stdio;POST /v1/runs/:id/permissions/:reqId(M3.2). - Leases renew themselves. A session working inside a claimed worktree extends the lease on any activity (hook or transcript growth) once it is past half-way — no more
swarm renewin a long session. Expired leases whose worktree still holds uncommitted or unpushed work are marked Orphaned within a minute and open anorphaned_claimincident; nothing is removed automatically (M1.2). - Handoffs, injected on start —
swarm handoff <task> --done … --remaining … [--files] [--verify](orswarm_handoff) records what the last holder leaves;swarm resume/swarm_resumereads it. The next session that starts inside that task's worktree gets it automatically asSessionStartcontext, along with what it holds and the lease left, gate status, held resources, and the repo's rule modes (M1.3). - Gates — verification runs recorded against a task:
swarm gate record login-form review pass --rubric "tests green, error paths read"(orswarm_gate_record). A run without a rubric is rejected; the latest run per gate decides; failed runs are never deleted and open agate_failedincident..swarm.toml [gates] required = ["review"]declares what every task must pass; the Board's Tasks grid shows ✓ / ✗ / — per gate and a Recent gates section lists the runs (M2.2). - The MCP tools finally connect.
swarm_status,swarm_claim,swarm_next_task,swarm_handoff,swarm_gate_record,swarm_acquire_resourceand the rest are reachable from Claude Code — see the fix below. - Dashboard deep links (
?view=board&project=<id>&session=<id>) and a screenshot carousel with a lightbox on the website;tools/screens.tsre-captures the shots with Playwright at 2×.
Fixed
- Swarm's MCP tools were never reachable.
swarm installwrotemcpServers.swarminto~/.claude/settings.json, which Claude Code ignores — user-scope MCP servers live in~/.claude.json(whatclaude mcp add -s useredits). Install now registers there (and cleans the stale settings.json entry);claude mcp listshowsswarm ✔ Connected. Re-runswarm installafter upgrading. - The daemon reads global config from where its state lives.
[rules]/[gates]/[tasks]in~/.swarm/config.tomlare resolved against the daemon's home (SWARM_HOME), matching the DB and logs — spawned runs, which execute in a worktree without the repo's.swarm.toml, still see machine-wide rules.
Install: bunx @ra3orblade/swarm setup · Docs: https://getswarm.vercel.app/docs/ · Changelog: https://getswarm.vercel.app/changelog