How it works

Track AI coding agent costs from local logs.

Passcard helps teams and freelancers track coding agent costs by person, project and client. A desktop app collects usage locally and checks budgets before supported actions; the web dashboard brings it together across devices.

From installation to a project cost overview

  1. Download an available Passcard desktop build, then pair it with your workspace in the browser. Each device receives its own revocable token and is associated with a workspace member.
  2. The desktop app discovers supported log folders, including additional profiles. You can review, add or disable folders in Settings. It reads existing logs and collects new usage as those logs change.
  3. Map repositories to projects in the dashboard. Repository remotes connect usage from different clones and devices; projects can be grouped by client. Team workspaces can also compare usage by person and team.
  4. To enable budget enforcement, install Passcard hooks for each supported agent from the desktop app. Reading usage logs alone does not install the circuit breaker.

Follow the Claude Code and Codex setup guidesAvailable in English

Which coding agents does Passcard support?

Passcard has local collectors and hook integrations for eight agents. The information available in each agent's logs determines how complete and timely its usage can be.

Supported coding agents and how their usage is measured
AgentMeasurement and limitations
Claude CodeReads logged token usage, deduplicates repeated message snapshots, and accounts for cache reads and writes.
Codex CLIReads per-turn token usage from session logs and separates cached input from other input tokens.
CursorEstimates tokens from transcript length. These transcripts do not provide token counts, model names or turn timestamps, so usage is marked as estimated.
Gemini CLIReads session token counts, separates cached input, and includes thinking tokens in output usage.
Grok CLIReads completed-turn usage from session logs and separates usage by model.
Copilot CLIReads token totals when a CLI session shuts down. Ongoing sessions and sessions without a clean shutdown can have no reported token usage.
OpenCodeReads token usage from the local SQLite database or the older session storage format.
piReads token usage from local session logs, including cache reads and writes.

Support refers to these local agent products and their compatible log formats. It does not cover every editor extension, hosted agent or provider account activity.

Are these costs the same as my provider bill?

Passcard calculates cost by multiplying token usage by published model API prices for input, output and caching. This gives work across people and projects a common basis for comparison. Your provider bill can differ because of subscriptions, included usage, negotiated rates, credits or billing rules.

The server checks public pricing feeds hourly. Known prices change when at least two feeds agree, and a new price applies to usage after its effective date. Historical usage keeps the rate that applied at the time. When a model price is missing, Passcard uses a model-family fallback where available and records that choice. Session details identify these cases. A fallback calculation can be corrected when an exact price becomes available.

Cursor token counts are inferred from transcript length. Missing counters or unresolved prices can leave some usage out of the total; session details show the available information.

Reproduce a cost calculation step by stepAvailable in English

How does the circuit breaker enforce a budget?

Budgets can apply to a workspace, team, person or project, with daily, weekly, monthly or total limits. Choose a warning threshold and a warning or blocking action. Shared budgets and company circuit-breaker controls are included in Team and Business.

Installed hooks ask the running Passcard desktop app for a decision before supported agent actions. The app combines the latest server cost snapshot with recorded local usage that the server has not yet acknowledged. When a blocking budget is exhausted, it returns the agent's supported blocking response.

What happens offline?

Cached budgets and local usage can continue to drive checks without a network connection. Other devices' new usage and changed budgets are only known after synchronization. When no budget snapshot is available, the running app follows the workspace's fail-open or fail-closed setting.

Can spending exceed the limit?

Yes. Enforcement uses usage already recorded in logs, so running requests, delayed logs and simultaneous devices can exceed a threshold before a later action is blocked. An expired daily, weekly or monthly snapshot does not block a new period. Passcard does not place a hard spending cap on a provider account.

The desktop app must be running and hooks must be installed and supported by the agent. If the local hook cannot reach the desktop app, it allows the agent to continue, including when the workspace is configured to fail closed for unavailable budget data.

What data leaves the machine?

The desktop collector sends normalized usage and operational metadata. It does not send prompt text, tool argument payloads, file contents, absolute file paths or environment variable values.

  • Usage: agent and model names, token counts, timestamps, session identifiers and whether usage is estimated.
  • Session context: repository and branch names, session timing, turn counts, tool names and counts, relative paths of touched files, and agent versions where available.
  • Device information: the device name, operating system, app version and connection status used to manage paired machines.

Repository names, branch names and relative filenames can contain confidential information. Consider these metadata fields when deciding whether Passcard fits your workspace's data requirements. Device tokens can be revoked from the dashboard.

Optional Linear and GitHub Ticket Beta

Ticket attribution starts disabled and requires an administrator to enable it. Once connected, it uses Git evidence and selected Linear issue and GitHub pull request metadata to attribute usage to tickets. Disabling the Beta stops new provider processing and ticket enforcement; existing attribution history remains.