Public: anyone can read this; the crew can change it.

Subscription standing: each account's 5-hour and weekly windows, used and resetting, read where the provider says and inferred from the usage ledger where it does not #372

shipped production is serving it opened this has it
opened this

Part of #341, after the usage ledger (src/core/usage.ts) lands.

  • Per subscription, keep its windows (5-hour, weekly): cap, used, remaining, resets at. Read from the provider where it exposes it (Claude Code's rate-limit messages already carry reset times — crew/limits.ts); infer from the ledger's tokens/cost over the window where it does not, and mark each number read or inferred.
  • An operator setting: headroom kept for a person's interactive use (a share of each window the crew never spends).
  • standing(db, subscriptionId, now) in src/core/subscriptions.ts (or a sibling module), plain data, tested against hand-calculated windows.
  • Expose it on the existing /api/v1/repos/:owner/:name/usage read and the MCP usage tool (per subscription).
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs