Codex App groups chats under the topmost saved project when multiple saved projects share a repo

Open 💬 2 comments Opened Jun 23, 2026 by chanchanman2
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

  1. With saved project A above saved project B in the project list, chats from this shared repository appear under project A.
  2. After removing project A from the Codex sidebar, the same chats appear under project B.
  3. After adding a standalone clone of the same repository and moving it above project B, the same chats appear under the standalone clone.
  4. 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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #29366
  • #29130
  • #28348
  • #29459
  • #29695

Powered by Codex Action

eeo-jiangmin · 18 days ago

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:

  • ChatGPT desktop app 26.803.41515 (build 6321)
  • macOS 26.5.2 (25F84)
  • Thread ID: 019f6e26-35d9-7aa1-a3b2-3753d3a3433d
  • Workspace: Codex-managed worktree

Observed sequence:

  1. At 2026-08-10T02:45:54.893Z, the thread was associated with the original saved project:
  • projectId: local-67eba96cd1902df645147d53129386bd
  1. I added a second saved project backed by an independent clone of the same private Git remote.
  2. At 2026-08-10T07:56:21.562Z, the same thread was associated with the new project:
  • projectId: 85300336-b4af-4bf2-8db9-4eb3e00894fd
  1. I did not use Move, Handoff, or any other project-reassignment action.

The thread still points to the original workspace:

  • cwd: ~/.codex/worktrees/22ce/classin_flutter_harness
  • Git common dir: ~/Documents/.../project-a/.git

The second project is an independent clone at another path with a separate .git directory. 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