Codex Desktop creates a valid worktree, then shows “Failed to start the conversation” without sending thread/start
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Reproduce the failure with multiple saved projects and trace the Desktop worktree setup completion into the conversation-start path, focusing on selected-project versus active-workspace-roots state. Check the pending worktree UI transition and whether a thread/start request is issued after Git reports success. Done means consistent project routing, a started conversation for the created worktree, and no orphan worktree on failure.
Written by the indexing model from the issue text.
Description
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/startrequest for the attempted conversation. - The local thread database and session storage contain no new thread or rollout for the attempt.
No local environment selectedis informational; no setup environment was selected, and worktree creation itself returned success.- Desktop's global state had inconsistent project selection:
selected-projectreferred to synthetic project A whileactive-workspace-rootsandelectron-saved-workspace-rootsreferred 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 --porcelainshows a valid worktree at the requested commit.- no corresponding thread/session was created;
- no
thread/startrequest 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:
- #14519: the thread/session exists but is missing from the Desktop project list. In this case no thread/session is created at all.
- #29670: worktree creation reports a post-create
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.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·