-
Notifications
You must be signed in to change notification settings - Fork 707
Turn on automatic retries for sandbox requests #1022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
packages/js-sdk/src/sandbox/index.ts
Outdated
| } | ||
|
|
||
| return fetch(url, options) | ||
| return fetchWithRetries(url, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing Retries for Sandbox REST API
The fetchWithRetries wrapper created on lines 131-134 is not passed to EnvdApiClient, so REST API calls through this.envdApi.api (like /health and /files endpoints) won't have automatic retry logic. Only the RPC transport gets retries. The EnvdApiClient constructor accepts a fetch parameter that should receive fetchWithRetries to enable retries for all sandbox requests.
| } | ||
| retry++ | ||
| } | ||
| } while (retry < maxRetries) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Silent Failures Drop User Input
After exhausting all retry attempts with retryable errors, the retry loop exits silently without throwing an error or logging the failure. This causes user input to be silently dropped when sandbox.pty.sendInput fails repeatedly, with no indication to the user that their keystrokes weren't sent to the terminal.
Note
Adds up to 3 automatic retries when sending sandbox PTY input, retrying on common transient/network errors.
packages/cli/src/terminal.tssandbox.pty.sendInputwith a retry loop (max 3 attempts).isRetryableErrorhelper to classify transient errors (e.g.,TimeoutError,AbortError, network codes likeECONNRESET, andTypeError: fetch failed).Written by Cursor Bugbot for commit 66ff8e0. This will update automatically on new commits. Configure here.