Agent work log
FreeWhat 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.
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 numbersThe 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.
| Tool | What it shows | Per task |
|---|---|---|
| ccusage | Tokens and cost per day, week, month and session. | No |
| /usage in Claude Code | Usage and cost of your current session. | No |
| Agent work log | Time, 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
Run node --version in a terminal. It must show 20.10 or later.
Run the command above. Add --since 7d to look at the last seven days, or --since all for everything on this computer.
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.
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
| Option | What it does |
|---|---|
| --since | Start of the period: today, yesterday, 7d, a date or all. |
| --agent | Read only one agent's sessions. |
| --keys | Which task id prefixes to look for, for example BUG,FEAT. |
| --git | Also read your git log, as a last way to find a task id. |
| --json | Print the report as JSON for other tools. |
| --push | Send time and a comment per task to BugBoard. It needs an API token and asks first. |