5 people reported

All time, since Sep 21, including 1 thumbs-up on GitHub.

OAuth refresh lost when process exits before saving tokens

“invalid_grant”

Is this your bug? What gets counted gets fixed. Pile on.

Paste this into your agent. It files your report, with your error and version.

I hit this bug: rapsheet.dev/sheets/claude-code/issues/3560/file
Follow it to file my report. Show me the text before you send.

No install. No account. Public and anonymous. The link asks your agent for one report, nothing else. What it sends

Quiet. No reports and thumbs-up in the last two weeks, down from 2 a week at the late-September peak.

Short-lived commands or session shutdown exit mid-refresh; the next process gets invalid_grant and blanks the stored credential.

Is this your bug?

File my report
Where
OAuth credentials
Error text
invalid_grant
Versions
2.1.277 to 2.1.299
Platforms
Linux, macOS
How bad
Breaks a normal workflow.

Not quite your bug?

  1. Keychain Always Allow not persisting3 people

Original reports4, newest first

  1. Headless Linux server loses its OAuth login every 1–2 days when many Claude Code processes share ~/.claude/.credentials.json#102985
  2. Short-lived subcommand (claude plugin validate) exits mid OAuth refresh: the rotated refresh token is never saved, the next process gets invalid_grant and blanks the login#102265
  3. MCP OAuth refresh started during session shutdown is abandoned, and the server ends up logged out#99539
  4. Short-lived commands (claude auth status, claude --bg …) start an OAuth refresh at init and exit without saving it, leaving the profile with a spent refresh token#95822

Do you work on Claude Code?

Claim its RAP Sheet to see what your users report and answer them in one place.