Skip to content

[Windows app] Chat can keep correct cwd while being assigned to the wrong projectId #48636

Open

Description

@voradori

Summary

Codex Desktop can end up with a chat whose working directory (cwd) points to the correct local repository, while the chat's projectId points to a different project.

The project picker also mixes local Codex projects, remote-host projects, and ChatGPT cloud projects into one undifferentiated list. When several projects share the same display name, the user cannot tell which object they are selecting.

This looks like more than a cosmetic project-picker problem: project identity / association metadata can diverge from the actual workspace used by the chat.

Environment

  • Codex Desktop on Windows
  • Codex Mobile Remote involved in one reproduction path
  • Observed on September 27, 2026

Concrete example

I have two different projects both displayed as Купец:

Local Codex project

  • type: local
  • path: G:\Household\Merchant_Repo_Custom
  • projectId: dff954ac-3363-4d30-92d9-a75115a75076

ChatGPT cloud project

  • type: chatgpt
  • no local path
  • projectId: g-p-6a6a4dfc3cfc8191aa940b2e11f607b8

In chat context menu -> Project, both are rendered simply as Купец, with the same folder icon and no project type, host, path, or other disambiguation.

The correct local project appears near the top of the list (after HomeAssistant). Another Купец after UE_Plugins is the ChatGPT cloud project. The picker does not expose that distinction, and I observed the wrong cloud project being highlighted when opening the menu.

More serious association mismatch

I also created two chats through Mobile Remote while targeting:

G:\Household\Merchant_Repo_Custom

Both chats had the correct working directory, but on Desktop they were associated with an older archived project named Barin.

So the resulting state was effectively:

  • cwd -> correct: G:\Household\Merchant_Repo_Custom
  • projectId -> wrong: archived Barin project

The chats could still appear to work with the correct repository because their working directory was correct, while their organizational/project identity was wrong.

Why this matters

A wrong project association can affect more than sidebar organization:

  • expected local folders / workspace roots
  • project instructions and project context
  • Remote visibility / placement
  • future chat routing
  • project-specific metadata

It is particularly hard to notice because the working directory may remain correct.

Expected behavior

For local / remote projects, project identity should remain consistent with the workspace being used.

At minimum:

  1. The project picker should visibly distinguish:
    • Local projects
    • Remote projects, including host name
    • ChatGPT cloud projects
  2. Same-name projects should show type + host + path, e.g.:
    • Купец — Local — G:\Household\Merchant_Repo_Custom
    • Купец — HOME — G:\Household\Merchant_Repo_Custom
    • Купец — ChatGPT
  3. When moving a local Codex chat, the picker should prefer projects whose roots contain the current cwd.
  4. Codex should warn or reject a local project assignment when the current cwd is outside that project's workspace roots.
  5. A Remote-created chat should reconcile to the corresponding Desktop project instead of preserving or guessing an unrelated historical projectId.

A useful consistency invariant would be roughly:

cwd ∈ roots(assigned local/remote project)

where applicable.

Related issues

The difference here is the explicitly observed split between a correct cwd and an incorrect projectId, plus the mixed Local / Remote / ChatGPT project picker making that mismatch difficult to detect.

Activity

  1. added
    bug
    app
    windows-os
    session
    on Sep 27, 2026
  2. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. markusschwarz174 commented on Nov 12, 2026

    @markusschwarz174

    Additional Windows Desktop reproduction observed on 2026-11-12.

    This extends the same-name Local/ChatGPT identity collision with a potentially destructive UI action.

    Setup

    Two distinct projects originally shared the same display name PHLU_VORBEREITUNG:

    • Local project: UUID project ID, projectKind=local, hostId=local, with an existing Windows folder.
    • ChatGPT project: g-p-… project ID, projectKind=chatgpt, no local path.

    The ChatGPT project was later visibly renamed to 🔴 P_CLD_⛔_PHLU_VORBEREITUNG to disambiguate it. The local project retained the original label.

    Verified backend/thread state

    For the affected Codex thread, both list_threads and a direct read_thread reported:

    • kind=codex
    • hostId=local
    • projectId=<the local UUID project>
    • cwd=<the same reachable local folder as the local project's path>

    The thread had successfully performed local file reads and writes for several hours. A fresh filesystem access check also succeeded.

    Incorrect Desktop UI state

    Opening the thread's project menu nevertheless displayed this action:

    Aus 🔴 P_CLD_⛔_PHLU_VORBEREITUNG entfernen

    That is the ChatGPT cloud project's current visible label, even though the thread metadata still references the local UUID project and the thread is running on the local host with the local project root.

    The user therefore sees a menu offering removal from a cloud project that the ID-based thread data says the thread is not assigned to.

    Related behavior in the same session

    An exact-ID sidebar move requested for a local project previously affected the same-named ChatGPT project instead. In another move, the tool response reported failure while a subsequent read showed that the state had changed. This suggests the collision is not limited to display text.

    Expected behavior

    1. Resolve project menus and mutations strictly by immutable project ID, never by display label.
    2. Display project kind and, for local projects, host/path context.
    3. If UI-resolved identity conflicts with thread projectId, block Remove from project, deletion, and reassignment instead of presenting a potentially destructive action.
    4. Keep local and ChatGPT project namespaces distinct even when labels collide.
    5. Add invariant/telemetry checks for thread.projectId versus the project object used by the menu/mutation.

    No private chat contents, user names, full local paths, credentials, or screenshots are included in this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugremotesessionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions