> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# backoff_strategy

> Contract, placement, related fields and source examples for this Nika YAML field.

[Language reference](https://docs.nika.sh/reference/language/overview.md) / `backoff_strategy`

## Meaning and placement

### retry

Which curve the delay follows between attempts · `fixed` · `linear` · `exponential` · default `exponential`. Each attempt waits `backoff_ms` flat, `backoff_ms × attempt`, or `backoff_ms × 2^(attempt-1)` capped at `backoff_max_ms`.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/$defs/retry/properties/backoff_strategy` |
| type | `"string"` |
| enum | declaration below |

<details>
  <summary>`enum` schema declaration (spec source, not a lesson)</summary>

  ```json theme={"system"}
  [
    "fixed",
    "linear",
    "exponential"
  ]
  ```
</details>

**In the same object:** [backoff\_max\_ms](https://docs.nika.sh/reference/language/words/backoff_max_ms.md) · [backoff\_ms](https://docs.nika.sh/reference/language/words/backoff_ms.md) · [jitter](https://docs.nika.sh/reference/language/words/jitter.md) · [max\_attempts](https://docs.nika.sh/reference/language/words/max_attempts.md) · [on\_codes](https://docs.nika.sh/reference/language/words/on_codes.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/schemas/workflow.schema.json)

## In a source template

Excerpt from `templates/fanout.nika`, source lines 117–126. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}
    timeout: "60s"                  # SLOT: per-iteration bound
    retry:
      max_attempts: 3
      backoff_strategy: exponential
      jitter: true
    on_error:
      recover: null                 # a failed item yields null at its index · the batch lives
    infer:                          # SLOT: the per-item job (any verb)
      # a reasoning model needs 16384 here, or a documented run.reasoning.effort: low
      max_tokens: 2000              # SLOT: the per-ITEM ceiling · think + answer · multiply by the fan width
```

### Templates containing this field

| Template | Source |
| - | - |
| `templates/fanout.nika` | [Line 120](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/fanout.nika#L120) |
| `templates/recover-optional-file.nika` | [Line 33](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/recover-optional-file.nika#L33) |

These are literal key occurrences in the source files, not an execution or conformance claim. [How to instantiate a template](https://docs.nika.sh/guides/templates.md).

## Contract and implementation

This page projects the named specification revision. Check [released engine status](https://docs.nika.sh/reference/status.md) and [the validation workflow](https://docs.nika.sh/guides/agent-authoring.md) before running a file. An optional field is not evidence that every engine supports every value.

Canonical identity: `language:word:backoff_strategy`. Spec revision: [`4e259e5b8012`](https://github.com/supernovae-st/nika-spec/tree/4e259e5b8012fcdf92f094142a52dfef24099b85).

[How documentation stays connected](https://docs.nika.sh/reference/knowledge-system.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.