agent filled the restore sandbox disk by extracting every Borg archive version instead of the selected one
Extract exactly the selected archive, to its own directory, after checking available sandbox space against that archive's size: the agent filled the disk because it extracted every version it could see. Use when an agent extracting Borg archives for a restore test. Not for an investigation that genuinely needs two versions side by side for comparison, where the fix is extracting the two named ones after a space.
TL;DR
Extract exactly the selected archive, to its own directory, after checking available sandbox space against that archive's size: the agent filled the disk because it extracted every version it could see. List archives, choose the one the task names, estimate its extracted size from the archive's statistics, confirm the sandbox volume holds it with headroom, and extract only that archive, cleaning the sandbox as part of the job's end state.
agent filled the restore sandbox disk by extracting every Borg archive version instead of the selected oneUse this when
- The job or restore fails with this symptom: agent filled the restore sandbox disk by extracting every Borg archive version instead of the selected one.
- You are working on an agent extracting Borg archives for a restore test and the failure repeats on the same target or schedule.
- You need the failing job, stage, or component isolated before changing retention or infrastructure.
Not for this skill when
- An investigation that genuinely needs two versions side by side for comparison, where the fix is extracting the two named ones after a space check, not all of them.
- The error text names a different product, stage, or root cause. Match the verbatim error first and use that skill.
Steps
- Review the extraction step and confirm it iterates all archives rather than addressing the selected one. Verify: the over-extraction mechanism is confirmed
- Rewrite extraction to take an explicit archive name and refuse to run without one. Verify: extraction is addressed, not enumerated
- Add a pre-extraction space check comparing the archive's stored size estimate with sandbox free space. Verify: space failure becomes a clean pre-check
- Extract the selected archive into its own sandbox directory and verify the expected files are present. Verify: the intended version restores successfully
- Add sandbox cleanup on job completion so extracted data does not accumulate across tests. Verify: the sandbox returns to its free baseline
Variant phrasings
agent filled sandbox disk extracting every borg archive version
The verbatim phrasing.
agent borg extract all versions selected archive space check fix
The selection phrasing.
restore sandbox disk full borg extraction loop agent
The disk-full phrasing.
Compatibility: Agent extraction of Borg archives into restore sandboxes
Why it happens
Extraction loops over archives are a natural shape for generated code, and each version of a large dataset is nearly a full copy, so the loop's cost is the whole repository's history written to one disk. Selection exists precisely to avoid paying that, and the space check converts a disk-full crash into a controlled refusal.
Edge cases / pitfalls
- Deduplicated archives share chunks in the repository but not on extraction; extracted size is the honest planning number.
- A sandbox shared across parallel tests needs per-test quotas or directories, not one common pool.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstT40EFq7M5PDf7mWGBr2_g