AI agents

What your coding agents cost, why that never joins your billable hours, and how it reaches a project and a task.

Commits stop being proportional to effort once an agent is involved. A session that costs eleven dollars can produce one commit, and an afternoon of your attention can produce none.

Clocktopus records what your agents cost alongside the hours you work, so the cost of a piece of work is human time × rate plus agent spend.

Agent time is never added to your hours

One person steering three agents for an hour is one human hour and three agent hours. Adding them gives four, which describes nothing. Agent runtime therefore never touches a timesheet total, and no screen in Clocktopus will combine them.

Money does combine. Once your hours are priced at your cost rate, that figure and agent spend are both dollars, and the sum is the true cost of delivery.

What gets recorded

Your agent reports its own usage over OpenTelemetry, and a pair of session hooks report which repository it was working in. Two channels, joined on the agent's session id.

Recorded Where it comes from
Token usage and cost in USD The agent's own telemetry
Active time — time spent working, not time idle The agent's own telemetry
Model, and whether the run was headless The agent's own telemetry
Every git remote, the branch and working directory Session hooks; telemetry carries no paths at all
The commits a session produced Sent by the session hook from your local git reflog

What is never collected

No prompts, no responses, no transcripts, no code. The receiver does not parse the signal those would travel in, and only an explicit list of fields — model, query source, timings, counts — is ever stored. Your agent's transcript file stays on your machine and is never uploaded.

Which agents are supported

Four, wired up by clocktopus agent setup. They look alike and are not: what each one can tell you depends on what its telemetry carries.

Agent -a id Reports Configured in
Claude Code claude Tokens and real dollars settings.json
Codex CLI codex Tokens only — no cost config.toml + hooks.json
OpenCode opencode Tokens, via a plugin a generated plugin file
Cursor cursor Sessions and time — no cost ~/.cursor/hooks.json and mcp.json

Only Claude Code reports money. It exports OpenTelemetry metrics natively and gives real dollars, so its spend is measured rather than estimated. Codex exports logs carrying token counts and no price, and a session with no price shows as cost unknown, never as $0.00 — which is why the report's Agents facet is shared by runtime rather than by spend.

Cursor reports no cost. Cursor exports usage only from its own servers, to a team admin, never from your machine. So Clocktopus records each Cursor session from its hooks: when it started and ended, the repository and branch, the commits it made and the task it worked on. Its runtime is the session duration Cursor reports when the session ends, which can include time the agent sat waiting for you, so it reads higher than another agent's active time. It records no tokens and no spend. Your own hours are tracked as usual, and a Cursor session that commits in a project's repository clocks you in like any other.

Grok is on the way. Other agents can already reach the receiver through the OpenTelemetry hooks bridge, but that path is built from the bridge's documented span vocabulary rather than a captured session, so they are labelled generically until one has been recorded end to end.

Two agent-specific things worth knowing:

Codex needs a trust prompt. Codex refuses to run a hooks.json it has not been shown, and the prompt is part of its own interface — there is no way to approve it from the CLI. Until you do, telemetry arrives and repository context never does, which looks exactly like a broken install. clocktopus agent setup and agent doctor both tell you when this is outstanding.

OpenCode has no session-end event. The plugin maps session.idle to session end, and that fires every time the agent stops and waits for you, so a five-turn conversation reports five of them. Commits are still declared correctly; you may just see more sessions than conversations.

Setting it up

One command, from a checkout of the repository you work in:

clocktopus agent setup

It mints an ingest token for this machine, configures every agent it finds installed, installs the session hooks, and checks the receiver accepts the token before saying it worked. Pass -a claude (or codex, opencode, cursor) to do one at a time.

Restart your agent afterwards. Both the exporter and the hooks read their configuration once, at startup. A session that is already open picks up none of it — this is the most common reason a correct setup appears to do nothing. On Codex, approve the hooks trust prompt as well.

The CLI reference covers status, doctor and disable.

How spend reaches a project and a task

The working directory gives a git remote, and the remote is matched against the repositories attached to your projects. A session works on a task when its branch names the key, when one of its commits carries it, or when the session tied itself to the task through the MCP server (link_session, which the agent skills call when it picks a task up).

Outcome What it means
Attributed Exactly one project owns the repository
Unattributed No single project owns the repository, so the session has none. Recorded anyway — spend nobody can account for is worth seeing
Ambiguous Several projects claim the same repository, so nothing is guessed. A wrong guess bills the wrong client — these land in Unattributed as well
No task The project is known, but nothing ties the session to a task. Not the same thing as Unattributed

Unattributed is a bucket, not a cause. A session lands there whenever its repository does not resolve to exactly one project you can write to — because nobody attached it, because several projects claim it, because the remote is neither GitHub nor Bitbucket, or because the agent ran outside a git checkout altogether. The spend is still recorded and still counted; it just sits in the report's "Unattributed agent work" row instead of against a client.

The fix is always a repository-to-project mapping, never anything on the machine the agent ran on. Run clocktopus agent doctor inside the checkout and it names which of the four applies, then attach the repository under Projects → your project → Repositories — or, if more than one claims it, detach all but one.

Agents can start your day

A commit arriving on a day with no clock-in already opens one. An agent session you were sitting at is at least as good evidence that you were working — a commit can be pushed by CI, an interactive terminal means a person was there — so it does the same, at the time the session started.

It only happens when the session was attended (never a headless or CI run), ran in a repository attached to a project, and actually produced something — commits, or more than trivial spend. Opening a terminal, asking one question and going to breakfast does not start your day, and neither does an agent in your dotfiles or a scratch clone.

The signal is written as automated and shows as such on your timeline, and becomes a manual one the moment you edit it. A wrong one is a row you drag, not a number you have to hunt down.

Agent sessions also rescue entries that would otherwise price at zero. When a commit lands with nothing earlier to measure from, Clocktopus records it flagged and at 0h — the start of the work is unknown. An agent already running supplies that missing starting point.

Reading the report

Reports → Summary → AI agents groups spend by project, with tasks underneath, over whatever range and filters you have selected.

Column What it tells you
Per human hour Agent dollars carried by each hour you worked. The only figure that means the same thing across projects of different sizes, and so the one that moves a pricing decision
Agent runtime How long agents were actually working, not how long a terminal sat open. Two agents steered through one hour is two agent hours, so this can exceed the length of your day
Unattributed Spend against no project at all. Usually a repository not attached to one yet
unsteered Agent spend with no human hours beside it. A finding, not a blank
Sessions / Commits How many times an agent ran, and how much of it reached your repository. Sessions with no commits are the ones worth asking about
Agent edits Lines the agent reported editing, including work it never committed. Only some tools report this at all, and the column is absent where none did

Above the figures, two facets sit side by side: Agents and Models. Each row is a checkbox, a share bar and one line of figures. Agents are shared by runtime — runtime rather than spend, because tools that report no dollars would otherwise read as 0% of work they actually did. Models are shared by spend, because a model is a fact about a cost event, not a session, so dollars are the one axis every model row honestly has. Tick any of them to narrow the report; the selection travels in the URL, so a narrowed view can be shared.

The two columns cross-filter. Tick Claude Code and the models re-count to Claude Code's; tick a model and the agents re-count to the ones that ran it. Each column always lists every value of its own, so a tick can be undone from where it was made, and a ticked value the other column has emptied stays listed, greyed.

Human hours never narrow with either. A time entry carries no agent, so the hours shown against a filtered task are the task's whole human time, not one agent's share of it. That makes per human hour read as "what this agent cost per hour of human work on the tasks it touched".

A model filter narrows in two steps, and the cost card's caption says so: the sessions kept are the ones that ran the model at all, so runtime and edits are those sessions'; the dollars and tokens within them are the model's own. A session that ran one model for the work and another for housekeeping cannot have its runtime divided between them, and the report does not pretend otherwise. A row reading not reported is a tool that sent dollars without naming the model, and cannot be ticked.

Under the ledger, agent spend per day draws what each day cost and the running total across the period, under the figures it is the shape of. It follows every filter the report has, both facets included, so a spike can be traced to the tool or the model that caused it. The running total ends on the spend figure above it.

The dashboard carries the two headline figures without a trip to the reports: agent spend for the selected range, and spend per human hour, on their own rail under the hours. They sit below the hours rather than among them because the two are different currencies and must never be added. A range where every session reported activity but no dollars reads unpriced, not $0.00.

For the shape of a period rather than its totals, the dashboard's Daily Time Tracking chart draws agent runtime as a second line beside your tracked hours. The lines are never stacked: where runtime rises above your hours, agents ran in parallel, or ran on a day you logged nothing at all. Spend per day is deliberately not there: it lives on this report, where it can be narrowed to one agent.

Agent edits are volume, not a score

Lines are shown beside spend so a decision to cut cost cannot quietly halve what gets built. There is deliberately no dollars-per-line and no lines-per-hour: both read as productivity measures, and lines are the easiest number in software to inflate on purpose.

They also sit apart from a pull request's own diff, which the task ledger shows in its own column. Agent edits count everything the agent touched, committed or not; the diff is what actually merged. Only Claude Code reports line counts today, so the column is absent where nothing reported any rather than showing a zero that would claim the agents wrote nothing.

Per-task figures are an apportionment

A session's cost, runtime and edits are split across the tasks it worked on, on one share, and every view of a task's cost uses the same share:

  • A session tied to tasks splits by time. Each cost event goes to the task the session was last tied to before it, so a session that moves from one task to the next pays for each while it works on it.
  • Any other session splits evenly across the tasks its branch and commits name.

The telemetry knows what each request cost and when, not which task it was for. Treat per-task figures as a fair share, not a measurement — project totals stay measured, only the breakdown underneath them is shared out.

Nothing showing up?

Run the doctor. It checks every link in the chain and names the one that is broken, rather than telling you that something is:

clocktopus agent doctor

The usual causes, in order: the agent was not restarted after setup; on Codex, the hooks trust prompt was never approved; the repository is not attached to a project, so spend is landing in the unattributed row; or the reporting period does not cover when the sessions actually ran.

Start measuring what your team ships

Output, cost and what your agents burn. Read from the commits, pull requests and agent runs you already have.

Start free

Free for single developers.