What
Some apps run Claude Code inside themselves and supply its sign-in credentials. Such an app can already pass a credential to a session that is already running. A new environment variable, CLAUDE_CODE_HOST_AUTH_ASK_AT_START, now lets it hand one over at start-up. It joins the host sign-in variables CLAUDE_CODE_HOST_AUTH_ENV_VAR and CLAUDE_CODE_HOST_CREDS_FILE.
- At start, Claude Code asks the host for a credential when
CLAUDE_CODE_HOST_AUTH_ASK_AT_STARTandCLAUDE_CODE_SDK_HAS_HOST_AUTH_REFRESHare set and no gateway is in use. - This works only when
CLAUDE_CODE_PROVIDER_MANAGED_BY_HOSTandCLAUDE_CODE_HOST_AUTH_ENV_VARare also set. The credential is written into the variable thatCLAUDE_CODE_HOST_AUTH_ENV_VARnames. - For Amazon Bedrock, when the variable is set and the named variable is
AWS_BEARER_TOKEN_BEDROCK, Claude Code no longer supplies its own AWS access key, secret key, profile, config file or credentials file. - While the variable is set, another environment lookup returns an empty value instead.
- A
not_refusedstatus is sent only to a host that setCLAUDE_CODE_HOST_AUTH_ASK_AT_START.
Why
This only matters to apps and SDK integrations that embed Claude Code. Ordinary command-line users are not affected. It lets such an app provide the credential when Claude Code starts, rather than only to a session that is already running.
New in this build: CLAUDE_CODE_HOST_AUTH_ASK_AT_START