Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.163 ·

OAuth 401 Recovery for Remote Sessions

Entry
JSON All of v2.1.163
EntryKind: in v2.1.163,
ChangesSection of the release
What

Remote sessions now wait for a rotated OAuth token after receiving a 401 error, instead of immediately propagating the failure.

Details
  • Wait time is controlled by CLAUDE_CODE_OAUTH_401_WAIT_MS (default: 60,000 ms = 60 seconds for remote sessions, 0 for local sessions).
  • If a valid, non-failed token appears within the timeout window, the request is retried automatically.
  • For remote child sessions (workers), CLAUDE_CODE_AUTH_FAIL_EXIT_MS (default: 600,000 ms = 10 minutes) controls how long to tolerate unrecovered 401s before exiting with a message to the runner to recycle the session with fresh credentials.
  • The "failed access token" (the specific token that got the 401) is tracked so a rotation to an identical token value is not treated as a recovery.
Evidence

Recovery function (search for "OAuth 401 recovery: waiting up to" and "OAuth 401 unrecovered past CLAUDE_CODE_AUTH_FAIL_EXIT_MS")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.163 →

Feedback