Repository navigation
perf(server): summary reactors stop loading activities they never read - #234
Merged
tusharbhardwaj-bk merged 1 commit intoSep 27, 2026
Merged
Conversation
CatchupSummaryReactor and WorkSummaryReactor (both fork) called getThreadDetailById without a query, which loads activity payloads, and then only read messages and turns. They now pass activityKinds: [], which the detail query already short-circuits. On the largest active thread of a prod copy (19,356 activities): 58-206 ms -> 33-40 ms per load. The feature is off in prod today, so this removes a stall for whoever turns it on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CatchupSummaryReactorandWorkSummaryReactor(both fork-owned) callprojectionSnapshotQuery.getThreadDetailById(threadId)with no query, which loads the thread's activity payloads. They only read messages and turns:buildTurnTranscript,lastAssistantMessageForTurnandbuildSessionContextnever touchactivities. Found by the background-load analysis subagent.Fix
Both call sites pass
{ activityKinds: [] }.ProjectionThreadDetailQuerydocuments that an empty list skips the activity query.Evidence
The largest active thread on a prod copy (19,356 activities), 3 loads each:
activityKinds: [](after)The feature (
experimental.sessionSummary) is off in prod, so this removes a stall for whoever turns it on rather than a current one.Tests:
CatchupSummaryReactor.test.ts+WorkSummaryReactor.test.ts, 14 pass, and summaries are still produced.vp run typecheckinapps/serveris clean.Model/harness: Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code