What
Claude Code sends its own usage analytics to Anthropic. Each event is now tied to the principal, meaning the signed-in identity, that produced it:
- Both ways of recording an event now attach a value worked out from the event name, as
principalStamp(principal_stampwhen sent). Events queued before analytics has started keep their stamp. - When sending, events stamped with a different principal from the current one are dropped. Events are also dropped by HIPAA-style checks, a set of safety events was added, and some internal events are removed when the data is cleaned up.
- The stamp is passed along with every event that is sent.
- In some cases the identity sent with events is built only from the environment variables
CLAUDE_CODE_ACCOUNT_UUID,CLAUDE_CODE_ORGANIZATION_UUID,CLAUDE_CODE_SUBSCRIPTION_TYPEandCLAUDE_CODE_RATE_LIMIT_TIER, instead of the stored account. The device ID falls back to those account and organization IDs.
Why
If you switch accounts, events recorded under one account are no longer sent as if they came from another, so analytics stay tied to the account that produced them.