You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
ElsewhereArea: what it touches
ImprovementsKind: in v2.1.329,
ImprovementsSection of the release
Unclear Exactly when the check refuses a key is not clear.
What
Microsoft Foundry is one of the cloud services Claude Code can send requests through. ANTHROPIC_FOUNDRY_RESOURCE names the Foundry resource, and ANTHROPIC_FOUNDRY_BASE_URL gives its full address instead. A new check stops a key that is pinned, meaning tied, to one resource from being used against another.
Normal sessions: when ANTHROPIC_FOUNDRY_RESOURCE is set and no Entra token provider (Microsoft's sign-in system) is in use, Claude Code calls refusePinnedFoundryKeyOffItsResource. The same check also wraps the token provider.
Eval environment: when Claude Code builds the separate environment for an eval child process, it checks ANTHROPIC_FOUNDRY_RESOURCE and ANTHROPIC_FOUNDRY_BASE_URL through pinnedFoundryKeyRefusal. If the check refuses, a set of credential environment variables is dropped.
Why
If you use Microsoft Foundry and set both a key and a resource, a mismatched setup is now refused instead of sending the key somewhere it does not belong. If requests start failing after this release, check that your key matches the resource or address you have configured.