Skip to main content

Module retry

Module retry 

Source
Expand description

Domain-specific retry adapters for VT Code.

The retry policy math (attempt budgets, backoff, jitter, category-based decisions) lives in vtcode_commons::retry; this module re-exports the canonical RetryPolicy / RetryDecision and layers the workspace’s domain knowledge on top via RetryPolicyCoreExt: typed error downcasts (VtCodeError, LLMError, tool errors), LLM Retry-After extraction, and the tool-aware command-timeout rule.

Structs§

RetryDecision
Result of classifying a failure for retry handling.
RetryPolicy
Typed retry policy shared across runtime layers.

Enums§

RetryEvent
Lifecycle event emitted by run_with_retry so callers can attach logging, metrics, or stats updates without re-implementing the loop.
RetryStep
Typed step produced by RetryPolicyCoreExt::step_for_vtcode_error.

Traits§

RetryPolicyCoreExt
Domain-aware retry decisions layered over the shared RetryPolicy.

Functions§

decision_for_anyhow_error
decision_for_vtcode_error
run_with_retry
Drive a retry loop per policy, invoking on_event for each lifecycle event. Returns the first successful result, or the final error if the policy gives up or all attempts are exhausted.