Skip to content

P1: Scope threads:summaries so opening Agents does not read every transcript #1398

Closed

Description

@currentbits

Evidence (2026-10-01)

On origin/main e2924af, services.threadSummaries maps every non-trashed thread and calls Store.getLastAssistantMessage for each. On a cache miss, that method synchronously readFileSyncs the thread's transcript shard. Both the selected-thread Recap card and Team view call the all-threads IPC.

The live store has 1,934 message shards totaling 752 MiB. A read-only harness using the real Store.prototype.getLastAssistantMessage through threadSummaries took 2,880 ms for 1,846 returned rows on the first call, versus 2 ms on a repeated cached call. A raw read-only scan took 468 ms warm-cache. This is a main-process block, not a renderer-only delay. No live data was modified.

Fix direction

Scope threads:summaries to the selected thread, its direct crew children, and the parent row the Team view actually displays. The server can filter cheap thread metadata before calling getLastAssistantMessage; Recap needs only the selected id. Reuse the current summary shape and last-assistant memo. Avoid a full-transcript migration or new cache layer.

Acceptance

A cold summaries request for one selected thread reads only the relevant shards, preserves Recap/Team rows and activity text, and no longer blocks the main process for seconds with a large archived history. Include one focused check that counts shard reads for a many-thread fixture and verifies selected crew rows.

Activity

  1. added
    plan:todo
    on Oct 1, 2026
  2. added
    plan:doing
    plan:done
    and removed
    plan:todo
    plan:doing
    on Oct 9, 2026
  3. currentbits commented on Oct 9, 2026

    @currentbits
    OwnerAuthor

    Fixed: summaries are scoped by projectId and threadIds (162189a, #1424; services-threads.js:1389), and shard reads are gone (a895b3d). Closing in the 2026-10-09 board cleanup (#1532).

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

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions