Skip to main content
From a user perspective, worktrees are the execution roots behind sessions.

Practical model

  1. You start a task/session.
  2. ctx runs work in that session’s worktree.
  3. The diff panel reflects that worktree’s changes.
  4. You review and decide to keep or revise.

Worktree controls you will see

  • Worktree identity/path context in session UI.
  • Diff summary tied to the active session’s worktree.
  • Worktree-related setup controls in Settings > Worktree Bootstrap.

Worktree bootstrap (important)

Use Settings > Worktree Bootstrap to run setup commands automatically for new worktrees. You can configure:
  • setup command
  • timeout
  • whether agent start waits for completion
Use this to keep dependencies and generated inputs consistent across sessions.