fix(coding-agent): load the saved catalog when the agents view opens - #1960
Merged
Merged
Conversation
v0.9.0 regression: the Inactive section was empty on a fresh agents view until a search query was typed. The saved catalog was loaded only for search (a #1900 optimization premised on the roster boot seed carrying the saved corpus as inactive rows); #1951 scoped that seed to live families, so the view must load what it displays. The load stays progressive and once-per-view.
sethkarten
self-requested a review
September 1, 2026 18:41
sethkarten
approved these changes
Sep 1, 2026
ketema
added a commit
to ketema/prime-agent
that referenced
this pull request
Sep 1, 2026
- Direct session transport between TUI and worker (ENG-5817, PrimeIntellect-ai#1926) - Event-driven supervisor agent roster with push subscriptions (PrimeIntellect-ai#1897, PrimeIntellect-ai#1900, PrimeIntellect-ai#1895) - Hardened daemon startup, recovery ownership, and worker launch diagnostics (PrimeIntellect-ai#1929, PrimeIntellect-ai#1918) - Python REPL runtime single-dump snapshots and bash preview tool (PrimeIntellect-ai#1945, PrimeIntellect-ai#1911) - Non-blocking RLM subagent deletion and snapshot update suppression (PrimeIntellect-ai#1954, PrimeIntellect-ai#1944) - Saved catalog loading on Agents View open (PrimeIntellect-ai#1960) - Advanced Anthropic prompt caching marker across tool results (PrimeIntellect-ai#1927) - TUI process replacement on update and empty draft eviction (PrimeIntellect-ai#1631, PrimeIntellect-ai#1946, PrimeIntellect-ai#1920)
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.
Regression
Introduced in v0.9.0 by the roster seed scoping (#1951): the agents view's Inactive section is empty on a fresh view. Before v0.9.0 the daemon's boot seed pushed the whole saved-session corpus as inactive roster rows through
roster_subscribe, and the view rendered those. #1951 scoped the seed to registered workers' families (CLIlist --allkept full parity), but the agents view's other source — the saved-session catalog — was only loaded once a search query was typed (armSavedSearchFetchgates on editor text, a #1900 optimization whose stated premise was that deep catalog data is needed only for search; display rows were assumed to come from the roster seed). Fresh TUI + agents view + no query = no catalog = empty Inactive section.Fix
Delete the dead-premise gate: the view loads the saved catalog when it opens, not first at search time. The load path is unchanged and stays progressive (
refreshSavedSessionsstreams rows in viaonSessionas the daemon reads them) and once-per-view (savedSearchFetchStartedlatch plus persistedsavedCatalogLoadedacross view instances). No new load path, no wire change.Measured (3051-session corpus, local M-series laptop)
Progressive catalog load after opening the view: first inactive row after ~10 ms, complete after ~6.0 s on a cold daemon (~2.2 s warm), filling in as it loads. For context, v0.8.1 showed all inactive rows immediately at view open, but only because the daemon had spent ~5.2 s at startup seeding and every roster subscriber received the full ~3300-row corpus as one payload; v0.9.0+ daemon startup is ~0.7-1.4 s on the same corpus.
Tests
New pin in
agents-view-mode.test.ts:armSavedSearchFetchwith an empty query starts the catalog fetch (fails on v0.9.0 main: the mock is never called). Theagents-view-inactive-reply.test.tslatch test drops only its empty-query-never-arms assertion (the reverted behavior); its loaded-catalog one-shot and failure re-arm pins are unchanged. Suites: agents-view + roster/daemon-adjacent files green in a sandbox (10 files, 226 tests), rootnpm run checkclean.Linear: https://linear.app/primeintellect/issue/ENG-5840/v090-regression-agents-view-inactive-section-empty-on-fresh-view
Note
Low Risk
Narrow agents-view UX fix: earlier progressive catalog load on open, no protocol or auth changes; main tradeoff is extra daemon work when opening the view with many saved sessions.
Overview
Fixes a v0.9.0 regression where the agents view Inactive section stayed empty until the user typed a search. Roster seed scoping stopped pre-filling inactive rows from the daemon boot seed, but the saved-session catalog was still only armed when the search box had text.
armSavedSearchFetchno longer returns early on an empty trimmed query. The inactive list is catalog-driven, sorefreshSavedSessionsstill runs progressively on view open (and on reconnect / query changes) with the same once-per-view latch andsavedCatalogLoadedguard.Tests add a pin that an empty query starts the catalog fetch; the inactive-reply latch test drops the obsolete “empty query never arms” assertion.
Reviewed by Cursor Bugbot for commit 79c9256. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Load saved session catalog on
AgentsViewModeview open regardless of queryFixes a v0.9.0 regression where the agents view Inactive section stayed empty until the user typed a search.
AgentsViewMode.armSavedSearchFetchno longer gates the fetch on a non-empty editor query — it now returns early only if a fetch already started orsavedCatalogLoadedis true. Tests in agents-view-inactive-reply.test.ts and agents-view-mode.test.ts are updated to match.Macroscope summarized 79c9256.