{"version":"2.1.330","anchor":"host-launched-apikeyhelper-can-take-over-from-a-launcher-exp","canonical_anchor":"host-launched-apikeyhelper-can-take-over-from-a-launcher-exp","heading":"apiKeyHelper run for a launcher now takes priority over an exported token","tier":"notice","area":"Auth","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330\/e\/host-launched-apikeyhelper-can-take-over-from-a-launcher-exp","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330","markdown":"### `apiKeyHelper` run for a launcher now takes priority over an exported token\n\nWhen a launcher asks Claude Code to run `apiKeyHelper`, the helper's token is now used and an exported `ANTHROPIC_AUTH_TOKEN` is set aside\n\n**What**\n\n`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:\n\n- The helper supplies the session's credential, and the token the launcher exported is not used\n\n- Claude Code logs a message saying so\n\n- Lookups that rely on that token return nothing when a host-provided token applies\n\n- `CLAUDE_CODE_SDK_HAS_HOST_AUTH_REFRESH` also affects whether the exported token is used\n\n**Why**\n\nIn 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.\n\n- Area: Auth\n- Names: `apiKeyHelper`, `CLAUDE_CODE_LAUNCHER_RUNS_API_KEY_HELPER`, `ANTHROPIC_AUTH_TOKEN`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: yes"}