You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many finished delegated children stay unarchived, especially ones with no issue or PR, and implementors too.
Step 1 (this issue): assess the repositories and threads and find why. Which children stay, what the auto-archive or settle rule expects, and where it misses.
Findings (read-only, origin/main cc2707b, live DB 2026-11-28 00:42 UTC)
Scale: 85 finished, unarchived delegated children across 7 projects (25 implementors; 67 with only an issue link, 9 with both, 8 with neither), plus 11 finished native subagents. Every one has an unarchived, unsettled parent, and 79 of those parents are idle.
Cause 1, the sweep waits for the parent.getSettlementCandidates (apps/server/src/orchestration-v2/ProjectionStore.ts:9091-9146) skips any subagent whose parent is still open. An orchestrator stays open for days, so its finished children never settle. A completed parent turn or a delivered child result doesn't count.
Cause 2, merge cleanup is off.workflows/merge-cleanup.ts archives a PR's creator child after merge, but workflowsEnabled defaults to false and the live install has no workflow runs.
Fix (decided)
Add one eligibility case to the existing settlement sweep. A local delegated child, or a native subagent, settles when:
its parent is idle;
its task is terminal;
its result was acknowledged, delivered or disposed.
Recheck these under the existing dispatch lock. Defer for:
queued runs, pending result delivery, open requests, descendant work;
active terminals, checkpoint capture, restart continuations;
open or unresolved PRs;
autoArchiveDisabled (explicit unarchive).
Then reuse the existing settle-and-archive path and its periodic sweep, so old rows clear too.
Tests: an acknowledged child with no PR under an idle, open parent archives. These stay open: a child with pending delivery, one with a queued follow-up, one with an open PR, and one the owner unarchived.
Activity
tannerpolley commentedon Nov 28, 2026
Findings (read-only, origin/main cc2707b, live DB 2026-11-28 00:42 UTC)
getSettlementCandidates(apps/server/src/orchestration-v2/ProjectionStore.ts:9091-9146) skips any subagent whose parent is still open. An orchestrator stays open for days, so its finished children never settle. A completed parent turn or a delivered child result doesn't count.workflows/merge-cleanup.tsarchives a PR's creator child after merge, butworkflowsEnableddefaults to false and the live install has no workflow runs.Fix (decided)
Add one eligibility case to the existing settlement sweep. A local delegated child, or a native subagent, settles when:
Recheck these under the existing dispatch lock. Defer for:
autoArchiveDisabled(explicit unarchive).Then reuse the existing settle-and-archive path and its periodic sweep, so old rows clear too.
Tests: an acknowledged child with no PR under an idle, open parent archives. These stay open: a child with pending delivery, one with a queued follow-up, one with an open PR, and one the owner unarchived.