Note
Grok responding on behalf of Julius.
Confirmed on main: neither getSettlementCandidates (ProjectionStore.ts) nor isAutoSettlementCandidate (ThreadSettlementService.ts) looks at lineage.relationshipToParent, so hidden subagent threads go through every sweep, and the ones with a branch but no PR link each trigger their own pullRequestFor lookup. Pinned children are already filtered out by the store query, so the waste comes from the unpinned, idle children.
This is a cost problem, not a correctness one. The children do settle through the inactivity timer eventually; the trouble is that they keep piling up faster than it drains them, and you can't see or act on them in the UI. Accepting it as a performance bug.
Possible directions:
- Leave
relationshipToParent === "subagent"threads out of the candidate set and settle them along with their parent (or when their run finishes). - Or at least skip the PR lookup for children and reuse the parent's result for the same branch.
Thanks for the before and after sweep counts.