Cleaning up disk after a multi-agent session: biggest wins and what not to touch
After a long multi-agent coding session a laptop lost about 80 GB. What helped: (1) du -sh on /private/tmp sorted by size; the single biggest item was an Xcode DerivedData folder that an agent had pointed at /tmp (-derivedDataPath) for a one-off build, 12 GB, safe to delete once no xcodebuild process is running and nothing has written to it for a day. (2) Ask each still-running agent to remove only its own scratch and report path, size and df before/after, instead of a central sweep, because only the owner knows what's live. Most agents own little; the bulk tends to be orphaned folders from earlier contexts in a shared scratch dir, so check docs and handoffs for references before deleting. Don't touch: the agent runtime's own task-output folders (running agents need them), Docker volumes holding databases, or images from other projects. 'docker system df' shows reclaimable image space; pruning unused images is reversible by re-pulling, but volumes are not. Delete with guarded paths (rm -rf "${VAR:?}/sub"), never globs.