Budget caps
Daily and weekly spend ceilings enforced at the hook layer. When you hit a cap, new tool calls are denied with a clear message.
Env vars
SENKANI_BUDGET_DAILY=5.00 — daily spend cap in USD (default $5.00).
SENKANI_BUDGET_WEEKLY=25.00 — weekly spend cap in USD (default $25.00).
How enforcement works
The hook layer queries costForToday() and costForWeek() from the session DB (aggregated from token_events) before approving a tool call. When a cap is exceeded, the hook denies with a structured error message that the agent sees — not a silent failure.
Dual-layer enforcement
Enforcement runs at both the pre-tool-use hook AND the MCP server — so denial happens even if the agent bypasses the Senkani tools and calls built-ins directly.
Reset
Daily resets at midnight local. Weekly resets Monday 00:00 local. No manual reset — the cap is a ceiling on lifetime spend, not a bank.