Commit 3911f6b
authored
directive: session budget circuit breaker (refs CC#68285) (cnighswonger#258)
Design directive (no code) for an opt-in hard per-session spend ceiling: once a
session's cumulative token consumption or rate crosses an operator-set limit,
further /v1/messages are short-circuited locally so they never reach Anthropic —
capping the single-session runaway from CC#68285 (700-subagent fan-out → ~$1000
surprise charge) at the source. Serves both billing models; for direct API-key
users the cost lever is a literal dollar ceiling.
AITL scope-approved (plan-approved); Codex directive review across 3 rounds
(reviewed-by-codex-agent) — fixed q5h-account-global vs per-session, dropped
unimplementable scope=workflow, added Load-bearing declaration, and folded in the
API-key audience; human lead approved. Implementation is load-bearing (blocks
live credential-bearing traffic) → Codex + human review + #68285 fan-out
sim-validation gate before the implementation PR merges.
Ref #682851 parent 0ed2ab5 commit 3911f6b
1 file changed
Lines changed: 351 additions & 0 deletions
0 commit comments