Codex App: Worktrees Handoff & Auto-Cleanup Controls
Codex App 26.303 introduces Handoff, a dedicated mechanism for moving a thread between the Local checkout and a Worktree environment without manual Git intervention. The release also adds a configurable Worktrees setting that lets users toggle automatic cleanup of Codex-managed worktrees on or off, giving teams finer control over how many isolated environments persist on disk.
Sources & Mentions
5 external resources covering this update
The Codex App
Hacker News
Today we shipped Handoff in the Codex app
X (Twitter)
Commit/Push buttons disappear after handoff from worktree to local · Issue #10572
GitHub
Codex App Worktrees Explained: How Parallel Agents Avoid Git Conflicts
Verdent Guides
Allow use of worktrees created outside codex app · Issue #12863
GitHub
Handoff: Seamless Movement Between Local and Worktree
Codex App 26.303 ships Handoff, one of the most-requested workflow improvements for teams using the app's Worktrees system. Handoff provides a dedicated, Git-aware mechanism for transferring an active thread between two distinct execution contexts: a Git worktree (an isolated checkout running on a separate branch) and the Local environment (the user's primary working directory).
Previously, moving work from a worktree back into the local checkout required manual Git operations — merging, rebasing, or cherry-picking changes across branches. Handoff automates this transition. When triggered from within a worktree thread, the feature handles the necessary Git operations, transfers the thread's context, and maintains a persistent association so that handing back to the worktree later remains coherent. This is particularly useful when a developer wants an agent to start work in isolation and then review or finalize the result directly in their main branch, without leaving the Codex App.
How Worktrees Work in Codex
In the Codex App, a worktree thread creates a separate Git checkout linked to the same repository metadata. Multiple worktree threads can run in parallel on different branches without any risk of interfering with each other or with the developer's active local work. When a new worktree thread starts, Codex selects a base branch, creates a dedicated checkout in a detached HEAD state, and optionally runs a local environment setup script against it.
Handoff bridges the gap at the end of that process: once the agent has completed its work in the worktree, the developer can move the thread to Local for final review, integration testing, or direct editing — all within the same Codex App session.
Configurable Worktree Auto-Cleanup
The 26.303 release also adds a Worktrees setting to the app's preferences panel. This toggle controls whether Codex automatically cleans up managed worktrees after a thread is archived or completed. By default, Codex retains approximately 15 recent worktrees; with the new setting, teams running high-frequency automations or long-lived parallel tasks can choose to disable automatic cleanup entirely and manage lifecycle manually, or keep the default to avoid accumulating stale worktree directories on disk.
This is a meaningful addition for teams running scheduled automations — frequent jobs can generate many worktrees quickly, and the cleanup toggle prevents unintended disk usage growth without requiring manual intervention.
Additional Changes
- An explicit English language option has been added to the app's language menu, resolving an edge case for users whose system locale does not default to English.
- GitHub and pull request workflows received reliability improvements.
- Approval prompts and app connection sign-in flows were refined.