dispatch: add cascade mode for bounded recursive fan-out #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a
cascadedispatch mode: a detached worker allowed to recursively dispatch its own headless/cascade sub-workers, bounded by a hard depth budget.Follow-on to coilysiren/coily#130 (the consult-posture work). Same axis, faster end: where
consultraised the interruption budget,cascaderaises the autonomy budget.The problem
Mass migrations require branching trees of dependent work. Telling a single headless worker to "migrate repos A, B, C, D" makes it determine the scope is too large and kick back. Doing the decomposition by hand means manually
coily dispatch headless-ing 12+ sub-tasks. There was no mode that could fan the work out itself.What changed
cascadesubverb on the detached (headless) surface. Spawns exactly like headless (detachedclaude -p, log file, returns immediately), but with a prompt posture that authorizes and instructs recursive decomposition: assess scope, and if too large, file sub-issues per slice and dispatch a worker against each.coily dispatch headless(do the work, close their own issue). Slices that still need splitting getcoily dispatch cascadesub-trees.--depth, default 3, max 5) prevents fork bombs. dispatch stampsCOILY_DISPATCH_CASCADE_DEPTHinto each spawned child's environment, decrements it on every nested cascade, and refuses to spawn a cascade past the floor (budget 1 = headless leaves or direct work only). headless children inherit0, so a leaf cannot start a cascade beneath itself. Only a top-level (non-dispatched) invocation starts a fresh budget.runDetachedhelper so headless and cascade share spawn / trust / meta / dry-run.Design decisions (settled with Kai)
cascade(evokes the dependent-work tree flowing down through levels).--dangerously-skip-permissions: the worker still runs under the lockdown and audit. The autonomy is the prompt posture plus permission to callcoily dispatch(already allowlisted viaBash(coily:*)).