Repository navigation
fix(sandbox): keep current sandbox, return building when not ready - #1709
Merged
Merged
Conversation
When a Workspace snapshot is still building, sandbox setup was wrapped into a fatal setup error and surfaced as an internal turn failure. Preserve the typed not-ready signal and convert it to a ToolInputError at the sandbox tool boundary so the agent can retry instead of aborting the turn. Evidence: https://sentry.sentry.io/issues/7694468765/events/14fd838305e84885ac23c21e95cc9726/ Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The first pass only softened tool failures. That still left turn-boundary paths saying "internal error" when a Workspace snapshot was still building. Use one plain message everywhere: - keep the typed not-ready error through sandbox setup - convert it to a recoverable tool error for sandbox tools - use the same message for failed-turn replies, Slack fallbacks, and resume - record workspace_snapshot_not_ready as the failure reason - show the same plain copy in the dashboard transcript Evidence: https://sentry.sentry.io/issues/7694468765/events/14fd838305e84885ac23c21e95cc9726/ Co-Authored-By: David Cramer <[email protected]>
Contributor
Dashboard visual evidenceMode: path-selected Triggered by:
Component gallery index · desktopConversations · desktopConversations · mobileConversation detail · desktopConversation detail · mobileConversation detail · focused composer · mobileFull-page screenshots from the mock dashboard. Not a pixel-diff gate. |
dcramer
marked this pull request as ready for review
August 26, 2026 23:46
Sandbox tools should report preparing state the same way switchWorkspace does: a normal tool result with status building, not a thrown failure. Co-Authored-By: David Cramer <[email protected]>
Plugin bash was treating the building tool result as a normal command and dropping the preparing message. Host workspace helpers were also throwing the raw not-ready error. Map building status into plugin stderr, and throw a plain ToolInputError from host helpers while keeping the typed not-ready cause.
A Workspace recipe change used to drop the conversation sandbox ref when the profile hash no longer matched. That forced a new snapshot boot and could strand work while a rebuild was still running. Pin sandbox continuity to the existing sandbox id. Restore that VM first. Only create a fresh sandbox when restore fails. switchWorkspace remains the intentional cutover path. Co-Authored-By: David Cramer <[email protected]>
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.
Reviewed by Cursor Bugbot for commit c363a12. Configure here.
Drop jargon-heavy comments, use one preparing message helper, and update the old profile-mismatch recreate test to expect restore-first behavior. Co-Authored-By: David Cramer <[email protected]>
Keep sticky restore-first acquire and building tool results. Remove the failure-reason/slack/dashboard plumbing that only covered a residual path. Co-Authored-By: David Cramer <[email protected]>
Replace leftover jargon in comments, helper docs, and test names. Co-Authored-By: David Cramer <[email protected]>
This branch was successfully deployed
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.







Two bugs:
What this does
switchWorkspacereplaces the current sandbox on purposeWorkspaceSnapshotNotReadyErroras-is through setupstatus: "building"with a normal preparing message instead of failing the turnNo new failure-reason paths, Slack fallback handlers, or dashboard transcript changes. Those only covered an edge the main fix should avoid.
Evidence: event
14fd838305e84885ac23c21e95cc9726/ JUNIOR-8ZRequested by David Cramer.
--
View Junior Session [Sentry]