Branching & Worktrees
Isolated git worktree branching for safe AI agent execution with manual merge-back.
How Branching Works
When starting an execution, enable branching to run the task in an isolated git worktree. You select both a source branch (where to branch from) and a target branch (the new working branch).
Enable "Use Branch" toggle in the run dialog
Select the source branch (defaults to current HEAD)
Optionally set a target branch name, or let it auto-generate
Click Start. The branch and worktree are created before the agent launches.
Automatic Branch Naming
When you leave the target branch name empty, AgentsInFlow auto-generates a branch name from the ticket type and title. For example, a "feature" ticket titled "Add search" becomes feature/add-search.
Worktree Isolation
Each execution runs in its own git worktree. Worktrees share the same git objects as your main repository, so they are fast to create and use minimal disk space. The agent works in a completely separate directory, so your main branch stays clean.
Multiple executions can run in parallel on different branches without interfering with each other.
Merge-Back
Merging is always manual and explicit. After reviewing the agent's changes in the git view or ticket inspector, you decide when and how to merge. AgentsInFlow does not auto-merge branches, giving you full control over what enters your main codebase.
Branch Setup Guarantee
The branch and worktree are created and verified before the agent CLI process launches. If branch creation fails (for example, due to a naming conflict), the execution does not start, and you receive a clear error message.