Skip to content

Resume picker hides app-created threads with history when preview is empty #48370

Open

Description

@joshka

Problem

Threads created through the desktop app’s create_thread tool can contain substantial conversation history and have a persisted name, but remain absent from codex resume --all.

On my machine, 62 non-archived CLI/app threads in one project were excluded. All 62 contained create_thread tool output but no user-message event. The 11 visible threads all contained user-message events. The missing threads had the correct project directory, source = vscode, and archived = 0.

Cause

The initial task input is recorded as ItemCompleted(FunctionCallOutput) for create_thread, with a <codex_delegation> payload, rather than ItemCompleted(UserMessage).

In codex-rs/state/src/extract.rs, apply_event_msg populates previews from user messages (including ItemCompleted(UserMessage)) and goal objectives, but not this tool output. Consequently, these threads retain an empty threads.preview.

In codex-rs/state/src/runtime/threads.rs, push_thread_filters_with_preview excludes these threads from ordinary active listings:

AND threads.preview <> ''

The resume picker uses that listing. Selecting “All” removes the directory filter, not the empty-preview filter.

One visible thread created through the same tool had subsequently received the user message continue; its stored preview is literally continue.

Reproduction

  1. Have the desktop app create a named task through create_thread and let it perform work.
  2. Do not send a regular user message directly to the created thread.
  3. Open codex resume --all.
  4. Observe that the thread is absent even though the desktop app displays its name and conversation history.

The affected local records have an empty preview and first_user_message, despite containing completed conversation items in their rollout files.

Expected behavior

A named thread containing initial task input and conversation history should appear in the resume picker without requiring an additional user message.

An empty preview should not, by itself, mean that a thread is empty or disposable.

Fix pointers

A narrow fix to consider is preserving named threads in the listing:

AND (threads.preview <> '' OR COALESCE(threads.name, '') <> '')

This would expose existing affected threads without rewriting their metadata, while continuing to hide unnamed sessions with empty previews. It would not cover unnamed threads created through create_thread, and it would also make explicitly named empty sessions visible.

A broader fix could populate previews from create_thread task input, including a backfill for existing threads, or base listing visibility on meaningful history instead of preview presence.

A regression test should cover a named thread with create_thread task input, conversation history, and an empty preview, alongside an unnamed empty session that should remain hidden.

Related

Forked session is hidden from resume picker until its first new message reports the same listing filter hiding forks. This report supplies a separate trigger: threads created through the desktop app’s create_thread tool.

Environment

  • Codex CLI: 0.157.1
  • Platform: macOS
  • Affected thread history mode: paginated

Activity

  1. added
    bug
    CLI
    session
    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

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

    CLIbugsession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions