Skip to content

[IDE / VS Code] Sessions misses recently updated conversations because provider limits by created_at #34843

Description

@joshmouch

Surface

  • VS Code 1.129.1 (arm64, macOS)
  • Marketplace extension: openai.chatgpt 26.5715.61943
  • View: VS Code/Copilot Sessions, sorted by Updated

This is a VS Code extension report, not a Codex Desktop report. The installed extension has no public repository or issue URL in its Marketplace manifest; I am filing here because openai/codex is the public Codex engineering tracker. Please route it to the IDE-extension owner if that is a separate internal component.

Actual behavior

The Sessions view cannot show many older conversations that were updated recently. Selecting Updated in VS Code does not fix this.

Root cause observed in the shipped extension

The extension registers VS Code's ChatSessionItemProvider, then calls the Codex app server:

{
  "limit": 50,
  "cursor": null,
  "sortKey": "created_at",
  "archived": false,
  "useStateDbOnly": true
}

It maps only the result's creation time into the VS Code session item:

const createdAtMs = Number(thread.createdAt) * 1000;
return { id, resource, label, timing: { startTime: createdAtMs } };

Therefore VS Code receives only the 50 newest-created candidates. Any conversation created before that cutoff is absent from the provider response, even if it was updated today. UI-side Updated ordering can only reorder the already truncated set.

Expected behavior

A Sessions view sorted by Updated should receive the most recently updated conversations, including older conversations with new activity. The provider should request activity-based ordering/pagination and provide appropriate activity metadata, or use another contract that preserves this user-visible semantic.

Independent secondary observation

The same request uses useStateDbOnly: true. On this machine, ~/.codex/session_index.jsonl contained valid July 20 sessions missing from ~/.codex/sqlite/codex-dev.db table local_thread_catalog, so state-only filtering can be a second source of omissions. This is distinct from the primary created_at/limit defect.

Requested follow-up

Please confirm the owner and intended thread/list contract for IDE history. I would like to prepare a focused fix with regression tests, but I understand that the public Codex repository accepts external PRs only by maintainer invitation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions