Skip to content

Add sandbox retry logic - #345

Draft
mendral-app[bot] wants to merge 1 commit into
mainfrom
mendral/add-sandbox-retry-logic
Draft

Add sandbox retry logic#345
mendral-app[bot] wants to merge 1 commit into
mainfrom
mendral/add-sandbox-retry-logic

Conversation

@mendral-app

@mendral-app mendral-app Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add exponential backoff retry to sandboxRequestWithRetry() for sandbox API errors marked as retryable (e.g., WORKLOAD_UNAVAILABLE during cold starts)
  • Retry uses 500ms initial backoff, doubling up to 30s, with a 60s total budget — matching the API's retry guidance
  • Prints "Waiting for sandbox to become available..." on first retry for user feedback

Fixes CLI missing retry for WORKLOAD_UNAVAILABLE sandbox errors


Note

Created by Mendral. Tag @mendral-app with feedback or questions.

Add sandboxRequestWithRetry() that retries on WORKLOAD_UNAVAILABLE (and
other retryable errors) with exponential backoff (500ms → 30s, 60s budget),
respecting the API's retryable field in error responses.

This eliminates user-facing errors during sandbox cold starts when the
workload is not yet available to serve requests.
@mendral-app
mendral-app Bot requested a review from a team July 15, 2026 14:31
@mendral-app
mendral-app Bot requested a deployment to integration-tests July 15, 2026 14:31 Waiting
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.

0 participants