budget

budget is a command for coding agents from omrikais/cctally. It costs 0 tokens per session (7,171 once invoked), scanned A, original, Apache-2.0.

A spending tracker for Claude and Codex, grouped by vendor and a calendar period such as a week or month. It shows current spend, spending pace, expected period-end spend, and whether usage is within the budget.

In plain words
What is it for?
Use it to set or remove budgets, review usage against limits, and monitor Claude or Codex spending independently.
Why use it?
It makes it easier to notice overspending before the period ends. Claude figures are transcript-based lower bounds, while Codex figures use actual API dollars; the budgets remain separate.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/omrikais/cctally/budget
Clone the repo
git clone --depth 1 https://github.com/omrikais/cctally

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for budget

README.md
[![agentmods](https://agentmods.dev/badge/commands/omrikais/cctally/budget.svg)](https://agentmods.dev/commands/omrikais/cctally/budget)
Your own site
<a href="https://agentmods.dev/commands/omrikais/cctally/budget"><img src="https://agentmods.dev/badge/commands/omrikais/cctally/budget.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,171 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.07171
Opus 5 $0.00000 $0.03585
Sonnet 5 $0.00000 $0.01434
Haiku 4.5 $0.00000 $0.00717

Measured 3d ago against content hash 6b20ae29bdfd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

budget scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/budget.md · 487 lines

How it starts

The opening of the file, as written. The whole thing — 487 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cctally budget

Track spend against a budget, per vendor (Claude and/or Codex) over a configurable calendar period. cctally budget shows spend, pace, projected end-of-period, and a verdict (ok / warn / over); cctally budget set <amount> and cctally budget unset manage the budget. When a budget is set and alerts are enabled, a desktop alert fires once per crossed threshold as actual spend passes it (see Alert behavior).

Claude cost coverage: Claude spend is a transcript-derived lower bound, not an exact /usage billing total. Codex accounting is unaffected.

The Claude budget defaults to the subscription week (the original v1 behavior) but can run over a calendar week or calendar month instead. A separate Codex (OpenAI) budget tracks Codex's actual API dollars over a calendar week or month — Codex has no Anthropic subscription week, so a Codex budget is calendar-period only. The two budgets are independent: configure either, both, or neither. There is no combined cross-vendor cap (Claude is equivalent-$, Codex is actual-$ — they are not summed).

budget is a cctally-original command (not a ccusage drop-in), so there is no claude budget / codex budget subgroup form — the flat cctally budget is the only surface.

Subcommands

  • cctally budget — status report (Claude block, then the Codex block when configured, then per-project).
  • cctally budget set <amount> — set the Claude budget to <amount> USD (a positive finite number). Confirms with the resolved budget + period + alert state.
  • cctally budget set <amount> --vendor codex — set the Codex budget. Codex requires a calendar period (--period calendar-week or calendar-month; default calendar-month).
  • cctally budget set <amount> --period {calendar-week,calendar-month,subscription-week} — set the Claude budget's period. Omitting --period preserves the stored period (or the per-vendor default on first create).
  • cctally budget unset — clear the Claude budget amount (period + alert thresholds are preserved for the next set).
  • cctally budget unset --vendor codex — remove the Codex budget entirely.

Read the full file on GitHub · 487 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 487 lines · 0 tokens per session scan A 6b20ae29bdfd

Subscribe to this mod's changes

budget is a command published in the GitHub repository omrikais/cctally (5 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 7,171 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.