1. brindle
  2. Docs
  3. Token usage and history

Token usage and history

Inspect durable session history, estimated spend and optional Pro budgets.

Where usage comes from

brindle reads each agent's own transcript incrementally. Claude Code records input, cache reads, cache writes, output and model in its project JSONL; Codex uses its session rollouts. Google Antigravity and native workers also supply readable transcripts. Providers without one, such as OpenCode or shell, show unknown usage rather than a token line.

Usage appears beside agents in the sidebar and brindle ls, in forwarded worker and reviewer results, and per row in brindle history. A forwarded line can read tokens: 182k in (160k cached, 20k written) · 9k out · sonnet · ~$0.18.

Durable history

brindle history is an append-only log of reports, review verdicts, successful merges and milestone checks. Reports and merges carry tokens; each row counts only usage since that agent's previous row, so totals do not double count. History survives session pruning and is capped at 5,000 rows per repo, dropping the oldest first. Recording failures are logged and skipped; they never block a report, merge or check.

Spend in dollars

brindle cost prices the last 30 days of history at dated model list prices per million input, output, cache-write and cache-read tokens. Built-in prices come from Anthropic and OpenAI pricing pages; brindle warns after 90 days. Local models cost $0, known free models read “Free” and still count tokens, and unknown models show unpriced tokens. A mixed result can read $1.20 (+40k tokens free). Subscriptions and discounts can make the actual bill lower.

Add or override prices in your user or repo config; entries merge per model:

{"pricing": {"my-model": {"input": 1, "output": 5, "cache_write": 1.25, "cache_read": 0.1}}}

brindle cost report (Pro) breaks spend down by day, profile and goal, with cost per merged branch and profile review pass rates. Savings include cache hits, routing against the most expensive configured profile for the same tokens, and spend avoided by budgets. These are estimates.

Budgets (Pro)

{"budget": {"task_usd": 5, "goal_usd": 40, "month_usd": 200, "stop": false}}

Set budgets in user, repo or local config, merged per key with local last. Weight routing estimates a task from finished tasks on that profile in this repo, or a typical token mix at list prices. If it would exceed a task, goal or monthly limit, routing tries a cheaper candidate. If none fits, assignment is refused with a reason and a question for you. A profile you name yourself is not second-guessed by budget routing.

Running workers are reported to the supervisor at 80% and 100% of task_usd. stop: true closes a worker at 100% instead of only warning. These budgets have no effect without the Pro cost feature. See Provider quota for subscription limits rather than dollar budgets.