Codex Desktop reassigns an existing worktree chat to a newly added clone with the same Git remote
Summary
An existing Codex worktree chat was automatically reassigned in the sidebar/project metadata from its original local project to a newly created local project backed by an independent clone of the same repository.
I did not use Move, Handoff, or any other action intended to change the chat's project. The chat's actual cwd and Git common directory still belong to the original project.
Environment
- ChatGPT desktop app: 26.803.41515 (build 6321)
- macOS 26.5.2 (25F84)
- Thread ID:
019f6e26-35d9-7aa1-a3b2-3753d3a3433d - Workspace: Codex-managed worktree
Steps to reproduce
- Add an existing repository clone as local project A.
- Create and use a Codex worktree chat under project A.
- Independently clone the same private Git repository to a different local path. This clone has its own
.gitdirectory but the same origin URL. - Add that second clone as local project B.
- Reopen or inspect the existing chat from step 2.
Actual behavior
The existing chat appears under project B even though its workspace still points to project A.
Observed project association transition:
- Before (2026-08-10T02:45:54.893Z):
- project:
main-harness - projectId:
local-67eba96cd1902df645147d53129386bd - After project B was added (2026-08-10T07:56:21.562Z):
- project:
ClassIn Harness Worker - projectId:
85300336-b4af-4bf2-8db9-4eb3e00894fd
The same thread ID is present in both log records.
The thread still reports:
- cwd:
~/.codex/worktrees/22ce/classin_flutter_harness - Git common dir:
~/Documents/eeo_projects/ai/classin_flutter_harness/.git
Project B is a different clone at:
~/Documents/eeo_projects/classin-harness-worker/classin_flutter_harness
The two clones have separate .git directories. Only their private origin URL and repository content are shared.
Expected behavior
An existing chat should remain associated with its original saved local project unless the user explicitly moves or hands it off. Matching should preserve the saved project/path or Git common-directory identity and must not reassign chats merely because another clone has the same remote URL.
Impact
This makes an old chat unexpectedly appear inside a different project and is easy to miss. It creates confusion about which repository the chat belongs to and raises the risk of users running commands or pushing from the wrong checkout.
Diagnostics and privacy
Relevant app log:
~/Library/Logs/com.openai.codex/2026/08/10/codex-desktop-582ad2f3-cf13-4630-ad4a-a55028996f2c-1436-t0-i1-023608-0.log
I intentionally did not attach the full log because it contains session summaries and potentially sensitive project information. The two timestamped association records above are the minimal relevant evidence.
Related but distinct: #11019 discusses threads after physically moving a project directory. In this case the original directory was not moved or deleted; adding a second independent clone caused the existing chat's project association to change.