Have you heard about Jujutsu? If you haven’t start here: Use Jujutsu, Not Git
AI coding assistants like Claude Code are changing how we write software, but they also introduce a new challenge: managing the chaotic, experimental, and often parallel streams of work they generate. A common pattern is to run multiple Claude instances on different tasks, but orchestrating this with traditional Git can feel clunky, even with tools like git worktree.
This is where Jujutsu (jj) transforms from a ‘better Git’ into an essential tool for AI-driven development. As Maddie Mort explained in her ‘Jujutsu for Busy Devs’ [1] article , jj has a ‘significantly simplified mental model and command-line interface compared to Git, without sacrificing expressibility or power.’ That power is uniquely suited for the agentic workflow.
This guide will show you how to run parallel Claude sessions using two jj workflows, moving beyond simple isolation to effortlessly curating and stacking AI-generated code.
If you’re new to Jujutsu commands, the official Git command table provides a comprehensive mapping from Git commands you know to their JJ equivalents—an essential reference for navigating JJ’s powerful but different command structure.
Why Jujutsu is a Superpower for This Workflow
The design choices in jj that can seem strange to a seasoned Git user become superpowers when working with an AI agent.
-
Automatic Capture, Zero-Effort Committing: One of the most common hurdles for new
jjusers is that ‘all changes are always staged implicitly,’ as one HN commenter [2] noted. For an AI workflow, this is a feature, not a bug. Claude can generate dozens of files and changes;jjautomatically captures everything in the current revision (@). You never lose work, and you don’t have to constantly rungit add .to keep track. Claude’s workspace is a commit. -
Zero-Cost Branching (Revisions): In Git, you might hesitate to create a new branch for a small experiment. In
jj, creating a new revision withjj newis the default, zero-friction way to start a new line of thought. Each Claude session can live in its own revision without the overhead of branch management. -
The Ultimate Safety Net: We’ve all been there: a wrong command or a messy rebase leaves you wanting to burn it all down. With
jj, there’s a universal undo. Another HN commenter [3] put it perfectly:You can fuck up your repo in git and that’s it — you’re screwed… With jj you just
jj op undo <operation_id_that_fucked_your_repo>and you’re fine. -
Effortless Curation: Because Claude’s messy work is captured in a revision, you can act as a human curator. Many have asked, as this Lobsters user did [4], ‘How do you fit [a
git add -p] workflow into jj?’ The answer, as another developer on HN explained [5], is to ‘usejj splitto break changes apart.’ You can let Claude run wild, then surgically extract only the good parts into a clean, final commit. -
No More Rebase Hell: Perhaps the most powerful feature is how
jjhandles stacked changes. Managing a series of dependent PRs is, in the words of yet another HN commenter [6], ‘excruciating in git if you ever need to make a fix to an earlier PR because you have to manually rebase every subsequent change.’ Withjj, this process is automatic, making it trivial to stack dependent tasks for your AI agent.
Method 1: The ‘Single Directory, Multiple Revisions’ Workflow
This is the most jj-native approach for keeping multiple task revisions in the commit graph while working from one directory. It is useful when you want to switch between tasks quickly and let jj track each task as its own revision.
It is not true parallel filesystem isolation. I verified this locally with jj 0.32.0: after creating two revisions with different contents, jj edit <rev> kept the same current working directory and swapped the files on disk to that revision’s contents. A single jj workspace has one working copy. If you want multiple Claude sessions running at the same time against separate files, dependencies, or build artifacts, use the multiple workspaces workflow below.
Step 1: Set Up Your Workspace
First, get your repository ready for jj.
Step 2: Create a Revision for Each Claude Task
Instead of creating branches, you create distinct, parallel revisions off your main branch. Each revision is an isolated line of work in jj’s history.
Your jj log will now show two parallel revisions branching off main:
@ fghij... (empty) Claude Task: Build data visualization component
│
○ abcde... (empty) Claude Task: Refactor auth system
│
◆ main... The main commit
Step 3: Switch Into a Revision
You switch the current workspace to a revision using jj edit. Your file system updates to reflect that revision’s state.
This isolates the work in jj’s history model, not in a separate directory. Other terminals pointed at the same project directory will see the same file changes when the working copy moves.
Terminal Tab 1 (Auth Refactor):
To work on the second task, stop or pause the first Claude session, then switch the same working copy:
# Switch the current workspace to the data viz revision.
# This swaps the files on disk to that revision's context.
jj edit fghij
claude "Build a new data visualization component using D3.js..."
You can switch between these contexts with jj edit <rev_id>. Claude’s changes are kept in the selected revision, but the filesystem is still shared by this one workspace. For concurrent Claude sessions, use separate jj workspaces.
Method 2: The ‘Multiple Workspaces’ Workflow (The Worktree Equivalent)
If you need true filesystem isolation, especially for multiple Claude sessions running concurrently, use jj workspace. This is the jj equivalent of git worktree: each workspace gets its own directory, working copy, dependencies, and build artifacts while sharing the same underlying repo history.
Step 1: Create a New Workspace for a Task
A workspace is a separate directory that shares the same underlying .jj repo but has its own working copy.
This does two things:
- Creates a new directory
../project-feature-a. - Creates a new working-copy revision based on
mainin that directory. You can then describe it, run installs, and launch Claude there without moving the files in your original workspace.
Step 2: Run Claude in Each Workspace
Terminal Tab 1 (Main Project):
cd your-project
claude "Fix bug #123"
Terminal Tab 2 (Feature A Workspace):
Uplevel: Curating and Stacking Claude’s Work
Now we combine the concepts to create a seamless human-AI collaboration workflow.
1. Curating Claude’s Messy Output
Claude has finished its ‘auth refactor’ (abcde). The revision now contains all the changes, good and bad. Here’s how to create a clean commit from the mess.
2. Stacking Dependent AI Tasks
Imagine Claude needs to build a profile page that depends on the new JWT auth. You find a bug in the auth code after Claude has already started the profile page.
That’s it. Jujutsu automatically rebases the lmnop revision on top of the newly fixed xyz revision. No manual rebase needed. The problem that was once ‘excruciating’ is now solved implicitly.
By embracing jj’s revision-based model, you can elevate your work with AI from a series of disjointed prompts to a fluid, orchestrated, and safe development process.