Prompts & Context
Every agent step has a prompt that tells the agent what to do. Gump resolves variables in the prompt, assembles additional context, and writes everything to a context file in the worktree before launching the agent.Prompt templates
Theprompt field is a template with variables in curly braces:
Available variables
| Variable | Available | Description |
|---|---|---|
{spec} | Always | Content of the spec file |
{item.name} | In a foreach | Current item name |
{item.description} | In a foreach | Current item description |
{item.files} | In a foreach | Current item blast radius |
{steps.<n>.output} | After step executes | Output of a previous step |
{error} | On retry | Error from the previous failed attempt |
{diff} | On retry | Diff from the previous failed attempt |
{run.cost} | Always | Running cost total |
Template escaping
If your prompt contains literal curly braces (e.g., a JSON example), escape them with double braces:{{ produces a literal {. }} produces a literal }.
Custom context
Thecontext field injects additional information into the agent’s context. Two sources are supported:
File context
Command context
Combining sources
How context is materialized
Gump writes a context file in the worktree before launching the agent. The file name depends on the agent:CLAUDE.md for Claude Code and Cursor, AGENTS.md for Codex and OpenCode, GEMINI.md for Gemini, QWEN.md for Qwen.
The context file contains:
- Gump system instructions (output format, Git rules, worktree constraints)
- Custom context (files and command outputs)
- Validation commands (so the agent knows what checks will run)
- The resolved prompt
Prompt from a file
For long prompts, usefile: instead of inline text: