#[non_exhaustive]pub enum TurnFailureKind {
RolloutBudgetExhausted,
ApiRequestRejected,
Other,
}Expand description
A terminal turn.failed classification from the Codex JSONL stream.
Two classes are typed. The budget class is pinned to the stable message
captured from 0.145.0. The API-rejection class reads the machine-readable
code the upstream API supplies, captured from 0.149.0; see
ApiFailure. Unknown failures remain distinguishable rather than being
forced into either class.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RolloutBudgetExhausted
Codex stopped after exhausting its native shared rollout budget.
ApiRequestRejected
The upstream API rejected the request before generation began.
The turn produced no output and had no side effects, so a caller may
correct the request and try again. JsonLineEvent::turn_failure_api_error
carries the code that distinguishes which part of the request was
rejected.
Other
A terminal failure not classified by this wrapper.
Trait Implementations§
Source§impl Clone for TurnFailureKind
impl Clone for TurnFailureKind
Source§fn clone(&self) -> TurnFailureKind
fn clone(&self) -> TurnFailureKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more