SafeDisk AI

AI agent storage incident

Parallel Agent Worktrees Cargo target Disk Full

When Base Studio Code, Claude, or another agent fleet builds isolated Rust worktrees at the same time, each worktree can create a separate target/ tree. Dozens of app-owned worktrees under paths like ~/.base-studio-code/worktrees can quietly grow into hundreds of GB before the code is wrong. Measure the per-worktree peak first, then choose lifecycle cleanup, shared target, pruning, or concurrency caps deliberately.

AI storage deletion judgment

Find what the AI tool can delete.

Copy the read-only check first. If the output still needs judgment, leave your email and we send the free SafeDisk AI deletion trial step only when the agent cache or session state needs review.

Add command output optional

Free trial step. We reply first with a delete / confirm / protect judgment or one read-only detail we still need.

See sample result Ask AI about one file

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 repo or project directory. It checks both Base Studio Code fleet worktrees and Claude-style worktree folders without deleting anything.

df -h . "$HOME" /tmp 2>/dev/null
df -i . "$HOME" /tmp 2>/dev/null
du -sh "$HOME/.base-studio-code/worktrees" .claude/worktrees 2>/dev/null || true
du -sh "$HOME/.base-studio-code/worktrees"/*/*/target "$HOME/.base-studio-code/worktrees"/*/target .claude/worktrees/*/target 2>/dev/null | sort -hr | head -30 || true
du -sh target "$CARGO_TARGET_DIR" "$HOME/.cargo" "$HOME/.cache/sccache" 2>/dev/null || true
find "$HOME/.base-studio-code/worktrees" .claude/worktrees -maxdepth 5 -type d -name target -print 2>/dev/null | head -80

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

Free AI deletion trial

Need a delete / confirm / protect answer for AI tool files?

Submit the form first; the command output or one-line agent storage symptom can follow. We check whether free guidance is enough before asking for the free SafeDisk AI deletion trial.

Add output optional

Start with email. Output can follow after the first reply.