Skip to content

feat(conversations): rebuild the conversation picker on provider-native indexes #874

Closed

Description

@Juliusolsson05

Motivation

The resume picker, Search Conversation Prompts, the path picker's session list, View Prompts and Rewind to Prompt are five surfaces over two listing paths and four transcript readers, and the user cannot find conversations with any of them. Measured on 2026-09-11 against the real stores on the author's machine:

Defect Evidence
Hard cap of 20 rows The focused project dir holds 57 Claude transcripts; 37 can never appear.
Worktree sessions invisible Upstream Claude Code merges every worktree's project dir (includeWorktrees, default true). Agent Code's app-side copy of that lister dropped it. Agent-code and its worktrees hold 155 Claude transcripts across 40 project dirs; the picker reads 57. Codex: 935 rollouts on the main cwd plus 200 on worktree cwds.
Orchestration children indistinguishable 16 of 57 Claude transcripts here, 9 of 16 in a worktree dir, 66 of 98 Codex threads in bringdown. Nothing records provenance.
Codex labels are boilerplate The lister takes the first event_msg/user_message, which is now Codex's injected # AGENTS.md instructions for …. Every row for a cwd reads the same. Codex's own index already stores the real first prompt.
Codex listing is slow Walks and stats all 2,020 rollouts per open: 1.5 s (main cwd) to 2.9 s (worktree cwd). Codex's SQLite index answers in 50 ms.
Prompt search is slow Folds up to 400 files per provider fully per cold query; head-parsing all rollouts takes 10.7 s. Claude's history.jsonl answers a substring search in 34 ms.
Nameless Claude sessions dropped; rows carry no time; preview turn count wrong parseSession returns null; row template renders label, branch, cwd only; "0 turns" / "1 turn" is counted from the preview's 40-record tail.
In-session prompt lists capped at 15, absolute timestamps only ViewPromptsModal, RewindToPromptModal.

Intended behaviour

One Conversations picker opened by Resume Session… and Search Conversations…, listing every past conversation of the focused pane's repository across all worktrees from all three providers, newest user activity first, children hidden behind a toggle with a count, labels with recorded provenance, relative time and prompt count per row, provider and scope filters inside the picker, instant search over labels and user prompts, preview via the existing pane, Enter resumes under the conversation's own cwd and provider. View Prompts and Rewind list every prompt with relative time. External control (nativeHistory.*) and the debug harness use the same catalog.

Sources are the providers' native indexes: Codex ~/.codex/state_*.sqlite (threads, thread_spawn_edges) via node:sqlite read-only, Claude project dirs merged by git worktree list plus ai-title records and ~/.claude/history.jsonl, OpenCode opencode.db. Transcript and rollout scans are fallbacks only. A durable Agent Code conversation ledger records titles, spoken names and orchestration provenance per native session id so child classification is exact going forward.

Design and stages: docs/decomposition/conversations.md on branch feat/session-picker. Verification is integration-heavy: system-tier tests over a corpus recorded from real stores, plus an opt-in live suite with a timing budget.

Acceptance criteria

  • Every transcript or index row in scope appears exactly once or is counted in the hidden-children toggle; no cap; pagination.
  • For the bringdown project, the default view lists the 13 real sessions by recency with readable first prompts and folds the 66 children.
  • Picker opens under 100 ms warm and 500 ms cold on the author's corpus; search under 50 ms; measured by the live suite.
  • Rows show provider, label with provenance, agent name when known, branch or worktree, relative time, prompt count.
  • View Prompts and Rewind show all prompts with relative time.
  • Old listing paths deleted: app-side Claude lister, sessionIndex.ts discovery/search, ipc/sessions.ts, duplicated SessionIndexEntry, palette resume mode, PromptSearchModal, path picker resume section, MainProviderConfig.listSessions/listAllSessions.

Refs #96, #151, #718, #735, #739, #762, #773. Supersedes PR #701.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions