What happens
Our chat app talks to three services that each need the user to sign in through Vercel Connect.
A user asked one question. The model searched all three, so all three asked for a sign-in in the same turn and three cards appeared, each with a device code.
The user signed in to the first one. The chat then showed this in red for each of the other two:
<connection> authorization failed (Superseded by a newer authorization attempt.)
Neither had failed, and the user had declined nothing. New cards for those two then appeared with different codes, and the same thing happened again.
Why it happens
Finishing the first sign-in makes eve run the step again. The other two services still have no token, so each asks for a sign-in a second time. eve sees a second request for a service that already has one waiting, cancels the first one, and reports that cancellation as a failure.
In 0.44.0:
harness/tool-loop.js sends authorization.completed with outcome: "failed" and reason: "Superseded by a newer authorization attempt." for every cancelled request.
getSupersededAuthorizationChallenges in harness/authorization.js picks which ones to cancel by matching connection name and user, so each service cancels its own earlier request.
- The built-in message reducer prints
<name> authorization <outcome> (<reason>)., which is the red text above.
Two things go wrong for the user. The message says something failed when nothing did, and the device code already on screen quietly stops being the right one.
What we expected
Asking again for the same sign-in, for the same user, is a replacement rather than a failure. Either:
- keep the first request alive, so the code already on screen still works; or
- report it with an outcome that isn't
"failed", so the app can swap the card out quietly.
Today outcome can only be "authorized", "declined", "failed", or "timed-out", so an app can't tell a real failure apart from eve replacing its own request.
Related
Three sign-ins at once is hard to finish even once the wording is fixed, because every completed sign-in restarts the step and re-asks for the rest. It would help if eve asked only for the service it is about to use, or asked for them one at a time.
Environment
eve 0.44.0, @vercel/connect 0.9.0 with user-scoped connect(), Next.js 16.3.0, browser chat using useEveAgent.
What we did instead
- Allowed only one sign-in per user at a time, in our own wrapper around
connect().
- Told the model to search one named service at a time.
- Reworded our connection descriptions so a common word like "search" no longer matches all three.
What happens
Our chat app talks to three services that each need the user to sign in through Vercel Connect.
A user asked one question. The model searched all three, so all three asked for a sign-in in the same turn and three cards appeared, each with a device code.
The user signed in to the first one. The chat then showed this in red for each of the other two:
Neither had failed, and the user had declined nothing. New cards for those two then appeared with different codes, and the same thing happened again.
Why it happens
Finishing the first sign-in makes eve run the step again. The other two services still have no token, so each asks for a sign-in a second time. eve sees a second request for a service that already has one waiting, cancels the first one, and reports that cancellation as a failure.
In 0.44.0:
harness/tool-loop.jssendsauthorization.completedwithoutcome: "failed"andreason: "Superseded by a newer authorization attempt."for every cancelled request.getSupersededAuthorizationChallengesinharness/authorization.jspicks which ones to cancel by matching connection name and user, so each service cancels its own earlier request.<name> authorization <outcome> (<reason>)., which is the red text above.Two things go wrong for the user. The message says something failed when nothing did, and the device code already on screen quietly stops being the right one.
What we expected
Asking again for the same sign-in, for the same user, is a replacement rather than a failure. Either:
"failed", so the app can swap the card out quietly.Today
outcomecan only be"authorized","declined","failed", or"timed-out", so an app can't tell a real failure apart from eve replacing its own request.Related
Three sign-ins at once is hard to finish even once the wording is fixed, because every completed sign-in restarts the step and re-asks for the rest. It would help if eve asked only for the service it is about to use, or asked for them one at a time.
Environment
eve 0.44.0,
@vercel/connect0.9.0 with user-scopedconnect(), Next.js 16.3.0, browser chat usinguseEveAgent.What we did instead
connect().