Skip to content

feat(usage): show Devin's daily and weekly allowance in Limits - #1

Open
vxirau wants to merge 1 commit into
realhasanshoaib:t3/devin-usage-popupfrom
vxirau:devin-usage-limits
Open

vxirau wants to merge 1 commit into
realhasanshoaib:t3/devin-usage-popupfrom
vxirau:devin-usage-limits

Conversation

@vxirau

@vxirau vxirau commented Nov 1, 2026

Copy link
Copy Markdown

Builds on pingdotgg#26381. Instead of only linking to the dashboard, this shows Devin's real daily and weekly bars in Usage → Limits, like the other providers. The Manage usage link stays as the fallback.

How

The Devin CLI already asks its own API server for the remaining allowance. At every ACP startup and on /status it calls POST <api_server_url>/exa.seat_management_pb.SeatManagementService/GetUserStatus (visible with RUST_LOG=debug devin acp), using the windsurf_api_key it stores in ~/.local/share/devin/credentials.toml. The response includes userStatus.planStatus.{daily,weekly}QuotaRemainingPercent and {daily,weekly}QuotaResetAtUnix.

  • devinUsageLimits.ts makes the same request with the CLI's login and version, and maps it to a Weekly and a Daily window (usedPercent = 100 − remaining; proto3 JSON omits a zero remaining percent, so a missing value means the window is used up).
  • driver.ts attaches the windows in checkProvider for registry Devin only, keeping the existing externalUsage link. Enrichment already preserves published limits, so no extra state is needed.
  • Any failure (no CLI login, network, unexpected response, Windows, or a custom executable with no known version) returns nothing, and the dashboard fallback from fix(usage): show Devin in subscription Limits pingdotgg/t3code#26381 stays exactly as it is.
  • The request has a 10 s timeout and refuses redirects, so the key only goes to the CLI's own server. That's the same pattern Cursor limits use with the Cursor CLI login (DashboardService/GetCurrentPeriodUsage).

No new settings, contracts, or dependencies.

Proof

  • Ran the real reader against my Devin Pro account with CLI 3000.11.228: it returned Weekly 0% used, resets 2026-11-08T08:00Z and Daily 0% used, resets 2026-11-02T08:00Z, matching app.devin.ai/settings/usage. An earlier request on the same account returned 22% daily remaining, with the weekly percent omitted (proto3 zero).
  • The server rejects the request without the version metadata fields (HTTP 400), which is why the custom-executable case skips it.
  • vp run check:changed 0765bc3da6: format, lint, both knip passes, typecheck (10 packages) and tests (13 in the 2 affected files) all pass.

Not checked: native desktop/mobile rendering and Enterprise/Teams plans.

The Devin CLI already reads its remaining allowance from its own API server
(SeatManagementService/GetUserStatus) with the login it stores. Reuse that
request to fill the existing Limits windows for registry Devin, and keep the
Usage & limits dashboard link as the fallback when it cannot be read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant