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

# Human-in-the-Loop

> Sometimes you want to review an agent's output before the workflow continues.

# Human-in-the-Loop

Sometimes you want to review an agent's output before the workflow continues. Gump supports pausing a run for human intervention with two positions.

## hitl: before\_gate (default)

Pause after the RUN, before the GATE. You inspect the worktree and decide to continue (the gate runs) or abort.

```yaml theme={null}
- name: decompose
  type: split
  run:
    agent: claude-opus
  hitl: before_gate
  get:
    prompt: "Decompose {spec} into tasks."
  gate: [schema]
```

`hitl: true` is an alias for `hitl: before_gate`.

## hitl: after\_gate

Pause after the GATE, before retry. You see the gate results and decide to continue, abort, or modify the worktree manually.

```yaml theme={null}
- name: impl
  type: code
  run:
    agent: claude-sonnet
  hitl: after_gate
  gate: [compile, test]
  retry:
    - exit: 3
```

## --pause-after

Pause after a specific step without modifying the YAML:

```bash theme={null}
gump run tdd --spec spec.md --pause-after decompose
```

Same behavior as `hitl: before_gate`, but from the command line. Useful for debugging or one-off reviews.

## Manual intervention

While paused, you have full access to the worktree. You can edit files, modify the plan, run your own tests, or delete generated code. When you resume with `gump run --resume`, Gump picks up from the current worktree state.

## When to use HITL

HITL is most valuable on the decompose/split step — the plan determines everything that follows. A bad decomposition leads to wasted agent work. Validating the plan manually before agents start building is the highest-leverage intervention point.
