Skip to content

bug(conversations): Codex no-index fallback loses 0.157 prompts (reads only event_msg:user_message) #1363

Description

@Juliusolsson05

Found by reviews A and B of #1354 (Codex 0.157.1 acceptance).

Actual

src/main/conversations/sources/codex.ts:104 (readRolloutHead) takes prompt text only from event_msg:{type:"user_message"}. Codex 0.157 writes none: the prompt is a role-user response_item plus event_msg:item_completed (UserMessage). When state_N.sqlite is missing or fails schema validation (scanEverything(), codex.ts:204-208), or a rollout is not in the index, the row gets userTexts: []. It is then classified empty (catalog/classify.ts:32) and hidden from the default listing (catalog/listing.ts:19,43), or loses its label and user activity.

Evidence

  • A census of 233 local 0.157.x rollouts: all have a role-user response item, and none has a legacy user event.
  • Today every sampled file is indexed, so this bites only on the degraded path.
  • A 0.157.1-shaped test expected ['Check this file'] and got []. The fallback system test checks only that rows exist.

Fix direction

Also read role-user response_item text (skipping Codex's injected context, as the index does), and pin it with a recorded 0.157 slice.

Activity

  1. Juliusolsson05 commented on Sep 27, 2026

    @Juliusolsson05
    OwnerAuthor

    Test gap to cover in the fix (from #1354 review B): deleting foldCodexRecord's response_item branch in src/main/conversations/prompts/promptFolder.ts leaves the targeted Codex prompt-folder test green (1/1). Pin current-shape prompt extraction there as well as in the fallback scan.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions