What version of the Codex App are you using (From “About Codex” dialog)?
Codex Desktop 26.715.31925, bundled codex-cli 0.145.0-alpha.18.
What subscription do you have?
Not included; the failure occurs locally before a conversation-start request reaches the app server.
What platform is your computer?
macOS 26.5.2, Apple Silicon (arm64).
What issue are you seeing?
Creating a new worktree-backed conversation completes the Git worktree operation, but Codex Desktop immediately marks the conversation start as failed:
[info] Starting worktree creation
Preparing worktree (detached HEAD <sha>)
HEAD is now at <sha> <commit subject>
Worktree created at <CODEX_HOME>/worktrees/<id>/<repo>
No local environment selected
Failed to start the conversation
The resulting worktree is healthy: it is registered by Git, clean, detached at the requested commit, and usable from the command line. However, Codex creates no thread/session for it.
Retrying produces another valid detached worktree and the same frontend failure, leaving orphan worktrees behind.
Local diagnostics at the failure timestamp show:
- Git worktree creation completed successfully.
- The app-server/backend log contains no
thread/start request for the attempted conversation.
- The local thread database and session storage contain no new thread or rollout for the attempt.
No local environment selected is informational; no setup environment was selected, and worktree creation itself returned success.
- Desktop's global state had inconsistent project selection:
selected-project referred to synthetic project A while active-workspace-roots and electron-saved-workspace-roots referred to synthetic project B.
- The pending worktree UI state changed from waiting/starting to failed before backend thread creation.
This appears to be a Desktop frontend/project-routing failure after successful worktree creation and before the app-server conversation-start RPC.
All repository names, local paths, commit identifiers, commit subjects, prompts, and account details have been intentionally omitted.
What steps can reproduce the bug?
This has reproduced twice in the affected state:
- Have multiple saved local projects in Codex Desktop.
- Reach a state where the selected project and active/saved workspace root are different (the mismatch was observed in local Desktop state; the exact UI sequence that produced it is not yet known).
- From the intended project, submit a prompt using Worktree with no local environment selected.
- Wait for the worktree setup card to report that the detached worktree was created.
- Observe
Failed to start the conversation.
- Inspect the result:
git worktree list --porcelain shows a valid worktree at the requested commit.
- no corresponding thread/session was created;
- no
thread/start request appears in backend logs.
- Click retry and observe a second valid orphan worktree followed by the same failure.
What is the expected behavior?
After Git successfully creates the worktree, Codex Desktop should start the conversation against that worktree and associate it with the project that initiated the request.
If project-routing state is inconsistent, Desktop should either reconcile it automatically or stop before creating the worktree with a specific recoverable error. It should not create orphan worktrees and then show only the generic Failed to start the conversation message.
Additional information
Related but distinct reports checked:
Suggested diagnostic improvement: include the caught conversation-start error and the intended project/workspace identifiers in sanitized structured logs, and remove or reuse the just-created worktree when conversation start fails.
What version of the Codex App are you using (From “About Codex” dialog)?
Codex Desktop
26.715.31925, bundledcodex-cli 0.145.0-alpha.18.What subscription do you have?
Not included; the failure occurs locally before a conversation-start request reaches the app server.
What platform is your computer?
macOS 26.5.2, Apple Silicon (
arm64).What issue are you seeing?
Creating a new worktree-backed conversation completes the Git worktree operation, but Codex Desktop immediately marks the conversation start as failed:
The resulting worktree is healthy: it is registered by Git, clean, detached at the requested commit, and usable from the command line. However, Codex creates no thread/session for it.
Retrying produces another valid detached worktree and the same frontend failure, leaving orphan worktrees behind.
Local diagnostics at the failure timestamp show:
thread/startrequest for the attempted conversation.No local environment selectedis informational; no setup environment was selected, and worktree creation itself returned success.selected-projectreferred to synthetic project A whileactive-workspace-rootsandelectron-saved-workspace-rootsreferred to synthetic project B.This appears to be a Desktop frontend/project-routing failure after successful worktree creation and before the app-server conversation-start RPC.
All repository names, local paths, commit identifiers, commit subjects, prompts, and account details have been intentionally omitted.
What steps can reproduce the bug?
This has reproduced twice in the affected state:
Failed to start the conversation.git worktree list --porcelainshows a valid worktree at the requested commit.thread/startrequest appears in backend logs.What is the expected behavior?
After Git successfully creates the worktree, Codex Desktop should start the conversation against that worktree and associate it with the project that initiated the request.
If project-routing state is inconsistent, Desktop should either reconcile it automatically or stop before creating the worktree with a specific recoverable error. It should not create orphan worktrees and then show only the generic
Failed to start the conversationmessage.Additional information
Related but distinct reports checked:
AGENTS.override.mdfailure. In this case setup reports success and the failure occurs afterward, beforethread/start.Suggested diagnostic improvement: include the caught conversation-start error and the intended project/workspace identifiers in sanitized structured logs, and remove or reuse the just-created worktree when conversation start fails.