I’m testing ephemeral token + Live session resumption exactly as
described in the docs, to verify that resumption does not consume uses
when uses=1.
However, the actual behavior contradicts the documentation, so I’m
reporting it here.
———
What I want to do
Per docs, within expireTime, I should be able to reconnect using
sessionResumption with the same token even if uses: 1, and resumption
should not count as a use.
———
Expected
First session opens normally
Receive sessionResumptionUpdate with resumable=true and a valid
newHandle
Close the first session (code 1000)
Reconnect immediately with the same token + handle
Reconnect succeeds and does not fail with “Token has been used too many
times”
———
Actual
I do receive a valid handle (resumable=true, newHandle present)
First session closes cleanly (code 1000)
Reconnect immediately with the same token + handle
Reconnect fails with Token has been used too many times (code 1011)
———
Environment
OS: macOS 15.6 (24G84)
Browser: Arc(Chromium Engine Version 144.0.7559.60)/ Chrome (144.0.7559.97 (arm64))
[first] sessionResumptionUpdate resumable=true hasHandle=true
[first] Close: code=1000 reason=
[reconnect] Opened
[reconnect] Close: code=1011 reason=Token has been used too many times
———
Repro code
(see below)
Additional note:
Live session resumption using a regular API key (non‑ephemeral) works
as expected.
The failure only occurs with ephemeral tokens when uses=1.
Hi there! We apologize that the ephemeral token resumption consumes uses even with uses=1. I passed this issue along to our engineering team to debug - we appreciate the detailed description of the issue
I found another related issue. Even after working around the uses problem by setting uses=5, session resumption with ephemeral tokens does not preserve conversation context.