Skip to content

Commit 1824e73

Browse files
authored
style(agent-core-v2): fold retry-budget note into the file header (#1742)
packages/agent-core-v2/AGENTS.md requires comments to live only in the top-of-file block, never beside statements.
1 parent 27236bd commit 1824e73

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • packages/agent-core-v2/src/_base/utils

packages/agent-core-v2/src/_base/utils/retry.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
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

710
import { 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).
1312
export const DEFAULT_MAX_RETRY_ATTEMPTS = 10;
1413

1514
const BASE_DELAY_MS = 500;

0 commit comments

Comments
 (0)