﻿# Argo retry expressions change the default failure policy

Current Argo retryStrategy defaults to OnFailure without an expression and Always when an expression is supplied; an explicit policy and expression are both required to permit a retry.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-argo-retry-policy-expression-default/
Language: en

## Preserve the intended failure classes when adding a condition

An extraction step originally retries ordinary application failures. Its maintainer later adds an expression to exclude a known permanent exit condition. Argo's current [retry guide](https://argo-workflows.readthedocs.io/en/latest/retries/) makes a consequential distinction: the default policy is OnFailure without an expression, but Always when an expression is present. Adding the condition can therefore change eligible failure classes if the policy is left implicit.

## Separate container failure from execution error

The [retry walkthrough](https://argo-workflows.readthedocs.io/en/latest/walk-through/retrying-failed-or-errored-steps/) distinguishes failure of the main container from controller errors and failures of initialization or wait containers. Those cases can require different remedies. A malformed document is not the same event as infrastructure trouble preventing reliable execution. Decide which categories should retry before writing an expression that examines the previous attempt's status or exit code.

## Combine policy and expression deliberately

The [field reference](https://argo-workflows.readthedocs.io/en/latest/fields/) exposes both controls in `retryStrategy`. The guide says an explicitly supplied policy still applies alongside the expression; both must permit another attempt. A permissive expression cannot override an explicit policy excluding the failure class. Conversely, an expression can reject an otherwise policy-eligible failure. State the policy explicitly when retaining previous behavior is important during configuration changes.

## Account for the budget after every outcome

The guide reevaluates policy and expression after each attempt. A later attempt can have a different outcome category from the initial failure. The walkthrough defines `limit` as the number of retries, with the initial execution separate from those repetitions. Backoff controls timing. [Task budgets](/journal/learn-codex-task-budgets/) should distinguish retries from total attempts and preserve enough state to explain why a remaining allowance was not used after a newly excluded outcome.

## Review the effective policy against the installed release

Use the current documentation for the deployed release rather than assuming an old implicit default remains unchanged. [Tool observations](/journal/learn-codex-tool-observation/) can record each attempt's phase, exit information and decision. A useful review explains which condition stopped recovery: failure class, expression, exhausted allowance or another execution constraint. This keeps a selective retry rule understandable without presenting an expression as a guarantee that every apparently transient extraction problem will receive another attempt.
