Skip to main content

Output Modes

The output field on an agent step tells Gump what the agent will produce and how to handle it.

diff (default)

The agent writes or modifies code in the worktree. Gump captures the git patch after the agent finishes.
- name: impl
  agent: claude-sonnet
  output: diff
This is the default — if you omit output, Gump assumes diff. The result is a structured Diff Contract containing the base commit, head commit, patch, and list of changed files.

plan

The agent produces a JSON array of items. Gump parses it, validates the schema, and stores it in the state bag. A foreach step can then iterate over the items.
- name: decompose
  agent: claude-opus
  output: plan
  prompt: |
    Decompose {spec} into independent items.
  gate: [schema]
The agent writes the plan to .gump/out/plan.json. Each item has a name, a description, and optionally a files array (the blast radius).
[
  {
    "name": "add-healthz",
    "description": "Add the /healthz endpoint",
    "files": ["internal/server/healthz.go", "internal/server/healthz_test.go"]
  }
]
Implicit guard: no_write: true — the agent is prevented from modifying code files during planning.

artifact

The agent produces free-form text — an analysis, a decision, a specification. Gump stores the text in the state bag. No code changes expected.
- name: arbiter
  agent: claude-opus
  output: artifact
  prompt: |
    Analyze both reviews and produce actionable instructions.
The agent writes to .gump/out/artifact.txt. Other steps can reference the artifact via {steps.arbiter.output}. Implicit guard: no_write: true.

review

The agent produces a JSON verdict: pass or fail, with a comment.
- name: code-review
  agent: claude-opus
  output: review
  session: fresh
  prompt: |
    Review the implementation for correctness.
    Diff: {steps.impl.output}
The agent writes to .gump/out/review.json:
{
  "pass": false,
  "comment": "Missing error handling on the database connection timeout."
}
If pass is false, it triggers the step’s on_failure handler (same as a gate failure). Implicit guard: no_write: true.

Implicit guards

The plan, artifact, and review modes automatically enable no_write: true — the agent is killed if it writes files outside .gump/out/. This prevents a planning or review agent from accidentally modifying code. You can override this with guard: { no_write: false } if needed.