File tree Expand file tree Collapse file tree
packages/agent-core-v2/src/_base/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
22 * `_base` retry helpers — exponential and server-directed backoff, abortable
33 * sleeps, and error-field extraction shared by retry policies (the loop's
4- * `stepRetry` plugin, full-compaction's self-managed resends).
4+ * `stepRetry` plugin, full-compaction's self-managed resends). The default
5+ * budget is 10 attempts per step (kept in sync with v1
6+ * `agent-core/loop/retry.ts`): the 500ms ×2 ramp capped at 32s waits out
7+ * multi-minute provider overload (sustained 429s) before a turn fails.
58 */
69
710import { abortable } from '#/_base/utils/abort' ;
811
9- // Default retry budget per step: 10 attempts (9 retries). Kept in sync with
10- // v1 (`agent-core/loop/retry.ts`): the exponential ramp below climbs 0.5s,
11- // 1s, 2s … up to the 32s cap, giving roughly 2–3 minutes of total wait to
12- // ride out a typical provider overload window (sustained 429s).
1312export const DEFAULT_MAX_RETRY_ATTEMPTS = 10 ;
1413
1514const BASE_DELAY_MS = 500 ;
You can’t perform that action at this time.
0 commit comments