FailedAttempt

@Serializable
data class FailedAttempt(val attemptIndex: Int, val failure: AnalyzedFailure, val elapsedTime: Duration, val consumption: LLMConsumptionOrNA, val delayBeforeAttempt: Duration)

A single failed attempt that preceded the final attempt of a retried operation.

Lives in AgentRunRecord.previousAttempts / PromptExecutionRecord.previousAttempts / DatasetItemEvaluation.previousAttempts. The list order matches execution order.

Constructors

Link copied to clipboard
constructor(attemptIndex: Int, failure: AnalyzedFailure, elapsedTime: Duration, consumption: LLMConsumptionOrNA, delayBeforeAttempt: Duration)

Properties

Link copied to clipboard

0-indexed position in the retry sequence. attemptIndex == 0 is the original attempt (whose failure triggered the first retry); attemptIndex == 1 is the first retry attempt that itself failed; and so on.

Link copied to clipboard

LLM consumption recorded for this attempt, or N/A when unavailable.

Link copied to clipboard

Wall-clock delay applied before this attempt started, per the retry policy. Duration.ZERO for the original attempt (attemptIndex == 0).

Link copied to clipboard

Wall-clock time this attempt itself took (excludes the delay before it).

Link copied to clipboard

The classified failure this attempt ended with.