Repository navigation
Description
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
- Have the desktop app create a named task through
create_threadand let it perform work. - Do not send a regular user message directly to the created thread.
- Open
codex resume --all. - 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
github-actions commentedon Sep 26, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action