Using Codex Worktrees
Worktrees let you create multiple working directories in a Git repository, enabling you to work on different tasks in parallel without interfering with each other.
What is a worktree?
Git worktree is a Git feature that lets you create multiple working directories in the same repository. Codex provides native support for worktrees.
Use Cases
- Develop multiple features in parallel
- Keep the main branch clean
- Perform development and code review simultaneously

Worktrees let you work as if you had multiple computers at once.
Using worktrees in Codex
Create a worktree
Create a worktree
Create a worktree in the Codex app
1. Select a project
2. Click "New" -> "Worktree"
3. Enter a branch name
4. Click create
Run tasks in a worktree
Select worktree mode when creating a thread:
| Mode | Description |
|---|---|
| Local | Work in the current project directory |
| Worktree | Work in a separate Git worktree |
Worktree mode creates a new Git worktree, keeping changes isolated.
Worktree management
Manage worktrees
View the worktree list
git
worktree list
Create a new worktree
git
worktree add ..
/
feature-branch
-b
feature-branch
Delete a worktree
git
worktree remove ..
/
feature-branch
Best Practices
- Create a separate worktree for each feature or fix
- Use descriptive branch names
- Clean up unneeded worktrees promptly when done
Worktrees are a powerful tool for parallel development, especially suitable for large projects.