Running two coding agent sessions on the same repository used to mean picking your poison: overwrite each other's files, or babysit a manual git worktree setup yourself. In the space of one release cycle, that changed for two more tools. Codex CLI 0.154.0 added an experimental --worktree flag on September 9, 2026, and Mistral Vibe shipped a full worktree plugin the same day. Claude Code has had this built in for a while. So how does the new Codex worktree flag actually compare to Claude Code's worktree workflow, and where does Mistral Vibe land as the third data point?
Key Takeaways
- Codex CLI 0.154.0, released September 9, 2026, added an experimental --worktree flag tied specifically to forked sessions, letting developers branch a session into its own isolated checkout.
- Mistral Vibe shipped a first-party worktree plugin the same day, with automatic retention of 15 recent worktrees and conservative cleanup that skips anything dirty or unpushed.
- Claude Code's worktree support is the most mature of the three, with active isolation enforcement that blocks edits and commands from touching the main checkout, not just a convention.
- Claude Code adds lifecycle depth the others lack: ask-to-create mid-session, .worktreeinclude for gitignored env files, subagent-level isolation, and automatic cleanup sweeps.
- All three tools now treat worktrees as first-class, but the real question is whether a tool enforces isolation for you or just hands you a checkout and hopes you remember which one you are in.
- For product managers, worktrees enable parallel investigation, competitive teardowns, multi-angle spec reviews, and discovery synthesis, exactly the workflow taught in the Claude Code for PMs cohort.
Learn this hands-on
Become a 10x PM by learning how to use Claude Code in your daily work as a Product Manager, through 3 highly efficient live sessions of 1h30. Join the Claude Code for PMs live cohort.
What Codex CLI's New --worktree Flag Actually Does
Codex CLI 0.154.0, released September 9, 2026, introduced worktree support behind an experimental label. Developers can attach an isolated git checkout to a new or forked session either by passing the --worktree flag at launch or by running the /worktree command from inside an active session. Codex tracks the worktrees it creates, so they can be browsed and resumed later instead of turning into untracked scratch directories someone has to hunt down and clean up by hand.
The detail worth noting is that Codex explicitly ties this to forked sessions. Forking a session to try a second approach only pays off if the two branches of work do not collide on disk, and pairing forks with worktrees closes exactly that gap. A developer can take a session partway through one approach, fork it, and let the fork run in its own checkout while the original keeps working untouched.
The same 0.154.0 release also added GPT-6 Astra to the model picker and to Amazon Bedrock catalogs, but the worktree feature is explicitly marked experimental, meaning the command surface (the flag, the slash command, or both) could still change before it settles, continuing the pace of recent Codex CLI updates. (Source: OpenAI Codex changelog)
How Claude Code's Worktree Support Compares
Claude Code has supported parallel sessions through worktrees for some time, and it is not marked experimental. Starting a session with claude --worktree feature-auth creates an isolated git worktree under .claude/worktrees/<name>/ on a new branch and starts Claude inside it immediately. Run the same command with a different name in a second terminal and you get a second fully isolated session, no manual git worktree add required.
A few things separate the mature version of this feature from a flag that just shipped as experimental:
- Ask-to-create, not just launch-to-create. You can start a session normally and later ask Claude to "work in a worktree," and it creates one on the fly using the built-in
EnterWorktreetool, switching the session's working directory, write access, and project configuration to that new location. - Enforced isolation, not just convention. While a session is inside a worktree, Claude Code actively blocks edits, command working directories, and git redirects that target the main checkout. That is a hard guardrail against exactly the file-collision problem worktrees exist to solve, not just a folder you happen to be working in.
- Built-in cleanup logic. On exit, Claude Code checks whether the worktree still holds changed or untracked files or unpushed commits. A clean, unnamed worktree gets removed automatically; a worktree with real work in it prompts you before anything is deleted.
.worktreeincludefor environment files. Since a worktree is a fresh checkout, gitignored files like.envare missing by default. A.worktreeincludefile (using.gitignoresyntax) copies specified gitignored files into every new worktree automatically.- Subagent-level isolation. A custom subagent can declare
isolation: worktreein its frontmatter so it always runs in its own checkout, and Claude Code runs a periodic sweep to clean up subagent and background-session worktrees once they age past a configurable retention window.
None of this makes Codex's new flag bad. It is early, it targets a specific and real pain point (forked sessions colliding on disk), and the "track and resume" behavior is the right instinct. But as of today, Claude Code's worktree support covers more of the lifecycle: creation, enforcement, environment setup, cleanup, and resumption, with the isolation actively enforced rather than left to convention. For a full walkthrough of building custom commands and subagents on top of this workflow, see our Claude Code mastery series.
Mistral Vibe Joins the Worktree Race
Mistral Vibe took a similar step in its v2.25.1 release. It shipped a new built-in worktree plugin with a skill for creating, reusing, and cleaning up git worktrees under $VIBE_HOME/worktrees, turning what developers previously had to script by hand into a first-party capability.
Vibe Desktop pairs the plugin with automatic retention: it keeps 15 recent managed Code worktrees by default (configurable in Local Coding settings) and periodically cleans up the rest. The cleanup logic is deliberately conservative, skipping any worktree that is active, dirty, has untracked files, or carries unpushed commits, so Desktop will not quietly delete work that was never saved or pushed elsewhere.
Mistral also improved session startup latency for worktree sessions specifically: a session that requests a worktree now starts immediately in the base repository and moves into the worktree once git worktree add completes, instead of blocking the entire session on the checkout. Attached images and files survive that move. (Source: Mistral Vibe changelog)
Claude Code Worktree vs Codex Worktree: Which Handles Parallel Sessions Better
Put side by side, the three tools converge on the same underlying need (developers running multiple agent sessions against one repo without them stepping on each other) but land at different points in the maturity curve:
- Codex CLI: experimental
--worktreeflag and/worktreecommand, tracks worktrees for later resume, explicitly framed around forked sessions. - Mistral Vibe: first-party
worktreeplugin, automatic retention with conservative cleanup rules, faster non-blocking session startup. - Claude Code: mature, non-experimental worktree support with active isolation enforcement, ask-to-create mid-session,
.worktreeincludefor env files, subagent-level isolation, and automatic cleanup sweeps.
For a developer deciding where to run parallel agent sessions today, the practical answer is that all three now treat worktrees as a first-class concept rather than a manual git chore. The gap is in depth: Codex is the newest and most experimental entry, Mistral Vibe sits in the middle with solid retention and startup ergonomics, and Claude Code currently covers the most ground across the full worktree lifecycle, from creation through enforced isolation to cleanup. For how Claude Code stacks up against two other terminal agents on parallel sessions specifically, see our comparisons with GitHub Copilot CLI and Warp's new Agent CLI.
Git Worktrees for Product Managers
If you are a PM who pairs with Claude Code rather than writing every line yourself, worktrees solve a very specific problem: running more than one line of investigation at once without them contaminating each other.
A few concrete uses:
- Competitive teardowns. Spin up a worktree per competitor and let Claude Code build out a comparison prototype in each, in parallel, without one session's scratch files leaking into another's.
- PRD or spec reviews from multiple angles. Fork a session reviewing a spec for technical feasibility, then fork again to review it for edge cases, each in its own isolated checkout so the two reviews do not overwrite each other's notes.
- Discovery synthesis. Run several exploratory sessions against the same codebase (one investigating auth, one investigating the billing flow) and merge only what is useful back into your main branch.
Product manager and want to work like this? This is exactly what we teach in Claude Code for PMs, our live cohort for product teams: 3 live sessions of 90 minutes over 2 weeks. Every PM ships a real feature, builds their own agent, and gets personalized written feedback.
The Bottom Line
Worktree support becoming table stakes across Codex CLI, Mistral Vibe, and Claude Code in the same week is a signal, not a coincidence. Parallel agent sessions on one repository are now a normal way to work, not an edge case, and every major coding agent is racing to make it safe by default. Codex's experimental flag and Mistral Vibe's new plugin are catching up to a workflow Claude Code has already built out in depth. If you run multiple agent sessions today, it is worth checking which of the three actually enforces isolation for you, rather than just handing you a checkout and hoping you remember which one you are in. For handling more complex multi-stage tasks inside those sessions once isolation is sorted, see our guide to Claude Code's ultracode effort level.