Skip to content

docs: document sbx prune cleanup - #25788

Open
dvdksn wants to merge 1 commit into
docker:mainfrom
dvdksn:codex/document-sbx-prune
Open

docs: document sbx prune cleanup#25788
dvdksn wants to merge 1 commit into
docker:mainfrom
dvdksn:codex/document-sbx-prune

Conversation

@dvdksn

@dvdksn dvdksn commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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

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>
@dvdksn dvdksn added the status/review Pull requests that are ready for review label Aug 11, 2026
@dvdksn dvdksn added this to the sbx/v0.39.0 milestone Aug 11, 2026
@dvdksn
dvdksn requested a review from a team August 11, 2026 14:37
@dvdksn
dvdksn marked this pull request as ready for review August 11, 2026 14:39

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION


```console
$ sbx prune --dry-run
$ sbx prune --filter since=168h

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ai status/review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants