docs: document sbx prune cleanup - #25788
Conversation
Routine lifecycle docs only covered removing one sandbox at a time. Document stopped-only bulk cleanup, dry-run, and stop-age filtering. Co-Authored-By: Codex <noreply@openai.com>
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The added documentation for sbx prune is accurate, clear, and consistent with the existing document's style and scope. No issues found.
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The added sbx prune documentation is clear, accurate, and consistent with the existing page's tone and scope. The dry-run and --stop-age examples are well-structured and follow Docker documentation style conventions. No issues found.
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟡 NEEDS ATTENTION
|
|
||
| ```console | ||
| $ sbx prune --dry-run | ||
| $ sbx prune --filter since=168h |
There was a problem hiding this comment.
[HIGH] Ambiguous filter direction for --filter since=168h
The prose says this command "filter[s] out sandboxes stopped within the last week," implying that recent sandboxes are excluded from removal (i.e., only older sandboxes get pruned). However, in Docker's CLI conventions, since= typically means "objects occurring after this point in time" — which would select (and remove) sandboxes stopped within the last 168 hours, the opposite of what the description states.
If --filter since=168h actually removes only older sandboxes (stopped more than 168h ago), the intent is correct but the flag semantics are the inverse of standard Docker tooling. If it removes recent sandboxes, the description is backwards and could lead users to accidentally delete sandboxes they want to keep.
Consider clarifying the direction explicitly — for example:
- "To remove only sandboxes stopped more than 7 days ago:
sbx prune --filter since=168h" (if it excludes recent) - Or correct the description if the flag's behavior differs from the prose.
| ``` | ||
|
|
||
| To remove all stopped local sandboxes, use `sbx prune`. Running sandboxes are | ||
| never removed. Preview the sandboxes that would be removed, or filter out |
There was a problem hiding this comment.
[MEDIUM] Two distinct operations conflated under one sentence
The introductory sentence links --dry-run (non-destructive preview) and --filter since=168h (actual destructive removal) with "or", presenting them as parallel alternatives. They have meaningfully different consequences — one previews without removing anything, the other removes a subset of sandboxes. Grouping them under one code block without distinguishing their effects may confuse readers about whether the filter command removes sandboxes or only previews them.
Consider introducing each command with its own sentence, or add inline comments to the code block to distinguish the non-destructive preview from the destructive filtered removal.
| $ sbx run claude | ||
| ``` | ||
|
|
||
| To remove all stopped local sandboxes, use `sbx prune`. Running sandboxes are |
There was a problem hiding this comment.
[MEDIUM] Imprecise phrasing and unexplained 168h value
"Filter out" is ambiguous — it can mean either "exclude from the set" or "apply a filter to reduce the set." Per the style guide, documentation should be precise and direct. Prefer explicit phrasing such as "exclude sandboxes stopped within the last 7 days from removal" (if the flag excludes recent sandboxes) or "remove only sandboxes stopped within the last 7 days" (if it targets recent ones).
Additionally, 168h is not immediately legible as "one week" — adding a parenthetical (7 days) or using --filter since=7d (if the CLI supports it) would lower cognitive load.
Summary
Document routine cleanup of stopped local sandboxes with
sbx prune, including dry-run and stop-age filter examples.@netlify /ai/sandboxes/usage/
Preview: https://deploy-preview-25788--docsdocker.netlify.app/ai/sandboxes/usage/
Generated by Codex