Repository navigation
Stop the Agents panel re-querying every thread's messages on each stream event - #49
Merged
currentbits merged 3 commits intoAug 15, 2026
Conversation
… Store: every stream event rewrites the entire 15 MB store sy
useCoder rebuilds the threads array on every thread:updated, so the Agents panel re-ran threads:summaries — which walks every thread's messages — many times per second during an orchestration. Depend on a cheap ids+statuses key instead, and keep lastActivity live with a 2s poll while any thread is working. Fixes #29 Co-Authored-By: Claude Opus 5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
currentbits
deleted the
coder/agents-panel-re-queries-all-threads-mess-0e30c6
branch
October 3, 2026 16:07
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.
What
The Agents panel team view refetched
threads:summarieswhenever thethreadsarray changed identity.useCoderrebuilds that array on everythread:updated, andservices.threadSummariesscans messages for every thread in the store — so during an orchestration the panel fired that IPC many times per second.The effect now depends on a cheap
id:statuskey derived fromthreads, so identity-only pushes (token deltas,updatedAtbumps) trigger nothing. Because the worker rows show a livelastActivityline, a 2s poll keeps that fresh — but only while some thread is actuallyworking, so an idle panel makes zero calls.Why not a debounce
A trailing debounce would keep resetting for as long as the stream keeps pushing, which is exactly when the activity line matters, so it would freeze mid-run. The key + bounded poll caps the rate without losing freshness.
Verification
test/teamView.test.tsxgains a case that counts fetches: two identity-only pushes leave the count at 1, a status flip takes it to 2.tsc --noEmitclean.Fixes #29