Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Correct period durations for pace tracking
- Codex Reviews: use PERIOD_WEEKLY_MS (7 days) per API docs
- Cursor billing: parse string timestamps, already in ms (no * 1000)

Co-authored-by: Cursor <cursoragent@cursor.com>
  • Loading branch information
robinebers and cursoragent committed Feb 5, 2026
commit f1f000f142848b67bf31d2622bc3349451dc56bf
2 changes: 1 addition & 1 deletion plugins/codex/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
limit: 100,
format: { kind: "percent" },
resetsAt: getResetsAtIso(ctx, nowSec, reviewWindow),
periodDurationMs: PERIOD_SESSION_MS
periodDurationMs: PERIOD_WEEKLY_MS // code_review_rate_limit is a 7-day window
}))
}
}
Expand Down
8 changes: 5 additions & 3 deletions plugins/cursor/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,12 @@
: pu.limit - (pu.remaining ?? 0)

// Calculate billing cycle period duration
// Use billingCycleStart/End if available, otherwise default to ~30 days
// API returns timestamps as strings in milliseconds
var billingPeriodMs = 30 * 24 * 60 * 60 * 1000 // 30 days default
if (typeof usage.billingCycleStart === "number" && typeof usage.billingCycleEnd === "number") {
billingPeriodMs = (usage.billingCycleEnd - usage.billingCycleStart) * 1000
var cycleStart = Number(usage.billingCycleStart)
var cycleEnd = Number(usage.billingCycleEnd)
if (Number.isFinite(cycleStart) && Number.isFinite(cycleEnd) && cycleEnd > cycleStart) {
billingPeriodMs = cycleEnd - cycleStart // already in ms
}

lines.push(ctx.line.progress({
Expand Down