#23152: feat(plugin): add retry-backoff extension
agents
size: L
Cluster:
Error Resilience and Retry Logic
Exponential retry with backoff for retryable model failures (rate_limit, timeout, unknown, 429).
## Features
- Exponential delay on retryable failures (`rate_limit`, `timeout`, `unknown`)
- HTTP 429 handling with `Retry-After` header support
- Error classification (`classifyError`, `extractRetryAfterMs`)
- High-level `retryWithBackoff(fn, opts)` executor with AbortSignal support
- Configurable base/max delay and max rounds
## Split from
Previously part of agent-resilience (#22734), now an independent plugin.
## Tests
30 tests passing.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds standalone retry-backoff plugin with exponential backoff for retryable model failures (`rate_limit`, `timeout`, `unknown`). Provides utilities for error classification, `Retry-After` header extraction, and a high-level `retryWithBackoff` executor with AbortSignal support. Split from agent-resilience (#22734).
Major changes:
- Core retry logic with exponential backoff capped at configurable `maxDelayMs`
- HTTP 429 handling with `Retry-After` header support
- Error classification for timeout-like failures (408/502/503/504/ECONNRESET)
- 30 passing tests covering retry behavior, abort signals, and edge cases
Critical issues found:
- Config schema mismatch: `index.ts` uses `emptyPluginConfigSchema()` but `openclaw.plugin.json` defines non-empty properties, causing validation failures
- Retry-After logic caps server-requested delays at `maxDelayMs`, potentially causing premature retries when servers request longer delays
<h3>Confidence Score: 2/5</h3>
- This PR has critical config validation issues that will prevent the plugin from loading with user-defined config
- Score reflects two critical logical errors: the config schema mismatch will cause runtime validation failures when users try to configure the plugin, and the Retry-After capping logic may cause premature retries. Code is well-tested and otherwise clean, but these issues need resolution before merge.
- Pay close attention to `extensions/retry-backoff/index.ts` (config schema) and `extensions/retry-backoff/src/retry-backoff.ts:197` (Retry-After logic)
<sub>Last reviewed commit: 0edab52</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#12995: feat(infra): Add retry with exponential backoff for transient failures
by trevorgordon981 · 2026-02-10
80.3%
#9025: Fix/automatic exponential backoff for LLM rate limits
by fotorpics · 2026-02-04
78.0%
#16195: feat(infra): add unified retry utility with exponential backoff
by bianbiandashen · 2026-02-14
75.0%
#16239: fix: retry on transient API errors (overloaded, rate-limit, timeout)
by zerone0x · 2026-02-14
74.7%
#19540: feat: add timeout and exponential backoff retry for frontend API calls
by Mozzzaic · 2026-02-17
73.1%
#8677: fix: add retry logic to OAuth token refresh
by skyblue-will · 2026-02-04
72.8%
#17001: fix: retry sub-agent announcements with backoff instead of silently...
by luisecab · 2026-02-15
71.6%
#23497: feat(retry): add retryHttpAsync utility with comprehensive coverage
by thinstripe · 2026-02-22
71.5%
#8256: feat: Add rate limit strategy configuration
by revenuestack · 2026-02-03
70.7%
#4086: Test/add backoff tests
by TechWizard9999 · 2026-01-29
70.6%