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
Junior eagerly persists an MCP auth session whenever an MCP provider is activated, before knowing whether interaction is required. Successful already-authorized calls leave those records behind for 24 hours.
The per-user/provider index keeps stale IDs and can grow indefinitely for an active user. Same-session link reuse can also delete the live auth session needed by the already-delivered callback URL.
Root causes
auth attempts are inferred from loosely coupled session/index/pending-auth records
lookup uses "latest session for user/provider" rather than deterministic attempt identity
attempt state is created before the SDK reaches an interactive redirect
link reuse deletes the newly prepared session without proving it is distinct from the reused attempt
callback claim/completion is not an atomic, idempotent transition
Acceptance criteria
Silent authenticated MCP calls create no authorization-attempt record.
Attempts are created lazily only when interaction is required.
Attempt identity is deterministic from the owning conversation/session/provider or represented by an explicit opaque attempt ID.
Reusing a live link cannot delete or invalidate its attempt state.
Attempt indexes prune expired entries and cannot grow indefinitely.
Callback claim and completion are atomic and duplicate callbacks are idempotent.
Persisted attempt context includes source, destination, actor, scope, resource, issuer, redirect URI, and resume identity.
Denied, expired, failed, superseded, and completed attempts all reach terminal states.
Problem
Junior eagerly persists an MCP auth session whenever an MCP provider is activated, before knowing whether interaction is required. Successful already-authorized calls leave those records behind for 24 hours.
The per-user/provider index keeps stale IDs and can grow indefinitely for an active user. Same-session link reuse can also delete the live auth session needed by the already-delivered callback URL.
Root causes
Acceptance criteria
Related: #782.