Git Worktrees
Every run executes in an isolated Git worktree. Your main branch stays clean — no half-finished code, no broken builds, no risk of corruption from a misbehaving agent.How it works
When you rungump run, Gump:
- Creates a worktree in
.gump/worktrees/run-<uuid> - Attaches it to a temporary branch
gump/run-<uuid> - Runs all steps inside this worktree
- Commits a snapshot after every agent step
Snapshots
After each agent step completes, Gump commits the changes with a structured message:Parallel worktrees
Whenparallel: true is set on a foreach, each item gets its own worktree cloned from the current state. Agents work simultaneously in separate directories. After all items complete, Gump merges them back sequentially in declaration order.
If two items modify the same file, the merge creates a conflict and the circuit breaker stops the run.
Two runs at once
You can run twogump run commands on the same repo simultaneously. Each creates its own worktree and its own run artifacts. No global lock. The only contention point is gump apply — if both runs modify the same files, the second apply will hit a merge conflict (standard Git behavior).
Apply
gump apply merges the run’s branch into your current branch:
Gump-Run: <uuid> trailer to the merge commit. You can trace any line of code back to the run that produced it.
Gump does not auto-commit on your branch. The merge is staged — you review it and commit (or let Gump’s apply do it with the trailer).
Cleanup
Worktrees, branches, and run artifacts accumulate over time. Clean them up:Dirty check
Before creating a worktree, Gump checks that your working directory is clean (no uncommitted changes). The.gump/ and .pudding/ directories are excluded from this check — workflow files are config, not source code.
If the check fails, Gump tells you what’s dirty and suggests committing or stashing.