Skip to content

Codex Desktop: created worktree task is absent from list_threads and clientThreadId cannot be resolved #48472

Open

Description

@blaugold

What version of the Codex App are you using?

ChatGPT desktop app 26.924.22138; bundled codex-cli/app-server 0.158.0-alpha.2.1.

What subscription do you have?

Not captured for this reproduction.

What platform is your computer?

macOS 27.0 (26A428), Apple silicon; uname -mprs: Darwin 27.0.0 arm64 arm.

What issue are you seeing?

A parent task used the Codex App create_thread tool to create a separate, user-visible project task in a managed Git worktree. Creation succeeded: the worktree and child conversation exist, the child completed its opening turn, and send_message_to_thread delivered a follow-up when addressed by its canonical thread ID. However, the parent received only clientThreadId: client-new-thread:<uuid>; the materialized child was absent from list_threads while active. The other thread tools require a canonical threadId, and no exposed tool resolves the client ID to it. The parent therefore cannot reliably discover, wait for, or message its own created task after worktree setup.

Direct read_thread by the canonical ID succeeds and reports a title, conversation history, worktree cwd, and an empty preview. A read-only inspection of the local state DB confirmed preview = '' for this child. The child was archived later in the investigation; the initial list_threads omission was observed before that archive operation.

This is a successful creation followed by a discovery failure, not a failed worktree setup or a send_message_to_thread delivery error.

What steps can reproduce the bug?

  1. In a saved local Git project, call list_projects and use its returned project ID.
  2. From a normal parent task, call create_thread with a title, an ordinary text prompt, and:
    {"type":"project","projectId":"<saved project ID>","environment":{"type":"worktree"}}
  3. Observe the immediate { "clientThreadId": "client-new-thread:<uuid>", "hostId": "local" } result.
  4. Wait for the managed worktree and child task to finish initialization. Do not send a direct user message to the child.
  5. Call list_threads from the parent while the child is active. The child is omitted.
  6. If the canonical thread ID is obtained outside the create_thread result, read_thread(threadId=...) succeeds, and send_message_to_thread(threadId=...) reaches the child.

The affected child in this reproduction was a separate task titled Worktree-Nachrichtentest, with thread source agent_created_thread. Its first turn is stored as a create_thread tool output containing <codex_delegation>, rather than a normal user message.

What is the expected behavior?

After worktree initialization, a successful, named, user-facing task should be discoverable through list_threads even if its preview is empty. The parent should also have a supported way to resolve the returned clientThreadId to the canonical threadId (or receive a completion event with that ID), so it can use wait_threads, read_thread, and send_message_to_thread.

Additional information

Likely contributing path in bundled app / codex 0.158.0-alpha.2.1: delegated create_thread starts the child with input: [] and a toolOutput named create_thread. codex-rs/state/src/extract.rs populates preview from user messages but not that response item; codex-rs/state/src/runtime/threads.rs excludes ordinary active records with threads.preview = ''. This explains why direct ID access works while listing fails. A regression test should cover a named, tool-created worktree task with a completed first turn and empty preview, plus the client-ID-to-thread-ID handoff.

In-app feedback/session reference provided by the reporter: 01a0dde8-8322-7392-9c21-d5529d7a85ba. Diagnostic upload status was not independently verified.

Related but differently scoped reports: #48370 (same empty-preview mechanism in CLI resume picker), #47119 (archived Work task visibility), #26861 (pending worktree ID is not addressable), and #32614 (agent-created top-level task discovery).

Activity

  1. added
    bug
    app
    app-server
    subagent
    on Sep 26, 2026
  2. github-actions commented on Sep 26, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. pimenov commented on Sep 28, 2026

    @pimenov

    Confirmed on Codex Desktop 26.924.22138 on two Apple Silicon Macs (MacBook and Mac mini), using two separate OpenAI accounts, with Astra selected.

    Fresh LOCAL chats on both machines reproduce the same discovery/UI failure:

    • create_thread: succeeds
    • send_message_to_thread: succeeds
    • wait_threads: returns TEST_OK
    • read_thread by canonical thread ID: succeeds
    • list_threads(limit=50): does NOT include the newly created child
    • Codex Desktop sidebar: child is not visible

    So the child conversation definitely exists and is addressable by canonical thread ID, but it is not discoverable through list_threads and is not surfaced in the sidebar.

    This reproduced independently on both Macs on the same Desktop build, which makes this look like a current thread-discovery/UI bug rather than a machine-specific problem.

  4. unwashedlugosi commented on Oct 2, 2026

    @unwashedlugosi

    Additional reproduction on October 2, 2026, with a saved local project (not a worktree).

    Environment

    • macOS ChatGPT/Codex Desktop 26.928.20755, build 12246
    • Bundled CLI/app-server 0.159.0
    • Standalone CLI 0.154.0 also installed; this reproduction uses the desktop task tools
    • iPhone Codex Remote connected to the same host; exact mobile build not captured

    Steps and results

    1. Use the supported create_thread tool to create a named task targeting a saved project with environment.type = "local".
    2. Let its opening turn run and complete, without sending an ordinary user message directly to the new task.
    3. Read the task through the supported exact-ID reader: it succeeds and returns the completed conversation. The preview is empty; the opening turn contains function-call output, reasoning, and an agent response, but no ordinary user-input item.
    4. Check active list_threads, the desktop sidebar, and iPhone Remote with the All filter: the new task is absent. Preexisting tasks in the same saved project remain visible on Remote.
    5. Move the task to the Tasks section through the supported tool: the move is acknowledged, but the task remains absent from the lists/UI.

    Expected: A successfully created, named, user-facing task with completed work remains discoverable on desktop and connected mobile Remote.

    Diagnostic limits

    • This adds current-version and iPhone evidence to the local-task reproduction already reported above. It does not independently establish the cause of every listing omission.
    • pendingThreadAssignmentIds contained both a hidden task and a visible task, so membership alone does not establish an assignment failure.
    • The exposed list_threads wrapper accepts only a limit; explicit sourceKinds filtering was not independently tested.
    • No client-restart test or diagnostic upload was performed. No workaround has been verified in this reproduction.

    Related: #32614 for desktop/mobile discovery and #48370 for active empty-preview filtering. No private task IDs, project content, local paths, screenshots, or raw logs are attached.

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

    appapp-serverbugsubagent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions