Skip to content

Load agent catalogs each turn instead of caching them on the chat - #267

Open
AshishKumar4 wants to merge 1 commit into
mainfrom
fix/refresh-agent-catalog
Open

Load agent catalogs each turn instead of caching them on the chat#267
AshishKumar4 wants to merge 1 commit into
mainfrom
fix/refresh-agent-catalog

Conversation

@AshishKumar4

@AshishKumar4 AshishKumar4 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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. null means "this gatekeeper has no catalog", so
one 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.

  • This is a small, concrete change; it is not a feature, refactor, or low-value cleanup.
  • I understand that maintainers decide whether the change is obviously correct and trivially verifiable.
  • I have read and followed the contribution guidelines.

@github-actions github-actions Bot added the kernel Changes to the Workshop kernel label Aug 19, 2026
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
AshishKumar4 force-pushed the fix/refresh-agent-catalog branch from e80909d to 399bf68 Compare August 19, 2026 18:45
@AshishKumar4 AshishKumar4 changed the title Load an agent catalog again when its entry falls due Load agent catalogs each turn instead of caching them on the chat Aug 19, 2026
@AshishKumar4
AshishKumar4 marked this pull request as ready for review August 25, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Changes to the Workshop kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant