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

# Parallel Tasks

> Decompose, then build all tasks at once.

# Parallel Tasks

Decompose. Build all tasks at once.

## When to use

When the spec decomposes naturally into independent tasks with strictly disjoint blast radii. Parallel execution divides run duration by the number of tasks.

```bash theme={null}
gump run parallel-tasks --spec spec.md
```

## The workflow

```yaml theme={null}
name: parallel-tasks
max_budget: 10.00

steps:
  - name: decompose
    type: split
    parallel: true
    get:
      prompt: |
        Decompose {spec} into independent tasks with strictly disjoint
        blast radii. No two tasks may touch the same file.
    run:
      agent: claude-opus
    gate: [schema]
    each:
      - name: impl
        type: code
        get:
          prompt: |
            Implement: {task.description}
            Only touch: {task.files}
        run:
          agent: claude-sonnet
          guard:
            max_turns: 60
        gate: [compile, test]
        retry:
          - attempt: 3
            agent: claude-opus
          - exit: 4

  - name: quality
    gate: [compile, lint, test]
```

## How it works

`parallel: true` on the split step means each task gets its own worktree. Agents work simultaneously. Merge is sequential in declaration order. File conflict = fatal.

Duration is that of the slowest task, not the sum.

## Customize

<AccordionGroup>
  <Accordion title="Use cheaper agents">
    Replace `claude-sonnet` with `qwen`.
  </Accordion>

  <Accordion title="Protect shared files">
    Add `untouched: "go.sum"` to the impl gate.
  </Accordion>

  <Accordion title="Test sequentially first">
    Remove `parallel: true` to test the workflow sequentially before enabling parallelism.
  </Accordion>
</AccordionGroup>
