Expand description
A Claude sign-in that is lost while agents run on it is noticed when it happens, not at the next spawn.
The Claude CLI keeps its token in memory, so an account whose credentials file is emptied (two
CLIs raced a refresh, a sign-out in another window) keeps working until its agents restart.
The one probe of the file runs at spawn (oauth_probe), so for hours nothing said the sign-in
was gone, and the first sign of it was every agent failing at the next upgrade.
check runs on the account tick. It probes each Claude account’s config dir. A CLI that is
rewriting the file can leave it unreadable for a moment, so a signed-out reading counts only
when a look at least [LOOK_GAP_MS] later says the same; then it logs once, marks the account needs_reauth
(Connectors shows Reconnect) and tells the account list to reload. An account it marked that
reads signed in again is put back. It never logs a token value (the probe it calls withholds them from transcripts), never writes the credentials
file, and does not start a sign-in.
Functions§
- check
- Look at every Claude account once and act on the ones whose sign-in was lost or came back. BLOCKING (file and store reads). Returns the ids it marked, for tests.