AI agent cost tracking for Claude Code, Codex CLI and OpenCode, and more
What your agents cost, beside the hours you work
Commits stop being a measure of effort once an agent is writing them. Clocktopus now records what your coding agents cost alongside the hours you work, so the cost of a piece of work is your time at its rate plus the agents' 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, and adding them up describes nothing. Money is the figure that does combine.
- What's recorded: tokens, cost, active time, the model, and whether the run was headless, plus the repository, branch and working directory from the agent's session hooks.
- What's never collected: your code, your prompts, the agent's replies or your transcripts.
We wrote about why this matters in Half a billion tokens in three days. AI agents covers what is recorded and how to read it.
Claude Code, Codex CLI and OpenCode, in one command
clocktopus agent setup
finds each supported agent on your machine and configures what it finds: Claude Code, Codex CLI and OpenCode. Restart your agent afterwards, because each one reads its configuration once, at startup.
clocktopus agent statuslists each agent and whether it's reporting, including agents that are installed but not sending anything.clocktopus agent doctornames the first broken link: settings, hooks, the token, whether the repository is attached to a project.clocktopus agent disableremoves the configuration it wrote and leaves anything you added yourself. Add--revoketo revoke the machine's token too.- Codex asks once. It won't run hooks it hasn't been shown, so the next Codex session asks you to trust them. Answer Trust all and continue.
- OpenCode uses a plugin. Setup adds one file to OpenCode's plugin folder and leaves your
opencode.jsonalone. Removing the file uninstalls it.
The CLI guide has the details for each agent.
The AI agents report
Reports → Summary → AI agents groups agent spend by project, with tickets underneath, under the same filters as the other tabs.
- Per human hour is the figure that compares across projects of different sizes.
- Agent runtime is the time agents were actually working, not the time a terminal sat open. It can be longer than your day.
- Unattributed spend gets its own row rather than disappearing.
- Agents used shows each agent's share of runtime. Tick one or several to narrow the table.
- Token usage sits beside spend, per project and per ticket, with a breakdown by agent.
- Unknown cost never shows as $0.00. A session with no price says cost unknown.
- Per-ticket figures are an apportionment of each session across its commits, and the report says so.
The dashboard's daily chart draws agent runtime beside your tracked hours, never stacked on top of them.
Agents can start your day
An agent session you were at, in a repository attached to a project, now clocks you in when it produces something: commits, or more than trivial spend. Opening a terminal to ask one question doesn't start your day. A session left open on an earlier day is closed before the new day opens.
Failed webhook deliveries are shown, not lost
A push Clocktopus rejected used to vanish. Failures are now recorded and shown in the app: an alert on Settings → Git Webhook and on the activity page, a history of failures, and a mark in the sidebar. The two causes behind most "I pushed but nothing was tracked" cases are named: a commit address that isn't on your account, and a repository not attached to a project.
Fixes & improvements
- Webhooks sent as form-encoded or base64 payloads are accepted.
- Commits pushed before the day's clock-in no longer book 0h.
- Two agent sessions that ran for exactly the same length are counted as two.
- Editing a time entry refreshes the AI agents report.
- Archiving a project with agent spend against it is no longer blocked. The spend becomes unattributed.
- Commits made in OpenCode sessions reach their ticket, including in back-to-back sessions.
- An entry's duration is no longer cut short at the end of its work day, which wrote 0h for a commit made just before midnight.
- The Human hours tile shows a dash instead of going blank for a range with agent spend and no logged time.