AI agent time tracking means recording each run an AI agent does for you, such as a Claude Code or Codex task, with the date, who started it, the client, what it delivered, how long it ran and what it cost. It is separate from tracking the hours people work. You can fill the log in by hand, pull the numbers from each agent’s usage command, or use a tool that logs runs for you.
Commands and figures below were checked against each vendor’s docs in November 2026.
The three methods at a glance
| Method | What it gives you | What it misses |
|---|---|---|
| A sheet you fill in | Full control of every field | Relies on you remembering; breaks once runs happen in parallel |
| The agent’s usage numbers (/usage, /status, ccusage) | Tokens, estimated cost, session duration and history | The client, the ticket and what the run delivered |
| A tool that logs runs | Runs filed on a client without retyping | Varies by tool; check what it sends to its servers |
What counts as an AI agent run
A run is one task you hand to an agent, from the moment it starts working to the moment it stops. You ask Claude Code to add a CSV export, it works for 38 minutes, it tells you the tests pass. That is one run.
Runs are a better unit than “hours of agent use” for two reasons. First, a client does not care that an agent was open all afternoon. They care that a refund flow now has tests. Second, one run usually maps to one ticket, so the entry can carry the ticket code and later match an invoice line.
Agents also behave differently from people. A person works one thing at a time. An agent can run while you sit in a meeting, and you can start two at once. The minutes of an agent run are real, but they are not minutes of your day. That matters further down.
What to record for each run
Ten fields cover almost every question a client or a teammate will ask later:
- Date.
- Agent, such as Claude Code or Codex.
- Who started it. A person is always responsible for a run, and you will want to know who.
- Client.
- Ticket or project code.
- Task, in the words you gave the agent.
- What it delivered, in one line.
- Time, from start to finish.
- Cost, or “included in plan” if you pay a flat price.
- Billable, yes or no.
Here is one filled-in entry, using a sample client:
| Field | Example |
|---|---|
| Date | November 18 |
| Agent | Claude Code |
| Started by | Sofia |
| Client | Northwind |
| Ticket | NW-142 |
| Task | Add a CSV export to the orders page |
| Delivered | Export button added, 6 tests written, all passing |
| Time | 38 minutes |
| Cost | Included in plan |
| Billable | Yes |
The delivered line is the one people skip, and it is the one that makes the entry useful. “Claude Code, 38 minutes” tells a client nothing. “Claude Code, 38 minutes, export button and 6 passing tests” tells them what they got.
For a sense of scale, Anthropic reports that across enterprise deployments the average cost of Claude Code is around $13 per developer per active day, with costs below $30 per active day for 90% of users (Anthropic, checked November 2026). Your numbers will differ with the model and the codebase, which is the reason to record your own instead of guessing.
Keep agent time out of a person’s hours
Do not add agent minutes to anyone’s timesheet. There are practical reasons.
If Sofia works on a client for four hours and starts a 40-minute agent run during that time, her day is still four hours. Adding the run makes it four hours forty. Her utilization looks higher than it was, and if you bill her hours to a client you now bill the same time twice.
People’s hours also feed things agents do not have: overtime, time off balances, approvals, pay. An agent has none of that. Mixing the two makes every one of those reports wrong in a way that is hard to spot later.
The third reason is the client conversation. A line such as “our team spent 31 hours, and our agents ran 12 tasks that took 6 hours” is easy to follow. A single number that blends them is not. How you then charge for the agent side is covered in how to bill clients for AI agent work.
So keep two ledgers that meet at the client: people’s hours on one side, agent runs on the other. Ruam works this way, and so can a spreadsheet with two tabs.
Three ways to track Claude Code and Codex time
By hand in a sheet
A spreadsheet with the ten columns above works for a freelancer running a few agent tasks a day. Fill in a row when the run ends, while you still remember what it delivered.
The cost is attention. You have to remember, and you have to find the duration and cost somewhere. If you forget for three days, the entries turn into guesses. This method breaks first when you start running agents in parallel or a teammate starts too.
From the agent’s own usage numbers
Each agent can tell you something about what it used, and you can copy those numbers into your sheet.
In Claude Code, running /usage shows the current session’s token usage in a Session block, with its total duration and an estimated cost computed from token counts at list price. Anthropic notes that the Session block is intended for API users. On Pro, Max and Ultra plans, usage is included in the subscription, so that dollar figure is not what you are billed. Subscribers see plan usage bars and a breakdown instead (Anthropic, checked November 2026). The totals reset when /clear starts a new session, so note them before you start the next task.
In a Codex CLI session, /status shows your remaining limits, and OpenAI points to a usage dashboard for current limits (OpenAI, checked November 2026). That tells you about your allowance, not about a single run, so you will still note the start and end times yourself.
In Antigravity CLI, /usage displays current model credit consumption and quota limits (Google, checked November 2026).
For history across many sessions, ccusage is an open source command line tool. Its GitHub page says it reads local usage data from coding agent CLIs, including Claude Code and Codex, and turns it into daily, weekly, monthly and session reports, with token counts, per-model breakdowns and costs in USD, and JSON output (ccusage on GitHub, checked November 2026). A session report is a good starting point for filling in the time and cost columns. To turn those token counts into a cost per client, paste them into the free AI agent cost calculator.

These numbers give you duration and tokens. They do not give you the client, the ticket, or what the run delivered. You still add those by hand, so the sheet gets easier to fill but stays manual.
With a tool that logs runs
The third option is software that records the work for you. Tools differ in what they record.
Some measure your own time while you work with the agent. WakaTime offers a Claude Code plugin with metrics per project, file and branch (WakaTime, checked November 2026), and Timing, a Mac app, records the time you spend working with Claude in the terminal and which project and file you focused on (Timing, checked November 2026). Those answer how long you spent working with the agent.
A client record needs a different answer: which runs happened, who started each one, which client it was for, what it delivered and what it cost. When you compare tools, ask whether it matches runs to clients without you typing, whether it keeps agent time out of people’s hours, whether it shows what each run delivered, and what it sends to its servers.
How Ruam tracks AI agent time
Ruam logs each agent run as its own record. Agent tracking is in Beta and open on every plan.
You connect each agent once. Claude Code, Codex, Antigravity CLI and Cursor are supported, and any other tool that supports MCP can log runs too. With Claude Code and Codex, a run opens by itself when you give the agent a task.
Each run then lands on a client. Ruam checks, in order, whether the agent named a client, whether a ticket code in the run matches your project keys, whether it remembers the repo, and whether you have only one client. The first time it sees a repo, it asks once which client the repo is for, and anything unresolved waits as “Needs a client” instead of landing in the wrong place.

The run shows what it delivered, who started it and how long it took. Cost appears when Ruam can work it out: runs on a flat plan such as Claude Max show as included once you tell Ruam which plan that agent runs on, and pay per use runs are priced from what the run used, at list prices. Runs carry a billable flag. Agent time never counts as anyone’s hours, and Ruam receives summaries only, never code, prompts or files.
One limit to know about: agent cost does not reach invoices, margins, budgets, reports or exports yet, so you copy the figures across when you bill. See what a run looks like for Claude Code, Codex or Antigravity CLI. If you use an assistant such as Claude or ChatGPT, you can also ask Ruam about your hours from your AI assistant.
Pick one client and one agent this week. Write down the next five runs with all ten fields, then look at the entries. If the sheet is already a chore, that is the moment to try a tool.


