DocsAgent Workflows
View as Markdown

Usage & Cost

See what your agents actually cost. Official subscription quota for every login, plus token and dollar history mined from Claude Code and Codex logs already on your disk.

Agent CLIs tell you almost nothing about spend until you hit a wall. Agentastic's Usage panel answers both questions in one place: how much quota is left right now, and what the last week, month, or quarter of agent work actually consumed.

Open it with View → Usage (Cmd+Opt+U). It opens as an editor tab, so you can split it beside a chat and watch the numbers move.

Official quota#

The top half is one card per login, grouped by provider — Claude, Codex, and Grok today.

Each card shows the provider's own reported rate-limit windows — the 5-hour window, the weekly window, the monthly window, whichever that plan publishes — as meters with a countdown to reset. The numbers come from the provider's API using your existing credentials, refreshed every five minutes, with a manual refresh in the header.

When a token needs renewing, the card says so and gives you the exact sign-in command to copy.

More than one account#

Most people have more than one login — work and personal, or a team seat and a side project. Agentastic finds them and tracks each separately.

Discovery is deliberately narrow, so nothing goes hunting through your home directory for credentials. It looks at:

  • the provider's default directory (~/.claude, ~/.codex, ~/.grok),
  • sibling profile directories you made by convention (~/.claude-work, ~/.codex-personal),
  • and directories Agentastic provisioned itself.

Add account runs the provider's own sign-in in a terminal here and opens the login page in a browser tab; the resulting profile gets its own config directory, so the two logins never overwrite each other. Rename or remove a profile from its card menu. Agents launched against a profile inherit it through the provider's own environment variable — CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME.

Choosing which providers appear#

Which providers show up follows the per-agent Show Subscription Usage toggle in Settings → Agents. That same toggle puts the remaining quota on the agent's row in the Inspector's Agents card, where you see it without leaving your work.

With none enabled, the panel shows every supported provider and tells you where the toggle lives — a blank panel reads as broken rather than unconfigured.

Token history#

The bottom half is built from logs the CLIs already write to your disk: Claude Code's per-project JSONL transcripts and Codex's rollout logs. Nothing is uploaded, and no extra instrumentation is needed — history exists for work you did before you ever installed Agentastic.

Getting this right is harder than summing a column. Claude Code writes a growing usage snapshot per content block, and resume, fork, and compaction can rewrite the same API call into several files — so every event carries a global dedup key and only the largest snapshot survives. Codex emits both a running total and a per-turn delta, and re-emits the same delta on UI refreshes. Sum the wrong field and your numbers inflate quadratically. Agentastic reads the right ones.

What you get#

ControlOptions
MetricCost or Tokens
RangeWeek, month, or quarter
LegendClick a provider to hide it from the chart
ChartDaily bars; click a day to pin its numbers

Below the chart, a stat strip for the selected range:

StatMeaning
Processed tokensEverything the models read and wrote
Cached inputCache reads, and their share of all input-side tokens
Uncached inputTokens billed at full input rates
OutputGenerated tokens
Cache savingsDollars prompt caching saved, and that saving as a multiple of what the range cost

That last one is usually the surprise. On a heavy agent workload, cache savings routinely run several times the actual bill.

Then two tables side by side:

  • By model — cost, share, and tokens per model, so you can see what an expensive default is really costing you.
  • By workspace — cost per project directory, so you can tell which repository is eating the budget.

About the money#

Costs are estimates at published pay-as-you-go list rates, never read from a bill. The rate table is versioned in the app with a visible freshness stamp and models each provider's long-context tiers — where a request that crosses a context threshold bills the whole request at elevated rates, not just the overflow.

If you are on a subscription, treat the dollar figures as "what this would have cost on the API" — which is exactly the number you want when deciding whether a plan is worth it.

Speed#

The corpus is skewed hard toward old, enormous logs: the last week is a fraction of a gigabyte while the full quarter can be tens of gigabytes. So scans deepen in stages — 7 days, then 30, then 90 — publishing after each, and stop at the range you are actually looking at. Usable numbers land in about a second; widening the range is what asks for the deeper read.

Scanning runs on a dedicated background queue, so the panel never blocks the app, and previous results stay on screen while a rescan runs.

Scope#

The Usage panel covers this Mac. Agents running on remote hosts or cloud VMs write their logs on those machines and aren't included yet.