{"name":"CLAUDE_CODE_OAUTH_401_WAIT_MS","slug":"claude-code-oauth-401-wait-ms","family":"env","title":"Environment variables","noun":"environment variable","description":"Milliseconds Claude Code waits for a rotated token after an API call returns 401 while its OAuth token comes from `CLAUDE_CODE_OAUTH_TOKEN` or the OAuth token file descriptor source; `0` skips the wait. Default `60000` when `CLAUDE_CODE_REMOTE_SESSION_ID` is set and `0` otherwise; minimum `0`.","description_source":"code","described_by":{"bundle":"2.1.286","author":"claude-opus-5-5"},"presence":{"first_seen":"2.1.163","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":126,"mined_builds":149,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.163","anchor":"oauth-401-recovery-for-remote-sessions","heading":"OAuth 401 Recovery for Remote Sessions","line":null,"released_at":"2026-06-04 17:56:01","reason":"found in this entry's text"}],"entries_total":1,"docs":[],"docs_total":0,"gates":[],"related":[{"name":"CLAUDE_CODE_OAUTH_CLIENT_ID","slug":"claude-code-oauth-client-id","description":"Overrides the OAuth client ID in Claude Code's OAuth configuration, and is passed as the client ID when logging in from `CLAUDE_CODE_OAUTH_REFRESH_TOKEN`. An empty value is ignored."},{"name":"CLAUDE_CODE_OAUTH_REFRESH_TOKEN","slug":"claude-code-oauth-refresh-token","description":"OAuth refresh token for Claude.ai authentication. When set, `claude auth login` exchanges this token directly instead of opening a browser. Requires `CLAUDE_CODE_OAUTH_SCOPES`. Useful for provisioning authentication in automated environments"},{"name":"CLAUDE_CODE_OAUTH_SCOPES","slug":"claude-code-oauth-scopes","description":"CLAUDE_CODE_OAUTH_SCOPES no longer defaults to 'user:inference' when unset"},{"name":"CLAUDE_CODE_OAUTH_TOKEN","slug":"claude-code-oauth-token","description":"Three artifact environment variables are now recognised, with the API token stripped from spawned processes as a secret."},{"name":"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR","slug":"claude-code-oauth-token-file-descriptor","description":"Login tokens are warmed at startup, and skipped entirely for token-based auth."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-oauth-401-wait-ms","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}