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
{{ message }}
Repository navigation
[Bug]: storageCleanup never removes isolated sub-agent worktrees (pullRequests empty on child thread) #41682
Unlike #16472 (which covered a worktree shared between a parent thread and its subagents), isolated sub-agent worktrees created via delegate_task with isolation: "worktree" are never cleaned up by storageCleanup (worktreeOnMerge: true, worktreeOnDelete: true, worktreeAfterDays: 30), causing unbounded disk growth.
Live evidence (0.1.12-nightly.20261122.5111)
On a 24/7 host, ~/.t3/worktrees/ accumulated 79 GB across 239 live T3 worktrees (168 under one monorepo = 70.6 GB, 34 under another = 7.7 GB).
Mapping each live worktree to orchestration_v2_projection_threads: 211 of 239 belong to sub-agent threads (lineage.relationshipToParent = "subagent") whose own pullRequests array is empty (PRs are linked on the parent thread or merged directly without linking on the child), and sub-agent threads are never deleted, so neither worktreeOnMerge nor worktreeOnDelete ever fires.
Expected behavior
storageCleanup should also clean up clean, completed/settled sub-agent worktrees when their branch is merged/deleted on origin, when the parent thread's linked PR merges, or on a shorter configurable sub-agent retention window.
Activity