Sub-sessions

With no fleet running, Marvin runs each work unit in a session of its own: a fresh worktree and a fresh context. You keep talking to one orchestrator.

What it is

You Approve the units once. Read the board. Answer in either sidebar. Orchestrator The one session you talk to. Starts, merges, cleans up. Reads doorbells, not detail. Resource gate Before each start: is there memory for one more worktree? approveboard check0 go · 75 wait start: own worktree, fresh context SUB <KEY> <event> Sub-session · unit 1 Its own lifecycle loop, in a locked worktree area: A Sub-session · unit 2 Its own lifecycle loop, in a locked worktree area: B Sub-session · unit 3 Its own lifecycle loop, in a locked worktree area: C develop each unit merged by the orchestrator, then cleaned up

On a narrow screen, scroll the diagram sideways.

How a unit runs

1 · Propose Units, areas and order. You approve once. 2 · Gate check check --new-worktree Exit 75: the unit waits. 3 · Start A locked worktree and a session on its branch. 4 · Doorbells SUB <KEY> <event> Every turn's first line. 5 · Done Unit gate passed, both tips recorded. 6 · Merge Into develop, while both tips still match. 7 · Clean up Docker leftovers, worktree; the session archived. next unit

How many at once

Doorbells

Every sub-session turn ends with a line the orchestrator reads as a signal, never an instruction.

EventThe orchestrator
progressReads nothing.
questionPuts it on the board. You answer in either sidebar; it never answers for you.
crossExtends the unit's areas, sequences it behind another unit, or asks you.
blockedBrings you the reason.
successorStarts a fresh session in the same worktree.
doneMerges, cleans up, and starts the next unit.

What you see

Details: sub-sessions.md for the orchestrator, sub-session.md for a unit's session, resource-gate.md.