What
apiKeyHelper is a setting that names your own command for producing a sign-in credential. When a launcher (a program that starts Claude Code for you) asks for that helper to be run, using CLAUDE_CODE_LAUNCHER_RUNS_API_KEY_HELPER, Claude Code used to refuse the helper whenever an ANTHROPIC_AUTH_TOKEN was also present. Now:
- The helper supplies the session's credential, and the token the launcher exported is not used
- Claude Code logs a message saying so
- Lookups that rely on that token return nothing when a host-provided token applies
CLAUDE_CODE_SDK_HAS_HOST_AUTH_REFRESHalso affects whether the exported token is used
Why
In sessions started by a host app, this changes which credential is actually sent. If you combine a launcher's exported token with apiKeyHelper, expect the helper's token to win.