Codex 0.162 lets the model create git worktrees without moving its working directory
Codex CLI 0.162.0, released October 8, 2026, adds create_worktree, get_worktree_creation_status and list_worktrees tools, letting the model spin up a clean checkout of the default branch on its own initiative. The agent's working directory stays unchanged, so every command against the new tree must name it explicitly.
- Tools are available when the worktrees feature is on and the project is trusted
- create_worktree runs asynchronously and returns an operationId for status polling
- New trees land in $CODEX_HOME/worktrees with a detached HEAD and no uncommitted changes
- Patch 0.162.1 on October 9 fixed two bugs
Read next
Software