A program that drives Claude Code, such as one built with the SDK (the toolkit for building on Claude Code), can ask it to switch models. When that request fails, the reason it gets back is now more specific. The listed reasons are:
not_foundcheck_rejected, when the API returned an error that no retry or sign-in clearscredits_requiredrate_limitauth_failedverdict_pending, which is not a refusal: the outcome follows as a separate informational messageinternal_error
These reasons also cover settings changes sent through apply_flag_settings. Sign-in errors, errors a retry will not fix, and rate limits (too many requests) are now told apart. A "forbidden" error is treated as worth retrying only when CLAUDE_CODE_REMOTE is set or the session is otherwise remote.
Programs that control Claude Code can now tell why a model change failed and react to it, for example by waiting out a rate limit or asking the user to sign in again.