I wanted a Wrapped for my year with coding agents: how many prompts, which hours, which models. Claude Code and Codex already log everything on your machine, so I built one that reads those logs. Counting turned out to be the hard part. Here is what's in the logs and what tripped me up.
Where the logs live
Claude Code writes one JSONL file per session in ~/.claude/projects/<folder>/<session>.jsonl, with subagent transcripts in a folder beside it. It also keeps ~/.claude/history.jsonl: every prompt you typed in the CLI, kept indefinitely.
Codex writes one "rollout" per session in ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl, and compresses old ones in place to .jsonl.zst. Nothing is deleted.
Node 22.15 can read all of it with no dependencies: readline for JSONL, and zlib now decompresses zstd.
Claude Code deletes your transcripts after 30 days
The setting is cleanupPeriodDays, and the default is 30. Most people can only see their last month in detail. history.jsonl survives, so prompt counts reach further back, but models, tokens and tool calls don't.
So the cards say where the counting starts ("Counted from Apr 7") instead of passing off a month as a year. A keep-logs command raises the setting after showing the change and asking first.
A user message is usually not a person
In Claude Code's logs, the user role holds far more than what you typed:
- tool results, which come back as user messages
- injected context, such as task notifications and slash-command output
- messages flagged
isMeta, and compaction summaries - a parent agent's instructions to a subagent (
isSidechain) - the
[Request interrupted by user]marker left when you press Esc
I missed the last one at first. It was 5% of my "prompts". Meanwhile, a prompt you type while Claude is busy isn't a user message at all: it's stored as a queued_command attachment.
One response, many lines
Claude Code writes a single model response across several lines as it streams, each with the same message id. Count lines and you overcount replies several times over; dedupe by id and keep the last line's token usage.
Codex logs running token totals, and sometimes writes the same total twice. Each reply's tokens are the difference from the previous total, skipping repeats.
These rules are adapted from codeburn (MIT), which had already mapped most of the quirks.
Private by construction
The logs are full of private things: prompts, file paths, project names, commands. The stats keep only what a share card needs:
- files become languages (
login.tsxcounts as TypeScript) - commands become program names (
FOO=1 npm test && git pushcounts npm and git) - project names and your first prompt stay on the page on your own machine, and saved cards leave them out
Nothing is uploaded. The page's only request is GitHub's public download count.
Cards as functions of time
The story is one HTML file. Each card is a function, draw(ctx, data, seconds), on a 1080×1920 canvas, so every animation is just arithmetic on seconds. Saving a card draws the frame at 10 seconds, which is also what reduced motion shows. Some cards take input: you scroll your top commands, swipe through models, tear off a ticket, open a pack.
My year: 5,528 prompts with a median of 9 words, and my agents ran grep 18,622 times. More than git.
Others who dug into these logs
- How to read Claude Code's session logs (and the 4 traps that inflate your token count)
- I parsed 76,801 lines of my own Claude Code history. Three things nearly broke my parser.
- Replaying 147 Claude Code & Codex Sessions to Tune autoCompactWindow (and Catching a 3x Token Overcount)
Try it, or help
npx -y https://github.com/mohamedaminehamdi/agents-wrapped/releases/latest/download/agents-wrapped.tgz See the demo first: https://mohamedaminehamdi.github.io/agents-wrapped/
It reads Claude Code and Codex so far. Cursor, Copilot, Gemini CLI, Aider, Cline, opencode and Continue are open issues, each with notes on where the tool keeps its logs, and there are new cards and accessibility work too. The pinned "Start here" issue sorts them.
mohamedaminehamdi / agents-wrapped
Your year with AI coding agents as a story of shareable cards. Reads the logs Claude Code and Codex already keep on your machine. Nothing leaves your laptop.
agents-wrapped
Your year with AI coding agents, as a story you can share.
Paste this into Claude Code or a terminal:
npx -y https://github.com/mohamedaminehamdi/agents-wrapped/releases/latest/download/agents-wrapped.tgz Or see it first: mohamedaminehamdi.github.io/agents-wrapped
It reads the logs your agents already keep on your machine, opens a story of cards in your browser, and lets you save any card as an image. Nothing is uploaded. Needs Node 22.15 or newer.
In Claude Code, you can install it as a skill instead:
/plugin install agents-wrapped --marketplace mohamedaminehamdi/agents-wrapped Then ask Claude for your Agents Wrapped, or type /agents-wrapped:wrapped.
What it reads
| Tool | Where | How far back |
|---|---|---|
| Claude Code | ~/.claude/projects, ~/.claude/history.jsonl | Full detail for the last 30 days (Claude Code deletes older transcripts by default). Prompts typed in the CLI go back further. |
| Codex | ~/.codex/sessions, ~/.codex/archived_sessions | Everything; old logs are compressed, not deleted. |
Coming next, and open for contributors: Cursor, GitHub Copilot, Gemini CLI…
This article was written with the help of AI.
