{"version":"2.1.305","anchor":"plugin-eval-can-pass-the-session-api-key-to-its-test-runs-by","canonical_anchor":"plugin-eval-can-pass-the-session-api-key-to-its-test-runs-by","heading":"claude plugin eval can now use your session's API key","tier":"notice","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305\/e\/plugin-eval-can-pass-the-session-api-key-to-its-test-runs-by","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305","markdown":"### `claude plugin eval` can now use your session's API key\n\nPlugin eval runs now prefer an available API key, fall back to it if login fails, and pass it to test runs by file descriptor except on Windows\n\n**What**\n\n`claude plugin eval` runs tests on a plugin. It now handles an API key (a secret key used instead of signing in) for those test runs.\n\n- Picking a credential: when a key is available and OAuth sign-in is not forced, the key is used. It is also used as a fallback when the OAuth token is missing or cannot be refreshed. Before, the eval path returned nothing when an API key file descriptor or other key source was present.\n\n- Passing it on: when the session's credential is an API key, it is handed to the test runs through `CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR`.\n\n- Windows: there it stops with \"claude plugin eval can't pass this session's API key to its test runs on Windows; set ANTHROPIC_API_KEY and run it again\".\n\n- Gateways: gateway credentials still use `CLAUDE_CODE_USE_GATEWAY` and `ANTHROPIC_BASE_URL`.\n\n**Why**\n\nIf you run evals with an API key, you no longer have to export the key yourself, except on Windows where you still need to set `ANTHROPIC_API_KEY`. Which credential your eval runs use may also differ from before.\n\n- Area: Plugins\n- Names: `claude plugin eval`, `CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}