Remote Control session auto-archives while still active (token-refresh race)
What happens
A long-lived, remotely-driven session ("Databook2 API refresh scheduling") gets archived on its own while it is still recently active and running. Unarchiving it works, but it re-archives later — this has happened repeatedly across multiple days.
Expected
An active Remote Control session should not be archived until it actually exits.
Suspected cause
This looks like the Remote Control archive-on-exit logic misfiring on a connection / token-refresh blip — the same class as previously shipped fixes:
- "Fixed Remote Control sessions getting archived on transient CCR initialization blips during JWT refresh"
- "Fixed Remote Control getting stuck on 'reconnecting' after resuming a session when an OAuth token refresh happened at the same time"
It appears to have regressed, or there is a remaining trigger, in 2.1.195.
Impact
Benign in terms of data (archive only hides; nothing is deleted, and the session can be unarchived) but disruptive — the active session keeps disappearing from the default session list and has to be manually recovered.
Steps to reproduce
- Drive a long-lived session via Remote Control (claude.ai web / mobile app).
- Keep it active over an extended period, with reconnects / token refreshes occurring.
- The session gets archived without an explicit
/exit, recurring across reconnects.
Environment
- Claude Code 2.1.195
- macOS (Darwin 25.5.0)
- Session driven via Remote Control (web/mobile)
Notes
Distinct from #65838 (per-client archive sync) and #39178 (auto-archive during idle, closed/stale) — here the session is recently active, and the trigger appears to be a reconnect/token-refresh race rather than idleness.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗