Experimental local-first CLI that turns Claude Code session logs into a work journal. Claude Code only; outcomes are log-reported, costs are list-price estimates.
Local-first CLI that turns AI coding-agent session logs (Claude Code JSONL transcripts today) into a durable work journal: task, actions, files touched, token usage, and an honest outcome per session.
npm install -g github:hchc00787/coding-agent-journal
agent-journal --input ~/.claude/projects --out ./agent-journal-out
Then open agent-journal-out/journal.html or read journal.md. Everything stays on your machine: no upload, no commit, no network.

## 2026-11-01 - ~$0.18 list-price est.
### demo-shop · claude-sonnet-4-5 · ~$0.18 (list-price est.)
- Task: Fix the refund flow so it charges the upgraded price [REDACTED] and update tests in <project>/src/billing.test.js
- Tokens: in 25000 / out 5300 / cache read 50000 / cache write 4000
- Files modified (Edit/Write): <project>/src/refund.js
- Outcome: log-reported pass - 41 passing (log-reported)
Aggregate numbers only (no session content), from running the CLI over 84 real Claude Code sessions (101 files, 23 dated days plus 2 undated sessions, public test data of daaain/claude-code-log, MIT, used locally and not redistributed):
| Sessions parsed / malformed lines | 84 / 0 |
| Models seen | Sonnet 4, Sonnet 4.5, Haiku 4.5, Opus 4, Opus 4.1, Opus 4.5, Opus 4.6, Opus 4.7 |
| Outcome: log-reported pass / failure / unknown | 4 / 6 / 74 |
| Known list-price estimate (sessions with a priced model) | about $39.5 |
Sessions shown as unknown cost | 7 (mixed models, 1h cache writes, or no usage data) |
Most sessions end as unknown on purpose: with no test-count or exit-code signal in the log, the tool does not guess. See "Principles" below.
pass only when the log itself recorded test output, and the report says it did not rerun anything.unknown rather than a made-up rate when the model or usage is unclear.Automated tests use bundled synthetic fixtures. The parser was also run over 84 real Claude Code sessions from real workspaces (public test data of daaain/claude-code-log, MIT, used locally and not redistributed): all parsed without errors, 0 malformed lines. Outcome detection and redaction are heuristic, cost figures are list-price estimates, not billed spend, and Codex and other agents are not supported. See CHANGELOG.md and CONTRIBUTING.md.
journal.md / journal.html into an output directory whose .gitignore excludes everything. No upload, no commit, no network.log-reported pass / log-reported failure - a signal (test counts or nonzero exit codes) appeared in tool-output text recorded in the log. That text is self-reported by whatever ran in the session; this tool did not rerun or verify it. A command exiting 0 is neutral: it is mentioned only as that fact and never makes a pass; a nonzero exit code counts as failure evidence.agent-claimed only - the last agent message explicitly states completion ("done", "fixed", "tests pass"...) with no corroborating signal. Questions and plans ("I'll look into it") do not count.unknown - no outcome signal. A command exiting 0 is reported only as that fact in the detail text; it never turns a session into a pass.modified (Edit/Write tool calls) or read (Read tool calls), separately. Markdown lists the paths; HTML shows only counts. Bash-driven changes are not detected. Test-pass text found inside a Read result or quoted source can look like a test run; outcome detection is heuristic..agent-journal-output). Any other non-empty directory is refused without changes, so it cannot touch another project's files or .gitignore. The output directory contains its own .gitignore with *.list-price est.; it is not billed spend (subscriptions, batch, long-context, fast mode, regional pricing and 1h cache writes are not modeled). Models missing from the table show unknown cost; there is no fallback rate. The tool does not read actual billed cost.--full-text embeds longer verbatim excerpts, prints a warning, and its output must be reviewed line by line before any sharing.The npm registry package is not published yet; install from this repository as shown in Quick start above.
From a source checkout:
node bin/agent-journal.js --input ~/.claude/projects --out ./agent-journal-out
node bin/agent-journal.js --input ~/.claude/projects --out ./agent-journal-out --full-text # longer excerpts; review before sharing
When installed globally, replace node bin/agent-journal.js with agent-journal.
Based on third-party documented formats, not an official schema:
Run npm test on Windows and report what breaks
https://github.com/hchc00787/coding-agent-journal/issues/6
Labels: help wanted, good first issue
Thanks for looking. This project is experimental and small, so keep changes small too.
Node 18+ with no dependencies. Run the tests with:
npm test
On Windows, the symlink regression tests need permission to create symlinks (for example Developer Mode or an elevated shell). Use an environment with symlink support when running the full suite.
test/fixtures/PROVENANCE.md. Never commit real session logs.Open an issue with the command you ran and a synthetic or redacted example of the log line that went wrong. Do not paste private logs.