<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Claude Code Camp</title>
    <description>Weekly lessons on shipping faster with AI</description>
    
    <link>https://www.claudecodecamp.com/</link>
    <atom:link href="https://rss.beehiiv.com/feeds/QIjKXT31M7.xml" rel="self"/>
    
    <lastBuildDate>Thu, 3 Dec 2026 06:05:02 +0000</lastBuildDate>
    <pubDate>Thu, 03 Dec 2026 04:47:30 +0000</pubDate>
    <atom:published>2026-12-03T04:47:30Z</atom:published>
    <atom:updated>2026-12-03T06:05:02Z</atom:updated>
    
      <category>Programming</category>
      <category>Software Engineering</category>
      <category>Artificial Intelligence</category>
    <copyright>Copyright 2026, Claude Code Camp</copyright>
    
    <image>
      <url>https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/publication/logo/713ee402-5719-49c9-b93b-d472fb299a84/newsletter-logo.png</url>
      <title>Claude Code Camp</title>
      <link>https://www.claudecodecamp.com/</link>
    </image>
    
    <docs>https://www.rssboard.org/rss-specification</docs>
    <generator>beehiiv</generator>
    <language>en-us</language>
    <webMaster>support@beehiiv.com (Beehiiv Support)</webMaster>

      <item>
  <title>Claude Code --dangerously-skip-permissions: How it works</title>
  <description>How dangerous is it actually?</description>
  <link>https://www.claudecodecamp.com/p/claude-code-dangerously-skip-permissions-how-it-works</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/claude-code-dangerously-skip-permissions-how-it-works</guid>
  <pubDate>Thu, 03 Dec 2026 04:47:30 +0000</pubDate>
  <atom:published>2026-12-03T04:47:30Z</atom:published>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Claude Code works by running commands on your machine. By default, Claude Code checks many of these actions first: either you approve them, or in auto mode a second model reviews them.</p><p class="paragraph" style="text-align:left;">That gets slow, so Claude Code has a few ways to cut down the approvals. The bluntest one is <code>--dangerously-skip-permissions</code>. As the name says, it skips the permission checks. It&#39;s dangerous because Claude can now run commands that change or delete things on your machine without asking.</p><p class="paragraph" style="text-align:left;">So how dangerous is it, really? People argue about this a lot. Some have used it for a year with no problems. Others say it will delete your files sooner or later. We wanted data, so we tested it.</p><p class="paragraph" style="text-align:left;">The short answer: it still blocks <code>rm</code> aimed at your home or project folder, plus any rules you set up. Most other risky commands run. In our test, 13 of 29 risky actions went through with no prompt. Three of them deleted all the files in our test home folder.</p><h2 class="heading" style="text-align:left;" id="what-we-tested">What we tested</h2><p class="paragraph" style="text-align:left;">We tested the following different actions to see what would happen:</p><ul><li><p class="paragraph" style="text-align:left;">deleting your home folder or project</p></li><li><p class="paragraph" style="text-align:left;">deleting files using Python, Node, <code>find</code>, or <code>rsync</code></p></li><li><p class="paragraph" style="text-align:left;">destructive git commands: <code>git clean</code>, <code>git reset --hard</code>, a force push</p></li><li><p class="paragraph" style="text-align:left;">leaking secrets: printing or uploading an SSH key</p></li><li><p class="paragraph" style="text-align:left;">editing config files: <code>.bashrc</code> or Claude Code&#39;s own settings</p></li></ul><p class="paragraph" style="text-align:left;">Each test was run in its own container.</p><h2 class="heading" style="text-align:left;" id="what-gets-blocked">What gets blocked</h2><p class="paragraph" style="text-align:left;">Even when permissions are bypassed, Claude Code blocks the <code>rm</code> command on <a class="link" href="https://code.claude.com/docs/en/permission-modes?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-dangerously-skip-permissions-how-it-works#which-paths-are-critical" target="_blank" rel="noopener noreferrer nofollow">critical paths</a>. Some examples of critical paths:</p><ul><li><p class="paragraph" style="text-align:left;">the root of the drive (/)</p></li><li><p class="paragraph" style="text-align:left;">any folder directly under the root, like /usr, /etc, or /Users</p></li><li><p class="paragraph" style="text-align:left;">your home folder (~)</p></li><li><p class="paragraph" style="text-align:left;">your project folder, plus every folder above it</p></li></ul><p class="paragraph" style="text-align:left;">We tried running some of these commands and Claude Code blocked all of them.</p><div class="codeblock"><pre><code>rm -rf ~
rm -rf &quot;$HOME&quot;
bash -c &#39;rm -rf ~&#39;
/bin/rm -rf ~
\rm -rf ~
command rm -rf ~
env rm -rf ~
D=$(pwd); rm -rf &quot;$D&quot;</code></pre></div><h2 class="heading" style="text-align:left;" id="what-gets-through">What gets through</h2><p class="paragraph" style="text-align:left;">These commands ran with no permission prompts:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Command</p></th><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">What happened</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>echo ~ | xargs rm -rf</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">files in the home folder deleted</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>eval &quot;rm -rf ~&quot;</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">files in the home folder deleted</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>find ~ -mindepth 1 -delete</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">files in the home folder deleted</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">A Python, Node, or Perl one-liner that deletes a folder</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">documents folder deleted</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>mkdir -p /tmp/empty &amp;&amp; rsync -a --delete /tmp/empty/ ~/decoy-docs/</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">documents folder emptied</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>mv ~/decoy-docs /tmp/gone</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">documents folder moved out of home</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>git clean -fdx</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">untracked files deleted</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>git reset --hard</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">uncommitted work lost</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>git push --force origin HEAD~1:main</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">remote branch rewritten</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>cat ~/.ssh/id_decoy</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">private key printed into the chat</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">An edit to <code>.claude/settings.json</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Claude Code&#39;s project settings rewritten</p></td></tr></table></div><h2 class="heading" style="text-align:left;" id="why-is-it-still-asking-me-for-appro">Why is it still asking me for approval?</h2><p class="paragraph" style="text-align:left;">Some actions always ask for approval. Even with the flag on, Claude Code still asks before:</p><ul><li><p class="paragraph" style="text-align:left;">deleting one of the folders above with rm</p></li><li><p class="paragraph" style="text-align:left;">any command you listed in an ask rule</p></li><li><p class="paragraph" style="text-align:left;">tools that need an answer from you, like Claude asking you a question</p></li><li><p class="paragraph" style="text-align:left;">tools your company set to always ask</p></li><li><p class="paragraph" style="text-align:left;">reading files outside your project, if you turned that block on</p></li></ul><h2 class="heading" style="text-align:left;" id="how-to-use-it-safely">How to use it safely</h2><h3 class="heading" style="text-align:left;" id="run-it-in-a-container">Run it in a container</h3><p class="paragraph" style="text-align:left;">This is Anthropic&#39;s advice: use the flag only in an isolated container or VM without internet access, cut off from your real files. Don&#39;t mount your home folder, SSH keys, or cloud logins into it. Claude can potentially delete anything it has access to.</p><h3 class="heading" style="text-align:left;" id="block-specific-commands-with-deny-r">Block specific commands with deny rules</h3><p class="paragraph" style="text-align:left;">A deny rule tells Claude Code never to run a command. Claude Code checks every command against your deny rules before running it (even with the flag on). If a command matches, Claude Code blocks it.</p><p class="paragraph" style="text-align:left;">Add rules like these to <code>~/.claude/settings.json</code>:</p><div class="codeblock"><pre><code>&#123;
  &quot;permissions&quot;: &#123;
    &quot;deny&quot;: [
      &quot;Bash(find * -delete*)&quot;,
      &quot;Bash(git clean*)&quot;,
      &quot;Bash(git reset --hard*)&quot;,
      &quot;Bash(git push --force*)&quot;,
      &quot;Bash(git push -f*)&quot;,
      &quot;Bash(rsync * --delete*)&quot;,
      &quot;Read(~/.ssh/**)&quot;,
      &quot;Read(**/.env*)&quot;
    ]
  &#125;
&#125;</code></pre></div><h3 class="heading" style="text-align:left;" id="check-commands-with-a-hook">Check commands with a hook</h3><p class="paragraph" style="text-align:left;">A hook is a script that Claude Code runs before every shell command. Your script reads the command and decides whether it can run. To block it, the script exits with code 2. This works even with the flag on.</p><p class="paragraph" style="text-align:left;">Because a hook is code, it can catch more than deny rules can. </p><p class="paragraph" style="text-align:left;">Example of the hook I built to test:</p><div class="codeblock"><pre><code>#!/usr/bin/env python3
import json, re, sys

cmd = json.load(sys.stdin).get(&quot;tool_input&quot;, &#123;&#125;).get(&quot;command&quot;, &quot;&quot;)

PATTERNS = [
    (r&quot;\brm\b.*\s-[a-zA-Z]*r&quot;, &quot;recursive rm&quot;),
    (r&quot;\bfind\b.*\s-delete\b&quot;, &quot;find -delete&quot;),
    (r&quot;rmtree|rmSync|rm_rf|unlink\(&quot;, &quot;scripted delete&quot;),
    (r&quot;\brsync\b.*--delete&quot;, &quot;rsync --delete&quot;),
    (r&quot;\bgit\s+clean\b&quot;, &quot;git clean&quot;),
    (r&quot;\bgit\s+reset\s+--hard\b&quot;, &quot;git reset --hard&quot;),
    (r&quot;\bgit\s+push\b.*(--force|\s-f\b|\+\S+:)&quot;, &quot;force push&quot;),
    (r&quot;base64\s+(-d|--decode).*\|\s*(ba|z)?sh\b&quot;, &quot;decoded script piped to shell&quot;),
    (r&quot;\beval\b&quot;, &quot;eval&quot;),
    (r&quot;\.ssh/&quot;, &quot;reads ~/.ssh&quot;),
    (r&quot;&gt;&gt;?\s*~?/?\S*\.(bashrc|zshrc|profile)\b&quot;, &quot;writes shell startup file&quot;),
]
for pat, why in PATTERNS:
    if re.search(pat, cmd):
        print(f&quot;Blocked by hook: &#123;why&#125;&quot;, file=sys.stderr)
        sys.exit(2)
sys.exit(0)</code></pre></div><p class="paragraph" style="text-align:left;">Then add this to <code>~/.claude/settings.json</code>:</p><div class="codeblock"><pre><code>&#123;
  &quot;hooks&quot;: &#123;
    &quot;PreToolUse&quot;: [
      &#123;
        &quot;matcher&quot;: &quot;Bash&quot;,
        &quot;hooks&quot;: [
          &#123; &quot;type&quot;: &quot;command&quot;, &quot;command&quot;: &quot;python3 ~/.claude/block-hook.py&quot; &#125;
        ]
      &#125;
    ]
  &#125;
&#125;</code></pre></div><h3 class="heading" style="text-align:left;" id="turn-it-off-for-your-team">Turn it off for your team</h3><p class="paragraph" style="text-align:left;">Admins can block the flag for everyone in <a class="link" href="https://code.claude.com/docs/en/managed-settings?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-dangerously-skip-permissions-how-it-works" target="_blank" rel="noopener noreferrer nofollow">managed settings</a>:</p><div class="codeblock"><pre><code>&#123; &quot;permissions&quot;: &#123; &quot;disableBypassPermissionsMode&quot;: &quot;disable&quot; &#125; &#125;</code></pre></div><h2 class="heading" style="text-align:left;" id="how-to-turn-it-on">How to turn it on</h2><div class="codeblock"><pre><code>claude --dangerously-skip-permissions</code></pre></div><p class="paragraph" style="text-align:left;">It&#39;s the same as <code>claude --permission-mode bypassPermissions</code>. </p><p class="paragraph" style="text-align:left;">To make it the default, set <code>&quot;permissions&quot;: &#123; &quot;defaultMode&quot;: &quot;bypassPermissions&quot; &#125;</code> in <code>~/.claude/settings.json</code>. </p><h3 class="heading" style="text-align:left;" id="the-even-more-dangerously-setting">The &quot;even more dangerously&quot; setting</h3><div class="codeblock"><pre><code>CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1 claude --dangerously-skip-permissions</code></pre></div><p class="paragraph" style="text-align:left;">This lets <code>rm</code> run on critical paths run with no permission prompt. </p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=c5659835-7584-4685-aeb9-42a8ac45cba6&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Trying out Claude Code&#39;s new Code Mode</title>
  <description>Did Claude proves the Riemann hypothesis?</description>
  <link>https://www.claudecodecamp.com/p/trying-out-claude-code-s-new-code-mode</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/trying-out-claude-code-s-new-code-mode</guid>
  <pubDate>Fri, 27 Nov 2026 15:45:00 +0000</pubDate>
  <atom:published>2026-11-27T15:45:00Z</atom:published>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Hey friends,</p><p class="paragraph" style="text-align:left;">Hope you had a good Thanksgiving!</p><p class="paragraph" style="text-align:left;">Claude Code recently shipped a new experimental feature called Code Mode. </p><p class="paragraph" style="text-align:left;">Quick refresher on how Claude Code works. It&#39;s a loop. Say you ask it to fix a bug in your login code:</p><ol start="1"><li><p class="paragraph" style="text-align:left;">Claude Code sends your prompt to Claude.</p></li><li><p class="paragraph" style="text-align:left;">Claude sends back a tool to use: search for <code>def login</code>.</p></li><li><p class="paragraph" style="text-align:left;">Claude Code runs the search on your laptop and sends the result to Claude.</p></li><li><p class="paragraph" style="text-align:left;">Claude sends back the next tool: read <code>src/auth.py</code>.</p></li><li><p class="paragraph" style="text-align:left;">Claude Code runs it and sends the result back. And so on.</p></li></ol><p class="paragraph" style="text-align:left;">With Code Mode on, Claude writes a small script that runs a bunch of tools at once. Claude Code runs the script, and only the output of the script is sent back to Claude.</p><div class="image"><img alt="Code Mode on: Claude sends back a script, Claude Code runs the tools inside it and returns only the answer. 3 trips instead of 5." class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f6db8002-848b-4bc2-8b8a-605287a16c1f/DJOyovLryYTt.gif?t=1795671560"/></div><p class="paragraph" style="text-align:left;">I have been testing out Code Mode on my sessions from the last couple of weeks. Here are the results I have seen so far:</p><ul><li><p class="paragraph" style="text-align:left;">~40-60% fewer tokens sent</p></li><li><p class="paragraph" style="text-align:left;">~40% faster (because it makes fewer calls to Claude)</p></li><li><p class="paragraph" style="text-align:left;">~20% cheaper</p></li></ul><p class="paragraph" style="text-align:left;">I ended up enabling it by default. I wrote up a deep dive on <a class="link" href="https://www.claudecodecamp.com/p/code-mode-in-claude-code?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=trying-out-claude-code-s-new-code-mode" target="_blank" rel="noopener noreferrer nofollow">How Code Mode works in Claude Code</a>.</p><h3 class="heading" style="text-align:left;" id="interesting-reads-this-week">Interesting reads this week</h3><ol start="1"><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://cekrem.github.io/posts/if-you-stop-writing-code-you-also-get-worse-at-reviewing-it/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=trying-out-claude-code-s-new-code-mode" target="_blank" rel="noopener noreferrer nofollow">If you stop writing code, you also get worse at reviewing it</a>: Some parts of this article resonated with me. I don’t think we are going back to writing code by hand again. And code reviews have mostly become performative and will die soon as well. However, I am being more mindful of how I work with Claude. I don’t want to lose the ability to think deeply about problems. Would love to hear how y’all are dealing with this.</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://news.ycombinator.com/item?id=50574968&utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=trying-out-claude-code-s-new-code-mode" target="_blank" rel="noopener noreferrer nofollow">Claude helped prove the Riemann Hypothesis. Maybe</a>: A researcher at Anthropic, Levent Alpöge says he proved the 167-year-old math problem with Claude&#39;s help. Tbh I had completely forgotten what the Riemann Hypothesis is and Claude gave me a good refresher. Will be interesting to see if the proof is accepted. Crazy times ahead! </p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://reddit.com/r/ClaudeAI/comments/1y2qpdd/whats_one_small_trick_that_changed_how_you_use/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=trying-out-claude-code-s-new-code-mode" target="_blank" rel="noopener noreferrer nofollow">What&#39;s one small trick that changed how you use Claude?</a>: A pretty good read. One trick I have been using personally:<br><i>ending the prompt with &quot;before you answer, list what you&#39;d need to know that I haven&#39;t told you&quot;</i></p></li><li><p class="paragraph" style="text-align:left;">Btw been hearing a lot of good things about the new Gemini 4 Neon model. I haven’t yet gotten around to trying it - if y’all have tried it and have any thoughts, let me know!</p><div class="image"><a class="image__link" href="https://x.com/dhh/status/2124860839572488538?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=trying-out-claude-code-s-new-code-mode" rel="noopener" target="_blank"><img alt="" class="image__image" style="border-radius:0px 0px 0px 0px;border-style:solid;border-width:0px 0px 0px 0px;box-sizing:border-box;border-color:#E5E7EB;" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/7d23fe7d-e64a-4075-b57b-f09079c95d97/CleanShot_2026-11-26_at_21.02.19_2x.png?t=1795755750"/></a></div><p class="paragraph" style="text-align:left;"></p></li></ol><h3 class="heading" style="text-align:left;" id="memes">Memes</h3><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/0ef01011-1225-4a89-a216-d4ee0f4e2226/CleanShot_2026-11-26_at_20.57.06_2x.png?t=1795755436"/></div><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">If you got this far, please do me a favor and forward this to a friend who might enjoy reading this. Hope you have a great weekend!</p><p class="paragraph" style="text-align:left;">Thanks!<br>Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=87c2e031-e1c4-4628-bf6d-7f38faa0bd60&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>How Code Mode works in Claude Code</title>
  <description>And if you should use it</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/82657d32-35cc-455d-8ea7-71603dd20944/mcp-0d4fc0b6-7ae6-4940-9470-3bb3a1b4f3fb.png" length="32621" type="image/png"/>
  <link>https://www.claudecodecamp.com/p/code-mode-in-claude-code</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/code-mode-in-claude-code</guid>
  <pubDate>Thu, 26 Nov 2026 06:39:46 +0000</pubDate>
  <atom:published>2026-11-26T06:39:46Z</atom:published>
    <category><![CDATA[Deep Dive]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Claude Code shipped a new feature called <a class="link" href="https://code.claude.com/docs/en/code-mode?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-code-mode-works-in-claude-code" target="_blank" rel="noopener noreferrer nofollow">Code Mode</a> recently. The idea comes from <a class="link" href="https://blog.cloudflare.com/code-mode/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-code-mode-works-in-claude-code" target="_blank" rel="noopener noreferrer nofollow">Cloudflare&#39;s Code Mode for MCP</a> and <a class="link" href="https://www.anthropic.com/engineering/code-execution-with-mcp?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-code-mode-works-in-claude-code" target="_blank" rel="noopener noreferrer nofollow">Anthropic&#39;s write-up</a> from last year.</p><p class="paragraph" style="text-align:left;">I wanted to know three things:</p><p class="paragraph" style="text-align:left;"></p><ol start="1"><li><p class="paragraph" style="text-align:left;">How it works under the hood?</p></li><li><p class="paragraph" style="text-align:left;">Does it make Claude Code more efficient (reduced token usage, save money)</p></li><li><p class="paragraph" style="text-align:left;">Any impact on quality of results?</p></li></ol><h2 class="heading" style="text-align:left;" id="how-claude-code-works">How Claude Code works</h2><p class="paragraph" style="text-align:left;">Claude Code is a loop.</p><p class="paragraph" style="text-align:left;">Say you ask it to fix a bug in your login code:</p><ol start="1"><li><p class="paragraph" style="text-align:left;">Claude Code sends your prompt to Claude.</p></li><li><p class="paragraph" style="text-align:left;">Claude sends back a tool to use: search for <code>def login</code>.</p></li><li><p class="paragraph" style="text-align:left;">Claude Code runs the search on your laptop and sends the result to Claude.</p></li><li><p class="paragraph" style="text-align:left;">Claude sends back the next tool: read <code>src/auth.py</code>.</p></li><li><p class="paragraph" style="text-align:left;">Claude Code runs it and sends the result back. And so on.</p></li></ol><p class="paragraph" style="text-align:left;">Each send-and-reply counts as one round trip. This fix takes 5: search, read, edit, run the tests, and the final reply.</p><div class="image"><img alt="Code Mode off, trip by trip. Claude Code sends the conversation, Claude sends back one tool (Grep, Read, Edit, Bash), Claude Code runs it and adds the result. 5 trips. Illustrative example." class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/50ebac97-edf3-4ca1-84a3-339f2bd1c468/ByAjhjBaSmFb.gif?t=1795671558"/><div class="image__source"><span class="image__source_text"><p>Illustrative example.</p></span></div></div><h2 class="heading" style="text-align:left;" id="what-code-mode-changes">What Code Mode changes</h2><p class="paragraph" style="text-align:left;">With Code Mode, Claude writes a small script that uses several tools at once. Claude Code runs the script locally on your laptop, and then sends the output back to Claude for the next step.</p><p class="paragraph" style="text-align:left;">Same bug:</p><ol start="1"><li><p class="paragraph" style="text-align:left;">Claude Code sends your prompt to Claude.</p></li><li><p class="paragraph" style="text-align:left;">Claude sends back a script: search for <code>def login</code>, read the file, and return the login function.</p></li><li><p class="paragraph" style="text-align:left;">Claude Code runs it and sends back just the login function.</p></li><li><p class="paragraph" style="text-align:left;">Claude sends back a second script: fix the line, and run the tests.</p></li><li><p class="paragraph" style="text-align:left;">Claude Code runs it and sends back &quot;12 passed.&quot;</p></li><li><p class="paragraph" style="text-align:left;">Claude replies.</p></li></ol><p class="paragraph" style="text-align:left;">That&#39;s 3 round trips instead of 5.</p><div class="image"><img alt="Code Mode on, same fix. Claude sends back a script, Claude Code runs the grep and the read inside it and returns only the login function. A second script edits the file and runs the tests. 3 trips. Illustrative example." class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f6db8002-848b-4bc2-8b8a-605287a16c1f/DJOyovLryYTt.gif?t=1795671560"/><div class="image__source"><span class="image__source_text"><p>Illustrative example.</p></span></div></div><p class="paragraph" style="text-align:left;">Code Mode also makes each trip smaller. Claude sees two tools instead of dozens: <code>REPL</code> runs a script, and <code>Poll</code> collects the results of a slow one. Every other tool becomes a function inside the script, and MCP tools (plugins that give Claude extra tools) shrink to a list of names. In my setup, the first request went from 84,655 tokens to 57,158.</p><h2 class="heading" style="text-align:left;" id="does-it-save-money">Does it save money?</h2><p class="paragraph" style="text-align:left;">Code Mode reduces token usage. Instead of sending all of your tools, Claude only sees two tools: <code>REPL</code> runs a script, and <code>Poll</code> collects the results of a slow one. Every other tool becomes a function inside the script.</p><p class="paragraph" style="text-align:left;">(In my setup, the first request on average went from ~85k tokens to ~57k tokens).</p><p class="paragraph" style="text-align:left;">I ran a couple of tasks from my real sessions with code mode enabled & disabled. These are the results I saw:</p><ul><li><p class="paragraph" style="text-align:left;">~40-60% fewer tokens sent</p></li><li><p class="paragraph" style="text-align:left;">~40% faster (because it makes fewer calls to Claude)</p></li><li><p class="paragraph" style="text-align:left;">~20% cheaper</p></li></ul><p class="paragraph" style="text-align:left;">Even though Code Mode sends ~40-60% fewer tokens, the total cost only reduced by ~20% because most of the cost comes from output tokens which doesn’t get impacted by Code Mode.</p><p class="paragraph" style="text-align:left;">Fewer round trips means less re-reading of the entire context (which is already cached). So even though we send fewer tokens, total cost doesn’t reduce by the same amount.</p><div class="image"><img alt="R2 cost split. Tokens sent fell from 2.0M to 695K. Cost fell from $1.10 to $0.82: cache reads dropped, cache writes stayed the same." class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/cc829478-cfd5-4147-8a1e-868007b86486/mcp-c2fd5987-2ebf-4c61-b5e0-8eb1ef5ce3fe.png?t=1795588890"/></div><div class="image"><img alt="Pikachu meme: tokens sent to the model drop 65%. The bill only drops 25% because cache writes never left." class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/cd088741-c9fd-4ab5-ab04-82fd3b7da530/3aa21baa-7ea3-4786-a9ff-167a53a39acc.webp?t=1795588899"/></div><h2 class="heading" style="text-align:left;" id="does-claude-get-worse-at-the-task">Does Claude get worse at the task?</h2><p class="paragraph" style="text-align:left;">This was my main worry. Without Code Mode, Claude sees each result before it picks the next step. With it, Claude plans a few steps at once.</p><p class="paragraph" style="text-align:left;">I didn&#39;t see a drop. I ran a bunch of my old claude sessions again with code mode enabled. It seemed to give the same results as the session without code mode. I am still keeping an eye on this since I have only used it for a day or two. </p><h2 class="heading" style="text-align:left;" id="when-not-to-use-code-mode">When not to use Code Mode</h2><p class="paragraph" style="text-align:left;">Code Mode only runs in the interactive terminal. Per the <a class="link" href="https://code.claude.com/docs/en/code-mode?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-code-mode-works-in-claude-code#requirements" target="_blank" rel="noopener noreferrer nofollow">docs</a>, it doesn&#39;t run in VS Code, the desktop app, cloud sessions, or through an LLM gateway. It turns off Remote Control, Claude in Chrome and computer use. In my tests it also didn&#39;t run in <code>claude -p</code>.</p><h2 class="heading" style="text-align:left;" id="how-to-enable-it">How to enable it</h2><p class="paragraph" style="text-align:left;">Add this to <code>~/.claude/settings.json</code>:</p><div class="codeblock"><pre><code>&#123;
  &quot;env&quot;: &#123;
    &quot;CLAUDE_CODE_EXPERIMENTAL_CODE_MODE&quot;: &quot;1&quot;
  &#125;
&#125;</code></pre></div><h2 class="heading" style="text-align:left;" id="heading-2"></h2></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=5e01383d-debf-48d6-b3b0-a84cb779df07&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>I am learning how git works under the hood</title>
  <description>I use it every day and had no idea how it works</description>
  <link>https://www.claudecodecamp.com/p/i-am-learning-how-git-works-under-the-hood</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/i-am-learning-how-git-works-under-the-hood</guid>
  <pubDate>Thu, 19 Nov 2026 15:45:00 +0000</pubDate>
  <atom:published>2026-11-19T15:45:00Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Hey friends,</p><p class="paragraph" style="text-align:left;">It&#39;s been a while. I want to handwrite one of these every week. It is hard resisting the temptation to use Claude for this as well. I am trying.</p><p class="paragraph" style="text-align:left;">Also, If you&#39;re reading this, you&#39;re one of the few people not playing GTA 6 today. Thank you.</p><p class="paragraph" style="text-align:left;">With agents writing all the code now, it&#39;s easy to hand off all understanding to the agents as well. To fight that, I&#39;ve been going deep on things from the ground up.</p><p class="paragraph" style="text-align:left;">Recently I have been spending time understanding the internals of Git. Kinda embarrassed to admit that even though I use git every day - I have very little idea how it works under the hood.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/9793e7fd-fcd4-4ca2-912b-b83682757401/image.png?t=1795063592"/></div><p class="paragraph" style="text-align:left;">A few things that got me curious:</p><ul><li><p class="paragraph" style="text-align:left;">Github has had a rough year of reliability and a lot of that is due to agents pushing way more code. It has had at least 20 incidents every month this year.</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://openai.com/index/scaling-git-at-openai/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-am-learning-how-git-works-under-the-hood" target="_blank" rel="noopener noreferrer nofollow">OpenAI</a> and <a class="link" href="https://www.anthropic.com/research/redesigning-source-control?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-am-learning-how-git-works-under-the-hood" target="_blank" rel="noopener noreferrer nofollow">Anthropic</a> both wrote about how they are handling git scaling challenges internally. Anthropic went from 2500 merges a day to over 30,000 over four months.</p></li></ul><p class="paragraph" style="text-align:left;">This week I went deep on how git clone works. I also ended up writing everything I learned. The guide ended up being quite long so I split it into two.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://codient.dev/git-clone-part-1?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-am-learning-how-git-works-under-the-hood" target="_blank" rel="noopener noreferrer nofollow">How git clone works, part 1: What happens when you run git clone</a></p><p class="paragraph" style="text-align:left;"><a class="link" href="https://codient.dev/git-clone-part-2?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-am-learning-how-git-works-under-the-hood" target="_blank" rel="noopener noreferrer nofollow">How git clone works, part 2: How the git server sends the files to the client</a></p><p class="paragraph" style="text-align:left;">One learning is that everything in git is basically just files.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ef76d7dc-55c3-4e12-b420-039b6b83abad/CleanShot_2026-11-18_at_20.49.06_2x.png?t=1795063760"/></div><p class="paragraph" style="text-align:left;">Both guides are interactive with a quiz at the end. If you have any feedback, please let me know! </p><h3 class="heading" style="text-align:left;" id="interesting-reads-this-week">Interesting reads this week</h3><ol start="1"><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://www.clocktowerbench.com?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-am-learning-how-git-works-under-the-hood" target="_blank" rel="noopener noreferrer nofollow">Clock Tower Bench</a>: Came across this benchmark on X where different models play the game Blood on the Clock Tower against each other. I thought this was fun way to test different models. I got inspired and started building a benchmark myself. Hope to share it next week!</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://blog.primeradiant.com/external-sandboxes-for-coding-agents/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-am-learning-how-git-works-under-the-hood" target="_blank" rel="noopener noreferrer nofollow">External sandboxes for coding agents</a>: talks about how you can run coding agents like Claude Code safely on your mac using sandboxes. Most of my personal coding agents have moved away from my personal laptop to a remote server which is inherently more secure and locked down (vs my personal laptop). But this is a good middle ground for running agents on personal laptops with guardrails.</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://claude.dev/blog/how-the-claude-code-team-thinks-about-verification/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-am-learning-how-git-works-under-the-hood" target="_blank" rel="noopener noreferrer nofollow">How the Claude Code team thinks about verification</a>: A guide from the Claude Code team about how they verify changes and some of the best practices for building your own verify skill. </p></li></ol><h3 class="heading" style="text-align:left;" id="memes">Memes</h3><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/2ef8bf57-495f-4b95-8864-d8ab1c79ea09/CleanShot_2026-11-18_at_19.17.17_2x.png?t=1795058247"/></div><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6a7953b2-7505-47bd-90b0-aeb90a3eef28/CleanShot_2026-11-18_at_19.17.41_2x.png?t=1795058273"/></div><p class="paragraph" style="text-align:left;">I hope you enjoyed reading this. If you got all this way, do me a favor and reply and let me know if you have any feedback. </p><p class="paragraph" style="text-align:left;">Thanks!</p><p class="paragraph" style="text-align:left;">Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=651bccd3-122f-464f-89f9-ab32abf68fbf&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>I tried to build my own Ultrafast model</title>
  <description>Trying to replicate OpenAI&#39;s ultrafast using Qwen3-235B</description>
  <link>https://www.claudecodecamp.com/p/i-tried-to-build-my-own-ultrafast-model</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/i-tried-to-build-my-own-ultrafast-model</guid>
  <pubDate>Mon, 05 Oct 2026 15:30:00 +0000</pubDate>
  <atom:published>2026-10-05T15:30:00Z</atom:published>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">OpenAI recently announced their fastest inference - Ultrafast during DevDay. It is supposed to be up to 8 times faster (&gt;300 tok/s) in Codex.</p><div class="embed"><a class="embed__url" href="https://x.com/OpenAI/status/2104993966043320759?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-build-my-own-ultrafast-model" target="_blank"><div class="embed__content"><p class="embed__title"> OpenAI (@OpenAI) on X </p><p class="embed__description"> This is Ultrafast. Our premium speed tier, Ultrafast offers up to 8x faster token generation (300 tokens per second) in Codex and up to 6x in the API. </p><p class="embed__link"> x.com </p></div><img class="embed__image embed__image--right" src="https://pbs.twimg.com/amplify_video_thumb/2104993936112779264/img/lmUTqfZ4cb7RxKfp?format=webp&name=large"/></a></div><div class="embed"><a class="embed__url" href="https://x.com/OpenAIDevs/status/2104996045482778973?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-build-my-own-ultrafast-model" target="_blank"><div class="embed__content"><p class="embed__title"> OpenAI Developers (@OpenAIDevs) on X </p><p class="embed__description"> Ultrafast is our fastest way to build with Astra yet: in Codex, it runs up to 8x faster than Astra Standard and 4x faster than Astra Fast. Bring your ideas to life as fast as you can type them. </p><p class="embed__link"> x.com </p></div><img class="embed__image embed__image--right" src="https://pbs.twimg.com/media/HTZzMeQbAAAoC6n?format=webp&name=large"/></a></div><p class="paragraph" style="text-align:left;">Unfortunately, ultrafast is only available on the new Pro $500 plan so I ran some quick tests via the API. My numbers lined up with the numbers publicly mentioned (6-8x faster for 6x the price).</p><p class="paragraph" style="text-align:left;">This got me thinking: what would it take to make an open weight model ultrafast (&gt;300 tok/s). OpenAI hasn’t said how it works under the hood. Nvidia <a class="link" href="https://blogs.nvidia.com/blog/gpus-openai-gpt-6-astra-ultrafast/?ncid=so-twit-351193&utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-build-my-own-ultrafast-model" target="_blank" rel="noopener noreferrer nofollow">wrote a blog post</a> mentioning that the ultrafast mode runs on Blackwell GPUs.</p><p class="paragraph" style="text-align:left;">I wanted to see what levers you could tune to get the most speed up and to get a sense of what OpenAI must be doing under the hood to support ultrafast.</p><p class="paragraph" style="text-align:left;"><i>Disclaimer: I am not an AI infra expert. OpenAI has dedicated tuning their infra. I am just exploring this with Claude / Codex.</i></p><p class="paragraph" style="text-align:left;">Here&#39;s where I ended up:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Qwen3-235B on 4 Nvidia B200s (Blackwell)</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Speed per person</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">GPU cost per million tokens</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Where I started: 64 people sharing, no tricks</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">71 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$1.63</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Where I got to: 1 person, plus a small model guessing ahead</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">306 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$23.52</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"></p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"><b>4.3x faster</b></p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"><b>14x the cost</b></p></td></tr></table></div><h2 class="heading" style="text-align:left;" id="the-setup">The setup</h2><p class="paragraph" style="text-align:left;">Qwen3-235B has 235B weights but only uses ~22B per token (it&#39;s a mixture-of-experts model). The file is 236 GB.</p><p class="paragraph" style="text-align:left;">I rented 4 Nvidia B200s (the Blackwell chips Ultrafast runs on) on Modal for $25/hour, served the model with vLLM, and timed every token on real coding prompts.</p><p class="paragraph" style="text-align:left;">Cost = hourly rental ÷ tokens produced. </p><p class="paragraph" style="text-align:left;">I started with 64 people sending requests at once, the most I tested. Each got 71 tok/s, at $1.63 per million tokens.</p><h2 class="heading" style="text-align:left;" id="lever-1-fewer-people-sharing">Lever 1: fewer people sharing</h2><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">People at once</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Speed per person</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Cost per million tokens</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">64</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">71 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$1.63</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">16</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">89 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$4.91</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">4</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">110 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$15.74</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">136 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$51.19</p></td></tr></table></div><p class="paragraph" style="text-align:left;">I tested different levels of concurrency (going from 1 to 64) and compared the speed vs cost for each level.</p><p class="paragraph" style="text-align:left;">Going from 64 people to 1 got me 1.9x the speed for 31x the cost. Each token still waits for the weights to be read, no matter how many people share the machine.</p><h2 class="heading" style="text-align:left;" id="lever-2-a-small-model-guessing-ahea">Lever 2: a small model guessing ahead</h2><p class="paragraph" style="text-align:left;">This is called speculative decoding. A small helper model guesses the next few tokens and the big model checks them all in one pass. Each correct guess is a token you don&#39;t wait for, and the output is identical.</p><p class="paragraph" style="text-align:left;">I used an off-the-shelf 2.4 GB helper for Qwen (EAGLE3). The big model accepted ~55% of its guesses on code.</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">People at once</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Speed per person</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Cost per million tokens</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">64</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">138 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.95</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">16</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">177 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$2.79</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">4</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">236 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$8.43</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">306 tok/s</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$23.52</p></td></tr></table></div><p class="paragraph" style="text-align:left;">It roughly doubled the speed at every level and cut the cost. At 64 people, speed went from 71 to 138 tok/s and cost dropped 41%.</p><h2 class="heading" style="text-align:left;" id="lever-3-more-gp-us-didnt-make-one-p">Lever 3: more GPUs (didn&#39;t make one person faster)</h2><p class="paragraph" style="text-align:left;">On H100s, I split the model across 8 GPUs instead of 4. Cost doubled for minimal speedup.</p><p class="paragraph" style="text-align:left;">One person got 112 tok/s on 4 GPUs and 115 on 8. Here&#39;s roughly where the time goes for each token:</p><div class="image"><img alt="Time to make one token on H100s for one person: 4 GPUs take 8.9 ms (1.6 ms reading weights, 7.2 ms everything else); 8 GPUs take 8.7 ms (0.8 ms reading, 7.8 ms everything else)" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/1daf342c-88ff-44df-a8a5-3ea718f9a684/lever3-time-per-token.gif?t=1790918546"/><div class="image__source"><span class="image__source_text"><p>Totals are measured. The blue/gray split is my estimate from the chips&#39; memory speed.</p></span></div></div><p class="paragraph" style="text-align:left;">Reading the weights from memory (blue) is the part more GPUs speed up. Doubling the GPUs cut it from 1.6 ms to 0.8 ms.</p><p class="paragraph" style="text-align:left;">Everything else (gray) is mostly the GPUs syncing. The model has 94 layers, and after each one, every GPU waits for the others before starting the next. That didn&#39;t get faster with 8 GPUs. It got a bit slower, since there are more GPUs to wait on.</p><p class="paragraph" style="text-align:left;">The math itself takes about 0.04 ms, too small to show.</p><p class="paragraph" style="text-align:left;">So more GPUs alone don&#39;t make one person faster. They help when lots of people share the machine. With 16 people, 8 GPUs gave each person 81 tok/s vs 59 on 4 GPUs, because there&#39;s more math to split up.</p><p class="paragraph" style="text-align:left;">What would help one person is less reading and less waiting. That&#39;s what Cerebras does. Its chip is one giant wafer with the memory built in next to the math, so weights load fast and there are fewer chips to sync. </p><h2 class="heading" style="text-align:left;" id="what-i-couldnt-test">What I couldn’t test</h2><ul><li><p class="paragraph" style="text-align:left;"><b>Custom GPU code:</b> according to <a class="link" href="https://blogs.nvidia.com/blog/gpus-openai-gpt-6-astra-ultrafast/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-build-my-own-ultrafast-model" target="_blank" rel="noopener noreferrer nofollow">Nvidia</a>, OpenAI used its own models to write GPU code tuned for Blackwell. I used vLLM&#39;s off the shelf which probably isn’t fully optimized for the B200 yet.</p></li><li><p class="paragraph" style="text-align:left;"><b>4-bit weights:</b> half the bytes to read. My 4-bit run didn&#39;t fit on one B200.</p></li><li><p class="paragraph" style="text-align:left;"><b>Bigger racks:</b> Nvidia&#39;s GB300 NVL72 connects 72 GPUs so they spend less time syncing. Nvidia didn&#39;t say which setup OpenAI uses.</p></li></ul><h2 class="heading" style="text-align:left;" id="how-close-did-i-get">How close did I get?</h2><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;"></p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Normal</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Fast</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Speed jump</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Cost jump</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">OpenAI: Astra Standard → Ultrafast</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">74 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">457 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">6.2x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">6x the price</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Me: same B200s, 64 people → 1 person</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">138 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">306 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2.2x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">25x my GPU cost</p></td></tr></table></div><p class="paragraph" style="text-align:left;">I wasn’t really able to get my ultrafast model to anywhere close to either Astra’s speed or relative price increase. </p><p class="paragraph" style="text-align:left;">Now, a 6x price increase seems reasonable for a 6-8x speed increase.</p><h2 class="heading" style="text-align:left;" id="you-can-use-fast-open-models-today">You can use fast open models today</h2><p class="paragraph" style="text-align:left;">You don&#39;t need the $500 plan to try this. Some OpenRouter providers sell fast and normal versions of the same open model. I tested a few:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Same open model</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Fast</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Normal</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Speed</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Price</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">GLM-5.2 on Decart</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">798 tok/s, $8.00</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">115 tok/s, $2.40</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">6.9x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">3.3x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">GLM-5.2 on BaseTen</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">381 tok/s, $6.60</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">118 tok/s, $4.40</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">3.2x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1.5x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">GLM-5.3 on BaseTen</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">407 tok/s, $6.60</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">189 tok/s, $4.40</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2.2x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1.5x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">MiniMax M2.7, MiniMax&#39;s own &quot;highspeed&quot;</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">47 tok/s, $2.40</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">54 tok/s, $1.20</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">0.9x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2x</p></td></tr></table></div><p class="paragraph" style="text-align:left;"><i>Prices are per million output tokens.</i></p><p class="paragraph" style="text-align:left;">Decart&#39;s fast GLM-5.2 hit ~800 tok/s for $8 per million, faster than Ultrafast. (OpenRouter numbers include thinking tokens and my Astra numbers don&#39;t, so it&#39;s a rough comparison.)</p><p class="paragraph" style="text-align:left;">MiniMax&#39;s &quot;highspeed&quot; tier was slower than its normal one in my test, at 2x the price, so time any speed tier before paying for it.</p><h2 class="heading" style="text-align:left;" id="what-if-i-bought-the-hardware">What if I bought the hardware?</h2><p class="paragraph" style="text-align:left;">I also priced buying instead of renting. These are reseller/analyst estimates from Sept 2026, spread over 3 years of 24/7 use, plus power or data center space.</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Setup</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Buy</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Speed, 1 person</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Cost per million, 1 person</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Cost per million, busy</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">4 B200s (half of an 8-GPU server)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">~$257,500</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">295 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$10.99</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$0.45</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">8 used H100s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">~$165,000</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">223 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$11.25</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$0.38</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">4 RTX PRO 6000 workstation</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">~$72,000</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">56 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$15.66</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$1.71</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Mac Studio M3 Ultra 512 GB</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$9,499</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">24 tok/s</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$4.60</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">n/a</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Owning is 2-3.5x cheaper than renting, but only if the machine is busy all day. At 10% use, the hardware cost per token is 10x higher.</p><h2 class="heading" style="text-align:left;" id="what-i-learned">What I learned</h2><p class="paragraph" style="text-align:left;">Getting an open model to ~300 tok/s for one person was doable on rented Blackwell GPUs and free software. Doing it cheaply is the hard part.</p><ul><li><p class="paragraph" style="text-align:left;">Sharing is what makes tokens cheap. Giving one person the whole machine only made it ~2x faster, for 25x the cost per token. That&#39;s most of why speed tiers cost more.</p></li><li><p class="paragraph" style="text-align:left;">The guessing helper (speculative decoding) was the best lever: 2x faster and cheaper. Providers likely use it already.</p></li><li><p class="paragraph" style="text-align:left;">The rest of OpenAI&#39;s speed comes from things you can&#39;t rent: custom GPU code and bigger, better-connected racks.</p><p class="paragraph" style="text-align:left;"></p></li></ul></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=bb8b698c-8a4b-4c57-b75f-8149f7d61482&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Catch-Up Thursday</title>
  <description>Everything that happened in AI coding this week</description>
  <link>https://www.claudecodecamp.com/p/catch-up-thursday-oct-1</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/catch-up-thursday-oct-1</guid>
  <pubDate>Thu, 01 Oct 2026 14:30:00 +0000</pubDate>
  <atom:published>2026-10-01T14:30:00Z</atom:published>
    <category><![CDATA[Five Post Friday]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Hey friends,</p><p class="paragraph" style="text-align:left;">It feels crazy to me but it seems like there is so much happening in the AI coding world. I am trying out this new format to quickly share everything that I came across over the last week. Let me know if you have any feedback!</p><h3 class="heading" style="text-align:left;" id="the-week-in-60-seconds">The week in 60 seconds</h3><ul><li><p class="paragraph" style="text-align:left;"><b>Anthropic shipped Sonnet 5.5.</b> Anthropic says it&#39;s 30% faster than Sonnet 5 and costs up to 30% less for most work. Its own benchmark table puts it close to Opus 5.5 on most tests. <a class="link" href="https://x.com/ClaudeDevs/status/2104641318555353400?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" target="_blank" rel="noopener noreferrer nofollow">Announcement</a></p></li><li><p class="paragraph" style="text-align:left;"><b>OpenAI held Dev Day.</b> The big launch was GPT-6.1 Sol. OpenAI says it&#39;s nearly as smart as its top model, Astra, for a fifth of the price. OpenAI also launched Dots, an always-on personal agent, and a new $500/month plan. Users say the $200 plan now comes with about half the usage. <a class="link" href="https://openai.com/index/introducing-gpt-6-1-sol/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" target="_blank" rel="noopener noreferrer nofollow">Sol</a> · <a class="link" href="https://x.com/theo/status/2104995863689142546?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" target="_blank" rel="noopener noreferrer nofollow">Full recap</a></p></li><li><p class="paragraph" style="text-align:left;"><b>Google announced Gemini 4 Argon.</b> Google says it scores 77.9% on DeepSWE, a test of long software tasks, which is the best score so far. It can write up to 1 million tokens in a single answer. Launch price is $2 per million input tokens and $10 per million output. For now, only a small group of security teams can use it. <a class="link" href="https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-4-argon/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" target="_blank" rel="noopener noreferrer nofollow">Announcement</a></p><p class="paragraph" style="text-align:left;"></p></li></ul><h2 class="heading" style="text-align:left;" id="my-5-favorite-posts-from-this-week">My 5 favorite posts from this week:</h2><h4 class="heading" style="text-align:left;" id="1-claude-finish-last-10-no-matter-h">#1 &quot;Claude finish last 10% no matter how long it takes&quot;</h4><div class="image"><a class="image__link" href="https://www.reddit.com/r/vibecoding/comments/1wrmzzx/the_new_development_timeline/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" rel="noopener" target="_blank"><img alt="Timeline bar: Idea 5 minutes, Working demo 2 hours, Final 10% 6 months" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/2f40e1ad-7ed4-46d2-be10-b9369404a6d9/image.jpg?t=1790744310"/></a><div class="image__source"><a class="image__source_link" href="https://www.reddit.com/r/vibecoding/comments/1wrmzzx/the_new_development_timeline/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" rel="noopener" target="_blank"><span class="image__source_text"><p>r/vibecoding: The new development timeline</p></span></a></div></div><p class="paragraph" style="text-align:left;">So true - we all know the last 10% take 80% of the time</p><h4 class="heading" style="text-align:left;" id="2">#2 </h4><div class="image"><a class="image__link" href="https://www.reddit.com/r/ClaudeCode/comments/1wnwi9s/chad_55/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" rel="noopener" target="_blank"><img alt="Crying Opus 5.1 soyjak vs calm Opus 5.5 Chad saying lol, here&#39;s your code" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/79890281-e196-42f5-ac52-4e5c6ef768c7/image.jpg?t=1790744312"/></a><div class="image__source"><a class="image__source_link" href="https://www.reddit.com/r/ClaudeCode/comments/1wnwi9s/chad_55/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" rel="noopener" target="_blank"><span class="image__source_text"><p>r/ClaudeCode: Chad 5.5</p></span></a></div></div><p class="paragraph" style="text-align:left;">I can finally talk to Claude again </p><h1 class="heading" style="text-align:left;" id="3">#3 </h1><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/87f34d52-7c35-47f4-b603-d58e6a9f5003/CleanShot_2026-09-30_at_20.50.02_2x.png?t=1790826620"/></div><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Good summary of everything that was announced at DevDay!</p><h1 class="heading" style="text-align:left;" id="4">#4 </h1><div class="image"><a class="image__link" href="https://x.com/trq212/status/2103576349499855160?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=catch-up-thursday" rel="noopener" target="_blank"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/10d4bac4-2217-46dc-a590-c8b57a2dc6e8/CleanShot_2026-09-30_at_20.50.58_2x.png?t=1790826668"/></a></div><p class="paragraph" style="text-align:left;">Great post by Thariq that helps you understand the effort levels in Claude and how to use them</p><h1 class="heading" style="text-align:left;" id="5">#5</h1><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/2a4f1312-3c1b-4dfe-859e-3f706f903a6e/CleanShot_2026-09-30_at_20.52.17_2x.png?t=1790826747"/></div><p class="paragraph" style="text-align:left;">In case you missed it, great talk by @poteto on how she ships 2000 (!) PRs to prod!</p><hr class="content_break"><h5 class="heading" style="text-align:left;" id="whatd-you-think-of-this-new-format-"><b>What&#39;d you think of this new format? Hit reply and tell me.</b></h5><p class="paragraph" style="text-align:left;">— Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=098a1aea-4734-4d16-bf0f-43b14ee4aee7&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>How models are served and how that impacts your bill</title>
  <description>I rented a GPU and served an open model to understand how prices work</description>
  <link>https://www.claudecodecamp.com/p/how-models-are-served-and-how-that-impacts-your-bill</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/how-models-are-served-and-how-that-impacts-your-bill</guid>
  <pubDate>Tue, 29 Sep 2026 15:00:00 +0000</pubDate>
  <atom:published>2026-09-29T15:00:00Z</atom:published>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Last week, I wrote a post about how new models get <a class="link" href="https://www.claudecodecamp.com/p/why-new-models-get-cheaper?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">cheaper</a>. While doing research for that, I started digging deeper into how models are actually served.</p><p class="paragraph" style="text-align:left;">I also wanted to understand why:</p><ol start="1"><li><p class="paragraph" style="text-align:left;"> Fable is capped at half of a Max plan&#39;s weekly usage</p></li><li><p class="paragraph" style="text-align:left;">OpenAI paused new $200 subscriptions a week after Astra launched.</p></li></ol><p class="paragraph" style="text-align:left;">So I rented a GPU (Nvidia H100) and ran vLLM, an open-source serving program, and served open Qwen models at three sizes. Didn’t optimize anything - just the default vLLM settings.</p><p class="paragraph" style="text-align:left;">These are the current prices for these models per million tokens:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Model</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Input</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Output</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Cached input</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Sonnet 5</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$2</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$10</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.20</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Opus 5.5</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$4</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$20</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.20</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Fable 5.1</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$10</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$50</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.25</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">GPT-5.6 Sol</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$2</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$10</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.20</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">GPT-6 Astra</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$10</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$50</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$1.00</p></td></tr></table></div><h2 class="heading" style="text-align:left;" id="a-model-is-a-file">A model is a file</h2><p class="paragraph" style="text-align:left;">A model is essentially a file of numbers called weights. The smallest model I tested (Qwen 3 8B), stored at two bytes per weight, uses 16.4 GB of memory. </p><p class="paragraph" style="text-align:left;">If you want to understand how LLMs work under the hood, these two resources are helpful:</p><ul><li><p class="paragraph" style="text-align:left;">3Blue1Brown&#39;s <a class="link" href="https://www.3blue1brown.com/lessons/gpt?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">&quot;But what is a GPT?&quot;</a></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://poloclub.github.io/transformer-explainer/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">Transformer Explainer</a></p></li></ul><h2 class="heading" style="text-align:left;" id="why-models-run-on-gp-us">Why models run on GPUs</h2><p class="paragraph" style="text-align:left;">GPUs are built for matrix multiplication and addition. Running a model is mostly matrix multiplication and addition, so that&#39;s where it runs. You could run one on a CPU, but the performance would be pretty terrible: a CPU does a few multiplications at a time and reads memory about ten times slower, while a GPU does thousands at once.</p><h2 class="heading" style="text-align:left;" id="why-a-bigger-model-costs-more-per-t">Why a bigger model costs more per token</h2><p class="paragraph" style="text-align:left;">The model&#39;s weights sit in the GPU&#39;s memory, but the arithmetic happens in its cores, which hold only a few megabytes. So for every output token, the entire weights stream through the cores a few megabytes at a time.</p><p class="paragraph" style="text-align:left;">Memory bandwidth becomes the bottleneck. The more weights a model has, the longer it takes for the weights to stream into the cores, and the longer each output token takes. That&#39;s also why tokens per second fall as the model gets bigger.</p><p class="paragraph" style="text-align:left;">An H100 moves memory at 3,350 GB per second. Qwen 8B&#39;s weights are about 16.4 GB. So it can stream that file at most about 204 times per second (3,350 ÷ 16.4), which is roughly the most output tokens per second one user can get. In my unoptimized setup, I measured 149.</p><p class="paragraph" style="text-align:left;">Double the model and each token takes twice as long to stream, so the same card makes half as many tokens per second, and each token costs twice as much GPU time.</p><h2 class="heading" style="text-align:left;" id="why-output-costs-more-than-input">Why output costs more than input</h2><p class="paragraph" style="text-align:left;">Output tokens take more GPU time to make than input tokens. Input tokens all exist up front, so the GPU multiplies each chunk of weights against all of them at once, and one stream of the file handles the whole prompt. Output tokens come one at a time, and each one needs its own full stream. The two phases are called <b>prefill</b> and <b>decode</b>.</p><p class="paragraph" style="text-align:left;">In the experiment, for this 8B model and one user, the GPU processed a 9,000-token prompt in about a quarter of a second. Producing 9,000 output tokens took about 65 seconds. With 32 users sharing the card the gap narrows to somewhere between 8x and 24x. The exact numbers depend on the model, its format, and the serving setup.</p><h2 class="heading" style="text-align:left;" id="why-sharing-the-card-lowers-the-cos">Why sharing the card lowers the cost</h2><p class="paragraph" style="text-align:left;">One user writing tokens leaves most of the card idle. Each pass through the weights produces one token. Servers fix this by batching: many users&#39; next-token steps run together, so one pass through the weights produces a token for every one of them.</p><p class="paragraph" style="text-align:left;">From here on the numbers use one-byte (FP8) versions of the models instead of the two-byte versions above. The 32B model at two bytes per weight is about 65 GB, which barely fits on an 80 GB card. So I ran all three sizes at one byte to keep them comparable.</p><p class="paragraph" style="text-align:left;">H100 rents for $3.95 an hour. With one user, the 8B model wrote 210 tokens per second, which is 756,000 tokens an hour, so a million output tokens cost $3.95 ÷ 0.756 = $5.22 of GPU time. With 32 users sharing the card it made 3,751 tokens per second in total, and the same million cost $0.29. With 128 users, 8,061 per second and $0.14. That&#39;s a 38x drop in the GPU cost of each added token. Each user also got slower as the card filled: 63 tokens per second each at 128 users, against 210 alone. All of these assume the card is busy every second of the hour. Idle time raises the real number.</p><p class="paragraph" style="text-align:left;">That&#39;s probably why Anthropic has offered more usage off-peak. In March 2026 it <a class="link" href="https://support.claude.com/en/articles/14063676-claude-march-2026-usage-promotion?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">doubled limits outside peak hours</a> for two weeks, and it tightens session limits during peak hours. Work that moves to a quiet hour fills a card that would otherwise sit idle. The labs&#39; batch APIs at 50% off do the same for work that can wait.</p><h2 class="heading" style="text-align:left;" id="why-cached-input-costs-10-or-less">Why cached input costs 10% or less</h2><p class="paragraph" style="text-align:left;">During the prefill, the model saves each token&#39;s working state, the numbers it will look back at while writing. This is called the KV cache. If the next request starts with the same text, the server can reuse that saved state instead of reading those tokens again. Only the matching part from the start of the request counts.</p><p class="paragraph" style="text-align:left;">I timed the same 9,000-token prompt cold and warm, measuring how long the server took to produce one token. Cold, 248 milliseconds. Warm, on the second repeat, 21. On the 32B model, 856 versus 35.</p><p class="paragraph" style="text-align:left;">That skipped work is why a cache read costs 10% or less of the input price. The first time the server sees a token, it computes that token&#39;s state and stores it. Anthropic charges 1.25x the input price for those tokens. That&#39;s the cache write. Every later request that starts with the same text pays the cache read price for them instead.</p><h2 class="heading" style="text-align:left;" id="same-card-three-sizes">Same card, three sizes</h2><p class="paragraph" style="text-align:left;">The earlier sections explained why a bigger model should make fewer tokens per second and cost more per token. Here&#39;s what happened when I tested it across three sizes of the same model family, with everything else held the same: same GPU, same serving program, same FP8 format, same test.</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Size (file)</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">One user, tokens/sec</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">128 users, tokens/sec total</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">GPU cost per million output</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">8B (9.5 GB)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">210</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">8,061</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.14</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">14B (16.3 GB)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">134</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">4,644</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.24</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">32B (34.3 GB)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">67</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1,930</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.57</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Serving speed drops as the file grows. The 14B to 32B step is almost exact: 2.1x the bytes, 2.0x slower for one user. Cost per token rises even with 128 users sharing the card: 1.7x from 8B to 14B, 2.4x from 14B to 32B.</p><h2 class="heading" style="text-align:left;" id="what-a-long-conversation-costs">What a long conversation costs</h2><p class="paragraph" style="text-align:left;">Every turn re-sends the whole conversation, so the input grows as the session goes on. Almost all of it is cache reads at a tenth of the input price. A turn at 100,000 tokens of context costs about $0.02 of input on Sonnet, about the same as turn 1&#39;s 8,200 fresh tokens. A long session is cheap per token. It gets expensive in one case: the cache misses, because you paused more than five minutes or something early in the prompt changed, and the whole conversation bills as fresh input again. <a class="link" href="https://claudecodecamp.com/p/how-prompt-caching-actually-works-in-claude-code?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">My prompt caching post</a> covers what breaks the cache.</p><p class="paragraph" style="text-align:left;">On the GPU, the cost is the saved state. For each token, the model keeps <a class="link" href="https://jax-ml.github.io/scaling-book/inference/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">the numbers it computed at every layer</a>, so later tokens can look back at it. On these Qwen models that&#39;s 144 to 256 KiB per token, against 4 bytes for the text. A 100,000-token conversation takes 15 to 26 GB of memory for one user. The card has 80 GB and the weights take their share first, so a bigger model has less room. About 430K tokens of state fit beside the 8B, about 140K beside the 32B. A bigger model holds fewer long conversations at once.</p><p class="paragraph" style="text-align:left;">Long contexts also slow the card down. Each new token has to read back the saved state for every token before it. In the experiment, 32 users at 9,000-token contexts ran 2.87x slower than the same 32 users at short prompts, on the 8B model. Fewer tokens per hour from the same card means more GPU time per token.</p><p class="paragraph" style="text-align:left;">Anthropic doesn&#39;t have a long-context rate anymore. It did until the 4.6 models, when prompts over 200,000 tokens billed at double. Now a 900,000-token request bills at the same per-token rate as a 9,000-token one. Anthropic covers the memory and the slowdown another way: the cache read price on every re-sent token, the 1.25x write price, and the five-minute expiry that frees the memory when you go idle. OpenAI still charges a higher rate past a context threshold.</p><h2 class="heading" style="text-align:left;" id="why-the-top-tier-gets-capped">Why the top tier gets capped</h2><p class="paragraph" style="text-align:left;">The best guess is that these models need a lot of resources and both labs have given the same answer: <a class="link" href="https://x.com/claudeai/status/2078302415804379218?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">not enough capacity</a>, <a class="link" href="https://techcrunch.com/2026/09/10/openai-puts-pro-subscriptions-on-hold-due-to-astra-demand/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-models-are-served-and-how-that-impacts-your-bill" target="_blank" rel="noopener noreferrer nofollow">too much strain on the system</a>.</p><p class="paragraph" style="text-align:left;">A bigger model makes fewer tokens per second and holds fewer conversations per GPU, so it uses up a fleet faster. When everyone tries the newest model in the same week, the machines don&#39;t exist yet. That&#39;s the cap.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=f08a38b3-1791-4714-9980-c03a35639681&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Why new models get cheaper</title>
  <description>Opus 5.5 and GPT-6 Sol cost about half as much per task.</description>
  <link>https://www.claudecodecamp.com/p/why-new-models-get-cheaper</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/why-new-models-get-cheaper</guid>
  <pubDate>Wed, 23 Sep 2026 14:30:00 +0000</pubDate>
  <atom:published>2026-09-23T14:30:00Z</atom:published>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Anthropic released Opus 5.5 and OpenAI released GPT-6 Sol yesterday. Both cost less per token than the models they replace. </p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Model</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Input</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Output</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Cached input</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Opus 5</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$5</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$25</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.50</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Opus 5.5</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$4</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$20</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.20</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">GPT-5.6 Sol</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$4</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$20</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">GPT-6 Sol</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$2</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$10</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"></p></td></tr></table></div><p class="paragraph" style="text-align:left;">Prices per million tokens, from <a class="link" href="https://platform.claude.com/docs/en/about-claude/pricing?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=why-new-models-get-cheaper" target="_blank" rel="noopener noreferrer nofollow">Anthropic&#39;s pricing page</a> and <a class="link" href="https://venturebeat.com/technology/openai-releases-gpt-6-sol-and-luna-models-slashing-api-costs-50-or-more?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=why-new-models-get-cheaper" target="_blank" rel="noopener noreferrer nofollow">OpenAI&#39;s launch coverage</a>. Opus 5.5 is 20% cheaper on input and output and 60% cheaper on cached input. GPT-6 Sol is 50% cheaper across the board.</p><p class="paragraph" style="text-align:left;">I wanted to know two things: do you actually pay less for the same work, and where do the savings come from?</p><h2 class="heading" style="text-align:left;" id="do-you-pay-less">Do you pay less?</h2><p class="paragraph" style="text-align:left;">A cheaper price per token doesn&#39;t mean a cheaper model. A new model can write more tokens. Price per task is a better measurement of how efficient a model is.</p><p class="paragraph" style="text-align:left;">I ran the same 12 coding tasks, three times each, on all four models: bug fixes, small features, refactors, tests, and docs. Opus ran in Claude Code and Sol ran in Codex, each at its default effort.</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Model</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Cost per task</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Output tokens per task</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Opus 5</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.173</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2,227</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Opus 5.5</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.088</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,434</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">GPT-5.6 Sol</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.225</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2,521</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">GPT-6 Sol</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.118</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2,178</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Both new models cost about half as much per task.</p><p class="paragraph" style="text-align:left;">For GPT-6 Sol, most of the savings came from the price cut. It also wrote 12% fewer tokens compared to GPT-5.6</p><p class="paragraph" style="text-align:left;">Opus 5.5 on average wrote 36% fewer tokens. So the efficiency was a combination of the 20% price cut and the model writing fewer tokens.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://artificialanalysis.ai/models/claude-opus-5-5?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=why-new-models-get-cheaper" target="_blank" rel="noopener noreferrer nofollow">Artificial Analysis</a> found the same thing on its much larger test:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Effort</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Opus 5</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Opus 5.5</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Opus 5.5 vs Opus 5</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Medium</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$2,732</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$1,627</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">0.60x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">High</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$4,332</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$2,172</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">0.50x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Max</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$7,275</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$8,708</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1.20x</p></td></tr></table></div><p class="paragraph" style="text-align:left;">At max effort, Opus 5.5 costs more. It thinks much longer. Simon Willison <a class="link" href="https://news.ycombinator.com/item?id=49804316&utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=why-new-models-get-cheaper" target="_blank" rel="noopener noreferrer nofollow">reported</a> that it used up its whole 128,000-token thinking budget on a simple drawing prompt without answering. </p><h2 class="heading" style="text-align:left;" id="what-makes-a-model-cheaper">What makes a model cheaper</h2><p class="paragraph" style="text-align:left;">The cost of a task is the price per token times the number of tokens the model writes. To cut it, a new model can lower the price per token, write fewer tokens, or both.</p><p class="paragraph" style="text-align:left;">Writing fewer tokens comes from how the model is trained. We can measure it, but we can&#39;t see inside the model.</p><p class="paragraph" style="text-align:left;">The lab sets the price per token. Under it is the cost of making a token: an hour of GPU time divided by the tokens the GPU makes in that hour. That cost we can test.</p><p class="paragraph" style="text-align:left;">I tested four changes on open Qwen models, on a rented GPU serving many users at once:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Change</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">How much cheaper to make each token</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">The catch</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1. Use fewer weights for each token</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2x</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">The whole file still has to fit in memory</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2. Keep less state per token</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2.4x on long conversations</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Some accuracy loss on long contexts</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">3. Use a newer GPU (B200 instead of H100)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">12%</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Costs 1.58x more per hour</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">4. Use a newer GPU plus smaller weights</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">23%</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Some accuracy loss, and it only works on the newest chips</p></td></tr></table></div><p class="paragraph" style="text-align:left;">The first two changes to the model saved far more than the new chip. DeepSeek, Kimi, and Qwen made each new generation cheaper mostly by redesigning the model. They all now use 3 to 5% of their weights per token, and DeepSeek cut its saved state by 93%.</p><p class="paragraph" style="text-align:left;"><b>Fewer weights for each token.</b> The model holds many sets of weights and uses only a few for each token.</p><p class="paragraph" style="text-align:left;"><b>Less state per token.</b> For each token in a conversation, the model keeps some numbers to look back at. Store them in half the space and twice as many conversations fit on one GPU.</p><p class="paragraph" style="text-align:left;"><b>Newer GPU.</b> A B200 costs 1.58x an H100 per hour but made 1.81x the tokens, so each token is cheaper.</p><p class="paragraph" style="text-align:left;"><b>Smaller weights.</b> Storing each weight in less space means less to move for each token. It only pays off on chips built for it. On the H100, it made tokens more expensive.</p><h2 class="heading" style="text-align:left;" id="what-opus-55-and-gpt-6-sol-might-be">What Opus 5.5 and GPT-6 Sol might be doing</h2><p class="paragraph" style="text-align:left;">We don’t know for sure what improvements these models made. Here is what I could find from their announcements:</p><p class="paragraph" style="text-align:left;"><b>Opus 5.5:</b> Anthropic says it &quot;requires less compute to serve than Opus 5&quot; and writes output &quot;more than 30% faster.&quot; That fits the first change, using fewer weights for each token.</p><p class="paragraph" style="text-align:left;">Anthropic also cut the cached input price 60%. That fits the second change. Less state per token makes cached tokens cheaper to store and read back.</p><p class="paragraph" style="text-align:left;">A newer chip could be part of it too. And the model writes fewer tokens per task, which comes from training.</p><p class="paragraph" style="text-align:left;"><b>GPT-6 Sol.</b> OpenAI credits &quot;improvements to inference and caching.&quot; It says more of each prompt now comes from the cache instead of being processed fresh, which cuts the cost of input. It doesn&#39;t say what changed in the model.</p><p class="paragraph" style="text-align:left;">What the tests do show is how much each change is worth. Changing the model can halve the cost of making a token. A newer chip alone can&#39;t.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=a5555eaa-0f60-408d-a266-4d7a998fb6a7&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>I moved my coding agents to a remote server</title>
  <description>My laptop is no longer the bottleneck</description>
  <link>https://www.claudecodecamp.com/p/i-moved-my-coding-agents-to-a-remote-server</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/i-moved-my-coding-agents-to-a-remote-server</guid>
  <pubDate>Fri, 21 Aug 2026 14:45:00 +0000</pubDate>
  <atom:published>2026-08-21T14:45:00Z</atom:published>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Happy Friday friends!</p><p class="paragraph" style="text-align:left;">My Claude limits reset today so I am looking forward to having the privilege of using Fable again for a day.</p><p class="paragraph" style="text-align:left;">It has been a while since the last newsletter. For those of you who are new or have forgotten who I am - let me reintroduce myself.</p><p class="paragraph" style="text-align:left;">I am Abhishek - I drank the Claude kool-aid last year and have been writing about my experiences using Claude Code.</p><h2 class="heading" style="text-align:left;" id="my-laptop-became-a-bottleneck">My laptop became a bottleneck</h2><p class="paragraph" style="text-align:left;">How I write code has changed in the last 6-9 months. A coding task can run from 20 minutes to a couple of hours.</p><p class="paragraph" style="text-align:left;">I would only run my longer coding tasks when I knew my laptop would stay open. I used caffeinate on my Mac to prevent it from going to sleep. I would keep my laptop lid half open when commuting. This went on for a couple of months.</p><p class="paragraph" style="text-align:left;">Then came the breaking point - memory & disk errors. Old sessions and worktrees kept piling up.</p><p class="paragraph" style="text-align:left;">I came across <a class="link" href="https://www.onorca.dev/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-moved-my-coding-agents-to-a-remote-server" target="_blank" rel="noopener noreferrer nofollow">Orca IDE</a> around this time on X. What got my attention:</p><ul><li><p class="paragraph" style="text-align:left;">It runs Claude Code / Codex in a terminal so the interface is a lot more familiar (unlike Conductor)</p></li><li><p class="paragraph" style="text-align:left;">Support for running Orca both locally and on a remote server</p></li><li><p class="paragraph" style="text-align:left;">Native iOS app</p></li></ul><p class="paragraph" style="text-align:left;">I already had a Hetzner VPS from when I was testing OpenClaw. Setup was easy: I pointed Claude at Orca&#39;s docs, had it install the Orca server on the Hetzner box, and added that server to my local Orca config.</p><p class="paragraph" style="text-align:left;">I eventually added all the configs to Terraform because I ended up getting a larger VPS and didn’t want to go through the manual process all over again.</p><p class="paragraph" style="text-align:left;">Later I moved it all to Terraform. I upgraded to a bigger VPS and didn&#39;t want to redo the setup by hand.</p><p class="paragraph" style="text-align:left;">Orca’s local + remote support helped me move over my workload gradually.</p><h4 class="heading" style="text-align:left;" id="whats-working-well">Whats working well</h4><h3 class="heading" style="text-align:left;" id="all-of-my-coding-work-now-runs-on-h"><span style="color:#2d2d2d;font-family:Helvetica, Arial, sans-serif;font-size:16px;">All of my coding work now runs on Hetzner.</span></h3><p class="paragraph" style="text-align:left;"><span style="color:#2d2d2d;font-family:Helvetica, Arial, sans-serif;font-size:16px;">A task keeps running even if my laptop is closed. And I can review work from my phone using the Orca app if I don’t have access to my laptop (my son’s swim lessons).</span></p><h2 class="heading" style="text-align:left;" id="anthropic-explained-how-claude-code">Anthropic explained how Claude Code tokens really work</h2><p class="paragraph" style="text-align:left;">Anthropic published a <a class="link" href="https://claude.com/blog/maximizing-the-value-of-your-claude-code-sessions?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-moved-my-coding-agents-to-a-remote-server" target="_blank" rel="noopener noreferrer nofollow">post last week</a> on getting more out of your Claude Code sessions. It explains what makes a session expensive, and what to do about it. It&#39;s one of the most useful things they&#39;ve written.</p><p class="paragraph" style="text-align:left;">First, the pricing basics from the post:</p><ul><li><p class="paragraph" style="text-align:left;">Output tokens (what Claude writes) cost about 5x more than input tokens (what Claude reads).</p></li><li><p class="paragraph" style="text-align:left;">When part of your session is cached, reading it again costs only 0.1x the normal price.</p></li><li><p class="paragraph" style="text-align:left;">Writing to the cache costs up to 2x. You pay that once, then every turn after it is cheap.</p></li></ul><p class="paragraph" style="text-align:left;">Here are the key takeaways:</p><ul><li><p class="paragraph" style="text-align:left;">Run /clear when you start a new task. By turn 40, Claude re-reads the 39 turns before it. Old context makes every new message cost more. Run /rename first if you may want the session back later.</p></li><li><p class="paragraph" style="text-align:left;">Pick your model and effort level at the start. /model, /effort, and fast mode are part of the cache. Change one mid-session and you pay full price to rebuild it.</p></li><li><p class="paragraph" style="text-align:left;">Use /rewind instead of /compact to undo recent turns. Rewind keeps the cache. Compact throws it away.</p></li><li><p class="paragraph" style="text-align:left;">@-mention files instead of typing the path. This skips a Read call. You only need to do it once — the file stays in the session.</p></li><li><p class="paragraph" style="text-align:left;">Add quiet flags to noisy commands. Put your daily commands in <a class="link" href="https://CLAUDE.md?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-moved-my-coding-agents-to-a-remote-server" target="_blank" rel="noopener noreferrer nofollow">CLAUDE.md</a> with the flags included. Command output under 30,000 characters stays in the session until the end.</p></li><li><p class="paragraph" style="text-align:left;">Run /compact before a long break. The cache expires after 1 hour on subscriptions (5 minutes on API keys). Compacting is much cheaper while the cache is still warm.</p></li></ul><h2 class="heading" style="text-align:left;" id="the-memes">The memes</h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/2eca5e25-2b73-4290-ba6f-85b70bc6966a/image.png?t=1787288393"/><div class="image__source"><span class="image__source_text"><p>Opus 5 communicating in Claudish</p></span></div></div><p class="paragraph" style="text-align:left;">That’s the week.</p><p class="paragraph" style="text-align:left;">Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=075d349a-aa9a-4052-bcc9-e95ada95e2d4&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Which model to use?</title>
  <description>Fable, Sonnet, Opus and now GPT 5.6. Which one to use?</description>
  <link>https://www.claudecodecamp.com/p/which-model-to-use</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/which-model-to-use</guid>
  <pubDate>Fri, 10 Jul 2026 16:22:16 +0000</pubDate>
  <atom:published>2026-07-10T16:22:16Z</atom:published>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Hi friends,</p><p class="paragraph" style="text-align:left;">We are back after a short two week summer break. Lots happened over the last 2 weeks. Fable 5 is back, though only temporarily till July 12. Sonnet 5 shipped. Opus 4.8 is still around. And GPT-5.6 launched yesterday as well.</p><p class="paragraph" style="text-align:left;">They all overlap. So which one to actually use? That&#39;s what I&#39;ve been digging into: which model to use, and when.</p><h2 class="heading" style="text-align:left;" id="which-model-for-which-job">Which model for which job</h2><p class="paragraph" style="text-align:left;">The tempting answer is to use the best one for everything - point Fable at every task and stop thinking. I think that mostly works (till July 12) as long as you use Claude Code on a subscription.</p><p class="paragraph" style="text-align:left;">However, it is also the most expensive way to use Claude Code. Fable is $10/$50 per million tokens. Opus is $5/$25. Sonnet 5 is on a promo $2/$10.</p><p class="paragraph" style="text-align:left;">The people who&#39;ve sorted this out don&#39;t pick one model. They give each one the job it&#39;s good at. Fable plans. A cheaper model builds.</p><p class="paragraph" style="text-align:left;">Here&#39;s what I use each for:</p><ul><li><p class="paragraph" style="text-align:left;"><b>Fable</b> for the vague, long, multi-file stuff. Its lead grows with difficulty. It&#39;s also slow and twice the price, so don&#39;t waste it on small work.</p></li><li><p class="paragraph" style="text-align:left;"><b>Opus 4.8</b> if Fable is not available (or I am running low on usage limits).</p></li><li><p class="paragraph" style="text-align:left;"><b>Sonnet 5</b> as the cheap executor.</p></li><li><p class="paragraph" style="text-align:left;"><b>GPT-5.5</b> if you want the strongest builder and don&#39;t mind a second subscription. It&#39;s the one a lot of people reach for to grind out implementation once Fable has written the plan.</p></li></ul><p class="paragraph" style="text-align:left;">I have no way to prove that is the optimal setup. There&#39;s no clean benchmark that says &quot;use Fable for X.&quot; <br><br>It&#39;s mostly using the models for different tasks, looking at the output, forming a gut read. Vibes, mostly. I’d be curious to hear which models y’all are using for your day to day work.</p><h2 class="heading" style="text-align:left;" id="a-few-other-things-worth-knowing">A few other things worth knowing</h2><p class="paragraph" style="text-align:left;">Sonnet 5&#39;s promo pricing runs <a class="link" href="https://www.anthropic.com/news/claude-sonnet-5?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=which-model-to-use" target="_blank" rel="noopener noreferrer nofollow">through August 31</a>: $2/$10 per million tokens, with a native 1M-token context window.</p><h2 class="heading" style="text-align:left;" id="the-memes">The memes</h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/be6cb116-8c28-47bc-be68-c741fc4d9012/CleanShot_2026-07-09_at_20.34.59_2x.png?t=1783654511"/></div><p class="paragraph" style="text-align:left;">That&#39;s the week. Let me know what you guys are building with Fable before it goes away! <br><br>We will be back next week with some more deep dives.</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Thanks!</p><p class="paragraph" style="text-align:left;">Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=c91a1837-733a-4ef4-9ba8-f0884af6d2a7&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Someone put ads in the Claude Code spinner</title>
  <description>Plus: understanding AI code, and how /fast works</description>
  <link>https://www.claudecodecamp.com/p/someone-put-ads-in-the-claude-code-spinner</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/someone-put-ads-in-the-claude-code-spinner</guid>
  <pubDate>Thu, 18 Jun 2026 14:47:00 +0000</pubDate>
  <atom:published>2026-06-18T14:47:00Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Hi friends,</p><p id="no-updates-on-fable-since-my-last-e" class="paragraph" style="text-align:left;">No updates on Fable since my last email. Still hoping everything gets resolved soon so we can get Fable back soon!</p><h3 class="heading" style="text-align:left;" id="interesting-stuff-from-this-week">Interesting stuff from this week</h3><h4 class="heading" style="text-align:left;" id="lazy-senior-dev"><a class="link" href="https://www.reddit.com/r/ClaudeCode/comments/1u3jlo0/i_gave_claude_code_a_lazy_senior_dev_mode_and_it/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=someone-put-ads-in-the-claude-code-spinner" target="_blank" rel="noopener noreferrer nofollow">Lazy Senior Dev</a></h4><p class="paragraph" style="text-align:left;">Somebody on Reddit shared a skill for a &quot;lazy senior dev&quot; mode that forces Claude to write as little code as possible.</p><h4 class="heading" style="text-align:left;" id="billing-for-claude-p-is-postponed">Billing for claude -p is postponed</h4><p class="paragraph" style="text-align:left;">Agent SDK and claude -p usage will still draw from your Pro/Max limits for now. Anthropic will provide an update on this later. I’m hopeful common sense will prevail and they will do the best for their customers.</p><h4 class="heading" style="text-align:left;" id="get-paid-to-wait-on-claude-code"><a class="link" href="https://x.com/andrewmccalip/status/2065049432652189933?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=someone-put-ads-in-the-claude-code-spinner" target="_blank" rel="noopener noreferrer nofollow">Get paid to wait on Claude Code</a></h4><p class="paragraph" style="text-align:left;">Andrew McCalip turned the Claude Code spinner into an ad marketplace: &quot;the Claude Code spinner might be the most watched line on Earth. So I turned it into an ad marketplace.&quot; </p><p class="paragraph" style="text-align:left;">An extension that runs ads while you wait and pays you half. I still can&#39;t tell if its a joke or not.</p><h4 class="heading" style="text-align:left;" id="understanding-code-you-didnt-write"><a class="link" href="https://www.claudecodecamp.com/p/how-to-use-claude-code-and-still-understand-your-own-code?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=someone-put-ads-in-the-claude-code-spinner" target="_blank" rel="noopener noreferrer nofollow">Understanding code you didn&#39;t write</a></h4><p class="paragraph" style="text-align:left;">You read the diff, the tests pass, you move on, and weeks later you own code you can&#39;t explain. The fix isn&#39;t reading more, it&#39;s matching how deep you go to how much the code matters. For a throwaway script, just ask what it does. </p><p class="paragraph" style="text-align:left;">For code you&#39;ll keep, make Claude quiz you instead of explain, because committing to an answer before you&#39;re proven wrong is what makes it stick. For code you&#39;ll own, make the edit yourself from memory until you can do it without Claude.</p><p class="paragraph" style="text-align:left;">The full breakdown, five tools by depth.</p><h4 class="heading" style="text-align:left;" id="same-model-faster-and-pricier-how-f"><a class="link" href="https://www.claudecodecamp.com/p/how-claude-code-fast-mode-works?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=someone-put-ads-in-the-claude-code-spinner" target="_blank" rel="noopener noreferrer nofollow">Same model, faster and pricier: how /fast works</a></h4><p class="paragraph" style="text-align:left;">Anthropic&#39;s /fast toggle runs the same model up to 2.5x faster for 2 to 6x the price per token. Same model, so why both? Normally you&#39;re sharing a GPU batch with a bunch of other requests, which is cheap but slower. </p><p class="paragraph" style="text-align:left;">Fast mode gives you a near-empty batch, so you go quicker but pay for the empty seats. It only pays off on long output like big refactors, not short turns. And watch the cache: flipping /fast mid-session re-bills your whole conversation at the fast rate, $3.15 for one keystroke on a 260K session, so flip it at the start, not at turn 80.</p><p class="paragraph" style="text-align:left;">/fast is currently in research preview.</p><h3 class="heading" style="text-align:left;" id="memes">Memes</h3><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/debf37f3-64df-462d-b14c-4619dada8ef1/did-they-had-to-give-us-a-taste-v0-f8radbq16i7h1.jpeg?t=1781754179"/></div><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a85a0c2f-9ca8-48a5-971a-11e0406d9c2c/image.png?t=1781753158"/></div><p class="paragraph" style="text-align:left;">That&#39;s the week.</p><p class="paragraph" style="text-align:left;">Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=8c09daa4-f548-47ce-85ff-4c874e7e3603&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>How to Use Claude Code and Still Understand Your Own Code</title>
  <description>Weekly lessons on shipping faster with AI</description>
  <link>https://www.claudecodecamp.com/p/how-to-use-claude-code-and-still-understand-your-own-code</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/how-to-use-claude-code-and-still-understand-your-own-code</guid>
  <pubDate>Wed, 17 Jun 2026 15:00:00 +0000</pubDate>
  <atom:published>2026-06-17T15:00:00Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">I ship code I haven&#39;t fully read. I look at the diff, it looks right, the tests pass, I move on. A few weeks of that, and I own code I can&#39;t explain.</p><p class="paragraph" style="text-align:left;">This got worse as the tools got better. Back when Claude was not as good, I read every line, because I had to fix what it broke. Now it&#39;s good. So reading feels optional. And optional things get skipped.</p><p class="paragraph" style="text-align:left;">Claude is great at writing code fast. Understanding the code is our responsibility.<br><br>So I tried a bunch of ways to use Claude to help me understand the code it wrote.<br><br>TL;DR: There&#39;s no best approach. It depends on the code. Some you should skim and forget. Some you should sit with. The trick is matching how deep you go to how much the code matters.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6dbba58a-3e42-42e3-aa66-edc5342f6a74/when-to-use.gif?t=1781639763"/></div><hr class="content_break"><h2 class="heading" style="text-align:left;" id="the-code-i-tested-on"><b>The code I tested on</b></h2><p class="paragraph" style="text-align:left;">I had Claude build one real thing. A <code>retryWithBackoff</code> helper for an HTTP client. It&#39;s 153 lines. It type-checks. It passes nine tests.</p><p class="paragraph" style="text-align:left;">It&#39;s the kind of code with a dozen small decisions hidden in it. Like these:</p><ul><li><p class="paragraph" style="text-align:left;">It retries on 429 and 5xx, and on network errors. Not on other 4xx. Not on a cancel.</p></li><li><p class="paragraph" style="text-align:left;">It waits a random amount before each try, and the wait grows each time.</p></li><li><p class="paragraph" style="text-align:left;">If the server says &quot;wait this long,&quot; it obeys that instead.</p></li><li><p class="paragraph" style="text-align:left;">It gives up after 30 seconds of real time, not after a set number of tries.</p></li><li><p class="paragraph" style="text-align:left;">It won&#39;t retry a POST unless you ask it to. Retry a POST and you might charge a card twice.</p></li></ul><p class="paragraph" style="text-align:left;">That&#39;s nine real decisions. Exactly the kind of code I&#39;d skim and accept. I tried the tools below on it.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="small-stuff-just-ask"><b>Small stuff: just ask</b></h2><p class="paragraph" style="text-align:left;">For a script you&#39;ll delete next week, asking Claude is enough. &quot;What does this do?&quot; You get one clean paragraph. Read it, move on.</p><p class="paragraph" style="text-align:left;">You don&#39;t need to drill yourself on code that won&#39;t outlive the week. Most of the time, this is the right call. The mistake isn&#39;t using the quick option. It&#39;s using the quick option on code that deserves more.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="code-youll-keep-make-it-quiz-you"><b>Code you&#39;ll keep: make it quiz you</b></h2><p class="paragraph" style="text-align:left;">When you&#39;ll come back to this code, reading the explanation isn&#39;t enough. You&#39;ll nod, then forget it by the time it breaks. So flip it. Have Claude ask instead of tell.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://github.com/pchalasani/claude-code-tools?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-to-use-claude-code-and-still-understand-your-own-code" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">Prasad Chalasani&#39;s </a><code>socratic-quiz</code> asks one question at a time. It gets harder or easier based on how you do. And it never just hands you the answer.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://x.com/trq212/status/2062217018187923783?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-to-use-claude-code-and-still-understand-your-own-code" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">Suzanne&#39;s prompt</a> writes a checklist to a file as it goes, then quizzes you with a real popup. Here&#39;s one question it wrote about my code:</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">Why retry GET / PUT / DELETE by default, but not POST?</p><ul><li><p class="paragraph" style="text-align:left;">A) POST requests are slower, so retrying wastes time</p></li><li><p class="paragraph" style="text-align:left;">B) POST bodies can&#39;t be re-read after the first send</p></li><li><p class="paragraph" style="text-align:left;">C) A retried POST might double-apply a side effect — e.g. charge a card or create two records — because POST isn&#39;t idempotent</p></li><li><p class="paragraph" style="text-align:left;">D) The HTTP spec forbids retrying POST</p></li></ul><figcaption class="blockquote__byline"></figcaption></blockquote></div><p class="paragraph" style="text-align:left;">The answer is C. You don&#39;t see it until you pick. That&#39;s the whole trick. You have to commit before you find out you were wrong.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="code-youll-own-make-the-change-your"><b>Code you&#39;ll own: make the change yourself</b></h2><p class="paragraph" style="text-align:left;">For code you&#39;ll own for months, go one step further. Don&#39;t just answer questions about it. Change it.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://pub.aimind.so/how-i-use-claude-code-without-losing-my-engineering-intuition-2fc9152d90ed?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-to-use-claude-code-and-still-understand-your-own-code" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">Tutor Mode</a> has Claude ask, you answer from memory, then you make a small real edit. On my code, it gave me a task. Add <code>408</code> to the codes it retries, write the test, make it pass.</p><p class="paragraph" style="text-align:left;">You&#39;re done when you can do it without Claude. If you don&#39;t know where the retry rule lives, the code won&#39;t build and the test stays red. You can&#39;t fake that.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ffcb0f9a-1e42-4989-a71c-bb7e05661381/teacher-vs-naive.gif?t=1781639803"/></div><p class="paragraph" style="text-align:left;">All three of these do the same thing. They make you say the answer, not read it. That&#39;s the oldest trick in learning. When you pull something out of your own head, it sticks. When you just read it, it doesn&#39;t. </p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="learning-something-new-build-it-by-"><b>Learning something new: build it by hand</b></h2><p class="paragraph" style="text-align:left;">The tools above help you understand code that&#39;s already there. This one is different. If you&#39;re picking up a new topic, or you want the basics to stick, build it yourself.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://github.com/devenjarvis/lathe?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-to-use-claude-code-and-still-understand-your-own-code" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">Lathe</a> writes a hands-on lesson, then you type the code by hand. Deven Jarvis, who built it, put the problem plainly: LLMs &quot;do most of the work for you, and with that work gone they also take away the part that helped me learn.&quot; The tagline is &quot;an experiment in using LLMs to teach you, rather than think for you.&quot;</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://github.com/mattpocock/skills?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-to-use-claude-code-and-still-understand-your-own-code" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">Matt Pocock&#39;s </a><code>teach</code><a class="link" href="https://github.com/mattpocock/skills?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=how-to-use-claude-code-and-still-understand-your-own-code" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff"> skill</a> is built for the long game. Small lessons, spaced out, with notes that carry from one session to the next. As it says, covering something isn&#39;t the same as learning it.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="a-simple-way-to-choose-what-does-it"><b>A simple way to choose: what does it leave behind?</b></h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d6600a02-f3c5-447d-adf1-02b7532ab867/mastery-gate.gif?t=1781639816"/></div><p class="paragraph" style="text-align:left;">The deeper you need to go, the more you want the session to leave a trace.</p><p class="paragraph" style="text-align:left;">Asking Claude leaves nothing. A quiz leaves a file or a short summary. Tutor Mode leaves a passing test. Lathe leaves the code you wrote.</p><p class="paragraph" style="text-align:left;">Match that to how much you&#39;ll need to remember.</p><hr class="content_break"><p class="paragraph" style="text-align:left;">There&#39;s no best tool here. There&#39;s a right depth for the task. Let Claude write the code, because that&#39;s what it&#39;s good at. Then decide how much you need to understand it, and pick the tool for that.</p><p class="paragraph" style="text-align:left;">The one thing that doesn&#39;t change: understanding what you ship is still your job. And you&#39;re the only one who can choose to do it.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=dbf13bc4-4a76-430b-86ef-231d5bbb24e8&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>How Claude Code Fast Mode Works</title>
  <description>Why it&#39;s 2.5× faster, why it costs 2–6× more, and when to turn it on.</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d6cd07ea-bbd1-472a-bf46-6e36a6fc677b/fast-mode-thumbnail.png" length="19181" type="image/png"/>
  <link>https://www.claudecodecamp.com/p/how-claude-code-fast-mode-works</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/how-claude-code-fast-mode-works</guid>
  <pubDate>Tue, 16 Jun 2026 14:45:00 +0000</pubDate>
  <atom:published>2026-06-16T14:45:00Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><h1 class="heading" style="text-align:left;" id="how-claude-code-fast-mode-works"><b>How Claude Code Fast Mode Works</b></h1><p class="paragraph" style="text-align:left;"><i>Toggle </i><code>/fast</code><i> and Claude answers about 2.5× quicker — for 2 to 6× the price. Same model, same answer. Here&#39;s the mechanism, and when it&#39;s worth turning on.</i></p><p class="paragraph" style="text-align:left;">Fast mode isn&#39;t a smaller or dumber model. Anthropic is explicit: &quot;Fast mode is not a different model.&quot; Same weights, same intelligence, the same answer it would have given anyway. The only thing that changes is how quickly the tokens come out — and what you pay for them.</p><p class="paragraph" style="text-align:left;">To see why those two move together, you need to know how Claude answers a question at all.</p><h2 class="heading" style="text-align:left;" id="two-phases-prefill-and-decode"><b>Two phases: prefill and decode</b></h2><p class="paragraph" style="text-align:left;">Every response has two phases with completely different physics.</p><p class="paragraph" style="text-align:left;"><b>Prefill</b> reads everything you sent — your message, the files, the whole conversation — in one forward pass. It&#39;s quick, and it scales well because all your input tokens go through in parallel.</p><p class="paragraph" style="text-align:left;"><b>Decode</b> generates the answer one token at a time, each token conditioned on every token before it. It&#39;s sequential, and it&#39;s where nearly all the wall-clock goes.</p><h2 class="heading" style="text-align:left;" id="why-decode-is-the-slow-part"><b>Why decode is the slow part</b></h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/0b77c74e-e9c0-4aa0-86cd-6ba003332778/prefill-decode.gif?t=1781584602"/></div><p class="paragraph" style="text-align:left;">Each decode step streams the model&#39;s entire weight set out of GPU memory (HBM) to compute a single token, then does it again for the next. For a frontier model that&#39;s hundreds of gigabytes moved per token.</p><p class="paragraph" style="text-align:left;">The key fact: decode is memory-bandwidth-bound, not compute-bound. The arithmetic for one token is trivial next to the cost of moving the weights, so the GPU&#39;s compute units sit mostly idle, stalled on memory. Prefill is the opposite — it pushes all your input tokens through one weight load in parallel, saturating the FLOPs.</p><p class="paragraph" style="text-align:left;">That idle compute during decode is the slack every inference provider is built to exploit.</p><h2 class="heading" style="text-align:left;" id="the-fix-batching"><b>The fix: batching</b></h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/bf9138ad-753e-46cb-8726-216ad8576308/batching.gif?t=1781584613"/></div><p class="paragraph" style="text-align:left;">One sequence can&#39;t keep the GPU busy during decode. So providers run many users&#39; sequences through the same forward pass — load the weights once, apply them to dozens of sequences at the same time. The expensive part, moving the weights, gets amortized across the whole batch.</p><p class="paragraph" style="text-align:left;">That&#39;s the entire economics of serving a frontier model. Bigger batch means more tokens per weight-load, which means higher throughput and lower cost per token. It&#39;s why Opus is affordable at all.</p><p class="paragraph" style="text-align:left;">But batching trades latency for throughput. Your tokens come out at the batch&#39;s shared cadence, and as the batch grows, each step has more sequences to attend over and more memory to move — so any one user&#39;s tokens decode slower. Standard Opus runs large batches: cheap, high-throughput, slower for you.</p><h2 class="heading" style="text-align:left;" id="what-fast-mode-does-differently"><b>What fast mode does differently</b></h2><p class="paragraph" style="text-align:left;">Fast mode puts you in a much smaller batch — likely on reserved capacity. Fewer sequences share each forward pass, so your tokens decode faster: higher output tokens per second (OTPS), up to 2.5×.</p><p class="paragraph" style="text-align:left;">The cost is the same lever from the other side. That per-step weight-load now amortizes across a handful of sequences instead of a full batch, so your share of each GPU-second jumps. You&#39;re not buying more work — the tokens are identical to standard Opus — you&#39;re buying a less-shared slice of the GPU. That&#39;s the premium: 2× on Opus 4.8, 6× on 4.7.</p><p class="paragraph" style="text-align:left;">(The 2.5× is Anthropic&#39;s stated number, not independently measured. Smaller batch size is the most likely mechanism given the OTPS-up / TTFT-flat behavior; Anthropic hasn&#39;t confirmed internals.)</p><h2 class="heading" style="text-align:left;" id="the-catch-it-finishes-faster-it-doe"><b>The catch: it finishes faster, it doesn&#39;t start faster</b></h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/3b226470-aa98-4e3c-8e02-097f40c7c377/race.gif?t=1781584626"/></div><p class="paragraph" style="text-align:left;">Fast mode speeds up decode. It doesn&#39;t touch prefill — so the wait before the first token (TTFT) is unchanged. Shrink the batch and decode speeds up; time-to-first-token stays put.</p><p class="paragraph" style="text-align:left;">Which means fast mode only helps when there&#39;s a lot to write. On a short reply, both speeds finish almost together — you paid 2–6× to save a blink. On a long generation, fast pulls clear. The longer the answer, the more the premium buys you.</p><h2 class="heading" style="text-align:left;" id="when-to-use-it"><b>When to use it</b></h2><p class="paragraph" style="text-align:left;"><b>Turn it ON for:</b></p><ul><li><p class="paragraph" style="text-align:left;">Long generations where decode dominates — refactors, scaffolding, anything that emits thousands of tokens</p></li><li><p class="paragraph" style="text-align:left;">Hands-on work where you&#39;re waiting on Claude and your time is the expensive part</p></li><li><p class="paragraph" style="text-align:left;">Time-boxed work where finishing sooner is worth real money</p></li></ul><p class="paragraph" style="text-align:left;"><b>Leave it OFF for:</b></p><ul><li><p class="paragraph" style="text-align:left;">Short turns — questions, confirmations, one-liners (TTFT-bound; fast barely helps)</p></li><li><p class="paragraph" style="text-align:left;">Background or autonomous runs nobody is watching</p></li><li><p class="paragraph" style="text-align:left;">Batch jobs and CI (it&#39;s not available there anyway)</p></li></ul><h2 class="heading" style="text-align:left;" id="the-one-trap-dont-flip-it-on-midses"><b>The one trap: don&#39;t flip it on mid-session</b></h2><p class="paragraph" style="text-align:left;">Fast and standard keep separate prompt caches. The moment you switch, your warm standard cache is useless to the fast path — the entire conversation prefix gets re-processed as a cache write at the fast rate, before Claude writes a token.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/94a0d89e-ff13-4f6f-8c94-e750ce17c7e0/rebill.gif?t=1781584862"/></div><p class="paragraph" style="text-align:left;">The deeper into a session you flip it, the bigger the one-time hit:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Context when you toggle</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Re-bill (Opus 4.8)</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Re-bill (Opus 4.7)</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">50K tokens</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.62</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$1.88</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">100K tokens</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$1.25</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$3.75</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">200K tokens</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$2.50</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$7.50</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">260K (measured)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$3.26</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$9.77</p></td></tr></table></div><p class="paragraph" style="text-align:left;">I measured the 260K row live: flipping <code>/fast</code> on a 260K-token session re-billed 260,591 tokens as a fast-rate cache write — $3.15 of one-time premium before any useful output.</p><p class="paragraph" style="text-align:left;">The fix: turn fast mode on at the <i>start</i> of a session, not at turn 80. Toggling off and back on later doesn&#39;t repeat the charge — the fast cache is already built.</p><h2 class="heading" style="text-align:left;" id="a-few-edges"><b>A few edges</b></h2><ul><li><p class="paragraph" style="text-align:left;">On a subscription, fast mode bills from usage credits only, at the fast rate from the first token.</p></li><li><p class="paragraph" style="text-align:left;">Hit the fast rate limit and it quietly drops back to standard speed and price.</p></li><li><p class="paragraph" style="text-align:left;">Fast mode is a research preview; pricing and availability may change.</p></li></ul><hr class="content_break"><p class="paragraph" style="text-align:left;">That&#39;s the deal: fast mode is the same model on a less-shared slice of GPU. Faster and pricier are one fact, not two.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=f26f7337-1459-47e3-bd28-8500c6e6d7fe&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Fable 5 is offline. The government pulled it.</title>
  <description>Here&#39;s what we know.</description>
  <link>https://www.claudecodecamp.com/p/fable-5-is-offline-the-government-pulled-it</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/fable-5-is-offline-the-government-pulled-it</guid>
  <pubDate>Mon, 15 Jun 2026 17:36:23 +0000</pubDate>
  <atom:published>2026-06-15T17:36:23Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Quick emergency newsletter for Fable 5.</p><p class="paragraph" style="text-align:left;">Last week I told you to use Fable 5 before it left the Pro/Max plan on June 22. Unfortunately, the US government shut it down on Friday, three days after launch.</p><h2 class="heading" style="text-align:left;" id="what-happened"><b>What happened</b></h2><p class="paragraph" style="text-align:left;">Friday at 5:21pm ET, Commerce Secretary Howard Lutnick sent Anthropic an <a class="link" href="https://www.anthropic.com/news/fable-mythos-access?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=fable-5-is-offline-the-government-pulled-it" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">export control order</a>: cut off Fable 5 and Mythos 5 for any foreign national. That includes foreign nationals inside the US, and Anthropic&#39;s own non-citizen staff. Anthropic can&#39;t tell those users apart in real time, so it shut both models off worldwide and had AWS pull them too.</p><h2 class="heading" style="text-align:left;" id="why-they-pulled-it"><b>Why they pulled it</b></h2><p class="paragraph" style="text-align:left;">Fable ships with safeguards that block it from finding and exploiting software vulnerabilities. The government says someone found a jailbreak that gets around them.</p><p class="paragraph" style="text-align:left;">Anthropic&#39;s version is smaller. It says it only got &quot;verbal evidence of a potential narrow, non-universal jailbreak,&quot; with no written details. The bypass, in its words, is &quot;asking the model to read a specific codebase and fix any software flaws.&quot; When Anthropic tested it, the model surfaced a few minor, already-known bugs that it says other public models, including GPT-5.5, find on their own.</p><p class="paragraph" style="text-align:left;">Anthropic is complying but disagrees. It says recalling a model over a jailbreak this narrow, if it became the standard, &quot;would essentially halt all new model deployments for all frontier model providers.&quot;</p><h2 class="heading" style="text-align:left;" id="my-take"><b>My take</b></h2><p class="paragraph" style="text-align:left;">This might end up being great marketing for Anthropic. &quot;Our model is so good the government made us turn it off&quot; sells itself.</p><p class="paragraph" style="text-align:left;">But it sets a precedent, and people will take note. So will companies. A frontier model got pulled three days after launch, and the lesson is the boring one: don&#39;t put all your eggs in one model that the government can switch off overnight.</p><p class="paragraph" style="text-align:left;">If you build agents, always test with multiple models. A single pulled model shouldn&#39;t be able to take your whole workflow down with it. I also think companies will explore more local and open-weight models as well.</p><h2 class="heading" style="text-align:left;" id="whats-next"><b>What&#39;s next</b></h2><p class="paragraph" style="text-align:left;">This is moving fast, so it&#39;s a guess. Reuters says Anthropic and US officials are <a class="link" href="https://www.reuters.com/technology/anthropic-us-officials-meeting-monday-resolve-dispute-over-export-curbs-2026-06-15/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=fable-5-is-offline-the-government-pulled-it" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">meeting today</a>, and an official said access could come back. Anthropic keeps calling the whole thing a &quot;misunderstanding.&quot;</p><p class="paragraph" style="text-align:left;">The messy part is the foreign-national rule. Anthropic may have to check your citizenship before handing you Fable. That&#39;d be a first for a consumer model.</p><p class="paragraph" style="text-align:left;">I hope by the time the regular edition goes out later this week, we will have Fable back on.</p><p class="paragraph" style="text-align:left;">Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=c93d0f0b-ddb5-4b2a-9c27-58590531adbc&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Two weeks with Claude Fable 5</title>
  <description>and what is Loop Engineering?</description>
  <link>https://www.claudecodecamp.com/p/two-weeks-with-claude-fable-5</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/two-weeks-with-claude-fable-5</guid>
  <pubDate>Fri, 12 Jun 2026 14:44:00 +0000</pubDate>
  <atom:published>2026-06-12T14:44:00Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Hi friends,</p><p class="paragraph" style="text-align:left;">This one&#39;s a day late, Friday instead of the usual Thursday. Anthropic launched Claude Fable 5 on Tuesday, and I&#39;ve spent the last few days running it on real work so I could share my thoughts.</p><h2 class="heading" style="text-align:left;" id="my-take-on-fable-5"><b>My take on Fable 5</b></h2><p class="paragraph" style="text-align:left;">It&#39;s very good at the long and complex tasks. I pointed it at a migration I&#39;d been putting off for weeks, the kind that touches 30 files and it just worked through the whole thing.</p><p class="paragraph" style="text-align:left;">Two things to watch. The first is cost. It&#39;s $10 per million input tokens and $50 per million out (~2x Opus). And you feel it fast. So it&#39;s not a daily driver. You need to choose the kind of task it excels at. </p><p class="paragraph" style="text-align:left;">The second is the deadline. Fable&#39;s only on the Pro, Max, Team, and Enterprise plans <a class="link" href="https://www.anthropic.com/news/claude-fable-5-mythos-5?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=two-weeks-with-claude-fable-5" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">through June 22</a>. After that have to pay API price for it.<br><br>So how I am thinking about Fable: Don&#39;t rebuild your whole setup around a model that’s temporary. I am using it for the next 2 weeks to get a sense of the what the frontier looks like but not getting my hopes too high.</p><h2 class="heading" style="text-align:left;" id="and-everyone-started-saying-loop-en"><b>And everyone started saying &quot;loop engineering&quot;</b></h2><p class="paragraph" style="text-align:left;">The other big thing this week wasn&#39;t a model, it was a phrase. It was all over X. This is the next phrase after <span style="background-color:#ffffff;">prompt engineering, context engineering and harness engineering. </span><br><br><span style="background-color:#ffffff;">T</span>he short version: instead of prompting Claude a step at a time, you give it a goal and a way to check its own work. Then let it run on its own, write, test, read the error, fix, and go again until the check passes. Boris Cherny <a class="link" href="https://www.youtube.com/watch?v=We7BZVKbCVw&utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=two-weeks-with-claude-fable-5" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">says he barely prompts it directly anymore</a>, his whole job now is writing the loops.</p><p class="paragraph" style="text-align:left;">Under the hood this isn&#39;t new, and it&#39;s the part to be careful with. The bare-bones version even has a name, the &quot;ralph loop,&quot; from <a class="link" href="https://ghuntley.com/ralph/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=two-weeks-with-claude-fable-5" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">Geoffrey Huntley</a>: you run the agent in a <code>while true</code> loop on the same prompt and let the work pile up on disk between runs.</p><p class="paragraph" style="text-align:left;">Before you point one at your repo, know two things. It only works when the task is well-defined and the agent has a real way to check itself. And it burns a lot of tokens, because it keeps rerunning until that check goes green. Great for a boring, well-specified grind, risky and expensive for anything fuzzy. If you want to go deeper, <a class="link" href="https://addyosmani.com/blog/loop-engineering/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=two-weeks-with-claude-fable-5" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">Addy Osmani&#39;s writeup</a> is the clearest one I&#39;ve found.</p><p class="paragraph" style="text-align:left;">I put these two together for a reason. Fable makes the agent good enough that you want to step back from the code, and a loop is how you actually step back, as long as the task is tight enough to trust it. The Claude Code team <a class="link" href="https://x.com/ClaudeDevs/status/2064399512664526853?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=two-weeks-with-claude-fable-5" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">summed it up</a>: we used to verify that Claude did the work right, now we verify that it&#39;s doing the right work.</p><h2 class="heading" style="text-align:left;" id="the-memes"><b>The memes</b></h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/816a55a7-91ae-4b64-a9fa-b09190f5e15b/CleanShot_2026-06-11_at_21.18.48_2x.png?t=1781237940"/></div><p class="paragraph" style="text-align:left;">That&#39;s the week. I would love to know how your experience with Fable has been so far. Hit reply and let me know!</p><p class="paragraph" style="text-align:left;">Abhishek</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=ec841c55-cd17-4b8a-b573-61adaf4d5e3f&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Images cost 3x more tokens in Claude Opus 4.7</title>
  <description>Here&#39;s what image tokenization is, what changed in 4.7, and when it&#39;s actually worth paying for</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/4b483fce-59bc-4236-9403-d7dda0ed69a5/images-4-7-thumbnail.png" length="26917" type="image/png"/>
  <link>https://www.claudecodecamp.com/p/images-cost-3x-more-tokens-in-claude-opus-4-7</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/images-cost-3x-more-tokens-in-claude-opus-4-7</guid>
  <pubDate>Mon, 20 Apr 2026 03:59:37 +0000</pubDate>
  <atom:published>2026-04-20T03:59:37Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Claude Opus 4.7 reads images up to 2576 pixels on the long edge. Earlier models capped at 1568. A reader asked what image tokenization means and whether the higher ceiling is worth it. Short answer: it depends on what you&#39;re doing with the image. The rest of this post is how to tell.</p><h2 class="heading" style="text-align:left;" id="how-image-tokenization-works">How image tokenization works</h2><p class="paragraph" style="text-align:left;">When you send Claude an image, the API doesn&#39;t read pixels directly. It converts the image into tokens — the same unit of measurement Claude uses for text and bills you for them.</p><p class="paragraph" style="text-align:left;">The <a class="link" href="https://docs.claude.com/en/docs/build-with-claude/vision?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=images-cost-3x-more-tokens-in-claude-opus-4-7" target="_blank" rel="noopener noreferrer nofollow">public formula</a> is simple:</p><p class="paragraph" style="text-align:left;"><i>tokens ≈ (width × height) / 750</i></p><p class="paragraph" style="text-align:left;">A 1000×1000 image is ~1,334 tokens. A 2000×2000 image is ~5,334 tokens. Pay-per-pixel, roughly.</p><p class="paragraph" style="text-align:left;">Two details matter.</p><p class="paragraph" style="text-align:left;">First, every Claude model has a max image resolution. Before 4.7, that limit was 1568 pixels on the long edge. Opus 4.7 raised it to 2576 pixels.</p><p class="paragraph" style="text-align:left;">Second, if your image is larger than the max, the API downscales it before counting tokens. From Anthropic&#39;s vision docs:</p><p class="paragraph" style="text-align:left;"><i>If your image&#39;s long edge is more than 1568 pixels, or your image is more than ~1,600 tokens, it is first scaled down, preserving aspect ratio.</i></p><p class="paragraph" style="text-align:left;">This means on Claude 4.6 and earlier, every image above ~1.15 megapixels arrived at the model&#39;s vision encoder at the same reduced resolution, no matter how big you uploaded it. The bill capped around 1,560 tokens per image. Upload a 6MP screenshot, get billed for the 1.15MP version.</p><p class="paragraph" style="text-align:left;">I measured this directly. Four images, two long-edge targets (1568 and 2576), both models, sixteen <code>count_tokens</code> calls. The 4.6 column was flat:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Image</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">4.6 at 1568px</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">4.6 at 2576px</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Code/UI screenshot</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,242</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,242</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Dense UI dashboard</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,558</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,558</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Technical diagram</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,560</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,560</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Unsplash photo</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,561</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">1,561</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Same image, twice the pixels on the long edge, four times the pixel count, identical token count. The downscale is doing exactly what the docs say.</p><h2 class="heading" style="text-align:left;" id="what-changed-in-opus-47">What changed in Opus 4.7</h2><p class="paragraph" style="text-align:left;">Three things.</p><p class="paragraph" style="text-align:left;">First, the max resolution went from 1568 to 2576 pixels on the long edge. That&#39;s about 2.6x the pixel count at the new ceiling.</p><p class="paragraph" style="text-align:left;">Second, coordinate mapping is now 1:1 with actual pixels. If you ask 4.7 to point at something in an image, the coordinates it returns are the coordinates in your original image — no scale-factor math needed. This is new in 4.7 and genuinely useful for computer-use agents that need pixel-accurate clicks.</p><p class="paragraph" style="text-align:left;">Third, the vision benchmarks jumped. Anthropic&#39;s release notes report ScreenSpot Pro moving from ~70 to 87.6%, visual reasoning 69.1 → 82.1%, and document-analysis scores climbing across the board. The model actually sees better, not just bigger.</p><p class="paragraph" style="text-align:left;">The tokenization approach itself didn&#39;t change. Same <code>(w × h) / 750</code> formula, same patch-based vision encoder (as best as I can tell from the outside). What changed is the cap on how many pixels it gets to work with.</p><h2 class="heading" style="text-align:left;" id="the-cost">The cost</h2><p class="paragraph" style="text-align:left;">Removing the cap means a full-resolution image at 2576px on the long edge now bills for the pixels you send, not the 1.15MP version of them. Here&#39;s what that looks like across the same four images:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Image</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">4.6 tokens</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">4.7 tokens</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Ratio</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Code/UI screenshot</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1,242</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">3,234</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">2.60x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Dense UI dashboard</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1,558</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">4,739</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">3.04x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Technical diagram</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1,560</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">4,766</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">3.06x</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Unsplash photo</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1,561</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">4,745</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">3.04x</p></td></tr></table></div><p class="paragraph" style="text-align:left;">At Opus input pricing of $15 per million tokens, a typical screenshot jumps from $0.023 to $0.071. A session with 50 images goes from $1.17 to $3.55 in image input alone. Ship vision at scale and the bill has roughly tripled.</p><p class="paragraph" style="text-align:left;">This lands in a moment where token burn is already the dominant Claude Code conversation. Max 20x users burning through monthly caps in days, prompt-cache regressions, effort-level defaults that burn tokens through retry loops. If you&#39;re already watching your bills, image costs are another thing to track.</p><h2 class="heading" style="text-align:left;" id="does-the-higher-resolution-actually">Does the higher resolution actually help?</h2><p class="paragraph" style="text-align:left;">The new ceiling costs more. The question is whether it does more.</p><p class="paragraph" style="text-align:left;">I ran two capability tests.</p><p class="paragraph" style="text-align:left;">First, text extraction on a dense analytics dashboard — 42 distinct metrics, labels, percentages, micro-copy, and a disclaimer footer. Two runs per resolution.</p><ul><li><p class="paragraph" style="text-align:left;">1568px (2,724 input tokens): 41 unique items</p></li><li><p class="paragraph" style="text-align:left;">2576px (4,817 input tokens): 42 unique items</p></li><li><p class="paragraph" style="text-align:left;">Intersection: 41 items, identical</p></li></ul><p class="paragraph" style="text-align:left;">The one item only-at-2576 was &quot;hi abhishek 🙂&quot; — a greeting the 1568 pass had merged into an adjacent block. Not fine print the lower resolution failed to read.</p><p class="paragraph" style="text-align:left;">That&#39;s one image. Fair critique: maybe the dashboard didn&#39;t have text small enough to break 1568. So I built a second test.</p><p class="paragraph" style="text-align:left;">A 2576×1800 canvas with 12 target strings at six font sizes (100, 48, 24, 16, 12, 8 px) and two content types: English words (&quot;ZIRCONIUM&quot;, &quot;BASALT&quot;) and random codes (&quot;9K7-QZ4&quot;, &quot;D7F-2LB&quot;). The random codes matter — a language model can reconstruct &quot;BASALT&quot; from partial visual signal using priors, but it can&#39;t do that for &quot;D7F-2LB.&quot; Downscale to 1568 long edge and 8px source text renders at ~4.9 effective pixels, which is where OCR should break.</p><p class="paragraph" style="text-align:left;">Across 2 resolutions × 2 runs × 12 cells = 48 extractions:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Font size at source</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">1568px correct</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">2576px correct</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">100px (word + code)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">48px (word + code)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">24px (word + code)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">16px (word + code)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">12px (word + code)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">8px (word + code)</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">2/2</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Every cell passed. Even 8px random codes read clean after the 1568 downscale. For OCR-flavored tasks — reading text off images — 1568px saturates. The extra pixels don&#39;t help.</p><p class="paragraph" style="text-align:left;">That doesn&#39;t mean they&#39;re not helping somewhere.</p><h2 class="heading" style="text-align:left;" id="where-the-extra-pixels-matter">Where the extra pixels matter</h2><p class="paragraph" style="text-align:left;">Anthropic&#39;s <a class="link" href="https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=images-cost-3x-more-tokens-in-claude-opus-4-7" target="_blank" rel="noopener noreferrer nofollow">4.7 release notes</a> name three workloads for the high-resolution support: <i>computer use, screenshot/artifact/document understanding,</i> and the new 1:1 pixel-to-coordinate mapping. Those aren&#39;t marketing flourishes — they&#39;re the workloads where the extra pixels pay off.</p><p class="paragraph" style="text-align:left;"><b>Computer-use agents</b> navigate live interfaces through screenshots. They need to click a specific button, drag a specific element, read a specific timestamp in the corner of a tab. The 1:1 pixel mapping means an agent can say &quot;click (847, 312)&quot; and the coordinate is in the actual image — no scale math. Combined with the higher resolution, agents reading dense UIs can now see individual pixels that a 1568px downscale blurs together. This is a real capability gain for any agent workflow that operates through a browser or an app.</p><p class="paragraph" style="text-align:left;"><b>Claude Design</b>, <a class="link" href="https://techcrunch.com/2026/04/17/anthropic-launches-claude-design-a-new-product-for-creating-quick-visuals/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=images-cost-3x-more-tokens-in-claude-opus-4-7" target="_blank" rel="noopener noreferrer nofollow">which Anthropic shipped the morning after 4.7</a>, generates prototypes, slides, and UI mockups from uploaded images, documents, and codebases. Its web capture tool grabs UI elements from live sites so generated prototypes match the real product. It applies a team&#39;s design system by reading design files and code. That workload needs pixel-level typography fidelity - the difference between 14px and 13px body text, kerning, grid alignment which a 1568 downscale does not preserve on a 4K design reference.</p><p class="paragraph" style="text-align:left;"><b>Document analysis</b> covers dense PDFs, multi-column reports, technical drawings with annotation layers, and charts with small labels. Anthropic&#39;s OfficeQA Pro score jumping from 57.1% to 80.6% suggests the resolution boost is doing real work on paper-style documents.</p><p class="paragraph" style="text-align:left;">None of those three workloads is &quot;sending a screenshot to a coding agent.&quot; And that&#39;s the practical split.</p><h2 class="heading" style="text-align:left;" id="what-to-do">What to do</h2><p class="paragraph" style="text-align:left;">If you&#39;re building computer-use agents, using Claude Design, or doing document analysis on dense PDFs — the 2576px ceiling is a real gain. Pay the bill.</p><p class="paragraph" style="text-align:left;">If you&#39;re sending dashboards, code, terminal output, or web pages to a coding agent for Q&A or summarization — downscale to 1568 long edge first. You&#39;ll pay half the input tokens per image, and across every OCR test I ran, the model extracted the same content either way.</p><p class="paragraph" style="text-align:left;">In Python:</p><div class="codeblock"><pre><code>from PIL import Image

img = Image.open(&quot;screenshot.png&quot;)
img.thumbnail((1568, 1568), Image.LANCZOS)
img.save(&quot;screenshot-1568.png&quot;)</code></pre></div><p class="paragraph" style="text-align:left;">Session replay on 8,373 of my own <code>~/.claude/projects/</code> sessions says 3% of eligible coding sessions include images at all. Most Claude Code users aren&#39;t feeling this yet. It lands immediately on anyone building visual workflows on the API.</p><h2 class="heading" style="text-align:left;" id="caveats">Caveats</h2><p class="paragraph" style="text-align:left;">The capability tests cover OCR — reading text off images. They don&#39;t cover design-fidelity tasks: kerning, pixel-grid alignment, color-accuracy diffs, sub-grid iconography. Those are where 2576px plausibly pays off, and the post doesn&#39;t test them.</p><p class="paragraph" style="text-align:left;">The public <code>(w × h) / 750</code> formula holds at 1568px (drift under 4%) but breaks at 2576px, overshooting by up to 36% on near-square images. A 4:1 patch at matched pixel count bills 20% fewer tokens than a square patch. Numbers in the cost tables are measured, not predicted.</p><p class="paragraph" style="text-align:left;">Token counts come from <code>count_tokens</code>, not billed inference. Capability probes are billed inference at default settings. Scripts and data are in the repo.</p><h2 class="heading" style="text-align:left;" id="the-short-version">The short version</h2><p class="paragraph" style="text-align:left;">Claude 4.6 downscaled every image above 1.15MP to fit a ~1,560-token budget. Claude 4.7 raises that ceiling and charges for the pixels you send — roughly 3x more per image at max resolution. The extra pixels matter for computer-use agents navigating UIs by screenshot, for Claude Design reading design references, and for document analysis on dense PDFs. They don&#39;t matter for OCR on dashboards, code, or terminal output — 1568 is already plenty.</p><p class="paragraph" style="text-align:left;">Figure out which workload you&#39;re in, and send images at the resolution that matches.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=cda14da1-cb50-4ced-a88c-050adf02235d&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>I Measured Claude 4.7&#39;s New Tokenizer. Here&#39;s What It Costs You.</title>
  <description>The docs said 1.0–1.35x more tokens. On real content, I measured 1.47x.</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e5042662-e001-4de8-8c26-224b260a6303/thumbnail.png" length="23195" type="image/png"/>
  <link>https://www.claudecodecamp.com/p/i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you</guid>
  <pubDate>Thu, 16 Apr 2026 21:36:51 +0000</pubDate>
  <atom:published>2026-04-16T21:36:51Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Anthropic&#39;s Claude Opus 4.7 migration guide says the new tokenizer uses &quot;roughly 1.0 to 1.35x as many tokens&quot; as 4.6. I measured 1.47x on technical docs. 1.45x on a real CLAUDE.md file. The top of Anthropic&#39;s range is where most Claude Code content actually sits, not the middle.</p><p class="paragraph" style="text-align:left;">Same sticker price. Same quota. More tokens per prompt. Your Max window burns through faster. Your cached prefix costs more per turn. Your rate limit hits sooner.</p><p class="paragraph" style="text-align:left;">So Anthropic must be trading this for something. What? And is it worth it?</p><p class="paragraph" style="text-align:left;">I ran two experiments. The first measured the cost. The second measured what Anthropic claimed you&#39;d get back. Here&#39;s where it nets out.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="what-does-it-cost"><b>What does it cost?</b></h2><p class="paragraph" style="text-align:left;">To measure the cost, I used <code>POST /v1/messages/count_tokens</code> — Anthropic&#39;s free, no-inference token counter. Same content, both models, one number each per model. The difference is purely the tokenizer.</p><p class="paragraph" style="text-align:left;">Two batches of samples. </p><p class="paragraph" style="text-align:left;"><b>First</b>: seven samples of real content a Claude Code user actually sends — a CLAUDE.md file, a user prompt, a blog post, a git log, terminal output, a stack trace, a code diff. </p><p class="paragraph" style="text-align:left;"><b>Second</b>: twelve synthetic samples spanning content types — English prose, code, structured data, CJK, emoji, math symbols — to see how the ratio varies by kind.</p><p class="paragraph" style="text-align:left;">The core loop is three lines of Python:</p><div class="codeblock"><pre><code>from anthropic import Anthropic
client = Anthropic()

for model in [&quot;claude-opus-4-6&quot;, &quot;claude-opus-4-7&quot;]:
    r = client.messages.count_tokens(
        model=model,
        messages=[&#123;&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: sample_text&#125;],
    )
    print(f&quot;&#123;model&#125;: &#123;r.input_tokens&#125; tokens&quot;)
</code></pre></div><h3 class="heading" style="text-align:left;" id="realworld-claude-code-content">Real-world Claude Code content</h3><p class="paragraph" style="text-align:left;">Seven samples pulled from real files a Claude Code user actually sends:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Content type</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">chars</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">4.6 tokens</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">4.7 tokens</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">ratio</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><a class="link" href="https://CLAUDE.md?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you" target="_blank" rel="noopener noreferrer nofollow"><b>CLAUDE.md</b></a><b> (real file, 5KB)</b></p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">5,000</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,399</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,021</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.445</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">User prompt (typical Claude Code task)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">4,405</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,122</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,541</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.373</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Blog post excerpt (Markdown)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">5,000</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,209</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,654</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.368</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Git commit log</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,853</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">910</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,223</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.344</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Terminal output (pytest run)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,210</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">652</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">842</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.291</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Python stack trace</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">5,255</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,736</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,170</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.250</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Code diff</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">4,540</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,226</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,486</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.212</b></p></td></tr></table></div><p class="paragraph" style="text-align:left;">Weighted ratio across all seven: <b>1.325x</b> (8,254 → 10,937 tokens).</p><h3 class="heading" style="text-align:left;" id="contenttype-baseline-12-synthetic-s">Content-type baseline (12 synthetic samples)</h3><p class="paragraph" style="text-align:left;">For comparison across well-defined content types:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Content type</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">chars</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">4.6</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">4.7</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">ratio</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Technical docs (English)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,541</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">478</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">704</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.47</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Shell script</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,632</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,033</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,436</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.39</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">TypeScript code</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">4,418</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,208</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,640</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.36</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Spanish prose</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,529</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">733</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">986</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.35</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Markdown with code blocks</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,378</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">604</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">812</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.34</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Python code</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">3,182</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">864</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1,112</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.29</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">English prose</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,202</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">508</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">611</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.20</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">JSON (dense)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">48,067</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">13,939</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">15,706</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1.13</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Tool definitions (JSON Schema)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">2,521</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">738</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">826</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1.12</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">CSV (numeric)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">9,546</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">5,044</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">5,414</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">1.07</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Japanese prose</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">993</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">856</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">866</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.01</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Chinese prose</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">750</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">779</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">789</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;"><b>1.01</b></p></td></tr></table></div><p class="paragraph" style="text-align:left;">English-and-code subset, weighted: 1.345x. CJK subset: 1.01x on both.<br></p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="what-changed-in-the-tokenizer">What changed in the tokenizer</h2><p class="paragraph" style="text-align:left;">Three patterns in the data:</p><ol start="1"><li><p class="paragraph" style="text-align:left;"><b>CJK, emoji, and symbol content moved 1.005–1.07x.</b> A wholesale new vocabulary would shift these more uniformly. That didn&#39;t happen. Consistent with the non-Latin portions of the vocabulary changing less than the Latin. Token counts don&#39;t prove which specific slots were preserved.</p></li><li><p class="paragraph" style="text-align:left;"><b>English and code moved 1.20–1.47x on natural content.</b> Consistent with 4.7 using shorter or fewer sub-word merges for common English and code patterns than 4.6 did.</p></li><li><p class="paragraph" style="text-align:left;"><b>Code is hit harder than unique prose</b> (1.29–1.39x vs 1.20x). Code has more repeated high-frequency strings — keywords, imports, identifiers — exactly the patterns a Byte-Pair Encoding trained on code would collapse into long merges.</p></li></ol><p class="paragraph" style="text-align:left;">Chars-per-token on English dropped from 4.33 to 3.60. TypeScript dropped from 3.66 to 2.69. The vocabulary is representing the same text in smaller pieces.</p><p class="paragraph" style="text-align:left;">That&#39;s a hypothesis, not a proof. Counting tokens doesn&#39;t tell you which specific entries in Anthropic&#39;s proprietary vocabulary changed.</p><hr class="content_break"><h4 class="heading" style="text-align:left;" id="free-claude-code-crash-course"><span style="font-size:18px;"><b>Free Claude Code crash course</b></span></h4><p class="paragraph" style="text-align:left;"><span style="font-size:16px;">60-min video lesson + CLAUDE.md starter kit. Yours when you subscribe.</span></p><div class="button" style="text-align:left;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://www.claudecodecamp.com/subscribe?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you"><span class="button__text" style=""> Subscribe </span></a></div><hr class="content_break"><h3 class="heading" style="text-align:left;" id="why-ship-a-tokenizer-that-uses-more">Why ship a tokenizer that uses more tokens</h3><p class="paragraph" style="text-align:left;">Anthropic&#39;s migration guide: <i>&quot;more literal instruction following, particularly at lower effort levels. The model will not silently generalize an instruction from one item to another.&quot;</i></p><p class="paragraph" style="text-align:left;">Smaller tokens force attention over individual words. That&#39;s a documented mechanism for tighter instruction following, character-level tasks, and tool-call precision. Partner reports (Notion, Warp, Factory) describe fewer tool errors on long runs.</p><p class="paragraph" style="text-align:left;">The tokenizer is one plausible contributor. Weights and post-training also changed. Token counts can&#39;t separate them.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="does-47-actually-follow-instruction">Does 4.7 actually follow instructions better?</h2><p class="paragraph" style="text-align:left;">That&#39;s the cost, measured. Now the question: what did Anthropic trade for it?</p><p class="paragraph" style="text-align:left;">Their pitch is &quot;more literal instruction following.&quot; Plausible, but the token-count data doesn&#39;t prove it. I ran a direct test.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://arxiv.org/abs/2311.07911?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-measured-claude-4-7-s-new-tokenizer-here-s-what-it-costs-you" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">IFEval</a> (Zhou et al., Google, 2023) is a benchmark of prompts with verifiable constraints. &quot;Respond in exactly N words.&quot; &quot;Include the word X twice.&quot; &quot;No commas.&quot; &quot;All uppercase.&quot; Each constraint has a Python grader. Binary pass/fail.</p><p class="paragraph" style="text-align:left;">IFEval ships 541 prompts. I sampled 20 with a fixed seed, ran each through both models, and graded with IFEval&#39;s published checker.</p><p class="paragraph" style="text-align:left;">The results:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Metric</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">4.6</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">4.7</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Delta</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Strict, prompt-level (all passed)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">17/20 (85%)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">18/20 (<b>90%</b>)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"><b>+5pp</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Strict, instruction-level</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">25/29 (86%)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">26/29 (<b>90%</b>)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">+4pp</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Loose, prompt-level</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">18/20 (90%)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">18/20 (90%)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">0</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Loose, instruction-level</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">26/29 (90%)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">26/29 (90%)</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">0</p></td></tr></table></div><p class="paragraph" style="text-align:left;">A small but directionally consistent improvement on strict instruction following. Loose evaluation is flat. Both models already follow the high-level instructions — the strict-mode gap comes down to 4.6 occasionally mishandling exact formatting where 4.7 doesn&#39;t.</p><p class="paragraph" style="text-align:left;">Only one instruction type moved materially: <code>change_case:english_capital</code> (0/1 → 1/1). Everything else tied. The one prompt that actually separated the models was a four-constraint chain where 4.6 fumbled one and 4.7 got all four.</p><p class="paragraph" style="text-align:left;">A few caveats worth naming:</p><ul><li><p class="paragraph" style="text-align:left;"><b>N=20.</b> IFEval has 541 prompts. A 20-prompt sample is enough to see direction, not enough to be confident about size. A +5pp delta at N=20 is consistent with anything from &quot;no real difference&quot; to &quot;real +10pp improvement.&quot;</p></li><li><p class="paragraph" style="text-align:left;"><b>This measures the net effect of 4.6 → 4.7.</b> Tokenizer, weights, and post-training all changed. I can&#39;t isolate which one drove the +5pp. The causal link between &quot;smaller tokens&quot; and &quot;better instruction following&quot; remains a hypothesis.</p></li><li><p class="paragraph" style="text-align:left;"><b>Single generation per prompt.</b> Multiple runs per prompt would tighten the estimate.</p></li></ul><p class="paragraph" style="text-align:left;">So: 4.7 follows strict instructions a few points better than 4.6 on this subset. Small effect, small sample. Not the &quot;dramatic improvement&quot; framing Anthropic&#39;s partners used in launch quotes — at least not on this benchmark.</p><p class="paragraph" style="text-align:left;">The extra tokens bought something measurable. +5pp on strict instruction-following. Small. Real. So: is that worth 1.3–1.45x more tokens per prompt? Here&#39;s the cost, session by session.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="dollar-math-for-one-claude-code-ses">Dollar math for one Claude Code session</h2><p class="paragraph" style="text-align:left;">Imagine a long Claude Code session — 80 turns of back-and-forth on a bug fix or refactor.</p><p class="paragraph" style="text-align:left;">The setup (what&#39;s in your context each turn):</p><ul><li><p class="paragraph" style="text-align:left;"><b>Static prefix</b>: 2K CLAUDE.md + 4K tool definitions = <b>6K tokens</b>, same every turn</p></li><li><p class="paragraph" style="text-align:left;"><b>Conversation history</b>: grows ~2K per turn (500-token user message + 1,500-token reply), reaches ~160K by turn 80</p></li><li><p class="paragraph" style="text-align:left;"><b>User input</b>: ~500 fresh tokens per turn</p></li><li><p class="paragraph" style="text-align:left;"><b>Output</b>: ~1,500 tokens per turn</p></li><li><p class="paragraph" style="text-align:left;"><b>Cache hit rate</b>: ~95% (typical within the 5-minute TTL)</p></li></ul><p class="paragraph" style="text-align:left;">One thing to explain upfront: the <b>average cached prefix across the 80 turns is ~86K tokens</b>, not 6K. The static 6K is tiny; the average history across all turns (0 at turn 1, 160K at turn 80, average ~80K) dominates. Since most of the cache-read cost happens in late turns where the history is huge, that ~86K average is what actually gets billed per turn.</p><h3 class="heading" style="text-align:left;" id="46-session-cost">4.6 session cost</h3><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Line item</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Math</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Cost</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Turn 1 cache-write</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">8K × $6.25/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.05</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Turns 2–80 cache reads</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">79 × 86K × $0.50/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$3.40</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Fresh user input</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">79 × 500 × $5/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.20</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Output</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">80 × 1,500 × $25/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$3.00</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"><b>Total</b></p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"></p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"><b>~$6.65</b></p></td></tr></table></div><p class="paragraph" style="text-align:left;">Cache reads dominate input cost. Output dominates overall.</p><h3 class="heading" style="text-align:left;" id="47-session-cost">4.7 session cost</h3><p class="paragraph" style="text-align:left;">Every token in the prefix scales by its content ratio:</p><ul><li><p class="paragraph" style="text-align:left;">CLAUDE.md: 1.445x → 2K becomes 2.9K</p></li><li><p class="paragraph" style="text-align:left;">Tool defs: 1.12x → 4K becomes 4.5K</p></li><li><p class="paragraph" style="text-align:left;">Conversation history (mostly English and code): 1.325x → 160K becomes 212K by turn 80, averaging ~106K across the session</p></li><li><p class="paragraph" style="text-align:left;">User input: 1.325x → 500 becomes ~660</p></li></ul><p class="paragraph" style="text-align:left;">Average cached prefix on 4.7: <b>~115K tokens</b> (up from 86K). Output tokens are a wildcard — roughly the same as 4.6, up to ~30% higher if Claude Code&#39;s new <code>xhigh</code> default produces more thinking tokens.</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Line item</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Math</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Cost</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Turn 1 cache-write</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">10K × $6.25/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.06</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Turns 2–80 cache reads</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">79 × 115K × $0.50/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$4.54</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Fresh user input</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">79 × 660 × $5/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$0.26</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Output</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">80 × 1,500–1,950 × $25/MTok</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">$3.00–$3.90</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"><b>Total</b></p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"></p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"><b>~$7.86–$8.76</b></p></td></tr></table></div><h3 class="heading" style="text-align:left;" id="the-delta">The delta</h3><p class="paragraph" style="text-align:left;"><b>~$6.65 → ~$7.86–$8.76. Roughly 20–30% more per session.</b></p><p class="paragraph" style="text-align:left;">The per-token price didn&#39;t change. The per-session cost did, because the same session packs more tokens.</p><p class="paragraph" style="text-align:left;">For Max-plan users hitting rate limits instead of dollars: your 5-hour window ends sooner by roughly the same ratio on English-heavy work. A session that ran the full window on 4.6 probably doesn&#39;t on 4.7.</p><hr class="content_break"><h2 class="heading" style="text-align:left;" id="how-this-hits-the-prompt-cache">How this hits the prompt cache</h2><p class="paragraph" style="text-align:left;">Prompt caching is the architecture Claude Code runs on. </p><p class="paragraph" style="text-align:left;">The 4.7 tokenizer change interacts with caching in three ways:</p><ol start="1"><li><p class="paragraph" style="text-align:left;"><b>First 4.7 session starts cold.</b> Anthropic&#39;s prompt cache is partitioned per model — switching from 4.6 to 4.7 invalidates every cached prefix, the same way switching between Opus and Sonnet does. The tokenizer change doesn&#39;t cause this, but it makes the cold-start more expensive: the prefix you&#39;re writing to the new cache is 1.3–1.45x larger than the 4.6 equivalent.</p></li><li><p class="paragraph" style="text-align:left;"><b>Cache volume grows by the token ratio.</b> 1.445x more tokens in the CLAUDE.md portion means 1.445x more tokens paying cache-write once, and 1.445x more paying cache-read every turn after. The mechanism still works. There&#39;s just more of it to pay for.</p></li><li><p class="paragraph" style="text-align:left;"><b>Same transcript, different count.</b> Re-run a 4.6 session on 4.7 and your logs show a different number. If you baseline billing or observability off historical token counts, expect a step-change the day you flip the model ID.</p></li></ol><hr class="content_break"><h2 class="heading" style="text-align:left;" id="objections">Objections</h2><h3 class="heading" style="text-align:left;" id="input-is-mostly-cache-reads-the-per">&quot;Input is mostly cache reads. The per-token cost barely changed.&quot;</h3><p class="paragraph" style="text-align:left;">Legitimate. In a session that stays within the 5-minute TTL, 96% of input is cache reads at $0.50/MTok — already 90% off nominal. A 1.325x ratio on the cached portion is a smaller dollar impact than on fresh input.</p><p class="paragraph" style="text-align:left;">But Max plans count all tokens toward rate limits, not dollars. And several patterns hit uncached territory: first session after a TTL expiry, every cache-bust event (CLAUDE.md edits, tool-list changes, model switches), and every compaction event that rewrites the prefix. On those turns you pay the full ratio on the cache-write. The steady-state is a bright spot. The edges got noisier.</p><h3 class="heading" style="text-align:left;" id="anthropic-documented-10135-x-as-a-r">&quot;Anthropic documented 1.0–1.35x as a range, not a hard ceiling.&quot;</h3><p class="paragraph" style="text-align:left;">Agreed. The real-world weighted ratio (1.325x) lands near the top of their range. Individual file types exceed it — CLAUDE.md at 1.445x, technical docs at 1.473x. That&#39;s the useful finding: the top of the documented range is where most Claude Code content sits, not the middle. Plan around the upper range, not the average.</p><hr class="content_break"><p class="paragraph" style="text-align:left;">So: tokens are 1.3–1.45x more expensive on English and code. Anthropic bought you +5pp on strict instruction following. The sticker price didn&#39;t change. The effective per-session cost did.</p><p class="paragraph" style="text-align:left;"><b>Is it worth it?</b> That depends on what you send. You&#39;re paying ~20–30% more per session for a small but real improvement in how literally the model follows your prompt.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=9b04344e-632f-45d5-85bc-0d0d6877d81b&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Claude Code Sandbox: How /sandbox Works (and What It Doesn&#39;t Protect)</title>
  <description>What Claude Code&#39;s /sandbox blocks at the OS, what still slips through, and a settings.json that matches the experiments</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/635b10a6-fab8-403f-9997-b2526a7a76eb/thumbnail.png" length="24174" type="image/png"/>
  <link>https://www.claudecodecamp.com/p/claude-code-sandboxing-how-sandbox-works-and-what-it-doesn-t-protect</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/claude-code-sandboxing-how-sandbox-works-and-what-it-doesn-t-protect</guid>
  <pubDate>Thu, 09 Apr 2026 03:42:19 +0000</pubDate>
  <atom:published>2026-04-09T03:42:19Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Type <code>/sandbox</code> in your Claude Code session right now.</p><p class="paragraph" style="text-align:left;">If you have never run it, every bash command Claude runs has the same access your terminal does. The Claude Code sandbox is off until you turn it on. The Anthropic docs say so.</p><p class="paragraph" style="text-align:left;">Sandboxing is OS-level isolation, the same class of tech Chrome uses on each tab. I ran <code>/sandbox</code> for three questions: Does it work? What does it protect? Can I unalias <code>--dangerously-skip-permissions</code>?</p><p class="paragraph" style="text-align:left;">Results:</p><ol start="1"><li><p class="paragraph" style="text-align:left;">Filesystem writes are kernel-blocked. Write outside your working directory and you get <code>Operation not permitted</code> at the syscall level. No dialog to click through.</p></li><li><p class="paragraph" style="text-align:left;">Network isolation runs through a local proxy, not only kernel blocking. Well-behaved HTTP clients route through a localhost proxy that checks the allowlist and returns <code>CONNECT 403</code> for denied domains. Tools that ignore proxy env vars fall through to a Seatbelt backstop that blocks non-loopback traffic at the socket layer.</p></li><li><p class="paragraph" style="text-align:left;">Sandboxing is opt-in. You have to run <code>/sandbox</code> and pick a mode. If you have not, your sandbox is off.</p></li><li><p class="paragraph" style="text-align:left;"><code>sandbox.denyRead</code> does not stop Claude&#39;s Read tool. Sharpest finding. In the runs I measured, a setting that looks like a read perimeter has no effect on Read. Verified with headless Claude and stream-json tool traces. The fix is a separate permission rule. Docs now say Read/Edit/Write use the permission system rather than the sandbox; Experiment 5 shows that in practice.</p></li></ol><p class="paragraph" style="text-align:left;">Finding 4 was the surprise.</p><h2 class="heading" style="text-align:left;" id="what-the-docs-dont-tell-you">What the docs don&#39;t tell you</h2><p class="paragraph" style="text-align:left;">Docs cover enabling <code>/sandbox</code>, modes, and config keys. These four points are what I hand teammates. Some overlap the docs; the value is measured behavior.</p><ul><li><p class="paragraph" style="text-align:left;"><b>Opt-in.</b> If you have never opened the <code>/sandbox</code> panel (or set <code>sandbox.enabled</code>), bash is unsandboxed. Soft fallback: missing Linux deps print a warning and run unsandboxed unless <code>failIfUnavailable</code> is true.</p></li><li><p class="paragraph" style="text-align:left;"><code>sandbox.denyRead</code><b> is not a Read-tool perimeter.</b> Bash-layer denies do not stop the built-in Read tool in the headless runs below. Mirror secret paths with <code>permissions.deny</code> <code>Read(...)</code> rules (and treat Edit/Write the same way until you test them).</p></li><li><p class="paragraph" style="text-align:left;"><b>Hardcoded </b><code>.git</code><b> denies.</b> Even inside <code>allowWrite</code>, writes to <code>**/.git/config</code> and <code>**/.git/hooks/**</code> fail. That breaks <code>git init</code>, <code>git clone</code>, and tools that call them (<code>cargo init</code>, <code>uv init</code>) unless those commands are excluded.</p></li><li><p class="paragraph" style="text-align:left;"><b>Escape hatch is on by default.</b> Claude can retry with <code>dangerouslyDisableSandbox</code> after a sandbox failure. Set <code>&quot;allowUnsandboxedCommands&quot;: false</code> if you want real enforcement.</p></li></ul><p class="paragraph" style="text-align:left;">For a second policy layer that can block tools before they run, see <a class="link" href="https://www.claudecodecamp.com/p/claude-code-hooks-the-complete-setup-guide?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-sandbox-how-sandbox-works-and-what-it-doesn-t-protect" target="_blank" rel="noopener noreferrer nofollow">Claude Code hooks: the complete setup guide</a> (PreToolUse as a hard deny).</p><h2 class="heading" style="text-align:left;" id="permissions-vs-sandbox-quick">Permissions vs sandbox (quick)</h2><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Layer</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Permissions</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Sandboxing</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Scope</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">All tools: Read, Edit, Bash, WebFetch, MCP</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Bash (and PowerShell / Monitor per current docs) and the subprocess tree</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Enforcement</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Claude Code checks before running the tool</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">OS kernel for filesystem; local HTTP/SOCKS proxy for network</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">On violation</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Prompts user for approval</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;"><code>Operation not permitted</code> (fs) or <code>CONNECT 403</code> (network), no prompt</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">Bypassable by model?</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">If user approves</p></td><td class="bh__table_cell" width="33%"><p class="paragraph" style="text-align:left;">No dialog; escape hatch can still unsandbox a retry unless you disable it</p></td></tr></table></div><p class="paragraph" style="text-align:left;">These two layers cover different ground. Treat them as separate controls.</p><p class="paragraph" style="text-align:left;">MCP servers and command hooks still run on the host under the built-in Bash sandbox. If you need the whole Claude Code process inside one OS boundary, Anthropic&#39;s docs point at the <a class="link" href="https://code.claude.com/docs/en/sandbox-environments?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-sandbox-how-sandbox-works-and-what-it-doesn-t-protect" target="_blank" rel="noopener noreferrer nofollow">sandbox runtime / containers / VMs comparison</a>, not <code>/sandbox</code> alone. For MCP token and tool surface, see the <a class="link" href="https://www.claudecodecamp.com/p/claude-code-mcp-deep-dive?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-sandbox-how-sandbox-works-and-what-it-doesn-t-protect" target="_blank" rel="noopener noreferrer nofollow">Claude Code MCP deep dive</a>.</p><h2 class="heading" style="text-align:left;" id="what-sandboxing-actually-is">What sandboxing actually is</h2><p class="paragraph" style="text-align:left;">Without sandboxing, Claude Code&#39;s bash tool is just bash. <code>curl</code> can reach any domain your machine can. <code>cat ~/.ssh/id_rsa</code> returns your SSH key. The only gate is a permission prompt you can auto-approve, configure away, or click through.</p><p class="paragraph" style="text-align:left;">Sandboxing removes that dialog. The kernel blocks writes outside your working directory. Network traffic goes through a local allowlist proxy; tools that bypass it hit a kernel block on non-loopback traffic. No &quot;do you want to allow Claude to...&quot; prompt. Syscalls fail like any other permission error, and the proxy returns 403 for disallowed hosts.</p><p class="paragraph" style="text-align:left;">macOS ships Seatbelt (TrustedBSD MAC). Apple uses it for Chrome renderers, iOS apps, and most system services. You can run it yourself: <code>sandbox-exec -p &#39;...&#39; bash -c &#39;whatever&#39;</code>. Claude Code wraps that primitive.</p><p class="paragraph" style="text-align:left;">Linux uses bubblewrap, the same sandbox Flatpak uses. WSL2 works because it is real Linux. WSL1 does not; bubblewrap needs kernel features WSL1 cannot provide.</p><p class="paragraph" style="text-align:left;">Permissions ask yes or no. Sandboxing removes the question. The kernel refuses the call.</p><h2 class="heading" style="text-align:left;" id="is-claude-code-sandbox-on-by-defaul">Is Claude Code sandbox on by default?</h2><p class="paragraph" style="text-align:left;">No.</p><p class="paragraph" style="text-align:left;">Anthropic&#39;s docs say you enable it yourself. Run <code>/sandbox</code>, pick a mode, and you are in. Never run it and the sandbox is off. You can also set <code>sandbox.enabled</code> in user settings for all projects, or enforce it with managed settings.</p><p class="paragraph" style="text-align:left;">On macOS it works out of the box; Seatbelt ships with the OS. On Linux or WSL2 install <code>bubblewrap</code> and <code>socat</code> first (<code>sudo apt install bubblewrap socat</code> on Debian/Ubuntu). Current docs also call out Ubuntu 24.04 AppArmor quirks for <code>bwrap</code> user namespaces.</p><p class="paragraph" style="text-align:left;">Fallback is soft. If the sandbox cannot start (missing deps, unsupported platform), Claude Code prints a warning and runs unsandboxed. Teams that want a hard gate set <code>sandbox.failIfUnavailable: true</code> so the warning becomes an error.</p><p class="paragraph" style="text-align:left;">Two modes. Auto-allow runs sandboxed bash without asking. If a command cannot be sandboxed (excluded tool or unlisted host), it falls back to the regular permission flow. This is the mode that replaces <code>--dangerously-skip-permissions</code> for bash. Docs are explicit:</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">Auto-allow mode works independently of your permission mode setting. Even if you&#39;re not in &quot;accept edits&quot; mode, sandboxed bash commands will run automatically when auto-allow is enabled.</p><figcaption class="blockquote__byline"></figcaption></blockquote></div><p class="paragraph" style="text-align:left;">In regular-permissions mode, the sandbox is on but you still approve each command. You see fewer prompts because denied operations fail instead of asking; allowed stuff still prompts. Safety-net mode.</p><p class="paragraph" style="text-align:left;">Filesystem and network rules are identical either way. The only difference is whether sandboxed commands get auto-approved.</p><h2 class="heading" style="text-align:left;" id="how-it-actually-works">How it actually works</h2><p class="paragraph" style="text-align:left;">I grepped the Claude Code binary to see the raw policy. There is a literal comment in the source strings:</p><div class="codeblock"><pre><code>; Essential permissions - based on Chrome sandbox policy</code></pre></div><p class="paragraph" style="text-align:left;">The Seatbelt policy Claude Code ships with comes from Chrome&#39;s renderer sandbox. It is a Scheme-style rule set:</p><div class="codeblock"><pre><code>(version 1)
(deny default (with message &quot;...&quot;))

; File I/O
(allow file-ioctl)
(allow file-read*)
(allow file-read-metadata)
(allow file-write* (subpath &quot;/path/to/cwd&quot;))

; Mach IPC
(allow mach-lookup (global-name-prefix &quot;com.apple.&quot;))
(allow mach-priv-task-port (target same-sandbox))

; Network
(allow network-bind (local ip &quot;*:*&quot;))
(allow network-outbound (remote ip &quot;localhost:*&quot;))

; Process info and signals - restricted to same sandbox
(allow process-info* (target same-sandbox))
(allow signal (target same-sandbox))</code></pre></div><p class="paragraph" style="text-align:left;">Default is <code>deny</code>. Anything not explicitly allowed is blocked at the kernel. <code>file-write*</code> is scoped to your working directory. <code>network-outbound</code> is localhost-only, so real-internet traffic must go through a proxy outside the sandbox.</p><p class="paragraph" style="text-align:left;">That proxy is the other half. On enable, Claude Code spawns an HTTP CONNECT proxy and a SOCKS5 proxy, then sets over a dozen proxy-related env vars inside sandboxed bash, including tool-specific overrides for gcloud, docker, git+ssh, and rsync:</p><div class="codeblock"><pre><code>https_proxy=http://localhost:61653
all_proxy=socks5h://localhost:61654
CLOUDSDK_PROXY_ADDRESS=localhost
DOCKER_HTTP_PROXY=http://localhost:61653
GIT_SSH_COMMAND=ssh -o ProxyCommand=&#39;nc -X 5 -x localhost:61654 %h %p&#39;</code></pre></div><p class="paragraph" style="text-align:left;">(Ports are illustrative from a measured session; yours will differ.)</p><p class="paragraph" style="text-align:left;">Two-layer network defense: well-behaved HTTP clients read <code>HTTPS_PROXY</code> and hit the local proxy, which returns 403 for disallowed hosts. Tools that ignore proxy env vars fall through to Seatbelt, which blocks non-loopback traffic; <code>connect()</code> fails with <code>Operation not permitted</code>.</p><p class="paragraph" style="text-align:left;">Not every tool is well-behaved. That matters for Experiment 4.</p><h3 class="heading" style="text-align:left;" id="the-subprocess-tree">The subprocess tree</h3><p class="paragraph" style="text-align:left;">Every child inherits the sandbox. If bash runs <code>npm install</code>, which runs a postinstall that runs <code>curl</code>, all of them share the same Seatbelt container. Spawning a child does not escape it. A wrapper that only intercepts the top-level command would miss the children; Claude Code&#39;s sandbox sees the whole tree.</p><h3 class="heading" style="text-align:left;" id="the-escape-hatch">The escape hatch</h3><p class="paragraph" style="text-align:left;">Docs mention an escape hatch: <code>dangerouslyDisableSandbox</code>. When a command fails inside the sandbox (say <code>docker build</code> hits the daemon-socket block), Claude can retry outside it after a user permission prompt.</p><p class="paragraph" style="text-align:left;">I pulled the exact text Claude Code injects into the system prompt when sandboxing is on. It lives in the binary as a nested string array. Wording below is exact; bullet and paragraph layout is mine:</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">You should always default to running commands within the sandbox. Do NOT attempt to set <code>dangerouslyDisableSandbox: true</code> unless: the user explicitly asks you to bypass sandbox, OR a specific command just failed and you see evidence of sandbox restrictions causing the failure. Evidence of sandbox-caused failures includes: &quot;Operation not permitted&quot; errors, Access denied to specific paths, Network connection failures to non-whitelisted hosts, Unix socket connection errors. When you see evidence of sandbox-caused failure: Immediately retry with <code>dangerouslyDisableSandbox: true</code> (don&#39;t ask, just do it). Briefly explain what sandbox restriction likely caused the failure. This will prompt the user for permission. Do not suggest adding sensitive paths like ~/.bashrc, ~/.zshrc, ~/.ssh/*, or credential files to the sandbox allowlist.</p><figcaption class="blockquote__byline"></figcaption></blockquote></div><p class="paragraph" style="text-align:left;"><code>&quot;(don&#39;t ask, just do it)&quot;</code> is a direct string in the binary. I did not make it up.</p><p class="paragraph" style="text-align:left;">Claude Code trains the model to retry failing commands outside the sandbox without asking. That is the escape-hatch behavior some users have noticed and been confused by.</p><p class="paragraph" style="text-align:left;">A user on r/claudecode caught it in the wild: Claude Code with <code>npx</code> on the denylist and bubblewrap enabled, asked for the npx version. Denylist blocked the first try. The agent found <code>/proc/self/root/usr/bin/npx</code> (same binary, different path) and tried again. When the sandbox caught that too, it talked itself into disabling the sandbox and running npx outside it.</p><p class="paragraph" style="text-align:left;">&quot;Don&#39;t ask, just do it.&quot;</p><p class="paragraph" style="text-align:left;">Turn it off with <code>&quot;allowUnsandboxedCommands&quot;: false</code>. The <code>dangerouslyDisableSandbox</code> parameter gets ignored, and the system prompt changes:</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">All commands MUST run in sandbox mode. The <code>dangerouslyDisableSandbox</code> parameter is disabled by policy.</p><figcaption class="blockquote__byline"></figcaption></blockquote></div><p class="paragraph" style="text-align:left;">Want real enforcement? This setting matters. Without it, one failed command is enough for Claude to retry outside the sandbox.</p><p class="paragraph" style="text-align:left;">For how the system prompt is structured and what else rides in that payload, see <a class="link" href="https://www.claudecodecamp.com/p/inside-claude-code-s-system-prompt?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-sandbox-how-sandbox-works-and-what-it-doesn-t-protect" target="_blank" rel="noopener noreferrer nofollow">Inside Claude Code&#39;s system prompt</a>.</p><h2 class="heading" style="text-align:left;" id="the-experiments">The experiments</h2><p class="paragraph" style="text-align:left;">Bash-layer experiments used <code>@anthropic-ai/sandbox-runtime</code>, the npm package Anthropic publishes and Claude Code vendors. <code>srt</code> (its CLI) is a good stand-in for bash-layer behavior even if it is not the same binary.</p><p class="paragraph" style="text-align:left;">Experiment 5 used headless Claude Code with custom settings and <code>--output-format stream-json</code> tool traces. Those findings are actual tool behavior, not an approximation.</p><h3 class="heading" style="text-align:left;" id="experiment-1-filesystem-perimeter">Experiment 1: filesystem perimeter</h3><p class="paragraph" style="text-align:left;">Question: what can you read and write from inside the sandbox by default?</p><p class="paragraph" style="text-align:left;">Setup: a fresh temp directory as the working directory. A fake SSH key at <code>~/.sandbox-exp1-fake-ssh/id_rsa</code> containing junk text. A sibling project outside the work dir. Sandbox policy: <code>allowWrite: [$WORK]</code>, no <code>denyRead</code>, default everything else.</p><p class="paragraph" style="text-align:left;">Writes:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Target</p></th><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Result</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>$WORK/new.txt</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>$WORK/allowed/test.txt</code> (existing)</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Sibling project directory</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">BLOCKED: <code>Operation not permitted</code></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>~/.bashrc-sandbox-test</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">BLOCKED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>/tmp/sandbox-exp1-shouldfail.txt</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">BLOCKED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>/etc/hosts</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">BLOCKED</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Every write outside the sandbox returned <code>Operation not permitted</code> at the syscall level. <code>sudo</code>, <code>chmod</code>, owning the file: none of it matters. Denial sits above the file-mode check. Writes are locked down.</p><p class="paragraph" style="text-align:left;">Reads:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Target</p></th><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Result</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>$WORK/allowed/test.txt</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>/etc/hosts</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>/etc/passwd</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Fake SSH key (chmod 600)</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>ls $HOME</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>~/.zshrc</code> (my actual shell config)</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">ALLOWED</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Every read succeeded: <code>/etc/passwd</code>, the fake SSH key, a full home listing, my real <code>~/.zshrc</code>. Default read perimeter is the whole computer.</p><p class="paragraph" style="text-align:left;">People hear &quot;sandbox&quot; and picture a closed box. Claude Code&#39;s is closed for writes; reads are open by default.</p><p class="paragraph" style="text-align:left;">Reads stay open unless you add paths to <code>denyRead</code> (bash) and mirror them in permissions for built-in tools. The Chrome-derived policy allows <code>file-read*</code> globally. Want a secrets perimeter? Configure it. Default is not that.</p><h3 class="heading" style="text-align:left;" id="experiment-2-network-isolation">Experiment 2: network isolation</h3><p class="paragraph" style="text-align:left;">Question: can a tool in Claude&#39;s subprocess tree reach a domain not on the allowlist?</p><p class="paragraph" style="text-align:left;">Setup: sandbox with <code>allowedDomains: [&quot;example.com&quot;]</code>. Try reaching google.com from curl, wget, python urllib, node fetch. Then try IP literals and hostname tricks.</p><p class="paragraph" style="text-align:left;">Results:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Attempt</p></th><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Result</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>curl https://example.com</code> (allowed)</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">HTTP 200</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>curl https://google.com</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">exit 56, <code>CONNECT tunnel failed, response 403</code></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>curl https://93.184.216.34</code> (IP literal for example.com)</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">exit 56 - still blocked</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>curl https://140.82.114.4 -H Host:github.com</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">exit 56</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>wget https://example.com</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">works</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>python3 urllib example.com</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">HTTP 200</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>python3 urllib google.com</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">blocked, <code>Operation not permitted</code></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>node -e &quot;fetch(&#39;https://example.com&#39;)&quot;</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">error: fetch failed</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><code>node -e &quot;fetch(&#39;https://google.com&#39;)&quot;</code></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">error: fetch failed</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Two things stood out.</p><p class="paragraph" style="text-align:left;">IP literal bypass does not work. Hitting example.com&#39;s IP (<code>93.184.216.34</code>) and github.com&#39;s IP with a <code>Host:</code> header rewrite both failed with <code>CONNECT tunnel failed, response 403</code>. The proxy checks something curl cannot lie about, not just the hostname.</p><p class="paragraph" style="text-align:left;">Node&#39;s native <code>fetch()</code> fails even on an allowed domain. That took a while to unpack. Node <code>fetch</code> is built on undici, which ignores <code>HTTPS_PROXY</code>. Inside the sandbox it tries a direct outbound TCP connection; Seatbelt denies it. The error surfaces as <code>fetch failed</code> with an underlying <code>ENOTFOUND</code> because direct DNS fails too.</p><p class="paragraph" style="text-align:left;">Every HTTP client inside the sandbox falls into one of three buckets:</p><ol start="1"><li><p class="paragraph" style="text-align:left;">Respects proxy env vars. curl, wget, git (https), python (requests, urllib), pip, pnpm, npm, cargo, uv. These get filtered at the local proxy and work fine for allowed domains.</p></li><li><p class="paragraph" style="text-align:left;">Has a tool-specific proxy var that Claude Code sets. gcloud reads <code>CLOUDSDK_PROXY_*</code>, docker reads <code>DOCKER_HTTP_PROXY</code>, rsync reads <code>RSYNC_PROXY</code>, git+ssh gets rewritten through <code>GIT_SSH_COMMAND</code>. Claude Code knows these and sets them all.</p></li><li><p class="paragraph" style="text-align:left;">Ignores everything. Node&#39;s native fetch. Anything built on undici without a manual <code>ProxyAgent</code>. These break inside the sandbox even on allowed domains.</p></li></ol><p class="paragraph" style="text-align:left;">Any tool built on node <code>fetch()</code> will fail silently on domains that should work: some AI CLIs, scrapers, npm-packaged tools. Fix: patch in undici&#39;s <code>ProxyAgent</code> with <code>process.env.HTTPS_PROXY</code>, or use a library that reads the env var. Plenty of npm tooling sits in that third bucket.</p><h3 class="heading" style="text-align:left;" id="experiment-3-the-speed-tax">Experiment 3: the speed tax</h3><p class="paragraph" style="text-align:left;">Question: does the sandbox slow anything down?</p><p class="paragraph" style="text-align:left;">Setup: run the same operations inside and outside the sandbox, 3 iterations each, report the median.</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Operation</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Direct</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Sandboxed</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Overhead</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"><code>/bin/echo hello</code></p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">166ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">287ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">+121ms</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"><code>ls $WORK</code></p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">189ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">271ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">+82ms</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"><code>find $WORK -name &#39;*.txt&#39;</code></p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">186ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">297ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">+111ms</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"><code>cat</code> 500 files</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1061ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">1218ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">+157ms</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;"><code>python3 fib(25)</code></p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">361ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">458ms</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">+97ms</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Pattern: ~80 to 160ms fixed cost per sandbox call. It does not scale with the work. A 10-second <code>npm install</code> and a 166ms <code>echo</code> pay roughly the same overhead, mostly spawning proxies and loading Seatbelt. Per-invocation setup.</p><p class="paragraph" style="text-align:left;">Inside real Claude Code the cost should be smaller; proxies stay up and do not respawn per command. I did not measure that path directly. Best guess from what I could time: tens of milliseconds per command.</p><p class="paragraph" style="text-align:left;">Real work (compile, test, install) pays once and then runs at full speed. You would only feel it in a script that spawns hundreds of tiny bash calls, and you can usually collapse that loop. I would not turn the sandbox off for speed.</p><h3 class="heading" style="text-align:left;" id="experiment-4-tools-that-break">Experiment 4: tools that break</h3><p class="paragraph" style="text-align:left;">Question: which dev tools break inside the sandbox?</p><p class="paragraph" style="text-align:left;">Setup: realistic tasks inside <code>srt</code> with a permissive config (cache dirs in <code>allowWrite</code>, common registries in <code>allowedDomains</code>). Startup worked for everything I tried. Failures showed up when tools did real work:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Task</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Result</p></th><th class="bh__table_header" width="33%"><p class="paragraph" style="text-align:left;">Cause</p></th></tr></table></div><p class="paragraph" style="text-align:left;"><code>pnpm install left-pad</code></p><p class="paragraph" style="text-align:left;">works</p><p class="paragraph" style="text-align:left;">pnpm respects <code>HTTPS_PROXY</code></p><p class="paragraph" style="text-align:left;"><code>uv pip install requests</code></p><p class="paragraph" style="text-align:left;">works</p><p class="paragraph" style="text-align:left;">uv respects proxy env vars</p><p class="paragraph" style="text-align:left;"><code>terraform init</code></p><p class="paragraph" style="text-align:left;">works</p><p class="paragraph" style="text-align:left;">no git involvement</p><p class="paragraph" style="text-align:left;"><code>git init test-repo</code></p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">Hardcoded <code>.git/config</code> + <code>.git/hooks/*</code> deny</p><p class="paragraph" style="text-align:left;"><code>git clone github.com/octocat/Hello-World</code></p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">Same <code>.git/hooks</code> copy fails</p><p class="paragraph" style="text-align:left;"><code>cargo init</code></p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">Calls <code>git init</code> internally</p><p class="paragraph" style="text-align:left;"><code>uv init</code></p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">Calls <code>git init</code> internally</p><p class="paragraph" style="text-align:left;"><code>gh api /zen</code></p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">TLS cert error: <code>x509: OSStatus -26276</code></p><p class="paragraph" style="text-align:left;"><code>docker build</code> (tiny Dockerfile)</p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">Docker daemon lives outside the sandbox</p><p class="paragraph" style="text-align:left;"><code>watchman watch</code></p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">fsevents needs kernel features unavailable</p><p class="paragraph" style="text-align:left;"><code>node fetch api.github.com</code></p><p class="paragraph" style="text-align:left;">BROKEN</p><p class="paragraph" style="text-align:left;">Native fetch ignores <code>HTTPS_PROXY</code></p><p class="paragraph" style="text-align:left;"><code>git init</code> being broken was a surprise. I dug in.</p><p class="paragraph" style="text-align:left;">Error is <code>could not write config file ... Operation not permitted</code> on <code>.git/config</code>, or <code>cannot copy ... commit-msg.sample</code> on <code>.git/hooks/</code>. Both paths sit inside the working directory (<code>allowWrite</code>). So why fail?</p><p class="paragraph" style="text-align:left;">I probed paths and found two patterns hardcoded-denied at any depth: <code>**/.git/config</code> and <code>**/.git/hooks/**</code>. <code>allowWrite</code> cannot override them.</p><p class="paragraph" style="text-align:left;">Reason is clear once you see it. <code>.git/config</code> can set <code>[core] editor = ...</code> or <code>[alias] log = !rm -rf ~</code>, so the next <code>git log</code> runs attacker code. <code>.git/hooks/pre-commit</code> is even more direct. The sandbox is right to block both.</p><p class="paragraph" style="text-align:left;">Cost: you cannot run <code>git init</code>, <code>git clone</code>, <code>cargo init</code>, or <code>uv init</code> inside the sandbox unless you mark them <code>excludedCommands</code>. The hardened config at the end of this post does that.</p><p class="paragraph" style="text-align:left;">When I first hit this I found no mention in public Anthropic docs. The current sandboxing guide now documents protected <code>.git</code> hooks/config. Turn sandboxing on, run <code>git init</code>, and you still feel it if those commands are not excluded.</p><p class="paragraph" style="text-align:left;">Second surprise: <code>gh</code> fails with <code>x509: OSStatus -26276</code> (macOS keychain &quot;certificate verification failed&quot;). <code>gh</code> is Go; Go&#39;s TLS stack on macOS checks the system keychain. The proxy presents its own cert, not in the keychain, so the handshake fails. Any Go tool doing HTTPS directly will hit this. Probably <code>docker</code> CLI, probably parts of <code>aws-cli v2</code>. I only tested <code>gh</code>. Official troubleshooting now lists Go CLIs under TLS failures and recommends <code>excludedCommands</code> (or weaker network isolation with a MITM proxy).</p><p class="paragraph" style="text-align:left;">Rules of thumb:</p><ul><li><p class="paragraph" style="text-align:left;">If a tool respects <code>HTTPS_PROXY</code> and uses a normal TLS stack, it works.</p></li><li><p class="paragraph" style="text-align:left;">If it pins TLS certs through Go&#39;s stack, it breaks.</p></li><li><p class="paragraph" style="text-align:left;">If it scaffolds a fresh <code>.git/</code> tree, it breaks.</p></li></ul><h3 class="heading" style="text-align:left;" id="experiment-5-the-bypass">Experiment 5: the bypass</h3><p class="paragraph" style="text-align:left;">Claim: <code>sandbox.denyRead</code> is documented as restricting what paths Claude Code can read inside the sandbox. Does it protect the Read tool, or only bash?</p><p class="paragraph" style="text-align:left;">Setup: three headless Claude Code runs, identical prompts, same file. Only settings change between runs.</p><p class="paragraph" style="text-align:left;">Raw tool traces via <code>--output-format stream-json</code> give the literal <code>tool_use</code> calls and <code>tool_result</code> payloads. Final assistant text can mislead (refuse, explain, paraphrase). <code>tool_result</code> is what the tool actually returned.</p><p class="paragraph" style="text-align:left;">Target: <code>/Users/abhishekray/.sandbox-demo-deny/data.txt</code>, with a fresh nonce <code>sbx-proof-c4e12f8e25f4</code> each run. Innocuous filename on purpose (more on that below).</p><p class="paragraph" style="text-align:left;">Run 1 is the baseline with no deny rules:</p><div class="codeblock"><pre><code>tool_use: Read(&#123;file_path: &quot;.../data.txt&quot;&#125;)
tool_result: &quot;1\tLine 1: benign file contents\n2\tLine 2: ordinary data\n3\tLine 3: sbx-proof-c4e12f8e25f4\n&quot;</code></pre></div><p class="paragraph" style="text-align:left;">Baseline: Read succeeds, returns the contents, the nonce is in the tool_result. As expected.</p><p class="paragraph" style="text-align:left;">Run 2 adds <code>sandbox.denyRead: [&quot;/Users/abhishekray/.sandbox-demo-deny&quot;]</code> to the settings:</p><div class="codeblock"><pre><code>tool_use: Read(&#123;file_path: &quot;.../data.txt&quot;&#125;)
tool_result: &quot;1\tLine 1: benign file contents\n2\tLine 2: ordinary data\n3\tLine 3: sbx-proof-c4e12f8e25f4\n&quot;</code></pre></div><p class="paragraph" style="text-align:left;">The tool_result is byte-for-byte identical to Run 1.</p><p class="paragraph" style="text-align:left;">Read called through. Deny list was set. File sat inside the denied directory. Read returned the contents anyway, nonce and all.</p><p class="paragraph" style="text-align:left;">Claude was not choosing to comply. It never saw a block. Sandbox config had zero effect on Read.</p><p class="paragraph" style="text-align:left;">To double-check, I had Codex (OpenAI&#39;s CLI via an MCP bridge) grep the saved jsonl. Confirmed: Run 2&#39;s tool_result contains <code>Line 3: sbx-proof-c4e12f8e25f4</code>, the same nonce from the start of the test. Sandbox deny list bypassed.</p><p class="paragraph" style="text-align:left;">Run 3 uses <code>permissions.deny: [&quot;Read(//Users/abhishekray/.sandbox-demo-deny/**)&quot;]</code> with no sandbox-layer deny rule:</p><div class="codeblock"><pre><code>tool_use: Read(&#123;file_path: &quot;.../data.txt&quot;&#125;)
tool_result: &quot;&lt;tool_use_error&gt;File is in a directory that is denied by your permission settings.&lt;/tool_use_error&gt;&quot;</code></pre></div><p class="paragraph" style="text-align:left;">Same file, path, and prompt. Only settings changed. <code>permissions.deny</code> produced a hard error from the tool layer; Read was invoked and returned <code>tool_use_error</code> before touching the filesystem.</p><p class="paragraph" style="text-align:left;">Narrow claim: in these three runs on this file, <code>sandbox.denyRead</code> did not stop Read. <code>permissions.deny Read(...)</code> did.</p><p class="paragraph" style="text-align:left;">I only tested Read, not Edit, Write, or WebFetch. Current Anthropic docs say Read, Edit, and Write &quot;use the permission system directly rather than running through the sandbox.&quot; That matches Experiment 5. Until you test otherwise, treat every built-in file tool as routing around <code>sandbox.denyRead</code>.</p><p class="paragraph" style="text-align:left;">In practice: turn on sandboxing with <code>denyRead</code> for <code>~/.ssh</code> and <code>~/.aws</code> and you have not closed the Read-tool side. Bash cannot <code>cat ~/.ssh/id_rsa</code>. In the scenario I tested, Read returned a denyRead&#39;d file as if the setting were absent.</p><p class="paragraph" style="text-align:left;">Close the gap with both layers:</p><div class="codeblock"><pre><code>&#123;
  &quot;sandbox&quot;: &#123;
    &quot;filesystem&quot;: &#123;
      &quot;denyRead&quot;: [&quot;~/.ssh&quot;, &quot;~/.aws&quot;, &quot;~/.netrc&quot;, &quot;~/.gnupg&quot;]
    &#125;
  &#125;,
  &quot;permissions&quot;: &#123;
    &quot;deny&quot;: [
      &quot;Read(//Users/**/.ssh/**)&quot;,
      &quot;Read(//Users/**/.aws/**)&quot;,
      &quot;Read(//Users/**/.netrc)&quot;,
      &quot;Read(//Users/**/.gnupg/**)&quot;,
      &quot;WebFetch(domain:*)&quot;
    ]
  &#125;
&#125;</code></pre></div><p class="paragraph" style="text-align:left;">Bash layer and tool layer, same paths, configured independently. Docs also describe a <code>sandbox.credentials</code> block for deny/mask of credential files and env vars inside sandboxed commands. That still does not replace <code>permissions.deny</code> for Read. VERIFY credentials.mask behavior on your version before you lean on it alone.</p><p class="paragraph" style="text-align:left;">Back to the innocuous filename. First run used a file named <code>credentials</code> with <code>AWS_SECRET_ACCESS_KEY=...</code>. Claude refused Read: &quot;I won&#39;t do that. Classic prompt injection pattern.&quot; Renamed to <code>data.txt</code> and Claude called Read every time.</p><p class="paragraph" style="text-align:left;">Soft layer above hard enforcement: Claude&#39;s refusal to touch obvious-secret-looking paths. Pattern matching loses to <code>notes.md</code>. <code>permissions.deny</code> is the only enforcement that does not depend on what Claude chooses to do.</p><h2 class="heading" style="text-align:left;" id="when-to-turn-it-on">When to turn it on</h2><p class="paragraph" style="text-align:left;">Turn it on if:</p><ul><li><p class="paragraph" style="text-align:left;">You run agentic workflows. Long autonomous sessions, background tasks.</p></li><li><p class="paragraph" style="text-align:left;">You install dependencies from untrusted sources. npm, pip, cargo.</p></li><li><p class="paragraph" style="text-align:left;">You are working on code from third parties. Public repos, client projects, contributed PRs.</p></li><li><p class="paragraph" style="text-align:left;">You run Claude remotely or headlessly, where you cannot approve prompts by hand.</p></li><li><p class="paragraph" style="text-align:left;">You have aliased <code>--dangerously-skip-permissions</code>. This is the feature that lets you stop.</p></li></ul><p class="paragraph" style="text-align:left;">Leave it off (or use a heavier isolation boundary) if:</p><ul><li><p class="paragraph" style="text-align:left;">Your workflow is dominated by Docker. Docker needs daemon socket access that sits outside the sandbox. The Go-based CLI likely runs into the same TLS trust-store issue as <code>gh</code>. I did not verify <code>docker build</code> end-to-end, but Anthropic&#39;s own docs recommend putting <code>docker *</code> in <code>excludedCommands</code>. That tells you what to expect.</p></li><li><p class="paragraph" style="text-align:left;">You use <code>watchman</code> heavily. It does not work. Jest with watch mode falls back to polling, which is slow.</p></li><li><p class="paragraph" style="text-align:left;">You scaffold new repos constantly and do not want to add <code>git init</code> to <code>excludedCommands</code>. You can, but it is an extra step every time.</p></li></ul><p class="paragraph" style="text-align:left;">Hybrid works too: auto-allow for routine coding, drop to regular-permissions (or pause the sandbox) for docker or git init. For unattended <code>--dangerously-skip-permissions</code> with MCP and hooks inside the boundary, prefer the <a class="link" href="https://code.claude.com/docs/en/sandbox-environments?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-sandbox-how-sandbox-works-and-what-it-doesn-t-protect" target="_blank" rel="noopener noreferrer nofollow">sandbox environments guide</a> (runtime / container / VM), not Bash sandbox alone.</p><h2 class="heading" style="text-align:left;" id="a-real-settingsjson">A real settings.json</h2><p class="paragraph" style="text-align:left;">Not the docs&#39; minimal example. Config shaped by the experiments:</p><div class="codeblock"><pre><code>&#123;
  &quot;sandbox&quot;: &#123;
    &quot;enabled&quot;: true,
    &quot;mode&quot;: &quot;auto-allow&quot;,
    &quot;allowUnsandboxedCommands&quot;: false,
    &quot;filesystem&quot;: &#123;
      &quot;allowWrite&quot;: [
        &quot;~/.cache/pnpm&quot;,
        &quot;~/.cache/pip&quot;,
        &quot;~/.cargo/registry&quot;,
        &quot;/tmp/build&quot;
      ],
      &quot;denyRead&quot;: [
        &quot;~/.ssh&quot;,
        &quot;~/.aws&quot;,
        &quot;~/.config/gh&quot;,
        &quot;~/.netrc&quot;,
        &quot;~/.gnupg&quot;,
        &quot;~/.docker&quot;
      ]
    &#125;,
    &quot;network&quot;: &#123;
      &quot;allowedDomains&quot;: [
        &quot;registry.npmjs.org&quot;,
        &quot;pypi.org&quot;,
        &quot;crates.io&quot;,
        &quot;github.com&quot;,
        &quot;*.github.com&quot;,
        &quot;api.anthropic.com&quot;
      ]
    &#125;,
    &quot;excludedCommands&quot;: [
      &quot;docker *&quot;,
      &quot;watchman *&quot;,
      &quot;git init *&quot;,
      &quot;git clone *&quot;,
      &quot;cargo init *&quot;,
      &quot;cargo new *&quot;,
      &quot;uv init *&quot;
    ]
  &#125;,
  &quot;permissions&quot;: &#123;
    &quot;deny&quot;: [
      &quot;Read(//Users/**/.ssh/**)&quot;,
      &quot;Read(//Users/**/.aws/**)&quot;,
      &quot;Read(//Users/**/.netrc)&quot;,
      &quot;Read(//Users/**/.gnupg/**)&quot;,
      &quot;Read(//Users/**/.config/gh/**)&quot;,
      &quot;Read(//Users/**/.docker/**)&quot;,
      &quot;WebFetch(domain:*)&quot;
    ],
    &quot;allow&quot;: [
      &quot;WebFetch(domain:github.com)&quot;,
      &quot;WebFetch(domain:api.github.com)&quot;,
      &quot;WebFetch(domain:raw.githubusercontent.com)&quot;,
      &quot;WebFetch(domain:docs.anthropic.com)&quot;,
      &quot;WebFetch(domain:code.claude.com)&quot;
    ]
  &#125;
&#125;</code></pre></div><p class="paragraph" style="text-align:left;"><code>allowUnsandboxedCommands: false</code> kills the escape hatch. Without it, Claude retries failing commands outside the sandbox on its own.</p><p class="paragraph" style="text-align:left;"><code>denyRead</code> is mirrored by <code>Read(...)</code> in <code>permissions.deny</code>. Same paths, both layers: sandbox for bash, permissions for Read. Experiment 5 in config form. Same idea for <code>WebFetch(domain:*)</code> as deny-all with an explicit allowlist.</p><p class="paragraph" style="text-align:left;"><code>github.com</code> in <code>allowedDomains</code> is an accepted risk. Broad domains allow exfiltration via gists and issue comments, but half your tooling talks to github. Matching <code>WebFetch</code> rules keep the tool-layer surface narrower than bash.</p><p class="paragraph" style="text-align:left;">Session cost sits next to security. Sizing Max vs API while you lock this down: <a class="link" href="https://www.claudecodecamp.com/p/claude-code-pricing?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-sandbox-how-sandbox-works-and-what-it-doesn-t-protect" target="_blank" rel="noopener noreferrer nofollow">Claude Code pricing</a>.</p><h2 class="heading" style="text-align:left;" id="faq">FAQ</h2><h3 class="heading" style="text-align:left;" id="is-claude-code-sandbox-on-by-defaul">Is Claude Code sandbox on by default?</h3><p class="paragraph" style="text-align:left;">No. Run <code>/sandbox</code> and pick a mode, or set <code>sandbox.enabled</code> in settings. Until then, bash has the same access as your terminal.</p><h3 class="heading" style="text-align:left;" id="does-sandboxdeny-read-block-the-rea">Does sandbox.denyRead block the Read tool?</h3><p class="paragraph" style="text-align:left;">Not in the headless runs I measured. <code>sandbox.denyRead</code> constrains sandboxed bash. The built-in Read tool follows <code>permissions</code> rules. Mirror secret paths with <code>permissions.deny</code> <code>Read(...)</code>. Docs now state that Read/Edit/Write use the permission system rather than the sandbox.</p><h3 class="heading" style="text-align:left;" id="sandbox-vs-permissions-which-do-i-n">Sandbox vs permissions: which do I need?</h3><p class="paragraph" style="text-align:left;">Both, for different jobs. Permissions gate tools before they run (Read, Edit, Bash, WebFetch, MCP). Sandboxing enforces OS limits on bash (and related shell tools) and their children after they start. Neither replaces the other.</p><h3 class="heading" style="text-align:left;" id="sandbox-vs-dangerouslyskippermissio">Sandbox vs <code>--dangerously-skip-permissions</code>?</h3><p class="paragraph" style="text-align:left;"><code>--dangerously-skip-permissions</code> skips prompts. It does not add an OS boundary. Auto-allow sandbox mode is the safer way to cut bash prompts while keeping writes and network inside a policy. For fully unattended runs with MCP and hooks inside the fence, Anthropic recommends a container, VM, or sandbox-runtime wrap, not Bash sandbox alone.</p><h3 class="heading" style="text-align:left;" id="does-git-init-work-inside-the-sandb">Does git init work inside the sandbox?</h3><p class="paragraph" style="text-align:left;">Usually no. Writes to <code>.git/config</code> and <code>.git/hooks/**</code> are protected/denied even under <code>allowWrite</code>. Put <code>git init *</code> / <code>git clone *</code> (and scaffolders that call them) in <code>excludedCommands</code>, or run those steps yourself outside the sandbox.</p><h2 class="heading" style="text-align:left;" id="conclusion">Conclusion</h2><p class="paragraph" style="text-align:left;">Sandboxing held in Experiments 1 and 2. Writes outside the work dir and traffic to unlisted domains failed at the kernel or the proxy; IP literals and Host-header tricks failed too.</p><p class="paragraph" style="text-align:left;">Off until you run <code>/sandbox</code> or set <code>sandbox.enabled</code>. If you aliased <code>--dangerously-skip-permissions</code> to dodge prompts, auto-allow is the trade that keeps an OS boundary.</p><p class="paragraph" style="text-align:left;"><code>sandbox.denyRead</code> still does not stop Read in the runs I measured. Mirror paths with <code>permissions.deny</code> <code>Read(...)</code>. Add <a class="link" href="https://www.claudecodecamp.com/p/claude-code-hooks-the-complete-setup-guide?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-sandbox-how-sandbox-works-and-what-it-doesn-t-protect" target="_blank" rel="noopener noreferrer nofollow">hooks that block dangerous Bash before it runs</a> when you want denies the model cannot talk past.</p><p class="paragraph" style="text-align:left;">I am turning it on with the settings.json above, not the minimal docs example. Default read access is the whole machine until you close both layers.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=bd73c6b2-7d78-440c-887f-10dbbcb04013&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Claude Code Pricing (2026): Plans, Max vs API, and How Much It Costs</title>
  <description>Pro, Max, Team, and API rates, plus real session math with prompt caching</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/c376dbae-b98f-458c-985e-7e5d0e1e850c/thumbnail.png" length="18311" type="image/png"/>
  <link>https://www.claudecodecamp.com/p/claude-code-pricing</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/claude-code-pricing</guid>
  <pubDate>Wed, 01 Apr 2026 18:31:26 +0000</pubDate>
  <atom:published>2026-04-01T18:31:26Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">Claude Code costs $20/month on Pro, $100 (Max 5x) or $200 (Max 20x) for heavy daily use, and $25–$125/seat on Team plans. On the API it&#39;s pay-as-you-go, about $5 per million input tokens and $25 per million output on Opus. There&#39;s no free tier.</p><p class="paragraph" style="text-align:left;">Most people think Claude Code pricing is about tokens. You use the model. You pay for the tokens. The bill arrives.</p><p class="paragraph" style="text-align:left;">That&#39;s not wrong. But it misses the big picture.</p><p class="paragraph" style="text-align:left;">I tracked a 170-turn Opus session. Without caching, it would have cost $168. With caching: $21. Over 98% of the input tokens were cache reads, billed at $0.50 per million instead of $5.</p><p class="paragraph" style="text-align:left;">For this deep dive series, I ran 30 API calls to measure thinking costs. I tracked session tokens turn by turn. I pulled cost data from public case studies.</p><p class="paragraph" style="text-align:left;">Claude Code needs a paid plan. Pro at minimum. There are four subscription tiers (Pro, Max 5x, Max 20x, Team) plus a direct API path. They differ in price, usage limits, and default model. Max and Team Premium run Opus 4.6 by default. Pro and Team Standard run Sonnet 4.6.</p><h2 class="heading" style="text-align:left;" id="claude-code-pricing-every-plan-at-a">Claude Code pricing: every plan at a glance</h2><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Plan</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Monthly Price</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Default Model</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Usage Limit</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Best For</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Pro</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$20 ($17 annual)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Sonnet 4.6</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Standard limits</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Daily development</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Max 5x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$100</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Opus 4.6</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">5x Pro limits</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Power users, multiple long sessions daily</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Max 20x</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$200</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Opus 4.6</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">20x Pro limits</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">8+ hour daily use</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Team Standard</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$25/seat ($20 annual)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Sonnet 4.6</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Standard limits</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Teams needing admin controls</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Team Premium</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$125/seat ($100 annual)</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Opus 4.6</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">5x Standard limits</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Teams needing heavy usage</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Enterprise</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$20/seat + usage at API rates</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Opus available</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">No per-seat limits</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Large orgs, compliance needs</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">API</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Pay-as-you-go</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Your choice</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">None — pure metered billing</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Tool builders, tight cost control</p></td></tr></table></div><p class="paragraph" style="text-align:left;">One caveat: Anthropic doesn&#39;t say what &quot;5x Pro limits&quot; means in exact message counts. We know the multiplier and the price. Not the ceiling.</p><p class="paragraph" style="text-align:left;">The model default matters. Pro gives you Sonnet 4.6. Max gives you Opus 4.6. Both work well. Opus reasons deeper on hard tasks. You can change the default with <code>--model</code> or <code>ANTHROPIC_MODEL</code>, but your plan&#39;s usage limits still apply.</p><h2 class="heading" style="text-align:left;" id="does-claude-code-require-a-paid-pla">Does Claude Code require a paid plan?</h2><p class="paragraph" style="text-align:left;">Yes. The free Claude.ai tier does not include Claude Code. You need at least Pro ($20/month) or a Console account with API credits.</p><p class="paragraph" style="text-align:left;">Pro is the starting point. You get Claude Code with Sonnet 4.6, standard usage limits, and the full feature set: slash commands, MCP servers, CLAUDE.md, the agentic loop. The limit is on how much you use it. Not on what it can do.</p><h2 class="heading" style="text-align:left;" id="what-happens-every-time-you-hit-ent">What happens every time you hit enter</h2><p class="paragraph" style="text-align:left;">Before we talk about costs, here&#39;s what you&#39;re paying for. Every message in Claude Code triggers five steps:</p><ol start="1"><li><p class="paragraph" style="text-align:left;"><b>System prompt + tools load</b> (~18,000 tokens). These are Claude Code&#39;s built-in instructions and tool definitions. Same every turn. Caches perfectly.</p></li><li><p class="paragraph" style="text-align:left;"><b>Your CLAUDE.md and MCP tools load.</b> Each MCP server adds tokens. Playwright adds 3,442. A Jira integration adds <a class="link" href="https://jdhodges.com?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow">17,000</a>. Your CLAUDE.md rules load too.</p></li><li><p class="paragraph" style="text-align:left;"><b>The full conversation history replays.</b> Turn 1 sends just your message. Turn 20 sends all 19 previous exchanges plus your new one. Turn 50 sends everything from the start. This part grows every turn. Caching makes most of it nearly free.</p></li><li><p class="paragraph" style="text-align:left;"><b>Claude thinks.</b> With extended thinking on, Claude reasons before responding. These are output tokens. You&#39;re billed for them even though you only see a summary.</p></li><li><p class="paragraph" style="text-align:left;"><b>Claude responds.</b> Text, tool calls, code edits. Also output tokens.</p></li></ol><p class="paragraph" style="text-align:left;">Steps 1-3 are input. Steps 4-5 are output.</p><p class="paragraph" style="text-align:left;">Input is cheap because of caching. Output is expensive because of how GPUs work. That&#39;s the split that drives everything on this page.</p><h2 class="heading" style="text-align:left;" id="why-output-costs-5-x-input">Why output costs 5x input</h2><p class="paragraph" style="text-align:left;">This isn&#39;t random markup. It reflects how the hardware works.</p><p class="paragraph" style="text-align:left;">Input tokens are read in parallel. The GPU handles thousands at once. That makes each one cheap.</p><p class="paragraph" style="text-align:left;">Output tokens are written one at a time. Each token depends on the one before it. The GPU generates one, feeds it back, generates the next. It&#39;s like a highway used for single-file traffic.</p><p class="paragraph" style="text-align:left;">Thinking tokens are output tokens too. When Claude reasons through a problem, every reasoning token costs the output rate. On Opus 4.6, that&#39;s $25 per million tokens. Same price whether you see them in your terminal or not.</p><p class="paragraph" style="text-align:left;">Caching works on the input side because reading is already cheap. It makes a cheap operation 10x cheaper. Output can&#39;t be cached. There&#39;s no shortcut for writing one token at a time.</p><h2 class="heading" style="text-align:left;" id="claude-code-api-pricing-june-2026"><b>Claude Code API pricing (June 2026)</b></h2><p class="paragraph" style="text-align:left;">These are the per-token prices if you&#39;re on the API. They also show what drives subscription costs under the hood.</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Model</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Input</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Output</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Cache Read</p></th><th class="bh__table_header" width="20%"><p class="paragraph" style="text-align:left;">Cache Write</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Claude Fable 5</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$10/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$50/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$1.00/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$12.50/MTok</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Claude Opus 4.8</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$5/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$25/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$0.50/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$6.25/MTok</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Claude Sonnet 4.6</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$3/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$15/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$0.30/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$3.75/MTok</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">Claude Haiku 4.5</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$1/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$5/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$0.10/MTok</p></td><td class="bh__table_cell" width="20%"><p class="paragraph" style="text-align:left;">$1.25/MTok</p></td></tr></table></div><p class="paragraph" style="text-align:left;">Opus has held $5/$25 across 4.6, 4.7, and 4.8 — a 3x cut from Opus 4.1 ($15/$75). If you avoided Opus before because of cost, recheck. Fable 5 is the new top tier at $10/$50 for the hardest work. Sonnet 4.6 and Haiku 4.5 are unchanged. The older Opus 4.6 and 4.7 are still available at the same $5/$25 as 4.8.</p><p class="paragraph" style="text-align:left;">The cache read column matters most. At $0.50 per million tokens for Opus, your conversation history costs almost nothing to re-send each turn.</p><p class="paragraph" style="text-align:left;">Cache writes cost 25% more than normal input. You pay that once when the cache is created. After that, every read is 90% off. Stay in one session and the math works. Restart often and you keep paying the write cost.</p><h3 class="heading" style="text-align:left;" id="flat-pricing-across-1-m-context"><b>Flat pricing across 1M context</b></h3><p class="paragraph" style="text-align:left;">Opus 4.8 and Sonnet 4.6 have flat pricing across the full 1M context window. A 900K-token request costs the same per token as a 9K request.</p><p class="paragraph" style="text-align:left;">Older models (Sonnet 4.5, Sonnet 4) charged 2x above 200K tokens. That doubled your cost when sessions got long. Current models don&#39;t have that cliff — more in the <a class="link" href="https://www.claudecodecamp.com/p/claude-code-1m-context-window?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow" style="color: #3794ff">1M context window deep dive</a>.</p><p class="paragraph" style="text-align:left;">This means long sessions don&#39;t suddenly get more expensive as they grow. The cost grows in a straight line. With caching, a 170-turn Opus session can cost $21 instead of $168.</p><h3 class="heading" style="text-align:left;" id="which-model-does-claude-code-use"><b>Which model does Claude Code use?</b></h3><p class="paragraph" style="text-align:left;">It depends on your plan.</p><p class="paragraph" style="text-align:left;">Max and Team Premium default to the latest Opus — Opus 4.8 as of June 2026. Pro and Team Standard default to Sonnet 4.6. You can override this with <code>--model</code> or <code>ANTHROPIC_MODEL</code>. Claude Code may also fall back to Sonnet if you hit usage limits on Opus.</p><p class="paragraph" style="text-align:left;">On the API, model choice hits your wallet directly. Sonnet cache reads are $0.30/MTok versus $0.50 for Opus. That&#39;s 40% less on the biggest cost. Big refactors benefit from Opus. Simple edits and searches work fine on Sonnet.Which model does Claude Code use?</p><p class="paragraph" style="text-align:left;">It depends on your plan.</p><p class="paragraph" style="text-align:left;">Max and Team Premium default to Opus 4.6. Pro and Team Standard default to Sonnet 4.6. You can override this with <code>--model</code> or <code>ANTHROPIC_MODEL</code>. Claude Code may also fall back to Sonnet if you hit usage limits on Opus.</p><p class="paragraph" style="text-align:left;">On the API, model choice hits your wallet directly. Sonnet cache reads are $0.30/MTok versus $0.50 for Opus. That&#39;s 40% less on the biggest cost. Big refactors benefit from Opus. Simple edits and searches work fine on Sonnet.</p><p class="paragraph" style="text-align:left;">Haiku 4.5 is fast and cheap. But Claude Code needs strong instruction-following to run its agentic loop, so most people only use Haiku in wrapper tools.</p><h2 class="heading" style="text-align:left;" id="the-invisible-thinking-tax">The invisible thinking tax</h2><p class="paragraph" style="text-align:left;">Claude&#39;s thinking tokens are summarized before you see them. But you&#39;re billed for the full amount.</p><p class="paragraph" style="text-align:left;">I measured this across 30 API calls:</p><div class="codeblock"><pre><code>Sonnet 4.6:
  Billed output:     2,026 tokens (average)
  Visible output:    1,776 tokens (estimated)
  Invisible gap:       250 tokens → 1.14x what you see

Opus 4.6:
  Billed output:     1,338 tokens (average)
  Visible output:    1,140 tokens (estimated)
  Invisible gap:       198 tokens → 1.17x what you see</code></pre></div><p class="paragraph" style="text-align:left;">You&#39;re paying for 15-17% more output tokens than you can see. At Opus rates, that&#39;s about $0.005 per request. Small per request. Adds up over a long session.</p><p class="paragraph" style="text-align:left;">Users in <a class="link" href="https://github.com/anthropics/claude-code/issues/31585?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow">GitHub issue #31585</a> report the gap reaching 3-10x on hard reasoning tasks at higher effort. A code review is moderate. A multi-step architecture decision probably generates much more invisible reasoning.</p><p class="paragraph" style="text-align:left;">You can see it in your logs. Check <code>~/.claude/projects/</code> for JSONL files:</p><div class="codeblock"><pre><code>&#123; &quot;type&quot;: &quot;thinking&quot;, &quot;thinking&quot;: &quot;&quot;, &quot;signature&quot;: &quot;EuUBCkYICxgCKkD...&quot; &#125;</code></pre></div><p class="paragraph" style="text-align:left;">The thinking field is empty. The signature proves tokens were used. You paid for reasoning you can&#39;t read, can&#39;t audit, and can&#39;t find in your logs.</p><p class="paragraph" style="text-align:left;">This isn&#39;t a bug. It&#39;s how summarized thinking works. But it means your real cost per turn is higher than what you see.</p><p class="paragraph" style="text-align:left;">Token usage visibility is <a class="link" href="https://github.com/anthropics/claude-code/issues/33978?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow">a highly requested feature</a> in Claude Code&#39;s issue tracker.</p><p class="paragraph" style="text-align:left;">You can&#39;t fix what you can&#39;t measure. Right now, you can&#39;t measure this.</p><h2 class="heading" style="text-align:left;" id="the-effort-level-lever">The effort level lever</h2><p class="paragraph" style="text-align:left;">Claude Code has an effort setting: low, medium, or high. It controls how much Claude thinks before answering. Toggle it with <code>/effort</code>.</p><p class="paragraph" style="text-align:left;">Here&#39;s what each level costs. I measured across 30 API calls:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Effort</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Time</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Cost/request</p></th><th class="bh__table_header" width="25%"><p class="paragraph" style="text-align:left;">Thinking tokens</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Low</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">17 sec</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.015</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">~23</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">Medium</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">20 sec</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.016</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">~26</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">High</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">60 sec</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">$0.016</p></td><td class="bh__table_cell" width="25%"><p class="paragraph" style="text-align:left;">~47</p></td></tr></table></div><p class="paragraph" style="text-align:left;">The cost per request barely changes. The speed changes by 3.5x. High takes three times longer for almost the same bill.</p><p class="paragraph" style="text-align:left;">Quality? Same across all three in my tests. Anthropic&#39;s SWE-bench data shows 76% fewer output tokens at medium versus high. Same task completion. The model just thinks more efficiently at medium.</p><p class="paragraph" style="text-align:left;">Until v2.1.68, Claude Code defaulted to <code>high</code> on Opus 4.6. Users on Reddit reported <a class="link" href="https://www.reddit.com/r/ClaudeAI/comments/1r1cfha/is_anyone_else_burning_through_opus_46_limits_10x/?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow">burning through Max limits 10x faster</a> than on Opus 4.5. Anthropic changed the default to <code>medium</code>.</p><p class="paragraph" style="text-align:left;">If you&#39;re on a subscription, effort is the biggest knob you have. Not because of cost per request. Because of how fast you burn through your ceiling.</p><h2 class="heading" style="text-align:left;" id="what-breaks-the-prompt-cache">What breaks the prompt cache</h2><p class="paragraph" style="text-align:left;">Caching keeps Claude Code cheap. Breaking the cache makes turns expensive. Here&#39;s what breaks it.</p><p class="paragraph" style="text-align:left;">The cache has layers: tools → system prompt → messages. A change at any layer breaks that layer and everything below.</p><p class="paragraph" style="text-align:left;"><b>Breaks the entire cache:</b></p><ul><li><p class="paragraph" style="text-align:left;">Switching models (Opus → Sonnet or back)</p></li><li><p class="paragraph" style="text-align:left;">Adding or removing an MCP server</p></li></ul><p class="paragraph" style="text-align:left;"><b>Breaks system + message cache:</b></p><ul><li><p class="paragraph" style="text-align:left;">Editing CLAUDE.md mid-session</p></li><li><p class="paragraph" style="text-align:left;">Changing the speed setting</p></li></ul><p class="paragraph" style="text-align:left;"><b>Breaks on time:</b></p><ul><li><p class="paragraph" style="text-align:left;">A 5-minute gap between messages. The cache expires.</p></li></ul><p class="paragraph" style="text-align:left;"><b>Does NOT break the cache:</b></p><ul><li><p class="paragraph" style="text-align:left;">Normal flow. Messages, responses, edits. The cache holds.</p></li></ul><p class="paragraph" style="text-align:left;">Don&#39;t switch models mid-session. Don&#39;t toggle MCP servers while working. Edit CLAUDE.md between sessions, not during. If you step away for five minutes, the cache expires on its own.</p><p class="paragraph" style="text-align:left;">The full details (KV cache, attention layers, prefix ordering) are in the <a class="link" href="https://claudecodecamp.com/blog/prompt-caching-deep-dive?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow">prompt caching deep dive</a>.</p><hr class="content_break"><h3 class="heading" style="text-align:left;" id="free-claude-code-crash-course"><span style="font-family:inherit;font-size:16px;"><b>Free Claude Code crash course</b></span></h3><p class="paragraph" style="text-align:left;"><span style="font-family:inherit;font-size:16px;">60-min video lesson + </span><a class="link" href="https://CLAUDE.md?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow"><span style="font-family:inherit;font-size:16px;"><i>CLAUDE.md</i></span></a><span style="font-family:inherit;font-size:16px;"> starter kit. Yours when you subscribe.</span></p><div class="button" style="text-align:left;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://www.claudecodecamp.com/subscribe?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs"><span class="button__text" style=""> Subscribe </span></a></div><hr class="content_break"><h3 class="heading" style="text-align:left;" id="subscription-vs-api-the-actual-math">Subscription vs. API: the actual math</h3><p class="paragraph" style="text-align:left;">Two paths.</p><p class="paragraph" style="text-align:left;">Subscription (Pro / Max): flat monthly fee, usage ceiling. Anthropic absorbs the cost swings.</p><p class="paragraph" style="text-align:left;">API: every token billed, no ceiling on usage or your bill.</p><p class="paragraph" style="text-align:left;">Some users go through OpenRouter. That&#39;s API billing through a middleman. You don&#39;t get subscription pricing.</p><p class="paragraph" style="text-align:left;">Picking wrong costs real money. Here&#39;s how to tell.</p><h3 class="heading" style="text-align:left;" id="real-session-data-what-170-turns-ac">Real session data: what 170 turns actually costs</h3><p class="paragraph" style="text-align:left;">Full breakdown from one of my Opus 4.6 sessions — 170 turns of brainstorming and writing:</p><div style="padding:14px 15px 14px;"><table class="bh__table" width="100%" style="border-collapse:collapse;"><tr class="bh__table_row"><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Metric</p></th><th class="bh__table_header" width="50%"><p class="paragraph" style="text-align:left;">Value</p></th></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Input (fresh, uncached)</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">239 tokens</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Cache reads</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">32,868,011 tokens</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Cache creates</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">598,778 tokens</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Output</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">31,559 tokens</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Cache hit rate</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">98.2%</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><b>Cost with caching</b></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><b>$20.97</b></p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">Cost without caching</p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;">$168.12</p></td></tr><tr class="bh__table_row"><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><b>Savings from caching</b></p></td><td class="bh__table_cell" width="50%"><p class="paragraph" style="text-align:left;"><b>$147.16 (88%)</b></p></td></tr></table></div><p class="paragraph" style="text-align:left;">33 million input tokens versus 31 thousand output. That&#39;s 1,000 to 1.</p><p class="paragraph" style="text-align:left;">Even at 90% off, input dominated: $20.18 out of $20.97 (96.2%). Output for the whole session was $0.79. Less than a dollar.</p><p class="paragraph" style="text-align:left;">Input per turn grew 5.7x from the first five turns to the last five. Every turn re-sends the whole history. But at 98% cache hits, the growth barely showed up on the bill.</p><p class="paragraph" style="text-align:left;">Turn-by-turn averages across multiple sessions:</p><ul><li><p class="paragraph" style="text-align:left;">Mid-session: <b>$0.11 per turn</b></p></li><li><p class="paragraph" style="text-align:left;">After a compact restart: <b>$0.29 per turn</b></p></li><li><p class="paragraph" style="text-align:left;">91% of total spend: mega-sessions (80+ turns)</p></li></ul><p class="paragraph" style="text-align:left;">Compacts are expensive because they break the cache. The conversation resets, a new cache gets written, and the next few turns pay full input price.</p><h3 class="heading" style="text-align:left;" id="the-burkov-calculation">The @burkov calculation</h3><p class="paragraph" style="text-align:left;">Andrej Burkov shared his API usage on X. About $0.80 per request, hundreds per day. That&#39;s roughly $80/day, or $2,400/month. Max costs $100/month. <b>24x cheaper</b> for his usage level.</p><p class="paragraph" style="text-align:left;">That&#39;s extreme. Burkov is a heavy ML researcher. But it shows the ceiling structure. Once your API bill passes ~$100/month, Max 5x saves money.</p><h3 class="heading" style="text-align:left;" id="the-ksredcom-data-point">The ksred.com data point</h3><p class="paragraph" style="text-align:left;">The blog ksred.com tracked a project that used about 10 billion tokens. API value: $15,000. Cost on Max: $800. That&#39;s 93% less.</p><p class="paragraph" style="text-align:left;">The $800 is several months of Max. The $15,000 is what the same work would cost at API rates. For big software projects, subscription pricing isn&#39;t a little better. It&#39;s a different scale.</p><h3 class="heading" style="text-align:left;" id="a-worked-example">A worked example</h3><p class="paragraph" style="text-align:left;">Say you run three sessions per day: morning (30 turns), afternoon (60 turns), evening (20 turns). That&#39;s 110 turns/day, about 3,300/month.</p><p class="paragraph" style="text-align:left;">At $0.11/turn mid-session: $363/month. Each session restart adds about $0.60 of warm-up cost. That&#39;s ~$50/month extra.</p><p class="paragraph" style="text-align:left;">Total API cost: ~$413/month. Max 5x: $100/month. You save $313/month. That&#39;s $3,700/year.</p><p class="paragraph" style="text-align:left;">That&#39;s not a power user. That&#39;s a normal day of work.</p><h3 class="heading" style="text-align:left;" id="breakeven">Breakeven</h3><p class="paragraph" style="text-align:left;">The rough threshold is ~$100/month of API usage. Above that, Max 5x probably pays for itself. We can&#39;t know exactly, because Anthropic doesn&#39;t publish the hard limits behind &quot;5x.&quot; Below $40, Pro is enough.</p><p class="paragraph" style="text-align:left;">Anthropic&#39;s own data: the average developer spends ~$6/day on API. That&#39;s ~$180/month. Well above the Max 5x price.</p><h3 class="heading" style="text-align:left;" id="extra-usage-the-hybrid-option">Extra usage: the hybrid option</h3><p class="paragraph" style="text-align:left;">Anthropic now offers <a class="link" href="https://support.anthropic.com/en/articles/12429409-extra-usage-for-paid-claude-plans?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs" target="_blank" rel="noopener noreferrer nofollow">extra usage</a> on Pro and Max. When you hit your limit, you don&#39;t get blocked. Instead, you keep going at API rates.</p><p class="paragraph" style="text-align:left;">You prepay funds and set a spending cap. Usage beyond your plan limit bills at the same prices in the API table above.</p><p class="paragraph" style="text-align:left;">This changes the decision. You can start on Pro. Stay within limits most days. Pay API rates only when you overflow. No need to commit to Max or API upfront. Works for both Claude.ai and Claude Code.</p><h3 class="heading" style="text-align:left;" id="the-honest-caveat">The honest caveat</h3><p class="paragraph" style="text-align:left;">We don&#39;t know what Anthropic pays for subscription usage on their own hardware. The &quot;5x Pro limits&quot; label suggests a soft usage model, not a hard token budget. If a lot of users started hitting 20x Max every single day, pricing could change. These numbers are from March 2026.</p><h2 class="heading" style="text-align:left;" id="how-to-track-what-youre-spending">How to track what you&#39;re spending</h2><p class="paragraph" style="text-align:left;">API users: run <code>/cost</code> to see token usage and estimated cost for the current session.</p><p class="paragraph" style="text-align:left;">Subscribers (Pro, Max, Team): run <code>/stats</code> instead. <code>/cost</code> tracks API billing, not subscription usage.</p><p class="paragraph" style="text-align:left;">Three things affect your costs beyond your plan:</p><h3 class="heading" style="text-align:left;" id="claud-emd-placement">CLAUDE.md placement</h3><p class="paragraph" style="text-align:left;">There&#39;s a 10x cost difference between <code>CLAUDE.md</code> at the project root versus <code>.claude/rules/</code>. Root placement gets injected into every tool call. It can eat 46% of your context window on rules alone. The <code>.claude/rules/</code> path only loads when needed.</p><h3 class="heading" style="text-align:left;" id="compaction-timing">Compaction timing</h3><p class="paragraph" style="text-align:left;">The most expensive moment in a session is right after a compact. The new summary gets re-cached over several turns. On the API, each compact costs about $0.50-$1.00 in restart overhead. Finish the task first, then compact.</p><h3 class="heading" style="text-align:left;" id="session-length">Session length</h3><p class="paragraph" style="text-align:left;">Caching rewards long sessions. Each cold start re-pays the cache write cost. One 80-turn session costs less per turn than four 20-turn sessions doing the same work.</p><h2 class="heading" style="text-align:left;" id="which-plan-should-you-get">Which plan should you get?</h2><h3 class="heading" style="text-align:left;" id="pro-20-month">Pro ($20/month)</h3><p class="paragraph" style="text-align:left;">You use Claude Code for daily work. Maybe an hour a day, some longer sessions mixed in. You sometimes hit limits but not always. Default model is Sonnet 4.6. Right entry point for most developers. Turn on extra usage if you want overflow protection.</p><h3 class="heading" style="text-align:left;" id="max-5-x-100-month">Max 5x ($100/month)</h3><p class="paragraph" style="text-align:left;">Multiple long sessions per day. Claude Code is core to your work, not a side tool. Default model is Opus 4.6. The extra $80/month buys you the freedom to stop worrying about limits.</p><h3 class="heading" style="text-align:left;" id="max-20-x-200-month">Max 20x ($200/month)</h3><p class="paragraph" style="text-align:left;">Claude Code 8+ hours a day. Or heavy tasks — big migrations, long research sessions — that burn through 5x limits.</p><h3 class="heading" style="text-align:left;" id="api">API</h3><p class="paragraph" style="text-align:left;">You&#39;re building on top of Claude Code. A script, an automation, a custom tool. You want to see exactly what each session costs. The trade-off: no ceiling. A runaway script can rack up a real bill.</p><h2 class="heading" style="text-align:left;" id="team-and-enterprise-pricing">Team and Enterprise pricing</h2><p class="paragraph" style="text-align:left;">Both Team tiers include Claude Code.</p><ul><li><p class="paragraph" style="text-align:left;"><b>Team Standard:</b> $25/seat/month ($20 annual). Sonnet 4.6 default. Standard usage limits. Same features as Pro, plus admin controls, SSO, and org billing.</p></li><li><p class="paragraph" style="text-align:left;"><b>Team Premium:</b> $125/seat/month ($100 annual). Opus 4.6 default. 5x Standard usage. For teams where Claude Code is a daily tool.</p></li></ul><p class="paragraph" style="text-align:left;">You can mix Standard and Premium seats. Minimum 5 seats, up to 150.</p><p class="paragraph" style="text-align:left;">For a 5-person team needing heavy usage: Team Premium costs $500-625/month depending on billing. Five individual Max 5x subs cost $500/month. Premium costs about the same but adds the admin controls companies need.</p><p class="paragraph" style="text-align:left;"><b>Enterprise</b> is usage-based. $20/seat/month billed annually, plus usage at standard API rates. No per-seat limits. You pay for what you use. Available self-serve or through sales. Admins can set spending limits per org and per user.</p><h2 class="heading" style="text-align:left;" id="frequently-asked-questions-about-cl">Frequently asked questions about Claude Code pricing</h2><h3 class="heading" style="text-align:left;" id="is-claude-code-free">Is Claude Code free?</h3><p class="paragraph" style="text-align:left;">No. You need at least Pro ($20/month) or an Anthropic Console account with API credits. The free Claude.ai tier does not include Claude Code.</p><h3 class="heading" style="text-align:left;" id="whats-the-difference-between-claude">What&#39;s the difference between Claude Pro and Claude Max?</h3><p class="paragraph" style="text-align:left;">Pro is $20/month with Sonnet 4.6. Max is $100/month (5x) or $200/month (20x) with Opus 4.6. The difference: usage limits and default model.</p><h3 class="heading" style="text-align:left;" id="how-much-does-claude-code-cost-per-">How much does Claude Code cost per month in 2026?</h3><p class="paragraph" style="text-align:left;">Pro: $20 ($17 annual). Max 5x: $100. Max 20x: $200. Team Standard: $25/seat ($20 annual). Team Premium: $125/seat ($100 annual). Enterprise: $20/seat + usage at API rates. On the API, Anthropic says the average developer spends ~$6/day. That&#39;s ~$180/month.</p><h3 class="heading" style="text-align:left;" id="is-claude-max-worth-100-a-month">Is Claude Max worth $100 a month?</h3><p class="paragraph" style="text-align:left;">For heavy users, yes. The ksred.com case showed 93% savings versus API pricing. Burkov&#39;s data showed 24x savings. The rough breakeven is ~$100/month in API usage. If you&#39;re hitting Pro limits often, the upgrade pays for itself.</p><h3 class="heading" style="text-align:left;" id="claude-code-api-vs-subscription-whi">Claude Code API vs subscription: which is cheaper?</h3><p class="paragraph" style="text-align:left;">Under ~$50/month API usage: Pro is cheaper. $50-100: Pro with extra usage, or Max 5x. Over $100: Max almost always wins.</p><h3 class="heading" style="text-align:left;" id="does-claude-pro-include-claude-code">Does Claude Pro include Claude Code?</h3><p class="paragraph" style="text-align:left;">Yes. $20/month includes full Claude Code access with standard usage limits.</p><h3 class="heading" style="text-align:left;" id="what-is-the-difference-between-max-">What is the difference between Max 5x and Max 20x?</h3><p class="paragraph" style="text-align:left;">Usage limits and price. 5x at $100/month, 20x at $200/month. Max 20x is for all-day sessions or heavy automation.</p><h3 class="heading" style="text-align:left;" id="can-i-use-claude-code-with-open-rou">Can I use Claude Code with OpenRouter?</h3><p class="paragraph" style="text-align:left;">You can reach Claude models through OpenRouter. But that&#39;s API billing through a proxy. You don&#39;t get subscription pricing. You still need a Claude subscription or Console key to run Claude Code itself.</p><h3 class="heading" style="text-align:left;" id="is-claude-code-included-in-the-team">Is Claude Code included in the Team plan?</h3><p class="paragraph" style="text-align:left;">Yes, both tiers. Team Standard ($25/seat) includes Claude Code with Sonnet 4.6. Team Premium ($125/seat) includes Claude Code with Opus 4.6 and 5x the usage.</p><hr class="content_break"><p class="paragraph" style="text-align:left;"><i>I write about Claude Code internals every week - context windows, hooks, MCPs, how things actually work.</i></p><div class="button" style="text-align:left;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://www.claudecodecamp.com/subscribe?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=claude-code-pricing-2026-plans-max-vs-api-and-how-much-it-costs"><span class="button__text" style=""> Subscribe </span></a></div><hr class="content_break"></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=bf9300e4-92bc-47db-bf84-74f23f2c5736&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>I Tried to Reverse Engineer Claude Code&#39;s Usage Limits</title>
  <description>Anthropic sends your utilization data on every API response. Claude Code doesn&#39;t show it to you. So I built a proxy to catch it.</description>
  <link>https://www.claudecodecamp.com/p/i-tried-to-reverse-engineer-claude-code-s-usage-limits</link>
  <guid isPermaLink="true">https://www.claudecodecamp.com/p/i-tried-to-reverse-engineer-claude-code-s-usage-limits</guid>
  <pubDate>Wed, 01 Apr 2026 17:00:16 +0000</pubDate>
  <atom:published>2026-04-01T17:00:16Z</atom:published>
    <dc:creator>Abhishek Ray</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><p class="paragraph" style="text-align:left;">I hit my Claude Code limit last week. Middle of regular work. Just a couple of coding sessions. Came out of nowhere.</p><p class="paragraph" style="text-align:left;">Then I saw <a class="link" href="https://x.com/trq212/status/2037254607001559305?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-reverse-engineer-claude-code-s-usage-limits" target="_blank" rel="noopener noreferrer nofollow">Thariq&#39;s post</a>:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/9834ef1f-c1c9-45cd-bc22-f7ea772d2dce/CleanShot_2026-04-01_at_09.54.08_2x.png?t=1775062460"/></div><p class="paragraph" style="text-align:left;">During peak hours (5am-11am PT), your 5-hour limit burns faster. About 7% of users will hit limits they didn&#39;t before. The advice: shift heavy work to off-peak hours.</p><p class="paragraph" style="text-align:left;">That&#39;s the whole explanation. No formula. No dollar figure. Just &quot;you&#39;ll hit limits faster&quot; and a suggestion to rearrange your workday.</p><p class="paragraph" style="text-align:left;">I pay $200/month for Max 20x. I want to know what I&#39;m buying.</p><p class="paragraph" style="text-align:left;">Tools like <a class="link" href="https://github.com/ryoppippi/ccusage?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-reverse-engineer-claude-code-s-usage-limits" target="_blank" rel="noopener noreferrer nofollow">ccusage</a> help with part of this. ccusage reads your local Claude Code session logs. It tells you how many tokens you used, which model served each request, and what it would cost at API rates.</p><p class="paragraph" style="text-align:left;">Useful. But it answers a different question.</p><p class="paragraph" style="text-align:left;">It tells you what you <i>spent</i>. Not what your <i>budget</i> is. Not where you stand against your 5-hour limit. Not when that window resets. That data isn&#39;t in the local logs.</p><p class="paragraph" style="text-align:left;">It lives in the HTTP headers Anthropic sends back on every API response. Claude Code gets them and throws them away.</p><p class="paragraph" style="text-align:left;">So I built a proxy to catch them.</p><h2 class="heading" style="text-align:left;" id="the-hidden-headers">The hidden headers</h2><p class="paragraph" style="text-align:left;">Every API response includes headers called <code>anthropic-ratelimit-unified-*</code>. Right there in the HTTP layer. Here&#39;s what&#39;s in them:</p><p class="paragraph" style="text-align:left;"><b>Utilization per window.</b> A number between 0.0 and 1.0. Not a vague bucket. An exact float. Anthropic tracks three windows: <code>5h</code>, <code>7d</code>, and <code>7d_sonnet</code>. Each has its own quota.</p><p class="paragraph" style="text-align:left;"><b>Status per window.</b> <code>allowed</code>, <code>exceeded</code>, or <code>rate_limited</code>. The 5-hour and 7-day windows are independent. You can be fine on one and throttled on the other.</p><p class="paragraph" style="text-align:left;"><b>Reset timestamps.</b> Unix epoch. You can calculate exactly when your window resets. To the second.</p><p class="paragraph" style="text-align:left;"><b>Surpassed threshold.</b> A boolean that flips when you cross the limit.</p><p class="paragraph" style="text-align:left;">All of this is sent to your machine on every API call. The percentage bar in Claude Code is a lossy summary.</p><hr class="content_break"><p class="paragraph" style="text-align:left;"><span style="font-size:16px;"><b>Free Claude Code crash course</b></span></p><p class="paragraph" style="text-align:left;"><span style="font-size:16px;">60-min video lesson + </span><a class="link" href="https://CLAUDE.md?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-reverse-engineer-claude-code-s-usage-limits" target="_blank" rel="noopener noreferrer nofollow"><span style="font-size:16px;">CLAUDE.md</span></a><span style="font-size:16px;"> starter kit. Yours when you subscribe.</span></p><div class="button" style="text-align:left;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://www.claudecodecamp.com/subscribe?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-reverse-engineer-claude-code-s-usage-limits"><span class="button__text" style=""> Subscribe </span></a></div><hr class="content_break"><h2 class="heading" style="text-align:left;" id="how-i-intercepted-it">How I intercepted it</h2><p class="paragraph" style="text-align:left;">I built a proxy in Go. Sits between Claude Code and <code>api.anthropic.com</code>. Forwards every request unchanged. Reads the response headers and token counts. Writes them to a log. Passes everything through.</p><div class="codeblock"><pre><code>git clone https://github.com/abhishekray07/claude-meter
cd claude-meter &amp;&amp; go build -o claude-meter ./cmd/claude-meter
./claude-meter setup    # points Claude Code at localhost:7735
./claude-meter start</code></pre></div><p class="paragraph" style="text-align:left;">Two minutes to set up. 1-2ms of added latency.</p><div class="codeblock"><pre><code>Claude Code → Proxy (:7735) → api.anthropic.com
                  ↓
           Raw JSONL capture
                  ↓
           Background normalizer
                  ↓
           Offline analysis + live dashboard</code></pre></div><p class="paragraph" style="text-align:left;">143 lines of Go. Standard library only. Zero external dependencies. I wanted something I could trust in my API path for months. Like a water meter on a pipe: it reads the flow, it doesn&#39;t change it.</p><h3 class="heading" style="text-align:left;" id="what-made-this-harder-than-expected">What made this harder than expected</h3><p class="paragraph" style="text-align:left;">The proxy is simple. The normalization is where things get messy.</p><p class="paragraph" style="text-align:left;">Claude Code streams responses using Server-Sent Events. Token counts arrive in two separate events. <code>message_start</code> has input and cache counts. <code>message_delta</code> has the final output count. You have to parse the stream, find both, and merge them.</p><p class="paragraph" style="text-align:left;">Responses are also gzip-compressed. Some streams are truncated because the proxy grabbed what it could while forwarding. The parser handles partial gzip. Reads what it can. Moves on.</p><p class="paragraph" style="text-align:left;">Then there&#39;s the headers. Not a flat list. A set of prefixed keys:</p><div class="codeblock"><pre><code>anthropic-ratelimit-unified-status: allowed
anthropic-ratelimit-unified-representative-claim: five_hour
anthropic-ratelimit-unified-fallback-percentage: 0.5
anthropic-ratelimit-unified-5h-status: allowed
anthropic-ratelimit-unified-5h-reset: 1774933200
anthropic-ratelimit-unified-5h-utilization: 0.07
anthropic-ratelimit-unified-7d-status: allowed
anthropic-ratelimit-unified-7d-utilization: 0.53</code></pre></div><p class="paragraph" style="text-align:left;">The parser groups these by window (<code>5h</code>, <code>7d</code>, <code>7d_sonnet</code>). Pulls out status, reset time, utilization, and threshold. A normalized record:</p><div class="codeblock"><pre><code>&#123;
  &quot;request_model&quot;: &quot;claude-opus-4-6&quot;,
  &quot;usage&quot;: &#123;
    &quot;input_tokens&quot;: 1210,
    &quot;cache_creation_input_tokens&quot;: 4723,
    &quot;cache_read_input_tokens&quot;: 156027,
    &quot;output_tokens&quot;: 310
  &#125;,
  &quot;ratelimit&quot;: &#123;
    &quot;status&quot;: &quot;allowed&quot;,
    &quot;representative_claim&quot;: &quot;five_hour&quot;,
    &quot;fallback_percentage&quot;: 0.5,
    &quot;windows&quot;: &#123;
      &quot;5h&quot;: &#123; &quot;status&quot;: &quot;allowed&quot;, &quot;utilization&quot;: 0.07 &#125;,
      &quot;7d&quot;: &#123; &quot;status&quot;: &quot;allowed&quot;, &quot;utilization&quot;: 0.53 &#125;
    &#125;
  &#125;
&#125;</code></pre></div><p class="paragraph" style="text-align:left;">The log writer strips <code>authorization</code>, <code>cookie</code>, and <code>x-api-key</code> headers before anything touches disk. The capture channel is non-blocking with a 256-item buffer. If the normalizer falls behind, it drops exchanges instead of blocking the API call.</p><p class="paragraph" style="text-align:left;">25,000+ requests over a week. Zero drops.</p><p class="paragraph" style="text-align:left;">Raw logs go to <code>~/.claude-meter/raw/</code> as daily JSONL files. Normalized records to <code>~/.claude-meter/normalized/</code>. If you change the parsing logic later, <code>claude-meter backfill-normalized</code> re-runs everything from raw.</p><h2 class="heading" style="text-align:left;" id="reverse-engineering-the-budget">Reverse engineering the budget</h2><p class="paragraph" style="text-align:left;">25,477 API calls over a week. The question: how much is my 5-hour budget worth in dollars?</p><h3 class="heading" style="text-align:left;" id="how-the-meter-probably-works">How the meter probably works</h3><p class="paragraph" style="text-align:left;">Anthropic&#39;s API pricing is public:</p><div class="codeblock"><pre><code>Opus 4.6 (per million tokens):
  Input:        $5.00
  Output:       $25.00
  Cache write:  $6.25
  Cache read:   $0.50</code></pre></div><p class="paragraph" style="text-align:left;">My assumption: the quota meter uses these same weights. Each API call has a cost. The meter tracks that against a ceiling.</p><p class="paragraph" style="text-align:left;">Easy to test. I processed 2.27 billion tokens over the week. 95.2% were cache reads. If the meter counted raw tokens, I&#39;d have blown past the limit on day one. Didn&#39;t happen. Utilization barely moved during cache-heavy sessions.</p><p class="paragraph" style="text-align:left;">Cache reads cost $0.50/MTok. Fresh input costs $5.00/MTok. Output costs $25.00/MTok. That&#39;s a 50x spread between the cheapest and most expensive token type. It explains everything about when you hit the limit and when you don&#39;t.</p><h3 class="heading" style="text-align:left;" id="the-hard-part-the-ceiling">The hard part: the ceiling</h3><p class="paragraph" style="text-align:left;">The weights are step one. The actual budget ceiling is harder.</p><p class="paragraph" style="text-align:left;">Headers give you utilization (0.0 to 1.0). Never the dollar amount. So I backed into it:</p><ol start="1"><li><p class="paragraph" style="text-align:left;">Watch for utilization drops. When the 5h window resets, utilization falls toward zero. That&#39;s a boundary.</p></li><li><p class="paragraph" style="text-align:left;">Between resets, add up the price-weighted cost of every API call.</p></li><li><p class="paragraph" style="text-align:left;">Divide cost by the utilization delta.</p></li></ol><p class="paragraph" style="text-align:left;">Say I spent $50 and utilization went from 0.0 to 0.30. Implied budget: ~$167.</p><p class="paragraph" style="text-align:left;">The challenge is noise. Some sessions are tiny: a quick question, $3 of usage. Some mix models. Some have gaps where utilization didn&#39;t update cleanly.</p><p class="paragraph" style="text-align:left;">So the analysis filters hard. Single-model intervals only. Max 10 requests. Max 20 minutes. It throws away the first interval in each group because the anchor point is unreliable.</p><p class="paragraph" style="text-align:left;">After filtering, 63 reset cycles on the 5-hour window:</p><div class="codeblock"><pre><code>5h window:
  Range:    $3 - $705
  Median:   $164
  P25-P75:  $104 - $272
  Sessions: 63

7d window:
  Range:    $718 - $2,659
  Median:   $1,378
  P25-P75:  $1,189 - $1,644
  Sessions: 8</code></pre></div><h3 class="heading" style="text-align:left;" id="why-the-range-is-so-wide">Why the range is so wide</h3><p class="paragraph" style="text-align:left;">There are assumptions that could be wrong:</p><p class="paragraph" style="text-align:left;"><b>The weights might not match.</b> I&#39;m using Anthropic&#39;s published API pricing. They might use internal compute costs instead. If GPU cost doesn&#39;t track the public price sheet, my weights are off.</p><p class="paragraph" style="text-align:left;"><b>The ceiling might move.</b> Thariq said limits are tighter during peak hours. The 5h budget could change by time of day. My analysis doesn&#39;t split peak vs off-peak yet. Some variance might be a real moving target, not noise.</p><p class="paragraph" style="text-align:left;"><b>Thinking tokens might count differently.</b> They&#39;re billed as output. But the proxy can&#39;t see them. They don&#39;t show up in the usage response. Maybe the meter weights them differently than visible output.</p><p class="paragraph" style="text-align:left;"><b>Utilization might not update per-call.</b> The headers could batch updates or report stale values. A utilization of 0.07 might come from a slightly different set of calls than what I captured.</p><p class="paragraph" style="text-align:left;">The median is the useful number. $164 per 5-hour window. $1,378 per week. This is one person on one plan. More data from more people makes the estimates sharper.</p><p class="paragraph" style="text-align:left;">I pay $200/month. Estimated weekly budget: ~$1,400 in API value. Roughly $5,600/month. If these numbers are right, that&#39;s about a 28x multiplier on what I pay. But the variance is wide enough that I wouldn&#39;t bet on it. Rough order of magnitude, not a measurement.</p><h3 class="heading" style="text-align:left;" id="other-things-in-the-headers">Other things in the headers</h3><p class="paragraph" style="text-align:left;">Every response has a <code>representative_claim</code> field. Mine always says <code>five_hour</code>. That&#39;s which window is binding right now.</p><p class="paragraph" style="text-align:left;">There&#39;s <code>fallback_percentage</code> (0.5 in my data). Might be how Anthropic degrades service near the limit. And <code>overage_status</code> (always <code>rejected</code> for me, since I haven&#39;t turned on extra usage). The system checks if you&#39;ve opted into overflow before throttling.</p><p class="paragraph" style="text-align:left;">Some records skip the 5h utilization entirely. Especially Haiku calls. The meter tracks model tiers separately. <code>7d_sonnet</code> has its own window with its own budget ($843 in my single observed session). Makes sense. Sonnet is cheaper to run.</p><p class="paragraph" style="text-align:left;">The 5-hour window is the bottleneck. Simple coding sessions last all day. One deep architecture conversation throttles me by lunch.</p><h2 class="heading" style="text-align:left;" id="then-the-source-code-leaked">Then the source code leaked</h2><p class="paragraph" style="text-align:left;">On March 31, Anthropic accidentally shipped a source map file in their npm package. A 60MB <code>.map</code> file that Bun generates by default. Someone forgot to add <code>*.map</code> to <code>.npmignore</code>. Within hours, 512,000 lines of TypeScript were mirrored across GitHub.</p><p class="paragraph" style="text-align:left;">I went straight to the rate limit code. Here&#39;s what it confirmed and what it revealed.</p><h3 class="heading" style="text-align:left;" id="what-it-confirmed">What it confirmed</h3><p class="paragraph" style="text-align:left;">Everything I found from the proxy is correct. The source (<code>claudeAiLimits.ts</code>) reads the exact same <code>anthropic-ratelimit-unified-*</code> headers I was capturing. Same windows: <code>five_hour</code>, <code>seven_day</code>, <code>seven_day_opus</code>, <code>seven_day_sonnet</code>. Same status values. Same utilization float.</p><p class="paragraph" style="text-align:left;">No hardcoded limits anywhere in the client. Everything comes from headers.</p><p class="paragraph" style="text-align:left;">The <code>representative_claim</code> header picks the window with the furthest reset time. When multiple limits are hit, it shows whichever takes longest to recover. Mine always said <code>five_hour</code> because that was always the binding constraint.</p><h3 class="heading" style="text-align:left;" id="what-i-couldnt-see-from-outside">What I couldn&#39;t see from outside</h3><p class="paragraph" style="text-align:left;">The source revealed things the proxy never could.</p><p class="paragraph" style="text-align:left;"><b>Warnings only show at 70%.</b> Below that, Claude Code suppresses the warning as &quot;potentially stale.&quot; This is why users feel blindsided. You&#39;re at 65% utilization and see nothing. Then suddenly &quot;approaching limit.&quot; No middle ground.</p><p class="paragraph" style="text-align:left;"><b>Early warnings compare burn rate to clock time.</b> The 5h window warns at 90% utilization, but only if less than 72% of the window has elapsed. Burning fast early? Warns sooner. Burning slow late? Stays quiet. The 7d window has three tiers:</p><ul><li><p class="paragraph" style="text-align:left;">75% utilization when 60% of time passed</p></li><li><p class="paragraph" style="text-align:left;">50% utilization when 35% of time passed</p></li><li><p class="paragraph" style="text-align:left;">25% utilization when 15% of time passed</p></li></ul><p class="paragraph" style="text-align:left;"><b>Opus-to-Sonnet fallback is silent.</b> When you hit an Opus limit and <code>anthropic-ratelimit-unified-fallback</code> is <code>available</code>, Claude Code catches the 429 and switches to Sonnet. No notification. Your next response comes from a cheaper model. You won&#39;t notice unless you check <code>/model</code>.</p><p class="paragraph" style="text-align:left;"><b>429s aren&#39;t retried for subscribers.</b> If you&#39;re on Pro or Max and hit a 429, Claude Code doesn&#39;t retry. It shows you a menu: upgrade, enable extra usage, or wait. API users get automatic retries. Subscribers don&#39;t. Exception: Enterprise with pay-as-you-go.</p><p class="paragraph" style="text-align:left;">Two smaller things. The server sends <code>fallback_percentage</code> (0.5 in my data) but the client never reads it. Dead code, or a feature that hasn&#39;t shipped. And Anthropic has 19 internal test scenarios in a <code>/mock-limits</code> command, with presets like <code>session-limit-reached</code>, <code>approaching-weekly-limit</code>, <code>opus-limit</code>, <code>fast-mode-limit</code>. The size of that test matrix tells you how complex this system is.</p><p class="paragraph" style="text-align:left;"><b>The percentage bar uses the same float.</b> The <code>/usage</code> panel calls <code>GET /api/oauth/usage</code>, gets a number 0-100, divides by 100, renders a Unicode block-character bar (<code>▏▎▍▌▋▊▉█</code>). The exact number is right there. They chose to show blocks instead.</p><h2 class="heading" style="text-align:left;" id="the-dashboard">The dashboard</h2><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/4eaf419a-1cc5-4187-aed0-a7cae78ca30a/image.png?t=1775062660"/></div><p class="paragraph" style="text-align:left;">The proxy serves a dashboard at the same port. Open <code>localhost:7735</code> in a browser:</p><ul><li><p class="paragraph" style="text-align:left;"><b>Utilization gauges</b> for 5-hour and 7-day, with peak markers</p></li><li><p class="paragraph" style="text-align:left;"><b>Token breakdown.</b> 2.16 billion cache reads vs 15 million fresh input. That ratio is the whole story.</p></li><li><p class="paragraph" style="text-align:left;"><b>Budget estimates</b> with range, median, and IQR per window</p></li><li><p class="paragraph" style="text-align:left;"><b>Utilization over time.</b> The 5h window is spiky. The 7d is a slow climb.</p></li><li><p class="paragraph" style="text-align:left;"><b>Per-model breakdown.</b> Opus: 12,046 calls (47%). Sonnet: 8,362. Haiku: 2,644.</p></li></ul><p class="paragraph" style="text-align:left;">Refreshes every 5 seconds. No build step. No npm.</p><h2 class="heading" style="text-align:left;" id="what-to-do-with-this">What to do with this</h2><p class="paragraph" style="text-align:left;"><b>Stay in sessions.</b> Cache reads barely count. Every cold start repays the cache write cost at full weight. One long session is cheaper than four short ones.</p><p class="paragraph" style="text-align:left;"><b>Use medium effort.</b> High effort makes more thinking tokens. Thinking tokens are output. Output is the most expensive thing on the meter.</p><p class="paragraph" style="text-align:left;"><b>Space out big sessions.</b> The 5-hour window is the real constraint. If you have a big refactor later, don&#39;t burn the window on a deep conversation in the morning.</p><h2 class="heading" style="text-align:left;" id="the-obvious-counterargument">The obvious counterargument</h2><p class="paragraph" style="text-align:left;">Anthropic has reasons to keep this opaque. Dynamic limits let them manage load across millions of users. Publishing a formula invites gaming. I get it.</p><p class="paragraph" style="text-align:left;">You can also run <code>/cost</code> or <code>/stats</code> in Claude Code to see token counts for your session. Not nothing.</p><p class="paragraph" style="text-align:left;">But the leaked source tells a different story. The utilization float is already in the client. The <code>/usage</code> panel already fetches it and renders a bar. The statusline hook already reads <code>rawUtilization</code> from every response. The data flows through the client and gets displayed as a vague bar instead of a number.</p><p class="paragraph" style="text-align:left;">Showing &quot;You&#39;ve used 73% of your 5-hour limit, resets in 2h14m&quot; doesn&#39;t reveal the formula. It just shows what you&#39;ve used. Like a gas gauge. You don&#39;t need to know the tank size to the milliliter. You need to know when you&#39;re running low.</p><p class="paragraph" style="text-align:left;">Every cloud provider does this. AWS shows your service quotas. GCP shows your API usage. Anthropic computes the number, sends it to your machine, renders it as a bar, and hides the number behind it.</p><p class="paragraph" style="text-align:left;">I&#39;m on Max 20x. I plan my day around Claude Code. When the limit hits at 2pm on a Tuesday, that&#39;s not minor. I need to see it coming.</p><p class="paragraph" style="text-align:left;"><a class="link" href="https://github.com/abhishekray07/claude-meter?utm_source=www.claudecodecamp.com&utm_medium=newsletter&utm_campaign=i-tried-to-reverse-engineer-claude-code-s-usage-limits" target="_blank" rel="noopener noreferrer nofollow">Claude Meter</a> makes the invisible visible. If you&#39;re on Pro or a different Max tier, your data helps. More data points across plans, sharper estimates.</p><p class="paragraph" style="text-align:left;">Run the proxy. Watch the numbers.</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/powered-by?publication_logo=https%3A%2F%2Fmedia.beehiiv.com%2Fcdn-cgi%2Fimage%2Ffit%3Dscale-down%2Cformat%3Dauto%2Conerror%3Dredirect%2Cquality%3D80%2Fuploads%2Fpublication%2Flogo%2F713ee402-5719-49c9-b93b-d472fb299a84%2Fnewsletter-logo.png%3Fv%3D1796277116&publication_name=Claude+Code+Camp&utm_campaign=2c0a2d62-b039-40e5-b467-31173f1ea7d7&utm_medium=post_rss&utm_source=claude_code_camp">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

  </channel>
</rss>
