Skip to content

Conversation

@Hilo-Hilo
Copy link

Summary

  • Fix Cursor plan percent calculation by using used + remaining (fallback: limit) instead of plan.breakdown.total.
  • Prevents Cursor from incorrectly showing 0% left when breakdown fields reflect used spend.

Test plan

  • ./Scripts/compile_and_run.sh
  • Verified via CodexBarCLI usage --provider cursor (Cursor Ultra now reports ~60% remaining instead of 0%).

Cursor’s /api/usage-summary breakdown fields describe used spend, not the plan limit.
Compute plan percent used from used + remaining (fall back to limit) to avoid showing 0% left.
@ratulsarna
Copy link
Collaborator

Thanks for the PR! We merged #240, which fixes the Cursor plan percent/limit bug by using plan.limit instead of breakdown.total. This PR now conflicts because it touches the same lines, so I’m going to close it as superseded. If you’ve seen real payloads where plan.limit is missing/incorrect but remaining is present (making used + remaining the right denominator), please comment with a redacted /api/usage-summary example and we can do a focused follow-up PR.

@ratulsarna ratulsarna closed this Feb 2, 2026
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.

2 participants