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

# max_items

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

[Language reference](/reference/language/overview.md) / `max_items`

## Meaning and placement

### task → for\_each

The fan's hard ceiling on the count axis · a longer collection fails the task before its first item (NIKA-VAR-006, naming the count and the cap), never a truncation · a literal list longer than the cap is refused at parse · spec/03-dag.md §for\_each.max\_items.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/$defs/task/properties/for_each/properties/max_items` |
| type | `"integer"` |
| minimum | `1` |

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

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

## Examples

No matching source-template occurrence is recorded in this projection. [Write a workflow](/guides/templates.md) or consult the schema declaration above.

## Contract and implementation

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

Canonical identity: `language:word:max_items`. Spec revision: [`a4796d976534`](https://github.com/supernovae-st/nika-spec/tree/a4796d976534bddb28562df157ac2afcaadd787c).

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


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