Skip to content

Implement usage all accounts - #399

Merged
tsouth89 merged 12 commits into
mainfrom
fix/issue-274
Aug 23, 2026
Merged

Implement usage all accounts#399
tsouth89 merged 12 commits into
mainfrom
fix/issue-274

Conversation

@tsouth89

@tsouth89 tsouth89 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Fixes #274.

Carries the flag into execution, expands configured Codex and Claude accounts, and fetches them with bounded concurrency while preserving output order. Each JSON or text result identifies its account, including independent failures. The default output shape remains unchanged.


Note

Medium Risk
Changes how usage fetches pin credentials to account config dirs and runs those fetches concurrently. Default CLI shape is unchanged, but a wrong pin would mix or leak the wrong seat’s quota.

Overview
Honors usage --all-accounts instead of ignoring it. Directory-backed Codex and Claude accounts expand to one fetch each, pinned to that account’s config dir; other providers stay a single entry.

Fetches run with a concurrency cap of 4 and are reordered to configured sequence. Failures stay independent. Text and JSON tag each result with id/label (configured_account in JSON). Without the flag, output stays one entry per provider.

Reviewed by Cursor Bugbot for commit ba83fc7. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add --all-accounts flag to usage command for multi-account fetching

  • Introduces UsageCommand.all_accounts and expands directory-backed providers into one target per configured account in usage_targets
  • Fetches targets concurrently with bounded concurrency of 4 via stream::iter(...).buffer_unordered(MAX_CONCURRENT_ACCOUNT_FETCHES) in collect_usage_output, then restores configured order
  • Text and JSON outputs now include configured_account identification (id, label) for account-pinned targets via annotate_text_account and annotate_json_account
  • Updates docs/CLI.md and CHANGELOG.md to describe the new JSON shape and flag behavior
  • Behavioral Change: JSON results for account-pinned targets gain a new configured_account object; text output gains account annotation lines/suffixes. Reviewers should check annotate_json_account and annotate_text_account in usage.rs for consumers that parse these outputs.

Macroscope summarized ba83fc7.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ceiling ba83fc7 Commit Preview URL

Branch Preview URL
Aug 23 2026, 06:59 PM

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_eeaa8279-1455-4480-b4f9-ef6bd6646f82)

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tsouth89, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b9c1d088-8393-46c1-b9fd-f5b7b5035b27

📥 Commits

Reviewing files that changed from the base of the PR and between 67be4b9 and ba83fc7.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • docs/CLI.md
  • rust/src/cli/usage.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_1db6ac8d-2e65-48a9-b449-4effb664e911)

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_5d8f4bd6-f39c-44cf-a98d-06d72abac76a)

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_be106ac6-2ba7-4478-8116-bf12e012ec18)

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_95a31abe-53d1-4b72-97d9-d5ddc2409aa7)

@tsouth89
tsouth89 merged commit 747fcfa into main Aug 23, 2026
13 of 14 checks passed
@tsouth89
tsouth89 deleted the fix/issue-274 branch August 23, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement the documented --all-accounts usage behavior

1 participant