2 months ago
257bb2dpruneClosedSessions only ever deleted dirs whose metadata.json said state=closed, so backups from crashed or force-quit sessions (missing or corrupt metadata, or stuck active) accumulated forever - observed 124GB of unprunable March backups, including ~9GB .snapshot-stage-* mkdtemp leftovers holding full workspace copies. pruneBackupsRoot now also ages out metadata-less orphans (7d), corrupt metadata dirs, abandoned active dirs (30d without a metadata write), and leaked .*-stage-* staging dirs (24h), and runs on backup create() so long-lived installs reclaim space even when close() never fires. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Parentb0105e5