<?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: PROOFNEXA</title>
    <description>The latest articles on DEV Community by PROOFNEXA (@ploofnexa).</description>
    <link>https://dev.to/ploofnexa</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%2F4055274%2Fc95b7493-9c2e-444c-a7b1-6a5a9ba018e6.png</url>
      <title>DEV Community: PROOFNEXA</title>
      <link>https://dev.to/ploofnexa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ploofnexa"/>
    <language>en</language>
    <item>
      <title>I measured where Claude Code actually spends tokens: 96.8% is re-reading history, my typing was 0.01%</title>
      <dc:creator>PROOFNEXA</dc:creator>
      <pubDate>Thu, 30 Jul 2026 14:41:37 +0000</pubDate>
      <link>https://dev.to/ploofnexa/i-measured-where-claude-code-actually-spends-tokens-968-is-re-reading-history-my-typing-was-16gm</link>
      <guid>https://dev.to/ploofnexa/i-measured-where-claude-code-actually-spends-tokens-968-is-re-reading-history-my-typing-was-16gm</guid>
      <description>&lt;p&gt;Claude Code writes a log of every session to &lt;code&gt;~/.claude/projects/&lt;/code&gt;. Each line is JSON, and &lt;code&gt;message.usage&lt;/code&gt; holds the token counts the API actually returned.&lt;/p&gt;

&lt;p&gt;I aggregated 32 sessions. These are not estimates.&lt;/p&gt;

&lt;h2&gt;
  
  
  96.8% is re-reading conversation history
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;th&gt;Share&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Re-reading history (&lt;code&gt;cache_read&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;1,370.9M&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;96.8%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache writes&lt;/td&gt;
&lt;td&gt;37.7M&lt;/td&gt;
&lt;td&gt;2.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model output&lt;/td&gt;
&lt;td&gt;6.7M&lt;/td&gt;
&lt;td&gt;0.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What I typed in&lt;/td&gt;
&lt;td&gt;0.2M&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.01%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total&lt;/td&gt;
&lt;td&gt;1,415.5M&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My own typing is 0.01%. Shortening prompts optimizes one ten-thousandth of the bill.&lt;/p&gt;

&lt;p&gt;The mechanism: the model re-reads the whole conversation every turn. So &lt;strong&gt;once a large return enters the context, you keep paying for it on every following turn.&lt;/strong&gt; Drop a 10k-char return in, talk for 20 more turns, and you paid for 200k chars.&lt;/p&gt;

&lt;h2&gt;
  
  
  88.8% of that history is tool return values
&lt;/h2&gt;

&lt;p&gt;Not prose. Not your instructions. Tool output.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is not call frequency. It is return size
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Share&lt;/th&gt;
&lt;th&gt;Calls&lt;/th&gt;
&lt;th&gt;Per call&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Full page fetch (browser)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;63.3%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;417&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;33,645 chars&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reading a whole file&lt;/td&gt;
&lt;td&gt;13.0%&lt;/td&gt;
&lt;td&gt;258&lt;/td&gt;
&lt;td&gt;11,132 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Screenshot&lt;/td&gt;
&lt;td&gt;4.0%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;296,827 chars&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bash&lt;/td&gt;
&lt;td&gt;3.7%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;967&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;839 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Extracting only the values with JS&lt;/td&gt;
&lt;td&gt;0.4%&lt;/td&gt;
&lt;td&gt;164&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;504 chars&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Look at the last two rows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;967 Bash calls cost less than 3 screenshots.&lt;/strong&gt; One screenshot is ~354 Bash calls.&lt;/p&gt;

&lt;p&gt;And in the same browser task, fetching the whole page costs 33,645 chars while extracting just the values you need costs 504. A &lt;strong&gt;67x&lt;/strong&gt; difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things that actually move the number
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never read a whole file.&lt;/strong&gt; 11,132 chars per read. Grep for the line numbers first, then read that region. Read the whole thing exactly once, when you first need the structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not take screenshots out of habit.&lt;/strong&gt; 296,827 chars each. If the state is readable as text, read it as text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never fetch a whole web page.&lt;/strong&gt; Extract the handful of values you need. 33,645 becomes 504.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Conversely: &lt;strong&gt;stop rationing shell commands.&lt;/strong&gt; 967 calls came to 3.7%.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;This sample skews toward web research, so browser calls rank first. If you mostly write code, file reads will lead. &lt;strong&gt;Measure your own logs.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cache_read&lt;/code&gt; is billed at a lower rate than fresh input, so token share is not cost share.&lt;/li&gt;
&lt;li&gt;Whether weekly usage limits deplete in proportion to this split is unverified; the formula is not published.&lt;/li&gt;
&lt;li&gt;Sample: 32 sessions, 2,478 tool returns.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Measure your own
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.claude/projects/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One folder per project, &lt;code&gt;.jsonl&lt;/code&gt; inside. Each line is JSON: &lt;code&gt;message.usage&lt;/code&gt; for tokens, &lt;code&gt;tool_result&lt;/code&gt; for the returns.&lt;/p&gt;

&lt;p&gt;Take the method, not my numbers. Your top consumer will differ, and that is the one worth cutting.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>productivity</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
