Skip to content

[macOS] Tasks created through app-server are searchable but missing from their assigned projects #48728

Open

Description

@peterwang998

What version of the Codex App are you using (From “About Codex” dialog)?

ChatGPT/Codex desktop app 26.924.22138, build 11645 (installed bundle metadata).
Bundled CLI: codex-cli 0.158.0-alpha.2.1.

What subscription do you have?

Not included in this report.

What platform is your computer?

macOS 26.5.1 (25F80), Apple Silicon / arm64.

What issue are you seeing?

Persistent tasks created programmatically through the Codex app-server API have valid saved project assignments but do not appear under those projects in the desktop sidebar.

Desktop Search finds the affected tasks, and opening them displays their conversation history normally. The projects themselves exist and are visible. The inconsistency is between the saved task-to-project assignment and Desktop's project task list.

This was observed on four existing tasks across three saved local projects during a read-only investigation on September 26, 2026. None of the four tasks is archived.

What steps can reproduce the bug?

The affected tasks were created using this app-server flow:

  1. Initialize an app-server connection with capabilities.experimentalApi: true, using the same local Codex home as Desktop.
  2. Resolve an existing saved project's ID through project/list.
  3. Create a persistent task with thread/start, ephemeral: false, and a task-specific cwd that differs from the project's root directory.
  4. Assign the task to that existing project through thread/metadata/update.
  5. Run the task normally with turn/start.
  6. In Desktop, find and open the task through Search.
  7. Open the assigned project's task list: the task is absent.

Relevant parameters, with placeholder paths and IDs:

{"method":"thread/start","params":{"cwd":"/path/to/task-workspace","ephemeral":false}}
{"method":"thread/metadata/update","params":{"threadId":"<created-thread-id>","projectId":"<existing-project-id>"}}
{"method":"turn/start","params":{"threadId":"<created-thread-id>","input":[{"type":"text","text":"Reply with OK."}]}}

These illustrate the observed creation and assignment sequence; they are not a complete standalone reproduction script. The failure was verified on four existing tasks. A fresh, isolated reproduction of the reduced sequence above has not yet been run.

What is the expected behavior?

A task with a valid saved project assignment should appear under that project in Desktop, including when the task was created through the app-server API and its working directory differs from the project root.

Search and project views should consistently expose the same persisted task membership.

Additional information

Read-only local checks found:

  • All four affected threads.project_id values in state_5.sqlite resolve to existing entries in the projects table.
  • All four have archived = 0 and stored source vscode.
  • Desktop's thread-project-assignments and thread-project-membership-host-ids maps contain no entries for these tasks.
  • The tasks are also absent from projectless-thread-ids.
  • Desktop's list_threads tool reports projectId: null for the affected tasks despite the non-null backend assignments.
  • Local migration state contains projectsMigrated: true and threadAssignmentsMigrated: false; threadAssignmentsReadMigrated is absent.
  • An older task that is visible under a project has a Desktop membership entry even though its backend project_id is null.

This suggests a mismatch between backend project assignments and Desktop membership synchronization. The migration state is evidence, not proof of the exact reason synchronization is inactive.

No task records, assignments, or desktop settings were modified during the investigation. Private task contents, project names, absolute user paths, and thread IDs are omitted.

Related reports:

This report adds the app-server creation/assignment sequence and verified non-null backend project IDs for affected tasks on macOS.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    app-serverIssues involving app server protocol or interfaces
    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. peterwang998 commented on Sep 27, 2026

    @peterwang998
    Author

    I reviewed the suggested duplicate, #48641. The reports are related, but there is a material difference in the persisted assignment state that warrants keeping this case separate pending maintainer confirmation.

    #48641 This report (#48728)
    Affected flow Existing project chats after a Linux desktop upgrade Persistent tasks created and assigned through the app-server API on macOS
    Legacy/Desktop assignment Preserved in global state Missing for the affected tasks
    Backend threads.project_id NULL Non-null and resolves to an existing project
    Observed problem Preserved assignments were not populated into the backend Desktop does not reflect assignments already saved in the backend

    #48641 describes restoring backend assignments through thread/metadata/update. In this report, that API is already part of the task creation flow, and read-only database checks confirmed valid saved assignments for all four affected tasks. A repair that only populates missing backend project IDs would therefore not address the state observed here. The projects themselves remain visible, and Search can find and open the affected tasks.

    Both reports use the same app/backend versions and show threadAssignmentsMigrated: false, so they could share an underlying synchronization defect. That checkpoint alone does not establish an identical failure or fix. Please retain this as a separate case unless the same fix is confirmed to cover adoption of existing backend assignments into Desktop membership.

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

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions