Codex app: support selecting existing worktrees.
Open 💬 4 comments Opened May 12, 2026 by CloudSen
What variant of Codex are you using?
App
What feature would you like to see?
Current behavior:
Only creating a new worktree is supported when starting a new conversation.
<img width="758" height="688" alt="Image" src="https://github.com/user-attachments/assets/f02def38-6868-4e13-b54c-08b333a3fe38" />
Issue:
Sometimes the conversation has been archived, or I want to reset the context, so I need to start a new conversation while continuing work on the same worktree.
Additional information
Codex App Version: 26.506.31421 (2620)
System: Darwin 25.4.0 arm64 arm
4 Comments
Still seeing this on Codex Desktop.
Current new-thread UI only exposes:
There does not appear to be a first-class way to choose an already-existing Codex-managed worktree as the execution target for a fresh zero-context thread.
The workflow this blocks is: continue from the same filesystem/git/index state after a long or polluted conversation, but start with an empty transcript/context window. Forking is not equivalent because it preserves conversation history, and creating a new worktree is not equivalent because it loses the exact existing checkout state.
Expected UX could be something like "New thread here", "Use existing worktree", or "Clear context for this worktree" from an existing worktree-backed thread.
+1 - I like to switch between coding agents apps often and this would help a ton.
Adding another concrete workflow that this would unblock.
In a spec/PR-review workflow, I sometimes need a fresh zero-context Codex thread attached to an already-existing local worktree because that worktree has the exact PR branch, local indexes, build-server files, and git state I want to preserve.
Current limitations I hit:
fork_threadwith same-directory can attach to the existing worktree, but it inherits completed conversation history, so it is not a clean zero-context review thread.create_threadcan create a new Codex-managed worktree from a branch, but it cannot target an arbitrary existing worktree path that is not listed as a saved project.Desired UX/API:
This is separate from worktree creation bugs like #30954 and UI refresh bugs like #30955. This request is specifically for selecting an existing worktree as the execution target for a fresh thread.
I’d like to add a UI and safety dimension to this request.
In the new-task composer,
Project | Local | mainlooks like three pieces of selected workspace state. However:Suggested intent-based choices:
For an existing task-managed worktree, useful actions would be:
The picker should show whether each worktree is managed, permanent, or user-created, along with its dirty state and whether another task is active.
To avoid concurrent-write problems such as #38541, Codex should block direct attachment when another task is actively using the worktree, or require a safe handoff/locking flow.
This would support starting with fresh conversation context while preserving the exact checkout state, without silently creating another worktree. The official worktree documentation already distinguishes task-dedicated managed worktrees from reusable permanent worktrees and explains that managed worktrees start detached.