> ## 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.

# fail_fast

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

[Language reference](/reference/language/overview) / `fail_fast`

## Meaning and placement

### task → for\_each

Whether the fan-out abandons the batch on the first failure · default true. False finishes every item and yields null at a failed index, so the batch reports what it could.

| Property        | Declaration                                            |
| --------------- | ------------------------------------------------------ |
| Requirement     | Optional in this object                                |
| Schema location | `/$defs/task/properties/for_each/properties/fail_fast` |
| type            | "boolean"                                              |

**In the same object:** [items](/reference/language/words/items) · [max\_parallel](/reference/language/words/max_parallel)

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

## In a source template

Excerpt from `templates/fanout.nika.yaml`, source lines 101–110. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}
    for_each:
      items: ${{ with.discover }}
      max_parallel: 8
      fail_fast: false
    on_error:
      recover: null                 # an unreadable item yields null · the batch lives
    invoke:
      tool: "nika:read"
      args: { path: "${{ item }}" }

```

### Templates containing this field

| Template                     | Source                                                                                                                               |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `templates/fanout.nika.yaml` | [Line 104](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/fanout.nika.yaml#L104) |

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

## Contract and implementation

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

Canonical identity: `language:word:fail_fast`. Spec revision: [`c5ebbb7b862b`](https://github.com/supernovae-st/nika-spec/tree/c5ebbb7b862b68bc6cf7235efba61173b844afc6).

[How documentation stays connected](/reference/knowledge-system).
