Problem
On intelligence-chubes4, DMC has a large registered workspace inventory and the full safety-review paths do not complete in a reasonable time.
Observed locally on 2026-05-11:
studio wp datamachine-code workspace worktree list --format=json | jq 'length' returned 576 worktrees.
studio wp datamachine-code workspace worktree list --stale --format=json | jq 'length' returned 375 stale worktrees.
studio wp datamachine-code workspace worktree cleanup --dry-run --skip-github --format=json | jq '.summary' timed out after 300 seconds.
studio wp datamachine-code workspace worktree reconcile-metadata --dry-run --format=json | jq '.summary' timed out after 300 seconds.
That leaves operators with only the cheap inventory path, which cannot prove safety for most rows.
Why this matters
Cleanup safety depends on full checks for merge/PR state, dirty status, unpushed commits, path containment, and primary safety. If those checks cannot finish at current inventory sizes, stale worktrees accumulate indefinitely.
Desired outcome
DMC should provide a bounded cleanup/reconciliation path that scales to hundreds of worktrees without timing out.
Acceptance criteria
- Cleanup and metadata reconciliation can run in bounded pages or resumable jobs.
- Each batch records evidence for candidates, skipped rows, and safety failures.
- Operators can review status and continue/apply later without rerunning the full inventory scan.
- A workspace with ~600 worktrees can produce a cleanup plan without exceeding typical WP-CLI time budgets.
Related
AI assistance
- AI assistance: Yes
- Tool(s): OpenCode (GPT-5.5)
- Used for: Drafting the issue from local DMC command output reviewed by Chris.
Problem
On
intelligence-chubes4, DMC has a large registered workspace inventory and the full safety-review paths do not complete in a reasonable time.Observed locally on 2026-05-11:
studio wp datamachine-code workspace worktree list --format=json | jq 'length'returned576worktrees.studio wp datamachine-code workspace worktree list --stale --format=json | jq 'length'returned375stale worktrees.studio wp datamachine-code workspace worktree cleanup --dry-run --skip-github --format=json | jq '.summary'timed out after 300 seconds.studio wp datamachine-code workspace worktree reconcile-metadata --dry-run --format=json | jq '.summary'timed out after 300 seconds.That leaves operators with only the cheap inventory path, which cannot prove safety for most rows.
Why this matters
Cleanup safety depends on full checks for merge/PR state, dirty status, unpushed commits, path containment, and primary safety. If those checks cannot finish at current inventory sizes, stale worktrees accumulate indefinitely.
Desired outcome
DMC should provide a bounded cleanup/reconciliation path that scales to hundreds of worktrees without timing out.
Acceptance criteria
Related
AI assistance