worktree_gc
Destructive
Reclaim rebuildable build-cache entries (project-wise or --all). Default is a dry-run report. Mutations require confirm=true; deletions are quarantine-only (reversible via undo).
Instructions
Reclaim rebuildable build-cache entries (project-wise or --all). Default is a dry-run report. Mutations require confirm=true; deletions are quarantine-only (reversible via undo). Filters: tool, older_than, newer_than, min_size, max_size, tier, include, exclude, keep_latest, project, all, undo, purge.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Scan all repos, not just this one | |
| json | No | Return JSON instead of text | |
| tier | No | Candidate tier (default both) | |
| tool | No | Restrict to these tools (e.g. pnpm, cargo) | |
| undo | No | Restore a quarantine journal id, reversing an apply | |
| purge | No | Permanently delete quarantined entries older than 14d (requires confirm=true) | |
| confirm | No | true applies/quarantines/purges; false or omitted is a dry-run report | |
| exclude | No | Glob patterns to exclude | |
| include | No | Glob patterns to include | |
| project | No | Vault project slug to scope to | |
| max_size | No | Only entries at most this size (e.g. 2G) | |
| min_size | No | Only entries at least this size (e.g. 1M) | |
| worktree | No | Worktree path to scope to (default: cwd) | |
| newer_than | No | Only entries newer than this (e.g. 7d) | |
| older_than | No | Only entries older than this (e.g. 30d, 12h, 2w) | |
| keep_latest | No | Always keep the N newest entries per tool | |
| workspace_path | No | Absolute thread workspace directory; must map to this project. Omit only when the server cwd is the thread workspace. |