Tencent/WeKnora · error
delete remote sandbox: %w
Error message
delete remote sandbox: %w
What it means
destroyBindingLocked deletes the remote sandbox backing a session binding before removing the binding record. If the provider Delete call fails and the error is not recognized as a benign 'binding replaceable' condition (CanReplaceRemoteBinding), the destroy is aborted with this wrapped error, leaving the sandbox running and the binding intact.
Source
Thrown at internal/sandbox/session_lifecycle.go:487
return fmt.Errorf(
"delete duplicate owned remote sandbox %q: %w",
candidate.ID,
err,
)
}
}
return nil
}
func (l *remoteSessionLifecycle) destroyBindingLocked(
ctx context.Context,
key SessionSandboxKey,
binding SessionSandboxBinding,
) error {
if binding.Provider == l.client.Provider() {
err := l.client.Delete(ctx, binding.SandboxID)
if err != nil && !CanReplaceRemoteBinding(err) {
return fmt.Errorf("delete remote sandbox: %w", err)
}
}
deleted, err := l.bindings.DeleteIfMatch(
ctx,
key,
binding.Provider,
binding.SandboxID,
)
if err != nil {
return fmt.Errorf("delete sandbox binding: %w", err)
}
if deleted {
return nil
}
current, err := l.readBinding(ctx, key)
if err != nil {
return errView on GitHub (pinned to 988cbb0330)
Solutions
- Read the wrapped provider error; if the sandbox no longer exists, the binding may point to a stale record — reconcile the store
- Retry the destroy operation after transient provider failures
- Verify provider credentials/permissions allow deleting sandboxes
- Check CanReplaceRemoteBinding semantics: errors considered 'replaceable' are intentionally swallowed; anything else is fatal here
Defensive patterns
Strategy: try-catch
Try / catch
err := manager.DestroySession(ctx, key)
if err != nil && strings.Contains(err.Error(), "delete remote sandbox") {
// inspect wrapped provider error; decide retry vs manual reconcile
log.Printf("destroy failed: %v", err)
} Prevention
- Ensure provider credentials grant delete permission
- Treat repeated destroy failures as alerts — they leak billable sandboxes
- Reconcile binding store vs provider inventory on a schedule
When it happens
Trigger: Session destroy / resolve path calls client.Delete(binding.SandboxID) and the provider returns a persistent error: network failure, 4xx/5xx, wrong credentials, or the sandbox in a state where deletion is rejected and not deemed replaceable.
Common situations: Provider outage during teardown; deleted/expired sandbox IDs (binding points at a stale sandbox); IAM/credentials lacking delete permission on the provider account.
Related errors
- delete sandbox binding: %w
- cleanup losing remote sandbox: %w
- sandbox: remove session input %s: %w
- model ID cannot be empty
- model is currently downloading
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/b4a2b0488eb1d243.
Report an issue: GitHub.