You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`init()` set `toolsRegistered = true` before the one network call registration
depends on, so when `userGroups()` failed both of its attempts it returned the
same empty set a user with no surfaced agents gets, the DO registered without
the coding/apply/repo groups, and the latch kept it that way until eviction —
with nothing thrown, logged or recorded, and no identical retry able to recover it.
- `userGroups()` now throws after its bounded retry (both the returned `{error}`
and the thrown-fetch path), carrying the last error. The no-token path is
unchanged: anonymous resolving to no groups is a certainty, not a failure.
- `init()` resolves the roster BEFORE the latch and before the registration
pipeline is installed. A refused `initialize` therefore leaves nothing latched
or registered; partyserver resets its status when `onStart` throws and re-runs
it on the next request, so the client's retry starts from scratch. The latch is
set right after the lookup, not after the registrations: everything below it is
synchronous and not re-runnable (the pipeline install wraps `tool`).
- The pinned `/mcp/i/<id>` path keeps its latch-before-lookup order on purpose:
an unreadable pinned surface already registers one tool that says so, and "not
your instance" is a permanent answer that must not refuse `initialize` forever.
Tests: the "gives up" case now asserts a refusal with nothing published and
nothing latched; two new cases prove the next `init()` registers the full
surface and that a network-level throw is refused the same way. Harness gains
`deferInit`. File-size pins raised with notes. Docs: workers/mcp/CLAUDE.md and
platform-docs/mcp.md describe the refusal.
Closes#803
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments