Load agent catalogs each turn instead of caching them on the chat - #267
Open
AshishKumar4 wants to merge 1 commit into
Open
Load agent catalogs each turn instead of caching them on the chat#267AshishKumar4 wants to merge 1 commit into
AshishKumar4 wants to merge 1 commit into
Conversation
A chat cached its agent catalogs and never loaded them again, so the agent could not see a skill added after the chat opened. A failed load was cached too, as null, which means "this gatekeeper has no catalog" -- so one failure read as an empty library for the rest of the chat. The cache was the cause of both. A catalog states what a session can reach now, which is not a fact a chat can hold. Loading it per turn removes the stale window and the cached failure together, and deletes the snapshot type, the completer, the chat field that stored it, and their tests. The cost is one call per ambient gatekeeper per turn. The chat already calls each of them to build its bindings.
AshishKumar4
force-pushed
the
fix/refresh-agent-catalog
branch
from
August 19, 2026 18:45
e80909d to
399bf68
Compare
AshishKumar4
marked this pull request as ready for review
August 25, 2026 04:02
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 does this change?
A chat cached its agent catalogs and never loaded them again. The agent could not see a skill added
after the chat opened. A new skill reached the slash-command picker at once, because that list is
live, but it never reached the agent's catalog. The user had to open a new chat.
A failed load was cached in the same way, as
null.nullmeans "this gatekeeper has no catalog", soone failure read as an empty library for the rest of the chat.
The cache caused both faults. A catalog states what a session can reach now, which is not a fact a
chat can hold. This loads it each turn. That removes the stale window and the cached failure
together, and it deletes the snapshot type, the completer, the chat field that held it, and their
tests.
Cost
One call for each ambient gatekeeper, each turn. The chat already calls each of them to build its
bindings.
A failure now costs one turn's catalog. The next turn loads it again.
Checklist
Checking every item does not guarantee acceptance. Maintainers determine whether
a pull request meets the contribution policy.