Codex App groups chats under the topmost saved project when multiple saved projects share a repo
Summary
Codex App appears to group chats under whichever saved project is highest in the sidebar when multiple saved projects point to different worktrees or clones of the same Git repository. The chat grouping changes when the project order changes, even though the underlying Git worktrees and branches are correct.
Environment
- Product: Codex App desktop
- Host type: remote SSH host
- Repository: private/user repository, same Git remote shared by all saved projects
- Saved projects involved: multiple sibling directories representing separate Git worktrees or a standalone clone of the same repository
Example anonymized layout:
~/projects/repo-main -> branch main-or-feature-a
~/projects/repo-worktree-a -> branch feature-a
~/projects/repo-worktree-b -> branch feature-b
~/projects/repo-standalone -> branch feature-b, standalone clone of the same remote
Actual Git state
The underlying Git state appears correct and separated. Each directory reports the expected top-level path and branch when checked in the terminal.
Example diagnostics:
git worktree list --porcelain
git -C ~/projects/repo-main status --short --branch
git -C ~/projects/repo-worktree-a status --short --branch
git -C ~/projects/repo-worktree-b status --short --branch
Representative anonymized output:
worktree ~/projects/repo-main
branch refs/heads/main-or-feature-a
worktree ~/projects/repo-worktree-a
branch refs/heads/feature-a
worktree ~/projects/repo-worktree-b
branch refs/heads/feature-b
For Git worktrees, each secondary checkout also has a private .git pointer like:
~/projects/repo-worktree-a/.git:
gitdir: ~/projects/repo-main/.git/worktrees/repo-worktree-a
~/projects/repo-worktree-b/.git:
gitdir: ~/projects/repo-main/.git/worktrees/repo-worktree-b
Observed behavior
- With saved project A above saved project B in the project list, chats from this shared repository appear under project A.
- After removing project A from the Codex sidebar, the same chats appear under project B.
- After adding a standalone clone of the same repository and moving it above project B, the same chats appear under the standalone clone.
- Moving project order changes where chats appear, even though the actual thread
cwd, Git worktree, and branch do not match the project shown in the sidebar.
In one inspected thread, the sidebar/project grouping showed one saved project while the actual thread metadata / terminal state indicated a different cwd.
Expected behavior
Chats should be grouped under the saved project whose path matches the thread's actual project path / cwd, not whichever saved project is first in the sidebar among projects sharing the same Git repository or remote.
Why this looks like a Codex App project-indexing bug
The underlying Git worktrees are not mixed. Each worktree has a separate private .git pointer and a distinct branch. The problem seems to be in Codex App's sidebar/project chat grouping logic when multiple saved projects correspond to the same repository or Git identity.
Notes
Screenshots were captured locally showing the same chats moving between different saved projects as project ordering changed, but I am filing this through the GitHub connector and cannot attach local images directly from here.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can confirm the same issue on a local macOS host (not remote SSH), with timestamped app-log evidence showing the project association changing while the thread workspace remains unchanged.
Environment:
019f6e26-35d9-7aa1-a3b2-3753d3a3433dObserved sequence:
2026-08-10T02:45:54.893Z, the thread was associated with the original saved project:local-67eba96cd1902df645147d53129386bd2026-08-10T07:56:21.562Z, the same thread was associated with the new project:85300336-b4af-4bf2-8db9-4eb3e00894fdThe thread still points to the original workspace:
~/.codex/worktrees/22ce/classin_flutter_harness~/Documents/.../project-a/.gitThe second project is an independent clone at another path with a separate
.gitdirectory. The two projects share only the same private origin URL/repository content.This appears to confirm that the grouping/indexing logic can reassign an existing chat based on shared repository identity instead of preserving the saved project/path or Git common-directory identity.
Relevant app log (full log intentionally not attached because it contains session summaries):
~/Library/Logs/com.openai.codex/2026/08/10/codex-desktop-582ad2f3-cf13-4630-ad4a-a55028996f2c-1436-t0-i1-023608-0.log