codex resume --all omits resumable sessions when first user_message is beyond scan limit

Open 💬 4 comments Opened May 8, 2026 by muzahidulislamhadi

What happened?

A valid local Codex CLI session is omitted from codex resume --all, even though it can be resumed directly by session ID.

Direct resume works:

codex resume 019e029c-b1e9-7e31-992e-df4638cf8ee8

But the same session does not appear in:

codex resume --all
codex resume --all --no-alt-screen

Searching inside the picker by UUID or title also returns no result.

Environment

  • Codex CLI: 0.129.0
  • Package: @openai/codex@0.129.0
  • OS: Linux
  • Session source: cli
  • Model provider: openai

Evidence

The session JSONL exists:

~/.codex/sessions/2026/05/07/rollout-2026-05-07T13-24-44-019e029c-b1e9-7e31-992e-df4638cf8ee8.jsonl

The local SQLite state index contains the session:

id: 019e029c-b1e9-7e31-992e-df4638cf8ee8
title: Review again and return FINAL REPORT!!
cwd: /path/to/project
archived: 0
has_user_event: 0
source: cli
model_provider: openai

The JSONL has a valid session_meta, and direct resume succeeds. However, the first actual user_message appears late in the file:

line 424: {"timestamp":"2026-05-07T13:57:10.370Z","type":"event_msg","payload":{"type":"user_message","message":"Review again and return FINAL REPORT!!", ...}}

Suspected cause

This appears related to #9501 and #9512, but the current fix still seems bounded by the picker scan limits:

HEAD_RECORD_LIMIT = 10
USER_EVENT_SCAN_LIMIT = 200

Because the first user_message is at line 424, the session remains outside the scan window and is omitted from the resume picker/list/search path.

Expected behavior

Any session that can be resumed directly by ID and exists in the local session index should appear in codex resume --all, or at least be searchable by UUID/title in the picker.

Actual behavior

The session is omitted from codex resume --all and cannot be found via picker search, despite being directly resumable by ID.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗