[BUG] Analytics API does not return Claude.ai subscription users
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Claude Code Analytics API (https://docs.claude.com/en/api/claude-code-analytics-api#get-analytics-for-a-specific-day) does not return usage for Claude.ai subscription users. Only users with customer_type=api that logged in using the Anthropic Console option show up in the API response.
What Should Happen?
The API response should return all Claude Code users, including users that log in with the Claude.ai subscription option in VS Code.
Error Messages/Logs
Steps to Reproduce
Steps:
- Log in through VS Code using Claude.ai subscription option (premium seat, Team account, organization_id: a2ec4342-715c-4856-b61a-d8781a307cd2)
- Use Claude Code for the day
- Check the API response
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
VS Code: anthropic.claude-code 2.0.21
Platform
Other
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Logging in via the CLI also did not make a difference.
Developers who used a Claude.ai subscription still show up in the web dashboard, just not the analytics API response.
There are payloads returned to the UI that show 0 active users but non-zero lines of code accepted, which also presents an inconsistency.
<img width="1526" height="781" alt="Image" src="https://github.com/user-attachments/assets/c0a39f2c-e257-4372-8b91-dce08a020bc4" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗