Agent Board Auto Mode — Dual-Window Pacing
Agent Board Auto Mode — Dual-Window Pacing to Maximise the 7-Day Reset Without Tripping the 5-Hour Reset
Dawn Studio — Working Paper v0.1, 2026-11-22 (Hector Chan / Emma) Status: DEFAULT mode specification for the Agent Board. This is the board's auto mode, not an optional feature.
Abstract
Claude accounts live under two nested quotas: a rolling 5-hour session cap C5 and a fixed 7-day cap C7 (reset at an account-fixed time, shown in Settings > Usage / /usage). Bursting maximises short-term throughput but trips C5 and leaves the agent blocked for hours; idling wastes C7, which expires worthless at reset — use-it-or-lose-it. We formulate Auto Mode as a dual-constraint pacing problem, solve it with a nested token-bucket / leaky-bucket controller driven by Model Predictive Control (MPC), reserve quota for forecast human-directed demand learned from the user's own behaviour, and fill only the provable surplus with elastic, no-pain work — including automatic book study when no repo work is pending. The terminal optimum is exact: in the final 5-hour window before the 7-day reset, C5 and C7 should be exhausted together; before that window, C5 must never bind.
1. Problem
For each account a, at time t:
- u5(t) = usage in the trailing / current 5h session window, cap C5, reset t5
- u7(t) = usage in the current 7d window, cap C7, reset t7 (fixed per account)
- Constraint (hard, pre-terminal): u5(t) < C5 for all t < t7 − 5h
- Objective: maximise u7(t7⁻) / C7 with ε = 2% operating margin (Hector 2026-11-22, final: "ε=2% is better") — three lines, in order: 98% = operating landing target (all pacing math runs with ε=2%); 99% = absolute hard ceiling, never crossed (in Hector's words, 99% at cutoff would be "amazing" — but it is the wall's doorstep, not the aim); 100% = never seen ("seeing 100% is scary" — blocked / failure). Because one in-flight large session can overshoot by several %, the effective dispatch stop is dynamic: stop admitting new auto work at 98% − (cost of the largest admissible job), so the landing, not the admission, sits at ≤98%, with the 98→99 band held purely as overshoot insurance.
- Secondary: never starve human-directed (URGENT/directed) work; never mutate live state with filler work (NO-PAIN class only).
This is exactly the shape of three giant literatures:
- Network congestion control — token bucket (burst budget) vs leaky bucket (smooth output); AIMD (Jacobson, TCP) and BBR-style probing for an unknown, drifting capacity.
- Google SRE / Borg — quota as schedulable capacity; preemptible / batch backfill tasks soak spare capacity and are evicted instantly by priority work; load-shedding and graceful degradation.
- HPC backfill scheduling (Slurm) + queueing theory — backfill only jobs that provably finish without delaying reserved future jobs; Little's Law to size concurrency from target rate × session latency.
Academic spine: control theory (PID / MPC — re-solve a finite-horizon optimisation every tick as forecasts update), demand forecasting (time-series + contextual features), and online learning (contextual bandit over task classes: value gained per token).
Books auto-studied in this line (curriculum, §6): Designing Data-Intensive Applications (Kleppmann — already Emma's standing study duty), Site Reliability Engineering (Google — quota, backfill, load shedding), The Art of Computer Systems Performance Analysis (Jain — measurement / AIMD), Introduction to Queueing Theory, TCP congestion-control canon (Jacobson 1988; BBR, Cardwell et al.).
2. The Core Rate Law
Sustained feasible rate is set by whichever window is tighter:
r_sustain = min( C5 / 5h , C7 / 7d )
But the optimal instantaneous dispatch rate is not constant — it is a catch-up pace to the 7-day deadline, clipped by the 5-hour bucket:
r7_pace(t) = (C7·(1−ε) − u7(t)) / (t7 − t) # water-filling to reset r5_head(t) = (C5·(1−ε) − u5(t)) / (t5 − t) # what this window can still absorb, spread out r_auto(t) = max( 0 , min( r7_pace(t), r5_head(t) ) − r_reserve(t) )
- If the user has been idle, r7_pace rises — Auto Mode may spend faster, but r5_head still smooths it (leaky-bucket output, not a burst).
- If the user has been heavy, r7_pace falls below the naive C7/7d line — Auto Mode throttles itself before the wall, not at it.
- ε = safety margin (start 3–5%), learned per account from observed cap drift / measurement error; shrink ε as telemetry (exact utilisation + reset_at from the usage endpoint /
/usage) proves reliable. - Terminal window (t ≥ t7 − 5h): the 5h constraint stops being a constraint — set r_auto to exhaust min(C5 remaining, C7 remaining) together. Hitting the 5h limit at the 7d reset is optimal, not a failure.
3. Behaviour Learning — Flow With the User
Auto work must never eat quota the human is about to need. Every tick (5 min), forecast human-directed demand for the next 5h:
D̂(t, t+5h) = f(hour-of-day, day-of-week, recent session sizes & lengths, active projects / deadlines, current live session burn rate)
- Model: start as an empirical quantile model over Hector's own history (he is strongly nocturnal, bursty, multi-project, late-night CST peaks; directed sessions are large and arrive in clusters) — reserve = 95th percentile of observed next-5h human demand in matching context buckets.
- r_reserve(t) = D̂₉₅ / 5h while far from t7; the reserve decays to 0 across the terminal window (forecast human demand after reset belongs to the next week's quota).
- Online update: every human session is a training sample (start time, tokens, model mix — Opus burns quota faster per token than Sonnet/Haiku — context depth, tool overhead). Forecast error feeds back: chronic over-reserve → lower quantile; any starvation event (human hits a limit because auto spent) → raise quantile + ε immediately, and log it as a PAIN entry. Starvation is the one unforgivable error of Auto Mode; waste is merely suboptimal.
- This is MPC in practice: forecast → optimise to t7 → dispatch one tick → re-measure real u5/u7 → re-solve. Never trust an open-loop schedule.
4. What the Surplus Burns On — Priority + Backfill
Dispatch only when r_auto(t) > 0, strictly in this order, each job sized / checkpointed so it can pause at a window boundary:
- Directed / URGENT human work — always preempts, never paced.
- Pending designed repo tasks (all Dawn + Flow repos, organic auto-advance).
- NO-PAIN filler: tests, verification runs, read-only audits, coverage closure, additive work on accumulated data.
- Book study (auto-learn): if the queue is dry and surplus remains, Auto Mode studies — the standing book curriculum (§1) plus books matched to live problems (e.g. queueing/control when pacing error is high, a domain book when a project stalls). Output is not raw reading: distilled canon notes + spot-check seeds into Dawn School, filed like any other work product. A dry queue with tokens remaining is a failure; a dry queue is converted into knowledge, never into make-work mutations.
Admission control, not retries: a 429 / limit signal is a capacity signal — on hit, AIMD multiplicative decrease (rate × 0.5), global cooldown across all workers on that account, exponential backoff with full jitter; on sustained clean windows, additive probing upward. Concurrency sized by Little's Law: N = r_auto × mean session latency, capped at 70% of observed safe concurrency.
Multi-account: the board's existing chooseAccount becomes a pacing-aware choice — pick the account with the highest feasible r_auto(t) (most 7d value at risk of expiring × most 5h headroom), respecting lane rules (reserved fastest lane stays un-busted unless near reset, per Hector's standing account rules).
5. Falsifiable Predictions (the paper's test)
- Utilisation: u7(t7⁻)/C7 ≥ 0.95 per account per week, vs. bursty-baseline weeks.
- Zero pre-terminal 5h blocks attributable to auto work over any rolling 4 weeks.
- Zero human starvation events; reserve forecast MAPE improves week over week.
- Filler value: tests/audits/book-notes produced per 1% of C7 is > 0 and non-decreasing as the task-class bandit learns value-per-token.
If (1) fails, the rate law / ε is wrong. If (2)–(3) fail, the reserve model is wrong. Either failure is data, per THINK → DO → FIX → REPEAT — the controller parameters, not the doctrine, get revised.
6. Implementation Sketch (board)
- Telemetry loop (5 min): read per-account utilisation + reset times (usage endpoint / board account state); persist time series — this is also Hector's usage dataset, the paper's empirical base.
- Controller: compute r_auto per account (§2–3); token-bucket dispatcher admits sessions against r_auto; leaky-bucket smoothing on starts.
- Scheduler: priority queue with backfill check — a filler/book job starts only if its token estimate fits surplus AND it is checkpointable before the next forecast human peak.
- Watchdogs: stall watchdog (zero-activity session → kill + redispatch raw), starvation watchdog (§3), dry-queue watchdog (surplus > threshold + empty queue → inject book study).
- Digest, not drip: weekly per-account report to Hector — utilisation achieved, blocks avoided, reserve accuracy, what the filler produced. His attention gate sees the summary, never the ticks.
References (giants)
Jacobson (1988) Congestion Avoidance and Control · Cardwell et al., BBR · Google SRE Book, ch. Handling Overload / Borg · Kleppmann, Designing Data-Intensive Applications · Jain, The Art of Computer Systems Performance Analysis · Slurm backfill scheduling docs · Anthropic Help Center / Claude Code docs on 5-hour session + weekly limits (limits are token-weighted, model-dependent, shared across surfaces).
← All papers