Skip to content

Codex/ChatGPT discovery never lists archived conversations #52

Description

@solkennedy

Bug

txcript version: main (HEAD as of 2026-09-17)
Agent: Codex CLI / ChatGPT cloud sessions (--from chatgpt)

ChatGptStore::discover() in src/harness/chatgpt.rs lists conversations with:

GET /backend-api/conversations?offset={offset}&limit={PAGE_SIZE}&order=updated

This is the same query ChatGPT's own web UI uses for the main (non-archived) sidebar list. Archived conversations are excluded from it — on chatgpt.com they only show up under Settings → Data Controls → Archived Chats, which the web client fetches with an is_archived=true filter on the same endpoint.

Because discover() never sends that filter, any Codex/ChatGPT conversation the user has archived is invisible to txcript list --from chatgpt / txcript view / MCP list_sessions, even though the account still has it. Unarchiving the conversation (moving it back into the default, non-archived set) makes it show up again — which is what tipped me off to the cause.

Note: this only affects the ChatGPT-cloud harness (src/harness/chatgpt.rs). The local Codex CLI harness (src/harness/codex.rs) reads ~/.codex/sessions/**/rollout-*.jsonl directly off disk and has no archived concept at all, so it's unaffected.

Expected

discover() (or an explicit opt-in flag, given is_archived=true is an extra request per page) should also surface archived conversations, so a session isn't a apparently gone until manually unarchived.

Proposed fix

Add a second paginated pass over /backend-api/conversations?...&is_archived=true in ChatGptStore::discover(), merging those rows in with the active ones (tagged appropriately if we want to preserve archived state in Meta).

Happy to open a PR for this — filing the issue first per CONTRIBUTING.md.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions