mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
Every write of the shared Nous store recorded a guest-to-account move, including routine token refreshes. When one profile logged out and then minted a free-tier guest, another profile's keepalive refresh of the account overwrote that guest, recorded a move of the guest's apps into the account, and left the account in the store for the logged-out profile to adopt again. Each caller of _write_shared_nous_state now declares renewal. A renewal (a token refresh) writes only over the identity the store already holds, compared by the guest's anon_ credential or the account's JWT sub, which survives a refresh. Sign-ins and mints still replace whatever the store holds, so only a sign-in can record a move. An empty store still takes a refresh, so profiles sharing one account keep their rotating refresh token in step.