Skip to content

v1.6.0 — Git Worktree Isolation

Choose a tag to compare

@brian-lai brian-lai released this 16 Mar 21:19
· 92 commits to main since this release
08ab763

What's New

Git Worktree Isolation

The agent now works in an isolated git worktree instead of switching your working branch. This means you stay on main (or wherever you are) while the agent implements in .para-worktrees/{task-name}/.

Key Changes

  • /para:execute now runs git fetch origin main && git worktree add .para-worktrees/{task-name} -b para/{task-name} origin/main instead of git checkout -b. The worktree path is recorded in context/context.md JSON metadata as worktree_path.

  • /para:archive automatically removes worktrees on cleanup (git worktree remove + git worktree prune). Requires uncommitted changes to be committed or stashed first — no force-remove.

  • /para:summarize reads diffs from the worktree using git -C {worktree_path} diff main...HEAD instead of the main working tree.

  • /para:status shows worktree health: active, stale reference, or orphaned. Detects and warns on out-of-sync states.

  • /para:init adds .para-worktrees/ to .gitignore automatically.

  • Session hook shows active worktree count in the status line when worktrees are present.

  • --no-worktree escape hatch falls back to the legacy git checkout -b behavior for workflows that don't need isolation.

JSON Schema Update

worktree_path is now a first-class field in context/context.md:

{
  "execution_branch": "para/task-name",
  "worktree_path": ".para-worktrees/task-name",
  ...
}

For phased plans, each phase entry also tracks branch and worktree_path (set to null until the phase is executed; cleared back to null after the phase worktree is removed).

Why Worktrees?

Previously the agent had to git checkout to a new branch, disrupting your working directory. With worktrees, the agent works in a separate directory on its own branch while your main working tree stays untouched — you can keep editing, reviewing, or running the app on main while the agent implements in the background.