Skip to main content

Steps

A step is a unit of work in a workflow. Gump has four kinds of steps, inferred from the fields you set — there’s no explicit type: field.

Agent Step

A step with an agent field. Runs a coding agent in the worktree.
- name: impl
  agent: claude-sonnet
  output: diff
  prompt: |
    Implement: {item.description}
  guard:
    max_turns: 60
  gate: [compile, test]
  on_failure:
    retry: 3
    strategy: [same, "escalate: claude-opus"]
Available fields on an agent step:
  • name — unique identifier (required)
  • agent — which agent to use (required)
  • prompt — the prompt template, as a string or file: path
  • output — what the agent produces: diff (default), plan, artifact, review
  • context — additional context sources (file:, bash:)
  • session — session mode: fresh (default), reuse, reuse-on-retry, reuse: <step>
  • timeout — kill after this duration (e.g., "5m")
  • max_budget — cost limit for this step in dollars
  • hitl — pause for human validation after execution
  • guard — live breakers during execution
  • gate — checks after execution
  • on_failure — what to do if a gate or guard fails

Gate Step

A step with gate but no agent, steps, or workflow. Runs deterministic checks on the worktree without calling any agent.
- name: quality
  gate: [compile, lint, test]
Use gate steps for final verification, quality checks, or integration tests. If the gate fails, on_failure applies (if present), otherwise the run stops.

Orchestration Step

A step with child steps. Groups sub-steps together, optionally with foreach or parallel.
- name: build
  foreach: decompose
  parallel: true
  steps:
    - name: impl
      agent: claude-sonnet
      gate: [compile, test]
Fields: name, steps, foreach, parallel, gate, on_failure. An orchestration step can have its own gate and on_failure — if the group gate fails, the entire group retries.

Workflow Step

A step with workflow but no agent or steps. Calls another workflow as a sub-workflow.
- name: validate
  workflow: security-check
  with:
    diff: "{steps.impl.output}"
    agent: "claude-sonnet"
Fields: name, workflow, with. The sub-workflow’s state bag is grafted into the parent — no explicit return needed.

Detection rules

Gump infers the step kind from the fields present. Some combinations are invalid:
  • agent + steps → error (an agent step can’t have child steps)
  • agent + workflow (without foreach) → error
  • workflow + steps (without foreach) → error
  • guard on a non-agent step → error (guards monitor agents, not gates)
  • with without workflow → error