WHAT IT IS
A local dashboard for what Claude Code sessions cost.
Claude Code writes its session transcripts to ~/.claude/projects, and AgentWrangler reads them to show where the tokens went. It runs as a daemon, a background process, that listens only on 127.0.0.1, the address that reaches nothing but your own machine, and you open the dashboard in a browser. It flags costly patterns, suggests a change for each one, and then watches the following 14 days to see whether the change helped, saying "Effect not measured" when the data can't support a call. It installs with npx agentwrangler and the code is Apache-2.0.

WHAT CHANGED
The public repo became an export, not the history.
The build ran on a private local repo, which also holds the plans, handoffs, research and export tooling. The public repo started on Aug 20 as a placeholder with a planning README, and at launch on Sept 4 it was replaced with a fresh tree built from a manifest, a file of rules that lists what may ship. Every update since has arrived as an export pull request, so the history on GitHub is a small fraction of the real one. The working rule that follows is that a fix lands in the private repo first and is then exported, since a fix made only on the public side is overwritten by the next export. Nothing automated blocks a public-side fix. The rule lives in the publishing instructions, and the export script has a check mode that reports when the two trees have drifted apart.
CONTROL
An export that fails a scan is never pushed.
The export script runs three scans on the tree it builds. An anonymization grep and a raw-content scan, which looks for transcript text, stop the run on any hit. The third is trufflehog, an open-source secrets scanner, and it fails closed: the script refuses to push when trufflehog isn't installed, and it refuses to push when the option that skips the scan is set. An export that passes goes up as a branch with a pull request against the public repo. The content scan is pattern matching, and the design record describes it as a tripwire and says plainly that it doesn't prove nothing slipped through.
LESSONS
Two patterns from this build.
- Put a privacy rule at the point where a mistake can't be undone. The first design stored only counts, which kept blocking useful recommendations because the detail they needed was in the transcripts and had been thrown away. Session content in a local database sits on the same machine as the transcripts it came from and can be deleted, while content that leaks into a commit or a public export can't be taken back. So in September the rule against raw session content moved from the database to the publish boundary, where a scan before each commit, a check in CI (the automated test run) and the export scan enforce it.
- Label modeled numbers as modeled. The dollar figures are what the tokens would cost at list price, which is a different number from a subscription bill, and a modeled saving is a different number again from one that was achieved. The README states all three distinctions.
PROJECT DESIGN
How it works.
How data moves
Key modules
Daemon
Boots, migrates, scans, and serves HTTP on 127.0.0.1 only, one daemon per database. Heavy work (history, recommendations, diagnostics, scanning, WAL checkpoints) runs in background workers, and pages read prepared snapshots instead of waiting on them.
Ingest
A transcript parser reads Claude Code's JSONL session files from ~/.claude/projects; a secrets filter redacts likely secrets before anything is stored.
Store
SQLite via better-sqlite3. Migrations take a VACUUM INTO backup first (skipped above 512 MB), and a database written by a newer version is refused rather than downgraded.
Detectors → recommendations → effects
Detectors find costly patterns and model their list-price cost; recommendations turn a finding into a change; effects observe the following 14 days and report the result or that it couldn't be measured.
Rate my setup
A setup grade plus an optional "Judge me" review that runs the user's own claude CLI with no tools, no MCP servers, and no saved session.
Guardrail hooks
Optional Claude Code hooks for context budget, loop detection, limit burn, a dangerous-command denylist, and a pre-compaction checkpoint, installed only on explicit request.
SECURITY & OPERATIONS
Security and operations.
- Loopback only: the daemon binds 127.0.0.1, with no telemetry, no hosted backend, and no account.
- Cross-origin writes are refused. A CSRF check reads Sec-Fetch-Site and, when that header is absent, requires any Origin header to exactly match 127.0.0.1, localhost, or [::1]; a null or foreign Origin gets a 403. A request that carries neither header passes that check, and write requests separately need a per-run token.
- Credentials aren't passed down. ANTHROPIC_API_KEY is stripped from the environment of any claude process AgentWrangler starts, and usage limits are read by running the user's own claude -p /usage, so the tool never handles the Claude login token. That was a redesign from the first release's approach.
- One-click apply is off: the route returns 403 APPLY_DISABLED, and the guardrail hooks no longer skip Claude Code's permission prompt. The alternatives are copying the prompt or an opt-in Open in Claude Code action that is off by default.
- The privacy doc says what's stored, honestly: aggregates and structural data plus secrets-filtered command text and bounded error excerpts. The filter is described as best-effort pattern matching, not a guarantee. Every network path is listed there too: the usage check runs the user's own claude CLI and can be switched off, and GitHub sync, calibration, and Judge me each need the user's own token, key, or click.
BUILDER NOTES
Builder notes.
- The commit count and the public history disagree on purpose. The 3,686 commits live on the private repo, many from agent-driven worktree branches (2,065 are on the first-parent merge line); GitHub only shows the export PRs.
- The release gate holds the daemon's event-loop p99 at or under 50 ms and checks each of 67 budgeted API routes against its p95 latency budget, 250 ms for most routes, per the changelog.
- Detectors ship with the changelog's claim that each is tested with a must-fire and a near-miss fixture: one input that should trigger it and one that almost should, so a detector proves it knows the difference.
WRITING
Field notes from this work.
Full build narrative
A local observability dashboard for Claude Code token spend. A Node daemon bound to 127.0.0.1 reads Claude Code's JSONL transcripts, runs a best-effort secrets filter, and stores the result in SQLite under ~/.agentwrangler. Detectors flag costly patterns, recommendations suggest a change, and an effects view watches a 14-day window to see whether the change helped, saying "Effect not measured" when it can't tell. Optional guardrail hooks install into Claude Code on request. Install with npx agentwrangler and open the dashboard on localhost; the code is Apache-2.0 on GitHub. Built offline: 3,686 commits across 57 active days on a private repo, roughly 135k lines of TypeScript, and 600+ test files by static count. The public GitHub repo is a curated export of that work, so its history is much shorter.
Built offline on a private local repo, then published by export. The stack call is written down: ADR-100 weighed a lightweight desktop shell (Tauri preferred) and chose a TypeScript/Node 22 daemon with better-sqlite3 and a browser UI on localhost instead. The public repo is generated from the private one by an export script that reads an INCLUDE/EXCLUDE/OVERLAY manifest (most-specific rule wins), substitutes a public README and CLAUDE.md, gates the tree, pushes an export branch, and opens a PR against public main. The sync point is derived from tree content rather than a stored commit hash, and a fix made only on the public side is reverted by the next export, so private main stays the one source of truth.