Codex Desktop: permanent worktree chats are grouped under source workspace instead of labelled worktree
Summary
Codex Desktop appears to run new chats in the selected permanent worktree, but still groups/routes the chat under the original/source workspace project section instead of the labelled permanent worktree section.
This makes project/sidebar organization confusing: I can start from a permanent worktree labelled for a specific effort, but the new chat appears under the original repository/project section.
Environment
- Product: Codex Desktop
- Platform: macOS
- Feature involved: permanent worktrees / project sidebar grouping / thread workspace hints
Reproduction
- Start with a repository workspace, for example:
/path/to/source-repo
- Create or select a permanent worktree from that repository, for example:
/path/to/codex/worktrees/<id>/source-repo
- Give that permanent worktree a custom project/sidebar label, for example:
Economics
- Start a new chat from that labelled permanent worktree/project section.
- Observe where the chat appears in the Codex Desktop sidebar.
Expected behavior
The chat should be grouped under the labelled permanent worktree/project section that the user started from.
For example, if the user starts the chat from the permanent worktree labelled Economics, the chat should appear under Economics.
Actual behavior
The chat runs in the permanent worktree execution directory, but the sidebar/project grouping still uses the original/source repository workspace.
In my local state, the anonymized shape looks like this:
Actual execution cwd:
/path/to/codex/worktrees/<new-id>/source-repo
Thread workspace root hint:
/path/to/source-repo
Existing labelled permanent worktree:
/path/to/codex/worktrees/<other-id>/source-repo -> "Economics"
So the agent process is correctly rooted in the permanent worktree, but the thread's project identity appears to be inherited from the source workspace root.
Why this matters
Permanent worktrees are useful for separating long-running efforts on the same repository. If chats created from those worktrees are grouped back under the source repository, the sidebar loses the intended separation and new chats are easy to file under the wrong project/effort.
Notes
I have intentionally anonymized local paths and repository names here. The important part is the mismatch between:
- execution cwd: permanent worktree path
- sidebar/project grouping: source workspace root
- labelled worktree section: not used for the new thread
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗