codex - 💡(How to fix) Fix Codex Desktop: permanent worktree chats are grouped under source workspace instead of labelled worktree

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

Code Example

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"
RAW_BUFFERClick to expand / collapse

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

  1. Start with a repository workspace, for example:
    • /path/to/source-repo
  2. Create or select a permanent worktree from that repository, for example:
    • /path/to/codex/worktrees/<id>/source-repo
  3. Give that permanent worktree a custom project/sidebar label, for example:
    • Economics
  4. Start a new chat from that labelled permanent worktree/project section.
  5. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop: permanent worktree chats are grouped under source workspace instead of labelled worktree