Claude Code prioritized a locally stored API key, such as one from a previous `/login` or configuration file, over a valid Claude Enterprise or Team sign-in when retrieving server-managed settings. If the settings endpoint rejected the stored key, the session would start without the organization's server-managed policies—including permission deny rules, model restrictions, and managed-only locks—or would continue using a stale cached copy of the policy while still operating under the organization's account. This issue requires local access to a device containing a stored API key. Endpoint-managed settings, such as those via MDM or file-based configurations, are not affected.