Skip to content

Agent work log

Free

What each ticket cost in agent time and tokens. One command reads your Claude Code and Codex session files and adds them up per task, such as BUG-204.

Run it

One command, nothing to install. It needs Node 20.10 or later.

Run this in a terminal
npx -y https://bugboard.ai/cli/bugboard-cli.tgz worklog

npx downloads a small file from bugboard.ai and runs it. It reads your session files and prints a table. It needs no account and sends nothing.

What a report looks like

An example with made-up numbers

The tasks and numbers above are an example, not real data. Your own report shows your tasks.

How it differs from other tools

Tools such as ccusage and the /usage command in Claude Code already show what your agents spent. They group it by day, week, month or session. This one groups it by task.

ToolWhat it showsPer task
ccusageTokens and cost per day, week, month and session.No
/usage in Claude CodeUsage and cost of your current session.No
Agent work logTime, tokens and estimated cost per task id, such as BUG-204.Yes

The totals those tools give are still useful, and you can use both. Our report is only as good as the task ids it can find: a session with no id in its branch, commits or first prompt is listed as no task.

How to get your first report

Check Node

Run node --version in a terminal. It must show 20.10 or later.

Run the command

Run the command above. Add --since 7d to look at the last seven days, or --since all for everything on this computer.

Read the table

Each row is a task: its sessions, active time, tokens and estimated cost. Sessions with no task id are in a row called no task.

Optional: send it to BugBoard

Add --push to write a time entry and a comment on each task. Skip this step to keep everything on your computer.

What it reads

Only files that are already on your computer.

  • Claude Code sessions The session files Claude Code keeps in your home folder.
  • Codex sessions The session files Codex keeps in your home folder. This part is experimental and its cost is shown as unknown.
  • Task ids and git A task id such as BUG-204 in the branch name, a commit message or the first prompt tells which task a session was for. With the git option it also reads your local git log for that time.
  • Token counts How many tokens each session used, cached tokens included. The cost is worked out from the models' public API prices.

It stays on your computer

The report is printed on your screen. Nothing is sent anywhere unless you add the push option.

When you push, only time and a short comment per task are sent. Your conversations, prompts, files and logs are never sent. It asks before it sends, unless you tell it not to.

What is an estimate

The cost is an estimate: token counts times the public API price of each model. On a subscription it is what the work would cost on the API, not what you paid.

A model without a verified price is shown as unknown and left out of the cost, so an amount marked + is a minimum. Time is active time: gaps longer than five minutes do not count.

What --push sends

Push needs a BugBoard API token in the BUGBOARD_TOKEN environment variable. For each task it finds, it sends two things:

  • One time entry: the active minutes, dated to the start of the period.
  • One comment: the number of sessions, time, tokens and estimated cost.
  • It looks the task up by its id, for example BUG-204. A task your token cannot see is reported as not found.

Options

OptionWhat it does
--sinceStart of the period: today, yesterday, 7d, a date or all.
--agentRead only one agent's sessions.
--keysWhich task id prefixes to look for, for example BUG,FEAT.
--gitAlso read your git log, as a last way to find a task id.
--jsonPrint the report as JSON for other tools.
--pushSend time and a comment per task to BugBoard. It needs an API token and asks first.

Questions

From a task id such as BUG-204 in the branch name, in a commit message the agent wrote or in the first prompt. Sessions with no task id are listed as no task.