Conversation
cf9cf5a to
5fa0270
Compare
PR SummaryMedium Risk Overview Written by Cursor Bugbot for commit 2b884d8. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
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: Goroutine uses cancellable context for orphan cleanup
- Applied context.WithoutCancel to detach the goroutine's context from the parent timeout context, matching the pattern used on line 118 for AsyncNewlyCreatedSandbox.
Or push these changes by commenting:
@cursor push c5e9ba42ee
Preview (c5e9ba42ee)
diff --git a/packages/api/internal/sandbox/store.go b/packages/api/internal/sandbox/store.go
--- a/packages/api/internal/sandbox/store.go
+++ b/packages/api/internal/sandbox/store.go
@@ -168,7 +168,7 @@
// Redis is the source of truth — divergent sandboxes are orphans running
// on the node but not present in the store. Kill them.
for _, sbx := range sbxsToBeSynced {
- go s.callbacks.RemoveSandboxFromNode(ctx, sbx)
+ go s.callbacks.RemoveSandboxFromNode(context.WithoutCancel(ctx), sbx)
}
} else {
// Memory backend — divergent sandboxes are ones discovered on the nodeThis Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
There was a problem hiding this comment.
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.


In case of some some random error (DB, node time out), the sandbox is removed from sandbox store, but it stays running on the node forever, this will make sure it gets properly cleaned up.