← All posts

Meshfleet v0.8.0 — Retry, recovery, and routing fan-out

Auto-retry transient failures, recover after crashes, and fan out work to the N best-scoring agents. 134 tests, MIT, local-first.

Meshfleet v0.8.0 is live. The headline: agents that fail transiently now auto-retry, crashed fleets recover cleanly, and route_work can fan out to multiple specialists.

What changed

Automatic retry with exponential backoff

When an agent’s process exits non-zero, hits the heartbeat watchdog, times out, or fails to spawn, it now gets respawned with 1s/2s/4s + ±20% jitter — up to 3 attempts. After 3 failures the agent is marked permanently failed with a clear ledger entry (agent_failed_permanent). Clean exits (code 0) skip retry entirely.

Configuration: AGENT_MESH_RETRY_BASE_MS (default 1000). Each retry is logged via appendEvent("agent_retry_scheduled", ...), so the event log gives you a full timeline.

Partial result recovery

If the MCP server crashes mid-fleet, the next start calls recoverInterruptedAgents() which transitions any agent left in running state to a new interrupted status with a clear error message. Fleet status is finally truthful after a crash.

The new status value ("interrupted") joins the existing pending | running | complete | failed set.

Ledger schema versioning

The JSON ledger now stamps schema_version: 1 on every write. migrateLedger() upgrades v0 ledgers (no field) on load. Missing collections default to empty objects so partial/corrupt files don’t crash the server.

This unblocks v1.0 — when we add fields, old ledgers upgrade automatically.

route_work top_n

route_work(description, top_n?) — default top_n=1 preserves backward compatibility. Pass a larger number to fan out work to the N best-scoring agents. Sort is by score (desc) then agent_id (asc) for deterministic ordering on ties.

npm publish ready

npm pack --dry-run produces a clean 29.3 kB tarball (16 files: dist/, docs, LICENSE, package.json). prepublishOnly runs build + tests. Once npm publish is run, install becomes:

npm install -g agent-mesh

Why this matters

The first three months of Meshfleet were about proving the architecture: spawn fleets, route work, let agents collaborate. v0.8.0 is about making that reliable.

Retry handles the most common failure (transient API hiccups). Recovery handles the worst case (the whole mesh crashed). Schema versioning handles evolution. Fan-out routing handles real workloads where multiple specialists need the same task.

The numbers

  • 134 tests across 12 files, all passing
  • 13 MCP tools (spawn_fleet, send_message, route_work, subscribe_inbox, set_fleet_timeout, etc.)
  • 3 OS × 3 Node CI matrix green
  • 29.3 kB npm tarball
  • MIT licensed
  • Zero runtime telemetry

Try it

git clone https://github.com/johnmwhitman/agent-mesh.git \
  ~/.config/opencode/mcp-servers/agent-mesh
cd ~/.config/opencode/mcp-servers/agent-mesh
npm install && npm run build

Add to ~/.config/opencode/opencode.jsonc and restart OpenCode. Or wait for npm install -g agent-mesh once the package is published.

Full release notes: GitHub release ROADMAP: ROADMAP.md

Built this. Open-sourced it. Would love your feedback.