Skip to main content

record_persistent_model_failure

Function record_persistent_model_failure 

Source
pub async fn record_persistent_model_failure(agent_name: &str, model: &str)
Expand description

Record a persistent model-specific failure and apply longer exponential backoff.

Used for failure modes that are commonly broken for long periods (for example silent exit-0 or opaque provider errors). Starts at 4h and escalates with the generic backoff formula up to 7 days.

Uses [PERSISTENT_FAILURE_COUNT_PREFIX], a counter independent of the generic failure_count: key that record_agent_success() resets on every successful run. Otherwise a single intervening success between persistent failures would reset escalation back to the 4h base, letting structurally unreliable models (intermittent parse errors, truncated runs) stay in rotation indefinitely.