GlossaryProductsIntermediate

Worktrees

Also written: Worktree-isolated sessions, Working tree

Worktrees are separate folders linked to a single Git repository, letting developers work on different branches at once.

In plain terms

Imagine you have one main project folder for your code. A worktree lets you create another folder, also linked to that same main project, but set up to look at a different version or 'branch' of your code.

This is useful when you want to work on a new feature without messing up your main code, or when you need to fix a bug in an older version while still developing the new one. Each worktree acts like its own independent project folder, but they all share the same underlying code history.

The expert version

Git worktrees allow multiple working directories to be checked out from a single repository. Each worktree can be associated with a different branch, enabling developers to work on multiple features, bug fixes, or versions concurrently without the need to constantly switch branches in a single directory. This feature is particularly useful for managing complex projects or when collaborating on different aspects of the codebase simultaneously.

Why it matters now

Frontier AI labs are integrating worktrees to offer developers more control and flexibility. Features like persistent cloud environments and local sandboxing allow users to work on different branches or projects simultaneously without affecting the main codebase. This improves workflow management and security for AI-assisted coding.

Where it shows up 9 items, newest first
How each company uses it
Anthropic Claude
Anthropic's Claude is improving session security and connectivity, which relates to the isolation and management of different working environments.
Microsoft Copilot
Microsoft Copilot and GitHub Copilot are using worktrees to enable local sandboxing, provide new controls in IDEs, and enhance agentic coding and workflow management.
OpenAI ChatGPT
OpenAI is using worktrees to provide persistent cloud environments for Codex, allowing users to code from anywhere and manage engineering work remotely.
Related terms

GitBranchesCommitsRepositoriesVersion ControlCode Collaboration

Often confused with
Monorepo
A monorepo is a single repository containing multiple distinct project
Forks
A fork creates a separate copy of an entire repository, typically for ind
Submodules
Git submodules allow embedding one Git repository within another, us
Origin

Worktrees were introduced as a feature of the Git distributed version control system. The initial implementation and announcement aimed to provide a more efficient way to manage multiple working copies of a repository. Source ↗

Try this about 5 minutes

If you use Git, you can create a worktree by navigating to your repository in the terminal and running 'git worktree add ../new-branch-folder branch-name'. Then, open the 'new-branch-folder' in your code editor and make changes. You can switch back to your main folder and see that your changes in the worktree did not affect it until you commit and merge.

Try it: Playbook entries that use thisPlaybook →

The Playbook: reusable how-tos, prompts, configs and tips pulled out of the news.

Questions people ask

Can I have multiple worktrees for the same branch?
Yes, you can create multiple worktrees pointing to the same branch, though the primary use case is for different branches to isolate development efforts.
Do worktrees take up extra space?
Worktrees share the underlying Git object database, so they only duplicate the files in the working directory, making them more space-efficient than cloning the repository multiple times.

First seen on Subvolts Feb 2, 2026. Updated Oct 17, 2026. Written by an AI model from the items above and reviewed against them weekly; report an error.