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

# While loops

## `core.loop.start`

Open a do-while control-flow region.

### Inputs

This action does not take input fields.

### Examples

**Repeat until a condition is met**

```yaml theme={null}
- ref: loop_start
  action: core.loop.start
- ref: check_status
  action: core.http_request
  depends_on:
    - loop_start
  args:
    url: https://api.example.com/jobs/${{ TRIGGER.job_id }}
    method: GET
- ref: loop_end
  action: core.loop.end
  depends_on:
    - check_status
  args:
    condition: ${{ ACTIONS.check_status.result.data.status != "completed" }}
    max_iterations: 20
```

## `core.loop.end`

Close a do-while control-flow region and evaluate whether execution should loop back to the matching `core.loop.start`.

### Inputs

<ParamField path="condition" type="string" required>
  Expression evaluated after the loop body; truthy values continue looping.
</ParamField>

<ParamField path="max_iterations" type="integer">
  Maximum number of loop iterations before failing.

  Default: `100`.
</ParamField>

### Examples

**Repeat until a condition is met**

```yaml theme={null}
- ref: loop_start
  action: core.loop.start
- ref: check_status
  action: core.http_request
  depends_on:
    - loop_start
  args:
    url: https://api.example.com/jobs/${{ TRIGGER.job_id }}
    method: GET
- ref: loop_end
  action: core.loop.end
  depends_on:
    - check_status
  args:
    condition: ${{ ACTIONS.check_status.result.data.status != "completed" }}
    max_iterations: 20
```
