Codex CLI Adds Managed Git Worktree Tools
Codex CLI 0.162.0 added managed Git worktree tools to the terminal UI. The tools let Codex create and list worktrees from trusted local projects. They are available when the worktrees feature is enabled. They give agents an isolated checkout for parallel work without disturbing the main working tree.
Key Takeaways
- Managed Git worktree tools let Codex create and list isolated checkouts directly from the terminal UI.
- Worktrees give each task its own directory and branch, which helps avoid collisions between parallel agent runs.
- The tools work only in trusted local projects, which keeps worktree creation within an explicit trust boundary.
- The capability is feature-gated: the worktrees feature must be enabled first.
- Release 0.162.0 also made URLs clickable in many prompts and banners, including wrapped links.
- The release adds task pinning in the Command Center and transcript copy controls, rounding out terminal workflow improvements.
Managed worktrees in the terminal
Codex CLI 0.162.0 added tools for creating and listing managed Git worktrees. They work from trusted local projects and only when the worktrees feature is enabled. A Git worktree is a second checkout of the same repository in its own directory, so a task can proceed on its own branch without touching the files the developer is editing.
Why it matters
Agentic coding often involves several tasks at once, such as one agent fixing a bug while another prototypes a feature. Sharing a single working tree makes those tasks collide. With managed worktrees, Codex can set up a separate checkout per task and list the ones that already exist, which keeps parallel changes apart and easier to review.
Scope and safety
The tools apply only to trusted local projects, so worktree creation does not extend to repositories the user has not marked as trusted. Because the capability is gated behind the worktrees feature, it must be enabled before the tools appear.
Other changes in 0.162.0
The same release made URLs clickable across approval headers, questions, MCP prompts, warnings and banners, including when a link wraps over several lines. It added task pinning with p in the agent Command Center, and /copy for transcript blocks. It also fixed sandbox startup problems on Linux and Windows and preserved CRLF line endings in apply_patch updates.