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

# Resume & Replay

> When a run fails or you want to redo part of it, Gump offers two recovery modes.

# Resume & Replay

When a run fails or you want to redo part of it, Gump offers two recovery modes with different trade-offs.

## Resume

Continue where you left off. The worktree stays as-is, sessions are preserved.

```bash theme={null}
gump run --resume
```

Completed steps are skipped. The FATAL step relaunches with `attempt` reset to 1, but the state is enriched from the failed attempt. In an `each:` block, completed tasks are skipped and the FATAL task is relaunched. In parallel, only the FATAL branch is relaunched.

To resume a specific run:

```bash theme={null}
gump run --resume --run <uuid>
```

## Replay

Start fresh from a specific step. The worktree is reset to the state before that step.

```bash theme={null}
gump run --replay --from-step impl
```

The state is reloaded with the target step's outputs (and successors') cleared. Sessions are lost. If the target step is inside an `each:` block, the replay restarts from the beginning of the each (all tasks relaunched). For a single task, use the qualified path: `--from-step build/task-2/impl`.

## Differences

| Aspect         | Resume                 | Replay                      |
| -------------- | ---------------------- | --------------------------- |
| Worktree       | As-is                  | Reset to pre-step commit    |
| State          | Preserved              | Target step outputs cleared |
| Sessions       | Preserved              | Lost (fresh)                |
| Retry counters | Reset to 1             | Reset to 1                  |
| Use case       | Continue after a crash | Clean re-execution          |

## When to use which

**The run crashed mid-step** → `--resume`. The agent can continue its session.

**A gate keeps failing and you changed the prompt** → `--replay --from-step`. Start the step fresh.

**You want to re-run with a different agent** → `--replay --from-step`. The worktree resets and the new agent starts clean.

**The plan was bad** → just run `gump run` again. A new run creates a new worktree from scratch.
