Skip to content

Comments

CliAgentEnv: teardown sandboxes via bulk delete#796

Merged
willccbb merged 1 commit intomainfrom
daniel/cli-agent-env-teardown-bulk-delete
Jan 28, 2026
Merged

CliAgentEnv: teardown sandboxes via bulk delete#796
willccbb merged 1 commit intomainfrom
daniel/cli-agent-env-teardown-bulk-delete

Conversation

@rasdani
Copy link
Contributor

@rasdani rasdani commented Jan 28, 2026

Description

adds teardown method and sandbox bulk deletion to CliAgentEnv

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes


Note

Ensures sandboxes are reliably cleaned up after runs and during teardown.

  • Track created sandbox IDs via self.active_sandboxes in verifiers/envs/experimental/cli_agent_env.py
  • New @vf.teardown teardown_sandboxes uses synchronous SandboxClient(APIClient()) to bulk_delete remaining sandboxes in batches of 100 (avoids event loop shutdown issues)
  • Add sandbox ID to the active set on creation and discard on per-rollout delete in destroy_sandbox
  • Minor imports added: SandboxClient, APIClient

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

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.

@rasdani rasdani requested a review from willccbb January 28, 2026 04:50
@willccbb willccbb merged commit ab54676 into main Jan 28, 2026
6 checks passed
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.

2 participants