fix: recognize confirmed container loss when resuming Daytona leases - #13792
Merged
Merged
Conversation
Daytona can retain a sandbox API record after its container disappears. Confirm the exact missing-container response with a bounded fresh read, then let the host apply its existing replacement and backup policy. Preserve unknown failures, recoverable errors, and identity mismatches. Verified 249 provider tests, 93 host lifecycle tests, plugin typecheck and build. Added 13 regressions. Read-only inspection confirmed the provider response and an existing verified backup without changing live state. Co-Authored-By: Paperclip <noreply@paperclip.ing>
Contributor
|
Compare the known provider message against the exact sandbox ID instead of requiring UUID syntax. Cover opaque IDs and regex punctuation while retaining fresh confirmation and the existing backup guard. Verified all 251 provider tests, plugin typecheck, and build. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
Linked Issues or Issue Description
What happened?
Daytona returns HTTP 200 for a retained sandbox, with state
error,recoverable: false, and an explicit error that its own container no longer exists. Paperclip rejects resume before reaching its existing missing-sandbox handling. Repeated resume attempts cannot use an available verified backup.Expected behavior
Treat a freshly confirmed missing container like a missing sandbox. Let the host apply its existing replacement policy and native-runner backup verification. Preserve the lease for unknown or uncertain failures.
Steps to reproduce
not found: failed to inspect sandbox container <id>: Error response from daemon: No such container: <id>for that same sandbox, with stateerrorandrecoverable: false.Paperclip version or commit
ded156a.
Deployment mode
Self-hosted server with the Daytona provider.
What Changed
Verification
tsc --noEmitandpnpm buildpass.cargo. Linux CI must pass before merge.Risks
Replacement can lose state if loss is misclassified. Recognition is intentionally narrow and requires a fresh provider confirmation for the same sandbox. The native-runner backup gate remains unchanged. Other errors still preserve the lease. The plugin does not delete or create a sandbox in this branch; the host owns those actions. No schema, credential, dependency-version, or retry-policy changes.
Model Used
OpenAI GPT-6 via Codex, with reasoning, shell tools, code editing, and read-only provider inspection. The exact model snapshot and context-window size are not exposed by this session.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template#NNN/github.com/paperclipai/paperclipURLs)docs/...,fix/...) and contains no internal Paperclip ticket id or instance-derived details