Label a Claude Team seat by its subscription, not its rate-limit tier - #11109
Open
omdenton wants to merge 1 commit into
Open
Label a Claude Team seat by its subscription, not its rate-limit tier#11109omdenton wants to merge 1 commit into
omdenton wants to merge 1 commit into
Conversation
The collector built the plan label from the OAuth rateLimitTier first, so a Team premium seat, which runs on default_claude_max_5x, showed in the agents panel as "Max 5x". Lead with subscriptionType and keep the multiplier as its qualifier: Max still reads "Max 5x", a Team seat reads "Team 5x". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sign in to Claude Code on a Team premium seat and the agents panel's hero line says Max 5x. The seat isn't on Max; it's a Team seat whose Claude Code allowance happens to run on the Max 5x rate-limit tier.
Why
plan_labelinbin/omarchy-agent-usage-claudereads two fields off the saved login,rateLimitTierandsubscriptionType, and lets the tier win whenever it matchesmax_<N>x. That's right for a Max account, where the two agree. On a Team premium seat the login looks like this:{ "subscriptionType": "team", "rateLimitTier": "default_claude_max_5x" }The tier names the ceiling, not the plan, so the panel labels the seat as the plan it is not on. Enterprise seats take the same path.
The fix
Lead with the subscription and keep the multiplier as its qualifier. The label stays exactly as it was for every case that worked before, and only the mislabelled one moves:
subscriptionTyperateLimitTiermaxdefault_claude_max_5xmaxdefault_claude_max_20xdefault_claude_max_5xprodefault_claude_proteamdefault_claude_max_5xteamKeeping the
5xon a Team seat is a judgment call. It's the one thing the tier does tell you, it's what makes a premium seat different from a standard one, and it mirrors the "Max 20x" / "Max 5x" shape the panel already uses. Happy to drop it to a plain "Team" if you'd rather.Testing
test/shell.d/agent-usage-claude-limits-test.shgains two cases that plant a.credentials.jsonand read the label back throughoauth_login, so the whole path is covered rather than the formatter alone. The Team case fails on the current collector and passes with the fix; the Max, Pro and multiplier-less cases pin the labels that must not move. The Claude scanner, usage-update, agents-panel and bin-style suites all pass.Verified on the real thing: running the patched collector against a signed-in Team premium seat prints
"tierLabel": "Team 5x"in the usage record where the shipped one prints"Max 5x". The panel drawstierLabelas-is, so no shell change is needed.🤖 Generated with Claude Code