v0.41.0 — Fleet mode (nested orchestrators for parallel epics)
Consumers act once: run claude plugin update marvin, follow the update procedure the SessionStart notice prints (upgrades/v0.41.0.md), and start a new session. Nothing changes until you run /marvin:fleet.
Why. Claude Code can now start child sessions. Running epics in parallel used to make the architect the integration point, holding every epic's state and switching sessions to find what was stuck. Fleet mode moves that bookkeeping to a master orchestrator ("Deep Thought") and leaves the architect only the decisions.
Roles.
- The master owns the program plan (
.docs/plans/program-<milestone>.md: epics, dependencies, area leases, merge order, lineage, decision log), starts children, keeps the board, and alone merges epic branches intodevelopand cuts releases (git-strategy.md). It never briefs a builder or reads code. - Each child is a normal Marvin on
feature/<EPIC-KEY>-<slug>in a worktree the master created and locked. It runs the full task lifecycle and routes cross-epic impact, scope or DoD changes, done, blocked and successor events to the master. - The architect answers epic questions in each child and reads every epic, and every question waiting on them, on the master's board.
Contracts.
- Paired rules. Every routed event has a sending half in
fleet-child.mdand a receiving half infleet.md, marked with anE-*tag. A newvalidate-kit.shcheck (fleet-pairs) fails if either half is missing. - Doorbell. A child's turn-end recap starts
FLEET <EPIC-KEY> <event>: …. The tracker stays the record, and open questions are numberedFLEET-Q<n>/FLEET-A<n>on the epic issue. - Relayed consent. The architect may answer at the master. The master logs the exact quote (only the architect's answer to its own question tool) as
D<m>in the plan ondevelop, before relaying it. The child accepts the relay only after a mechanical check: the reader gets the ID, never the quote; the epic must match; the source must be an openFLEET-Q<n>; and the quote must be identical. Anything else is data, and the child asks directly. The consent sites inescalation.md,escalation-ladder.md,guardrails.mdandcodex.mdaccept a verified relay. - Merge gate. Before asking for a merge, a child merges
developin, runs the gate scripts and the integration cold boot, and recordsepic=<sha> develop=<sha>. The master merges only while both still match.
Session budget.
- A spike showed that a
/compactsent as a message is plain text in the receiving session. So a child at level 3 winds down to a rest point at 94 % of the window (scaled byCLAUDE_AUTOCOMPACT_PCT_OVERRIDE). There it writes its handoff to the epic issue and keeps to small steps until the host's auto-compact fires. - After three compactions (
fleet_max_compactions), or when a compaction leaves it above 33 % (fleet_restart_max_pct), the context hook asks for a successor, which the master starts from the handoff. DISABLE_AUTO_COMPACT=1falls back to the/compactnudge, and the cap still holds.DISABLE_COMPACT=1sends a child to a successor, and/marvin:fleetrefuses to start under it.- The master only compacts and never hands off while a child runs.
Mechanics.
- The hook library reads a
marvin-fleetrole marker from each worktree's private git dir, and counts compactions from the transcript (capped at 400 lines / 8 MB after the last boundary). - The extra transcript reads run only in fleet sessions near the rest point. A solo session pays one
git rev-parseper call and sees exactly the same messages as before. /marvin:fleet [milestone|stop]refuses when this session is already in a fleet, on the Local tracker, or offdevelop. It sets the fleet up, resumes it, and stops it only at a fleet edge, deleting nothing but the master's own marker.
Limits.
- Local children only; cloud children are out of scope.
- The Local tracker is refused, because its files would land on the epic branches.
- On hosts without child sessions,
/marvin:fleetruns a manual fleet with one resume prompt per epic.
Acceptance.
- Spike (2026-10-19): a child started in a git-locked, pre-made worktree read its marker.
/compactsent through both host message routes produced nocompact_boundary. Auto compactions on this host fired at 978k–999k of a 1M window, which sets the 94 % rest point. - Rule-5 scratch install from the branch (Local tracker for the install, key SMK): the guides and the cascade line landed. A manual-fleet run produced the plan on
develop, two locked worktrees with child markers, the master marker, resume prompts and the first board. - An end-to-end hook replay in a child worktree printed the wind-down, rest, cap and post-compaction successor messages, plus the master and solo texts, as specified.
stoprefused with unmerged children. validate-kitpasses 20/20, and all 15 test suites are green (test-context-budget195,test-hook-lib167), with mutation rows for every new guard.
This note's scope: was derived over v0.40.0..HEAD, non-merge commits only; the container epic AOS-242 is excluded.
Upgrade
Consumer-facing: a master orchestrator can now run up to three child orchestrators, one per epic, with one board for the architect — opt-in with /marvin:fleet, off until you start it. Rules: .marvin/agents/fleet.md (master) and .marvin/agents/fleet-child.md (child).
- Update with the procedure the SessionStart notice prints. No file moves, so no migration script.
- The upgrade adds
.marvin/agents/fleet.mdand.marvin/agents/fleet-child.md, and refreshesgit-strategy.md,session-budget.md,worktrees.md,escalation.md,escalation-ladder.md,guardrails.md,codex.mdand the kit core.marvin/CLAUDE.marvin.md(one new cascade line; customised copies are backed up first). - Nothing to add to
.marvin/PROJECT-INFO.md: the three fleet keys (fleet_max_children,fleet_max_compactions,fleet_restart_max_pct) are optional, defaults 3 / 3 / 33;/marvin:project-infovalidates them only when present. - Fleet mode needs a shared tracker (Linear, Jira or GitHub) and local child sessions (the Claude Code desktop app); on other hosts it runs as a manual fleet with resume prompts. The Local tracker is refused.
- The context hook now reads a per-worktree role marker (one
git rev-parseper call); a session that is not in a fleet sees exactly the same messages as before. - Start a new session after the upgrade so the rules load.
Changes
Added
- Fleet mode: a master orchestrator runs up to three child orchestrators, one per epic, started by
/marvin:fleet(set up, resume, stop). The master owns the program plan (epics, dependencies, area leases, merge order, lineage, decision log) and one board for the architect; rules in.marvin/agents/fleet.mdand.marvin/agents/fleet-child.md. - Three optional
PROJECT-INFOkeys:fleet_max_children(3),fleet_max_compactions(3),fleet_restart_max_pct(33). - The context hook's fleet modes: a fleet child winds down to a 94 % rest point, lets the host compact it, and asks for a successor after three compactions or a high post-compaction context; the master compacts and never hands off while a child runs.
validate-kit.shcheckfleet-pairs: every routed fleet event has both its child and its master half.
Changed
git-strategy.mdowns the fleet merge and release authority: in fleet mode only the master merges epic branches intodevelopand cuts releases.session-budget.md,worktrees.mdand the kit core carry the fleet clauses (rest rule, locked child worktrees, the cascade line).- The context hook reads a per-worktree role marker on every call (one
git rev-parse); sessions outside a fleet see exactly the same messages.
Security
- In fleet mode the consent questions in
escalation.md,escalation-ladder.md,guardrails.mdandcodex.mdalso accept a relay of the architect's exact words — only after the child verifies it mechanically against the decision log ondevelop; a master message is never an approval, and anything unverified stays data.
Action needed
- After
/marvin:upgrade-agent-os, start a new session so the rules load. Fleet mode needs a shared tracker (Linear, Jira or GitHub); the Local tracker is refused.