When a server answers a request with a 401 error, which means "not authorized", Claude Code tries to recover by refreshing your sign-in. It now tells two cases apart:
- Withheld: the request was sent without a credential on purpose.
- Refused: a credential was sent and the server rejected it.
Only the refused case is treated as a real sign-in failure. When Claude Code tries to create a code session and gets a 401 for a withheld credential, it now gives up quietly instead of running its sign-in failure handling.
A 401 caused by a credential that was held back on purpose says nothing about whether your sign-in is still good. Treating it as a failure could prompt you to sign in again for no reason, and this change should cut down on those prompts.