<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: HackP0!nt</title>
    <description>The latest articles on DEV Community by HackP0!nt (@hackpoint).</description>
    <link>https://dev.to/hackpoint</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F901459%2F967f132a-31fe-48cb-9e3c-8025508ce1d6.png</url>
      <title>DEV Community: HackP0!nt</title>
      <link>https://dev.to/hackpoint</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hackpoint"/>
    <language>en</language>
    <item>
      <title>Claude Code re-reads whole files to use one function. I built Lumen to stop paying for it.</title>
      <dc:creator>HackP0!nt</dc:creator>
      <pubDate>Sun, 05 Jul 2026 09:16:24 +0000</pubDate>
      <link>https://dev.to/hackpoint/claude-code-re-reads-whole-files-to-use-one-function-i-built-lumen-to-stop-paying-for-it-5f5k</link>
      <guid>https://dev.to/hackpoint/claude-code-re-reads-whole-files-to-use-one-function-i-built-lumen-to-stop-paying-for-it-5f5k</guid>
      <description>&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Lumen shows what your Claude Code sessions actually cost — and cuts token spend on large-file reads by around 87%, measured to the token. macOS app + CLI, MIT, fully local.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here's a thing that quietly drains your Claude Code budget: the agent reads a 600-line file to use one function from it — and you pay input tokens for all 600 lines. Every time it re-reads.&lt;br&gt;
Multiply that across a real session and it's the single biggest token sink in agentic coding. But Claude Code doesn't show you any of it while you work — not how full your context is, not what the session costs, not where the tokens went.&lt;br&gt;
So I built Lumen. It shows you the whole picture, and it cuts the cost of those big reads.&lt;br&gt;
&lt;a href="https://github.com/HackPoint/lumen" rel="noopener noreferrer"&gt;https://github.com/HackPoint/lumen&lt;/a&gt; (MIT)&lt;/p&gt;

&lt;p&gt;What it does&lt;br&gt;
Two things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It shows you the truth. Lumen watches your Claude Code session files locally and surfaces what the tool hides:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Context fill — a live gauge, green → amber at 80% → red at 95%, so compaction never blindsides you mid-flow.&lt;br&gt;
Session cost — real dollars, split into input / output / cache read / cache write.&lt;br&gt;
Where the money goes — per-category breakdown, plus today / this week / all-time totals.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It actually saves tokens. When Claude tries to read a large file (≥ 300 lines), Lumen steps in before the read runs and gives Claude a smarter path:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;smart_read returns a map of the file — functions, classes, imports with line ranges — without the bodies. That's roughly 5–10% of the cost of reading the whole file.&lt;br&gt;
recall_file then pulls just the one function Claude actually needs (resolved via a real AST, not a regex).&lt;br&gt;
compress_logs collapses repeated lines and stack-trace noise in build/test output — deterministic, no information lost.&lt;/p&gt;

&lt;p&gt;Instead of walking through the whole building every time, Claude gets the floor plan first and then opens only the door it needs.&lt;br&gt;
So how much does it actually save?&lt;br&gt;
On intercepted reads, about 87% fewer tokens — measured on my machine, and it varies with your codebase. Bigger, more structured files save more.&lt;br&gt;
The important word is measured. Every intercepted read records the full-read cost vs. the actual cost, counted by the same kind of tokenizer Claude uses. No estimates, no extrapolation. The "saved" number starts small and grows honestly with every session.&lt;br&gt;
Fewer input tokens means two wins at once: a lower bill, and more room in your context window — which means fewer compactions and sharper answers late in a session.&lt;br&gt;
One honesty note I'm proud of&lt;br&gt;
Lumen also shows what Claude Code's built-in prompt cache saved you — but it keeps that in a separate row and never adds it to its own number. Plenty of tools would bundle the two into one big hero stat. I don't. Small and verified beats large and invented.&lt;br&gt;
GUI and CLI — same data, your choice&lt;/p&gt;

&lt;p&gt;Menu-bar app — lives in your macOS menu bar (not the Dock). The tray icon changes color with your context fill, so the warning sits in your peripheral vision. Left-click for a quick popover; right-click to open the full window with Context and Optimizer tabs.&lt;br&gt;
lumen CLI — the same live dashboard, rendered in your terminal. Reads from the same local database. If you live in the terminal, you never have to leave it.&lt;/p&gt;

&lt;p&gt;Both read from one local SQLite file. Which brings me to:&lt;br&gt;
Everything stays on your machine&lt;br&gt;
No account. No telemetry. No phone-home.&lt;br&gt;
The hooks are plain shell scripts. The intercept script reads no file contents and makes zero network calls. The meter counts tokens locally and writes one row to a local SQLite DB you can open, inspect, or delete yourself. That's it.&lt;br&gt;
Honest status (a "not yet" beats a fake guide)&lt;br&gt;
Right now Lumen runs on macOS (Apple Silicon). Windows, Linux, and Intel Mac builds are on the roadmap — but they're not shipping yet, so there are no fake install docs for them. (Need an Intel build? Open an issue.)&lt;br&gt;
A couple more real edges: the app isn't notarized yet (Homebrew handles the Gatekeeper flag for you), and hook-based interception is CLI-only — the VS Code extension API doesn't support the hooks, so there it runs in a "soft mode" with the gauge and cost tracking but no enforced interception. Use the CLI for guaranteed, measurable savings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bashbrew tap HackPoint/tap
brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; HackPoint/tap/lumen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Launch it, click through the (non-destructive) setup, restart Claude Code, and watch the numbers show up.&lt;br&gt;
Stack, for the curious: Rust core, daemon, and MCP server; Angular + Tauri for the app. It's MIT — issues, questions, and PRs all welcome.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HackPoint/lumen" rel="noopener noreferrer"&gt;https://github.com/HackPoint/lumen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've ever been mid-flow when Claude Code compacted on you without warning — or just wondered where your token budget actually went — this is the tool I wish I'd had. I'd love to hear what you think.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>rust</category>
      <category>opensource</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
