인셔셔RSS 관심 있는 블로그, 뉴스, 기술 정보를 효율적으로 추적하고 읽으세요
원문 읽기 InertiaRSS에서 열기

추천 피드

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
月光博客
月光博客
爱范儿
爱范儿
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
腾讯CDC
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
U
Unit 42
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
L
LangChain Blog

Show HN

GitHub - astefanutti/shaderbang: Shebang for Shaders Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code.
coral-ai/claude-code-token-xray at main · Coral-Bricks-AI...
Hiteshjain11 · 2026-05-28 · via Show HN

Stars License: Apache 2.0 Python

Reverse-engineer a month of your own local Claude Code logs (~/.claude/projects/*/*.jsonl) into where the tokens, time, and cost actually go — and run it on yours. Reads only local logs; nothing is sent anywhere.

Token consumption per task, before vs. after the Opus 4.7 upgrade — ~4× on the same work

What it found (one month of my own logs — 181 sessions, 25,564 model calls):

  • You don't pay to generate, you pay to re-read. ~29M unique tokens → 4.35B billed (~150×), because every turn re-sends the whole ~173K-token context.
  • The bill is 84% input / 16% output — and re-reading the same context is 64% of it.
  • The biggest line is the one you never see: hidden reasoning is 84% of output and ~60% of everything re-read.
  • ~$3,371 for the month at Opus 4.7 list rates. Caching already serves 98% of input — and re-reading is still 64% of the bill.

Full write-up (all the tables, the why, the main-thread-vs-subagent split) → coralbricks.ai/blog/claude-code-token-xray

Quickstart

pip install -r requirements.txt   # just tiktoken
python3 token_time_breakdown.py
python3 cost.py
python3 main_vs_sidecar.py
python3 reread_breakdown.py

tiktoken is OpenAI's tokenizer, not Claude's, so token proportions are reliable to ~±15%, not Claude-exact. The billed-token counts in cost.py come straight from the API usage blocks and are exact.

What a month cost

From cost.py on my logs, priced at Opus 4.7 list rates:

Line item Cost Share
Input — re-reading context (cache reads) $2,176 64%
Input — cache writes $682 20%
Input — fresh (uncached) $2 0%
Output — reasoning $429 13%
Output — tool calls + summaries $82 2%
Total $3,371 100%

Caching is the only thing keeping it sane — without it the same work lists at ~$22,630 (~7×). Your numbers will differ; that's the point. Run it on yours.

Scripts

  • token_time_breakdown.py — the headline table: tokens (marked input/output) and wall-clock time per activity (reasoning, running commands, writing tool calls, subagents, summaries, reading/searching, editing) plus the passive-context rows (system prompt + tools, attachments, the typed prompt, injected reminders). One pass, so tokens and time stay consistent. Reasoning isn't stored in plaintext (only an encrypted signature), so it's recovered by subtraction: output − tool_calls − summaries. Time is reconstructed from event timestamps.
  • cost.py — billed token totals (cache reads / cache writes by TTL / fresh input / output) priced at Opus 4.7 list rates, plus the no-caching counterfactual.
  • main_vs_sidecar.py — splits the human-driven main thread from spawned subagents (logged under nested */subagents/*.jsonl); reports billed tokens, per-model mix, cache-hit rate, turns per agent (per session for the main thread, per subagent for the sidecar), and cost for each, plus the combined total.
  • reread_breakdown.py — per-activity cumulative input: replays each session's context growth to show what each kind of context costs once it's re-read every turn. Reports unique vs re-read tokens per activity (reasoning is the biggest re-read line). The replay is scaled to the measured billed input (exact); the per-activity split is a model.

Caveats

  • One person's month on one machine — directional, not a benchmark. Claude Code is dynamic, so your split will differ. That's the point: run it on yours.
  • A generation-time gap also includes the model reading its context before it writes; Bash time is real execution (commands auto-approved), but code run in the background or a separate terminal isn't counted.
  • The system-prompt row is estimated from each session's first cache write.

Found this useful?

If this helped you see where your Claude Code tokens, time, and cost actually go, please ⭐ the repo — it helps others find it. Curious what your re-read share comes out to.

License

Apache 2.0 — see the repository LICENSE.