<?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>Forem: Patric</title>
    <description>The latest articles on Forem by Patric (@mypatric69).</description>
    <link>https://forem.com/mypatric69</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3894207%2Ff45c18bf-9632-49c9-abde-27f237fbdacc.jpeg</url>
      <title>Forem: Patric</title>
      <link>https://forem.com/mypatric69</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mypatric69"/>
    <language>en</language>
    <item>
      <title>TRACE Part 2: What Happens Before You Even Write a Single Line of Code</title>
      <dc:creator>Patric</dc:creator>
      <pubDate>Tue, 28 Apr 2026 19:47:18 +0000</pubDate>
      <link>https://forem.com/mypatric69/trace-part-2-what-happens-before-you-even-write-a-single-line-of-code-1opi</link>
      <guid>https://forem.com/mypatric69/trace-part-2-what-happens-before-you-even-write-a-single-line-of-code-1opi</guid>
      <description>&lt;h1&gt;
  
  
  TRACE Part 2: What Happens Before You Even Write a Single Line of Code
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Continued from: &lt;a href="https://dev.to/mypatric69/i-built-a-token-cost-tracker-for-claude-code-and-it-changed-the-way-i-think-about-ai-development-111i"&gt;I built a token cost tracker for Claude Code – and it changed the way I think about AI development&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  An innocent start
&lt;/h2&gt;

&lt;p&gt;Imagine you open a new project, launch Claude Code, and type:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Hey, I'm just starting a new project. I want to set up a REST API using Express and TypeScript. Can you help me with that?”&lt;br&gt;
Harmless. A normal start. You expect a short answer, maybe a directory structure, a few commands.&lt;br&gt;
What you don’t see: Before Claude even says a word, the model has already consumed thousands of tokens. Not from your question. Not from the answer. But simply from the initial startup.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The numbers no one talks about
&lt;/h2&gt;

&lt;p&gt;I ran the same initial prompt on two different models and compared the results.&lt;br&gt;
&lt;strong&gt;Claude Sonnet 4.6:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;System Prompt&lt;/td&gt;
&lt;td&gt;6,100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;System Tools&lt;/td&gt;
&lt;td&gt;8,100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP Tools&lt;/td&gt;
&lt;td&gt;141&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory Files&lt;/td&gt;
&lt;td&gt;905&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Skills&lt;/td&gt;
&lt;td&gt;721&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Messages&lt;/td&gt;
&lt;td&gt;2,300&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~18,100&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Claude Opus 4.7:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;System Prompt&lt;/td&gt;
&lt;td&gt;8,400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;System Tools&lt;/td&gt;
&lt;td&gt;11,500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP Tools&lt;/td&gt;
&lt;td&gt;251&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory Files&lt;/td&gt;
&lt;td&gt;1,200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Skills&lt;/td&gt;
&lt;td&gt;721&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Messages&lt;/td&gt;
&lt;td&gt;3,600&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~25,700&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;+42% more tokens&lt;/strong&gt; – for the exact same prompt, on a fresh project without a single line of code.&lt;br&gt;
This is not a mistake. This is the new tokenizer in Opus 4.7.&lt;/p&gt;
&lt;h2&gt;
  
  
  What a Tokenizer Difference Means in Practice
&lt;/h2&gt;

&lt;p&gt;Anthropic has introduced a new tokenizer with Claude Opus 4.7. The same text is split into more token units than with older models. That sounds technically abstract—but the effects are concrete:&lt;br&gt;
&lt;strong&gt;Every single turn in a session carries this base load.&lt;/strong&gt;&lt;br&gt;
For Turn 1, it’s 18k vs. 25k tokens. By Turn 50, the entire conversation history up to that point is loaded as input—and the tokenizer difference multiplies with every subsequent turn.&lt;br&gt;
A 100-turn session on Opus 4.7 costs more not just because Opus is more expensive per token. It costs more because it structurally generates more tokens—even if you do the same thing as on Sonnet 4.6.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why /context and /cost alone aren’t enough
&lt;/h2&gt;

&lt;p&gt;Claude Code has built-in visibility tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/context&lt;/code&gt; shows the current context window usage by category&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/cost&lt;/code&gt; shows the current session’s consumption so far
Both are useful. But both are &lt;strong&gt;pull mechanisms&lt;/strong&gt;—you have to actively remember to call them. You already have to suspect that something is wrong.
What happens in reality? You’re working. You’re writing code. You’re in the flow. You don’t call &lt;code&gt;/cost&lt;/code&gt;.
TRACE is a &lt;strong&gt;push mechanism&lt;/strong&gt;. It comes to you.
During the live session, TRACE displays in real time:&lt;/li&gt;
&lt;li&gt;Current token count and cost&lt;/li&gt;
&lt;li&gt;Session health – green, yellow, or red&lt;/li&gt;
&lt;li&gt;Context window utilization as a visual bar&lt;/li&gt;
&lt;li&gt;A notification when you cross the warning threshold – before it gets expensive
And new since the first version: a &lt;strong&gt;Cost Efficiency Section&lt;/strong&gt; that shows you what the same session would have cost on the baseline model.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The Daily Tokenizer Check
&lt;/h2&gt;

&lt;p&gt;TRACE runs an automatic check early every morning: It sends a fixed reference text to both models—the current one and the baseline model—and calculates the ratio.&lt;br&gt;
The result for Sonnet 4.6 vs. Opus 4.7:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"current_model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"claude-sonnet-4-6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"baseline_model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"claude-opus-4-7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"current_tokens"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;407&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"baseline_tokens"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;521&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ratio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.7812&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sonnet 4.6 uses &lt;strong&gt;22% fewer tokens&lt;/strong&gt; than Opus 4.7 for the same text. The dashboard shows you this difference—not as an abstract number, but as a concrete cost savings for your last week.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s been added since the first article
&lt;/h2&gt;

&lt;p&gt;TRACE has evolved since the first article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Activity Section&lt;/strong&gt; with GitHub-style heatmap – streaks, active days, average cost per session&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost Efficiency Section&lt;/strong&gt; – Comparison of current model vs. baseline, potential savings per week&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configurable monthly budget&lt;/strong&gt; – Adjustable directly in the dashboard&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tokenizer Ratio Check&lt;/strong&gt; – Daily automatic comparison via Anthropic count_tokens API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VS Code Simple Browser Integration&lt;/strong&gt; – Dashboard directly in VS Code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified Installer&lt;/strong&gt; – &lt;code&gt;bash install.sh&lt;/code&gt; automatically detects whether it’s a first-time installation, adding a project, or an update&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  An Insight into Visibility
&lt;/h2&gt;

&lt;p&gt;The difference between Sonnet 4.6 and Opus 4.7 isn’t just a price difference. It’s a structural difference in how the model processes text. This difference is invisible—until you start measuring.&lt;br&gt;
That is the real message of TRACE: Not “here are your costs,” but “here’s what happened while you were working—and you wouldn’t see it otherwise.”&lt;br&gt;
&lt;code&gt;/context&lt;/code&gt; and &lt;code&gt;/cost&lt;/code&gt; show you the moment. TRACE shows you the progression.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;TRACE is open source under the MIT license: &lt;a href="https://github.com/MyPatric69/trace" rel="noopener noreferrer"&gt;github.com/MyPatric69/trace&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;If you find it useful: a star helps. If you have questions or find a bug: an issue helps more.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>monitoring</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I built a token cost tracker for Claude Code - and it changed the way I think about AI development</title>
      <dc:creator>Patric</dc:creator>
      <pubDate>Thu, 23 Apr 2026 16:20:47 +0000</pubDate>
      <link>https://forem.com/mypatric69/i-built-a-token-cost-tracker-for-claude-code-and-it-changed-the-way-i-think-about-ai-development-111i</link>
      <guid>https://forem.com/mypatric69/i-built-a-token-cost-tracker-for-claude-code-and-it-changed-the-way-i-think-about-ai-development-111i</guid>
      <description>&lt;h2&gt;
  
  
  It started with a number I couldn’t explain
&lt;/h2&gt;

&lt;p&gt;A few months ago, I looked at my Anthropic billing dashboard and saw a number that didn’t add up. I knew roughly how much I’d worked with Claude Code. The bill said otherwise.&lt;br&gt;
I couldn’t tell which sessions were expensive. I couldn’t tell why. I only had a total figure at the end of the month—and no way to link it to specific work.&lt;br&gt;
That bothered me. Not because of the money—but because of the lack of visibility. And as someone who’s worked in IT for 30 years, I know: What you can’t measure, you can’t improve.&lt;br&gt;
So I built TRACE.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I thought I was building—and what I actually built
&lt;/h2&gt;

&lt;p&gt;The original idea was simple: log token consumption per session, calculate costs, store in SQLite. An afternoon project.&lt;br&gt;
What I actually built—over weeks of iteration with Claude Code itself as a development partner—is a local MCP server that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tracks token costs per project and session in real time&lt;/li&gt;
&lt;li&gt;Detects session health (green / yellow / red) based on configurable thresholds&lt;/li&gt;
&lt;li&gt;Sends native macOS notifications when expensive limits are exceeded – no dashboard required&lt;/li&gt;
&lt;li&gt;Automatically keeps &lt;code&gt;AI_CONTEXT.md&lt;/code&gt; up to date via Git hooks&lt;/li&gt;
&lt;li&gt;Generates enriched handoff prompts when starting a new thread&lt;/li&gt;
&lt;li&gt;Displays everything in a web dashboard with a 7-day history, provider badges, and live multi-session tracking&lt;/li&gt;
&lt;li&gt;Runs directly in the VS Code Simple Browser Panel – no external browser required&lt;/li&gt;
&lt;li&gt;Optionally starts automatically at Mac login via LaunchAgent
MIT license – free to use, forkable, no restrictions. With solid test coverage ensuring it works in real-world scenarios.
The gap between an “afternoon project” and a production-ready open-source tool says something about how AI-powered development really works when you seriously commit to it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Nobody Talks About: Context Rot
&lt;/h2&gt;

&lt;p&gt;Here’s what I’ve learned—and what I’ve never heard in any podcast, video, or presentation:&lt;br&gt;
Token costs do not scale linearly with the work. They scale with the session length.&lt;br&gt;
Every turn in a Claude Code session appends to the conversation history. By turn 50, every new message carries the weight of the previous 49 turns as input tokens. By turn 100, you’re burning tens of thousands of tokens per message—just to maintain context, even if the actual task is small.&lt;br&gt;
Anthropic calls this “context rot” in its documentation: As the number of tokens grows, accuracy and recall degrade. The model doesn’t lose tokens—it loses attention. It has to spread its focus across an ever-growing history.&lt;br&gt;
&lt;strong&gt;The practical consequence:&lt;/strong&gt; A 300-turn session doesn’t just cost more than 30 sessions of 10 turns each. It costs significantly more—and the quality of the later turns is measurably worse.&lt;/p&gt;

&lt;h2&gt;
  
  
  Push Instead of Pull: Why Built-in Commands Aren’t Enough
&lt;/h2&gt;

&lt;p&gt;Claude Code has built-in visibility tools. &lt;code&gt;/cost&lt;/code&gt; shows the current session usage. &lt;code&gt;/context&lt;/code&gt; visualizes context window utilization. &lt;code&gt;/stats&lt;/code&gt; provides usage statistics.&lt;br&gt;
These are pull mechanisms. You have to remember to use them. You have to be curious enough to check. You have to already suspect that something is wrong.&lt;br&gt;
TRACE is a push mechanism. It comes to you.&lt;br&gt;
When a session exceeds 80,000 tokens, a notification—a subtle &lt;code&gt;Tink&lt;/code&gt; sound and a macOS alert—appears before it gets really expensive. At 150,000 tokens, a more distinct &lt;code&gt;Funk&lt;/code&gt; signals that it’s time for a new thread. You don’t have to remember to check. TRACE checks for you.&lt;br&gt;
The dashboard also runs directly in the VS Code Simple Browser—for those who want to keep everything in one interface.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;&lt;code&gt;/cost&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;/context&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;TRACE&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Current session usage&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visual context window&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache tokens separately&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Historical sessions&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per project&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monthly budget &amp;amp; alerts&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Session health indicator&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Push notifications&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Handoff prompt&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI_CONTEXT.md auto-update&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VS Code Simple Browser&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Autostart on Login&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  There is no universal token limit
&lt;/h3&gt;

&lt;p&gt;A question that quickly arises during use: at what point is a session “too long”? The answer is: it depends.&lt;br&gt;
80,000 tokens as a warning threshold is a good starting point—but a developer working on a small script will reach that after just a few turns, while someone refactoring a complex backend is still far from it.&lt;br&gt;
TRACE therefore makes the thresholds configurable—directly in the dashboard or in the configuration file. Three recommendations for guidance:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Usage Type&lt;/th&gt;
&lt;th&gt;Warning&lt;/th&gt;
&lt;th&gt;Critical&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Economical – cost-conscious&lt;/td&gt;
&lt;td&gt;50,000&lt;/td&gt;
&lt;td&gt;100,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Standard – recommended&lt;/td&gt;
&lt;td&gt;80,000&lt;/td&gt;
&lt;td&gt;150,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intensive – large projects&lt;/td&gt;
&lt;td&gt;120,000&lt;/td&gt;
&lt;td&gt;200,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These numbers are not set in stone. They are a starting point that should be adjusted once you understand your own usage patterns.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: TRACE tracks Claude Code sessions—i.e., work done in the terminal. For claude.ai web/desktop chats, a separate Anthropic Usage API is required, which is only available for Team and Enterprise accounts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What a real day of usage looks like
&lt;/h2&gt;

&lt;p&gt;I recently installed TRACE for a colleague. After one day of use, the logs told a clear story.&lt;br&gt;
A single session showed over 37 million cache read tokens and nearly $20 in costs. The session had accumulated hundreds of turns—including many invisible tool-use turns that Claude Code generates internally for file reads, Bash commands, and code analysis. Each of these counts as a turn in the transcript, even if the user typed only 30 prompts.&lt;br&gt;
The insight isn’t that something went wrong. The insight is: Without visibility, you don’t even ask the question in the first place.&lt;br&gt;
TRACE makes the invisible visible. That’s all it does—but it turns out to be a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  The /resume Trap
&lt;/h2&gt;

&lt;p&gt;One more thing worth knowing: Claude Code’s &lt;code&gt;/resume&lt;/code&gt; command is more expensive than it looks.&lt;br&gt;
When resuming a session, Claude Code sends the entire conversation history as input tokens—including invisible “Thinking Block Signatures” from Extended Thinking turns. These are base64-encoded, unreadable, and cannot be truncated. But they are sent to the API with every resume and billed accordingly.&lt;br&gt;
&lt;a href="https://github.com/anthropics/claude-code/issues/42260" rel="noopener noreferrer"&gt;Anthropic’s own GitHub issues document cases where resuming a 24-hour session cost ~156,000 input tokens—before the user had even typed a single character.&lt;/a&gt;&lt;br&gt;
Anthropic’s own documentation is clear: Do not rely on session resumption. Save results as state and pass them to a fresh session.&lt;br&gt;
TRACE’s &lt;code&gt;new_session()&lt;/code&gt; tool does exactly that—it generates a compressed handoff prompt from &lt;code&gt;AI_CONTEXT.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, current Git changes, and the open task in the backlog. A new thread gets everything it needs in a few hundred tokens instead of hundreds of thousands.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bugs That Taught Me the Most
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The $0.0000 Sessions.&lt;/strong&gt; TRACE logged sessions but showed zero cost. The model string in the transcripts was &lt;code&gt;claude-sonnet-4-5-20250929&lt;/code&gt;. The config key was &lt;code&gt;claude-sonnet-4-5&lt;/code&gt;. Exact matching failed. A line of prefix matching fixed it—but finding it really required digging into the logs.&lt;br&gt;
&lt;strong&gt;The health indicator that disappeared after a refresh.&lt;/strong&gt; Session Health turned red at 150,000 tokens—and then disappeared when the browser was refreshed because the state was stored in a JavaScript variable. The fix was to move the health state to a &lt;code&gt;last_health.json&lt;/code&gt; file on the server side. Obvious in hindsight. Not obvious until a real user encountered it.&lt;br&gt;
&lt;strong&gt;The &lt;code&gt;AI_CONTEXT.md&lt;/code&gt; file that was out of date.&lt;/strong&gt; The doc synthesizer only updated on &lt;code&gt;feat:&lt;/code&gt; and &lt;code&gt;fix:&lt;/code&gt; commits. A day with &lt;code&gt;chore:&lt;/code&gt; and &lt;code&gt;docs:&lt;/code&gt; commits left the context file four days out of date. Removing the commit type filter entirely fixed it.&lt;br&gt;
Every bug taught us something about the gap between “works in theory” and “works when a real person uses it all day.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Where TRACE stands today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Solid test coverage, all tests passing&lt;/li&gt;
&lt;li&gt;Tracks input, output, cache creation, and cache read tokens separately with correct pricing&lt;/li&gt;
&lt;li&gt;Session Health: green under 80,000 tokens, yellow up to 150,000, red above that – all configurable&lt;/li&gt;
&lt;li&gt;Native notifications on macOS, Windows, and Linux&lt;/li&gt;
&lt;li&gt;Web dashboard with 7-day history, dark/light/auto theme, provider badges, live multi-session tracking&lt;/li&gt;
&lt;li&gt;Runs in the VS Code Simple Browser – no external browser required&lt;/li&gt;
&lt;li&gt;Optional autostart via macOS LaunchAgent&lt;/li&gt;
&lt;li&gt;Enhanced Handoff prompts with current phase, open tasks, files to read&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I would tell someone just starting out
&lt;/h2&gt;

&lt;p&gt;The most useful thing I built wasn’t the dashboard. It was the discipline of treating &lt;code&gt;AI_CONTEXT.md&lt;/code&gt; as a first-class artifact. Every project gets one. Every commit potentially updates it. Every new session starts by reading it.&lt;br&gt;
An AI assistant with full context is a different tool than one that starts from scratch. TRACE exists to make the former the standard—not the exception.&lt;br&gt;
The second most useful thing: Measure before you optimize. I had strong intuitions about which sessions were expensive. The data contradicted most of them. The expensive sessions weren’t the ones with the difficult problems. They were the ones that ran for a long time.&lt;br&gt;
And the third: Don’t wait for permission to build something useful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;TRACE is open source under the MIT license: &lt;a href="https://github.com/MyPatric69/trace" rel="noopener noreferrer"&gt;github.com/MyPatric69/trace&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;If you find it useful: a star helps. If you find a bug: an issue helps more. If you build something with it: I’d love to hear about it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>monitoring</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
