Skip to content

devlog/token-math/a-terminal-budget-for-weekly-flow-pass-caps-720.md

A Terminal Budget for Weekly Flow-Pass Caps

Weekly flow-pass caps are not monthly budgets

The expensive mistake happens between terminal tabs: an agent starts a broad refactor, another session reviews the diff, and a background job retries failed evaluations. Each workload looks reasonable. Together, they consume the week's allowance before Thursday.

A weekly cap answers, “How much can this pass consume during this reset window?” A monthly budget answers, “How much am I willing to spend during this calendar month?” Treat them as separate constraints. Before automating anything, verify your flow pass's reset time, timezone, cap scope, and exhaustion behavior. Do not assume unused allowance rolls over or that hitting the cap disables every spending path.

A $100 month does not imply four $25 weeks

Calendar months and weekly reset windows do not align. A month can intersect five weekly windows, so dividing your monthly budget by four is not a reliable guardrail. A $30 weekly ceiling can expose you to more than $100 of spending across those windows, depending on when usage lands.

For a $100 budget in a 31-day month, the baseline daily pace is about $3.23, or $22.58 per seven days. That is a planning rate, not a replacement for either cap. Reserve $15 for release-day debugging, and your routine-work allowance becomes $85. Recalculate from remaining money and remaining days instead of preserving an obsolete Monday target.

Put two checks before every agent run

I prefer a small launcher around my coding tools rather than relying on a dashboard I remember to open after lunch. Keep a local ledger with the billing period, weekly reset boundary, settled spend, and reservations for active jobs. Treat that ledger as advisory unless you have verified authoritative usage reconciliation.

  • Reject new work when either remaining allowance cannot cover its reservation.
  • Reserve estimated costs atomically before launching concurrent sessions or evaluation workers.
  • Release each reservation after reconciling the provider's reported usage and charges.
  • Pause unattended jobs when usage data becomes stale or unavailable.

Your admission ceiling is the smaller of weekly remaining allowance and monthly remaining budget, minus outstanding reservations and a safety margin. A local wrapper only protects traffic routed through it; direct CLI sessions and shared credentials can bypass it. Use server-side limits where available, and verify their actual scope.

Count cache traffic before choosing a model

Fluxo gives me one key and one base URL, https://api.fluxorelay.com, across Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen, Grok and more. That simplifies routing, but it does not make requests economically interchangeable. Fluxo bills real tokens, including cache reads and writes, with no monthly fee.

For example, benchmark Claude Sonnet 5.5 and DeepSeek V4 Flash on the same repository task. Record input, output, cache-read, and cache-write tokens alongside actual charges, latency, and whether the patch passes tests. Do not infer the cheaper completed task from a model label or one token category. Repeated failed edits can erase an apparent per-request saving.

Separate interactive fixes from overnight batch work

Fluxo works with Claude Code, Codex, Gemini CLI, and any OpenAI SDK. Keep interactive and batch workloads distinguishable in your own launcher logs, even when they share the same relay credentials. Track tool, repository, task identifier, model, and retry count.

Give overnight evaluations a smaller admission allowance than interactive debugging. Bound retries and agent iterations explicitly. When weekly headroom shrinks, defer low-priority batches rather than silently switching every task to another model. A fallback should preserve your test criteria, not merely return a response.

Reconcile weekly resets without refreshing monthly money

At the weekly reset, refresh only the weekly counter. Keep monthly spending intact. At month-end, reconcile charges against your ledger and investigate unexplained differences before increasing limits. If invited users pay, Fluxo lets you earn a referral share; keep that separate from spending forecasts until its availability and applicable terms are clear.

If you want to try this workflow, create a Fluxo account and start with one bounded repository task. The useful outcome is not a perfectly smooth spending chart. It is knowing, before pressing Enter, which constraint your next run could exhaust.

Next in the buffer

Sign up in a minute and get credit to try every model mentioned here. Sign up →