Show HN: Lupen – an itemized, verified receipt for Claude Code and Codex spend Developer Raul Momo released Lupen, a macOS app that provides itemized, verified receipts for AI coding tool spend from Claude Code and Codex logs. The tool breaks down costs by turn, step, and sub-agent, recomputes them from raw tokens against public price tables, and flags any discrepancies without sending data over the network. Lupen recomputes your spend straight from the raw Claude Code and Codex logs — broken down by turn, step, and sub-agent, checked against the tokens, and never leaving your Mac. Install: brew install --cask momoraul/lupen/lupen — or grab the signed DMG . Requires macOS 26 Tahoe on Apple Silicon. Your AI coding spend says $50 today . Which provider was it? Which session? Which turn? Which sub-agent or tool loop? A daily total can't answer that, so Lupen breaks the number down and recomputes each cost from the raw tokens. Provider-scoped totals — $50 today · Claude Code · 12 sessions · 84 turns . Claude Code and Codex stay in separate modes instead of one mixed list. Cost per Turn, Step, SkillGroup, and SubAgent , where the data allows it. Recomputed, then diffed — each cost is recomputed from raw tokens and the public price table and compared to the reported total, so any difference is shown rather than assumed. Origin-tagged attachments — every file, image, and URL is labelled by where it entered the context. Sub-agent cost rolls up into the parent turn and stays attributable on its own. Provider mode — Choose Claude Code or Codex. Lupen shows only that provider's sessions, conversations, dropdown totals, reports, diagnostics, and verification results. Cost drift verification — Run the Verify Usage window to recompute every cost from raw tokens and the public price table, then diff it against the reported total; any difference is flagged. Claude Code is checked against its per-request totals; Codex gets an independent local verifier over rollout token count events. Search and resume — Full-text search finds a session by any prompt it contains across every turn , plus its project and slug. Reopen any result in Claude Code or Codex to pick up where you left off — Lupen runs claude --resume / codex resume in a new Terminal window, or copies the command for you. Turn boundaries that match Anthropic's API — Lupen uses stop reason to mark Turn boundaries instead of timestamps. Tool-use loops stay inside one Turn instead of fragmenting into a dozen rows. Codex rollout support — Lupen reads ~/.codex/sessions/YYYY/MM/DD/rollout- .jsonl , normalizes cached input, preserves reasoning tokens, handles cumulative token deltas, and watches new day folders live. Sub-agent cost rollup — When a Turn spawns sub-agents, their cost rolls up into the parent in the outline but stays separately attributable in the detail pane. The aggregate and the per-agent figures come from the same source, so they stay consistent. Origin-tagged attachment tracking — File paths, image bytes, and URLs are classified by where they entered the conversation inline prompt, tool input, tool output, reply, … so you can see what's filling the context window. 5-hour limit tracking — A Bayesian estimate of $ per 1 % of limit consumed across your last 7 days, surfaced in the menu-bar icon's ring tint yellow at 70 %, orange at 90 %, red at 100 % . Scriptable — The same app binary is a command line over the same local index: every report as a table, lupen CLI --json , or --csv , plus verify / budget exit-code gates for a CI step or commit hook. See Command line command-line . Zero network — Lupen only reads local Claude Code and Codex files on disk. No API keys, no telemetry, no cloud sync. brew install --cask momoraul/lupen/lupen …or grab the signed DMG from the latest release https://github.com/momoraul/Lupen/releases/latest . Both are notarized and keep themselves up to date via Sparkle. git clone https://github.com/momoraul/Lupen.git cd Lupen cp Config/Local.xcconfig.example Config/Local.xcconfig set DEVELOPMENT TEAM xcodebuild build -project Lupen.xcodeproj -scheme Lupen -destination 'platform=macOS' open ~/Library/Developer/Xcode/DerivedData/Lupen- /Build/Products/Debug/Lupen.app The app binary doubles as a lupen CLI — same local index the menu-bar app builds, every report scriptable and local: lupen skills --last 30d per-skill cost, $/run, top model lupen top --by sessions --limit 5 the costliest sessions lupen budget --over 20 --last 7d exit 4 if this week ran over $20 lupen verify exit 4 if any cost drifts from the recomputed truth lupen daily --json | jq any report as JSON / CSV The full command set, grouped: | Commands | | |---|---| Spend | summary default · daily / weekly / monthly | Breakdowns | skills · models · projects · top | Find & resume | search