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:
Key variables
See the State & Variables page for the full reference.
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, AGENTS.md for Codex and OpenCode, GEMINI.md for Gemini, QWEN.md for Qwen, .cursor/rules/gump-agent.mdc for Cursor.
The context file contains:
- Gump system instructions (output format, Git rules, worktree constraints, step type conventions)
- Resolved template variables
- Custom context (files and command outputs)
- The resolved prompt
Retry context injection
Whenattempt > 1 and the prompt is not overridden in the retry block, Gump automatically injects a retry section into the context — the failed diff, the error output, non-repetition instructions, and remaining attempts.
When the prompt is overridden in the retry block, this section is not injected — the developer controls everything.
Prompt from a file
For long prompts, usefile: instead of inline text: