fix: no "after restart" badge until the new pod has listed its tools (CLEAN-109) - #108
Merged
Merged
Conversation
… its tools (CLEAN-109) A snapshot older than the running pod belongs to its predecessor; it now reads as "listing pending" (no per-tool flags) instead of "this pod lacks everything". The sheet loads through the store on every open, shows a quiet "loading its tools" note while pending and polls until the listing lands. A real-container test proves the recorder lookup across modules. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…109) Co-Authored-By: Claude Fable 5.1 <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.
Summary
Follow-up to #101. After restarting an agent, the Tools panel kept saying "after restart" until the page was reloaded.
Ticket: CLEAN-109
The client state was fine; the claim itself was wrong. Right after a restart the new pod is up but has not called
tools/listyet, and the catalogue compared today's tools against the previous pod's snapshot, so every tool read as "missing from this pod".GET /agents/:id/toolsgainslistingState(none/pending/fresh). A snapshot older than the running pod (10 s clock slack) ispending: no per-toolinPodflags, no badge. Flags are only set when the snapshot comes from this pod.useAsyncDatacache in between), shows a quiet "the agent has started and is loading its tools" note while pending, and polls every 4 s until the listing lands (bounded to 2 minutes).tools/listhandler finds the listing recorder provided under auseExistingalias in another module — that lookup swallowed errors silently, so it needed proof.Generated admin SDK: only the
listingStatehunks are added on top of main's files (a regen on this machine reorders 3,000 lines for no change).Test plan
cd api && NODE_OPTIONS=--experimental-vm-modules npx jest src/slices/agent/toolCatalog src/slices/mcpgreen;bun run buildclean.cd admin && bun test slices && npx nuxt typecheckclean.🤖 Generated with Claude Code