Skip to content

fix: retry transient provider overloads in stream - #210

Draft
lawyer112 wants to merge 1 commit into
leookun:mainfrom
lawyer112:agent/retry-transient-provider-overloads
Draft

fix: retry transient provider overloads in stream#210
lawyer112 wants to merge 1 commit into
leookun:mainfrom
lawyer112:agent/retry-transient-provider-overloads

Conversation

@lawyer112

Copy link
Copy Markdown

What changed

  • Preserve provider HTTP status codes in typed errors.
  • Retry 429, 502, 503, and 504 responses inside the same RunSSE stream.
  • Retry only when the failed provider pass produced no text, reasoning, finish reason, or tool invocation.
  • Use bounded backoff delays of 2s, 5s, and 10s, with a maximum of three retries.

Why

Transient provider overloads currently terminate the local Cursor stream immediately. The client then sees an avoidable failed turn even though retrying before any output has been emitted is safe.

Impact

Short provider overloads can recover transparently without duplicating partial output or tool calls. Permanent errors and failures after output still fail normally.

Validation

  • go test ./...
  • Production candidate built and verified locally on the formal 18080/18090 runtime.

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.

1 participant