Claude Code · 14:39
Root cause
The refresh call and expiry check read the same stale token state. Both requests enter the branch before either one writes the replacement.
- serialize refresh work behind one in-flight promise
- re-check token state after acquiring the lock
const token = await refreshOnce()
return retry(request, token)21 auth tests now pass. The source-native transcript remains available beneath this rendered view.
