Package: @hexos/runtime

Options for configuring exponential backoff retry behavior.

Controls the number of attempts, delay progression, and error classification for retryWithBackoff. The optional shouldRetry predicate allows overriding the default isRetryableError logic for custom error handling.

Related: NormalizedRetryConfig provides the runtime defaults, RetryConfig is the user-facing configuration.

interface RetryOptions {
    maxAttempts: number;
    initialDelayMs: number;
    maxDelayMs: number;
    multiplier: number;
    jitter: boolean;
    shouldRetry?: (error: unknown) => boolean;
}

maxAttempts

number

initialDelayMs

number

maxDelayMs

number

multiplier

number

jitter

boolean

shouldRetry

(error: unknown) => boolean