SafeDisk AI

AI agent storage incident

Parallel Agent Worktrees Cargo target Disk Full

When several AI agents build isolated Rust worktrees at the same time, each worktree can create a separate target/ tree. Four 12-16 GB build directories can saturate a 38 GB session volume before the code is wrong. Measure the per-worktree peak first, then choose shared target, cleanup-on-finish, or concurrency caps deliberately.

AI workspace cleanup request

Get the exact agent workspace cleanup step.

Leave your email now; the failing worktree summary can follow after the first reply. We send the $29 Deep Cleanup step only if the parallel build policy still needs review.

See sample result

Evidence To Capture First

Before changing Cargo or deleting directories, prove the disk peak per agent. This keeps the fix focused on workflow policy rather than hiding a real test or linking failure.

Read-only first pass

Measure each worktree and target directory.

Run this from the parent directory that contains the agent worktrees.

df -h .
df -i .
du -xhd1 . 2>/dev/null | sort -h | tail -40
find . -maxdepth 3 -type d -name target -prune -print0 2>/dev/null \
  | xargs -0 du -xsh 2>/dev/null | sort -h

Policy Options

  1. Shared CARGO_TARGET_DIR: best disk reduction, but validate concurrent Cargo lock behavior and cross-branch artifact invalidation.
  2. Per-agent target cleanup: safe when the branch is pushed, tests are done, and no later step needs the compiled outputs.
  3. Concurrency cap: choose floor((free_gb - reserve_gb) / peak_target_gb) for heavy Rust builds instead of a fixed agent count.
  4. Larger session volume: useful for burst capacity, but still keep telemetry so target growth does not silently return.

Do Not Delete First

Deep Cleanup

Need an agent workspace cleanup order?

Submit the form first; one worktree size summary can follow. We check whether free guidance is enough before asking for the $29 Deep Cleanup.