Skip to content

Conversation

@djeebus
Copy link
Contributor

@djeebus djeebus commented Nov 14, 2025

Note

Adds up to 3 automatic retries when sending sandbox PTY input, retrying on common transient/network errors.

  • CLI – packages/cli/src/terminal.ts
    • Retry logic: Wraps sandbox.pty.sendInput with a retry loop (max 3 attempts).
    • Retryable detection: New isRetryableError helper to classify transient errors (e.g., TimeoutError, AbortError, network codes like ECONNRESET, and TypeError: fetch failed).
    • Non-retryable errors are surfaced immediately; existing batching and terminal session handling unchanged.

Written by Cursor Bugbot for commit 66ff8e0. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 14, 2025

⚠️ No Changeset found

Latest commit: 66ff8e0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

}

return fetch(url, options)
return fetchWithRetries(url, options)
Copy link

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.

Fix in Cursor Fix in Web

}
retry++
}
} while (retry < maxRetries)
Copy link

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.

Fix in Cursor Fix in Web

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.

2 participants