Skip to main content
Run each praisonai run on its own git worktree so concurrent runs never step on each other’s changes.

Quick Start

1

Simplest run

Run a one-shot prompt on its own branch.
2

Keep the worktree for review

Keep the checkout in place after the run instead of tearing it down.
3

Run a YAML file in isolation

A YAML workflow runs on its own branch too.

How It Works

--worktree provisions a fresh git worktree on a new branch, chdirs into it for the run, then handles teardown. Isolation provisions a fresh worktree on a new branch named praisonai/<slug>-<8-char-uuid> under <repo>/.praisonai/worktrees/. A random 8-char UUID suffix keeps two concurrent or repeated runs of the same target from sharing a branch or mixing each other’s uncommitted changes. Even when the run raises, the original working directory is restored and the worktree is torn down.
A YAML file target is resolved to an absolute path before the chdir, so an untracked or gitignored ./agents.yaml (absent from the fresh worktree) still loads.
--worktree always runs in-process β€” it disables the warm-runtime shortcut. An isolated run may feel slightly slower than an attached praisonai run.

CLI output lines

Grep these exact prints to follow an isolated run:

Configuration Options

These flag combinations fail fast with exit code 1:
  • --worktree + --attach β†’ --worktree cannot be combined with --attach (the warm runtime is a separate process whose cwd cannot be redirected).
  • --keep without --worktree β†’ --keep requires --worktree.
  • --worktree + --agent / --command / --profile / --profile-deep β†’ --worktree is only supported for direct prompt and YAML file runs.

Choosing Between Plain and Isolated Runs


Common Patterns

Run multiple isolated tasks in parallel β€” each gets its own branch.
Review, then merge (default, without --keep β€” the branch is retained).
Keep the checkout open for in-place review.
Fall back safely on a non-git directory β€” isolation degrades to a plain run.

Interaction flow


Best Practices

Isolation shines when a run touches the working tree. Concurrent or repeated runs of the same target each get their own branch, so uncommitted changes never mix.
Pair --worktree with --session to keep a review thread while the file changes land on a dedicated branch you can inspect before merging.
Outside a git repository the flag prints Not a git repository; running without worktree isolation. and continues without isolation β€” safe to leave on in scripts.
The warm runtime is a separate process whose cwd cannot be redirected, so --worktree + --attach fails fast with exit code 1.

Workspace Isolation

The Python GitWorktreeAdapter API this CLI feature builds on.

Run Command

The full praisonai run flag reference.