Skip to content

sandbox delete by name#406

Open
kcoopermiller wants to merge 3 commits intomainfrom
feature/sdbx-name-deletion
Open

sandbox delete by name#406
kcoopermiller wants to merge 3 commits intomainfrom
feature/sdbx-name-deletion

Conversation

@kcoopermiller
Copy link
Member

@kcoopermiller kcoopermiller commented Feb 27, 2026

Note

Medium Risk
Adds a new bulk-deletion selector (name) to both the SDK and CLI, which can delete multiple sandboxes at once if misused. Risk is moderated by mutual-exclusion validation and explicit confirmation prompts, but it depends on backend support for the new request field.

Overview
Enables bulk sandbox deletion by exact name in addition to existing ID/label-based deletes.

Updates the prime-sandboxes SDK BulkDeleteSandboxRequest and SandboxClient.bulk_delete() (sync + async) to accept name and include it in the DELETE /sandbox payload.

Extends prime sandbox delete with a --name/-n option, updates argument exclusivity/required checks, and adds output for per-sandbox failures when deleting by labels or name.

Written by Cursor Bugbot for commit 81d94ea. This will update automatically on new commits. Configure here.

@kcoopermiller kcoopermiller marked this pull request as ready for review March 2, 2026 08:52
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Delete-by-name silently drops failed deletion results
    • Added handling for result.failed in the delete-by-name path so failed sandbox deletions are reported with sandbox ID and error message.

Create PR

Or push these changes by commenting:

@cursor push 63211fc75f
Preview (63211fc75f)
diff --git a/packages/prime/src/prime_cli/commands/sandbox.py b/packages/prime/src/prime_cli/commands/sandbox.py
--- a/packages/prime/src/prime_cli/commands/sandbox.py
+++ b/packages/prime/src/prime_cli/commands/sandbox.py
@@ -663,6 +663,14 @@
                 )
                 for sandbox_id in result.succeeded:
                     console.print(f"  ✓ {sandbox_id}")
+            if result.failed:
+                console.print(
+                    f"\n[bold red]Failed to delete {len(result.failed)} sandbox(es):[/bold red]"
+                )
+                for failure in result.failed:
+                    sandbox_id = failure.get("sandbox_id", "unknown")
+                    error = failure.get("error", "unknown error")
+                    console.print(f"  ✗ {sandbox_id}: {error}")
 
         elif len(sandbox_ids) == 1 and not all:
             sandbox_id = sandbox_ids[0]
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 458adeef3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant