<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jonathan Barazany</title>
    <description>The latest articles on DEV Community by Jonathan Barazany (@johnib).</description>
    <link>https://dev.to/johnib</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3835698%2Fd6ee4a57-fac3-4472-b34e-52241d49669a.png</url>
      <title>DEV Community: Jonathan Barazany</title>
      <link>https://dev.to/johnib</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johnib"/>
    <language>en</language>
    <item>
      <title>The 5-Hour Quota, Boris's Tweet, and What the Source Code Actually Reveals</title>
      <dc:creator>Jonathan Barazany</dc:creator>
      <pubDate>Wed, 01 Apr 2026 11:26:14 +0000</pubDate>
      <link>https://dev.to/johnib/the-5-hour-quota-boriss-tweet-and-what-the-source-code-actually-reveals-39ic</link>
      <guid>https://dev.to/johnib/the-5-hour-quota-boriss-tweet-and-what-the-source-code-actually-reveals-39ic</guid>
      <description>&lt;p&gt;Yesterday I published a deep dive into Claude Code's compaction engine. At the end, I made a promise: go deeper on the caching optimizations that happen &lt;em&gt;outside&lt;/em&gt; of compaction.&lt;/p&gt;

&lt;p&gt;But actually, the caching rabbit hole started before that post - because of a tweet from about ten days ago.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tweet That Confused Me
&lt;/h2&gt;

&lt;p&gt;If you're a heavy Claude Code user, you felt the 5-hour usage cap snap shut after Anthropic's two-week promotional window closed. The complaints flooded in. Someone tagged Boris - the engineer behind Claude Code, the person who built it - asking what he planned to do about it.&lt;/p&gt;

&lt;p&gt;His answer: improvements are coming to squeeze more out of the current quota.&lt;/p&gt;

&lt;p&gt;My first reaction: &lt;em&gt;what can he possibly do?&lt;/em&gt; The quota is server-side. It's rate limits and token budgets. There's no client trick that changes how many tokens you're allowed per hour.&lt;/p&gt;

&lt;p&gt;That question sat with me. Then yesterday's compaction post led me to look harder at the source - and the answer became obvious.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache Hit Ratio &lt;em&gt;Is&lt;/em&gt; the Quota
&lt;/h2&gt;

&lt;p&gt;Every message you send to Claude Code costs tokens. But tokens aren't flat. Cache hits are discounted significantly. Cache misses cost 1.25x - you're not just paying full price, you're paying a penalty.&lt;/p&gt;

&lt;p&gt;If your cache hit ratio is high, you stretch the same quota dramatically further than someone whose cache keeps busting. The quota doesn't change. What you extract from it does.&lt;/p&gt;

&lt;p&gt;This is the reframe. When Boris says improvements are coming, he's not talking about changing server limits. He's talking about recovering cache hit ratio - which is the same thing as handing quota back to users.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Claude Code Already Does About This
&lt;/h2&gt;

&lt;p&gt;When I asked Claude to analyze its own source code, what came back wasn't a simple "we cache the system prompt." It was twelve distinct mechanisms working together, each one plugging a specific leak.&lt;/p&gt;

&lt;p&gt;Two stood out - and they reveal how deeply Anthropic thinks about cache economics.&lt;/p&gt;

&lt;p&gt;The first solves a combinatorial explosion: five runtime booleans in the system prompt means 32 possible cache entries, most of which will never get a second hit. Claude Code's fix involves a literal boundary string in the source that splits stable content from dynamic content, with the stable prefix shared globally across every user on Earth.&lt;/p&gt;

&lt;p&gt;The second is even more interesting: a side-channel called &lt;code&gt;cache_edits&lt;/code&gt; that surgically removes old tool results from the cached KV store &lt;em&gt;without changing a single byte in the actual message&lt;/em&gt;. No cache invalidation. No reprocessing penalty.&lt;/p&gt;

&lt;p&gt;But those are just two of twelve mechanisms. The full picture includes a 728-line diagnostic system that treats cache misses as bugs, a function literally named &lt;code&gt;DANGEROUS_uncachedSystemPromptSection()&lt;/code&gt;, and a one-sentence prompt rewrite that saved 20K tokens per budget flip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://barazany.dev/blog/claude-code-token-caching" rel="noopener noreferrer"&gt;Read the full source code analysis on my blog →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's what you'll find in the full post:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How &lt;code&gt;__SYSTEM_PROMPT_DYNAMIC_BOUNDARY__&lt;/code&gt; solves the 2^N cache key explosion with Blake2b prefix hashing&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;cache_edits&lt;/code&gt; side-channel: surgery without invalidation&lt;/li&gt;
&lt;li&gt;Why there's a function called &lt;code&gt;DANGEROUS_uncachedSystemPromptSection()&lt;/code&gt; and what it forces engineers to do&lt;/li&gt;
&lt;li&gt;The real mechanism behind the &lt;code&gt;/clear&lt;/code&gt; warning (it's called "willow" internally)&lt;/li&gt;
&lt;li&gt;What Boris can actually ship to stretch your quota further&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Previously: &lt;a href="https://barazany.dev/blog/claude-codes-compaction-engine" rel="noopener noreferrer"&gt;Claude Code's Compaction Engine: What the Source Code Actually Reveals&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>We Were About to Buy an Automation Platform. We Already Had One.</title>
      <dc:creator>Jonathan Barazany</dc:creator>
      <pubDate>Wed, 01 Apr 2026 06:18:17 +0000</pubDate>
      <link>https://dev.to/johnib/we-were-about-to-buy-an-automation-platform-we-already-had-one-4k4a</link>
      <guid>https://dev.to/johnib/we-were-about-to-buy-an-automation-platform-we-already-had-one-4k4a</guid>
      <description>&lt;p&gt;When Cowork launched in January, I didn't understand the hype.&lt;/p&gt;

&lt;p&gt;We'd deployed Claude Enterprise at Nayax. Hundreds of employees now had access to a tool most of them had only dreamed about — connected to Jira, Outlook, Teams, Confluence, Snowflake. People were doing things that were simply out of reach before. That felt like the win.&lt;/p&gt;

&lt;p&gt;Cowork existed. I knew it. But the initial version was a local file-management tool — point it at a folder, let it sort your downloads. Useful, but not what I needed. And Chat, combined with the connectors we'd spent months carefully plugging in, was already doing incredible things. So Cowork stayed on the shelf.&lt;/p&gt;

&lt;p&gt;Then the automation requests started coming in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Death Spiral
&lt;/h2&gt;

&lt;p&gt;Every department had something they wanted to automate. IT wanted to auto-respond to incomplete helpdesk tickets. Finance needed meeting summaries routed somewhere useful. Managers wanted Jira tickets updated based on what happened in their standups. Everyone had a list.&lt;/p&gt;

&lt;p&gt;We started evaluating n8n and Workato. That's when the death spiral began.&lt;/p&gt;

&lt;p&gt;How does Andy from HR run a workflow on behalf of his credentials? How many environments do we need? Who educates the entire company on workflow variables, testing, monitoring? The n8n enterprise license alone wasn't cheap. And even I — with an engineering background and hands-on software experience — had struggled with n8n. I eventually pulled off what I needed by connecting it to Claude, but when it broke, I still had to debug it in the n8n portal. That's a learning curve that shuts most people out entirely.&lt;/p&gt;

&lt;p&gt;I didn't see a way out. No clean answer, just more governance discussions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Moment That Changed It
&lt;/h2&gt;

&lt;p&gt;On February 24, Anthropic shipped the full enterprise push for Cowork — plugins, deep integrations, and &lt;code&gt;/schedule&lt;/code&gt;. My first reaction: "What could I actually do with that?"&lt;/p&gt;

&lt;p&gt;I sat with that question. And then it clicked — not because of the scheduling feature itself, but because of what was already underneath it.&lt;/p&gt;

&lt;p&gt;Cowork runs in each user's context. It logs in as them. It inherits their permissions. And it connects to every SaaS integration we'd spent the previous months approving and configuring — already scoped, already governed, already ours. No new environments. No credential sharing. No governance meeting required.&lt;/p&gt;

&lt;p&gt;The automation platform we'd been debating how to buy was already deployed.&lt;/p&gt;

&lt;h2&gt;
  
  
  So How Does a Non-Technical Person Actually Build the Workflow?
&lt;/h2&gt;

&lt;p&gt;That's the part that surprised me most. The governance problem was solved — but I still had a nagging question: how does Andy from HR actually build his automation?&lt;/p&gt;

&lt;p&gt;The answer involves a mechanism where Claude watches your successful conversation, composes a reusable skill from it, then &lt;em&gt;tests that skill against a clean session&lt;/em&gt; and produces an eval report. No nodes. No variables. No portal debugging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://barazany.dev/blog/we-already-had-the-automation-platform" rel="noopener noreferrer"&gt;Read the full breakdown on my blog →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The full post covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How the "skill that writes skills" actually works in practice&lt;/li&gt;
&lt;li&gt;The specific automations I've been running for weeks (enriched work items, auto-responses, usage reports, meeting summaries → Jira)&lt;/li&gt;
&lt;li&gt;Why the connectors and governance we built over 3 months turned out to be the foundation for something none of us expected&lt;/li&gt;
&lt;li&gt;What rollout looks like next — and why it needs its own workshop&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>devtools</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>What Karpathy's Autoresearch Unlocked for Me</title>
      <dc:creator>Jonathan Barazany</dc:creator>
      <pubDate>Tue, 31 Mar 2026 22:58:56 +0000</pubDate>
      <link>https://dev.to/johnib/what-karpathys-autoresearch-unlocked-for-me-24k7</link>
      <guid>https://dev.to/johnib/what-karpathys-autoresearch-unlocked-for-me-24k7</guid>
      <description>&lt;p&gt;I'm not a data scientist. I've trained a few models before — simple classification problems, with AI writing the Python and me running the iterations. It worked. I got confident.&lt;/p&gt;

&lt;p&gt;Then a friend asked for help with something harder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Weeks at 0.58
&lt;/h2&gt;

&lt;p&gt;The problem involved predicting an outcome from a mix of CRM data and call recordings. Not trivial, but not exotic either.&lt;/p&gt;

&lt;p&gt;Quick primer on AUC — the metric I'll use throughout. Imagine your model looks at two random people: one where the answer is yes, one where it's no. AUC measures how often the model correctly ranks the yes above the no. Score of 0.5 means random guessing. Score of 1.0 means always right.&lt;/p&gt;

&lt;p&gt;I tried everything I knew: XGBoost, feature engineering, extracting features from transcripts using AI models, trying different combinations. I assumed more data meant better results — that's how it's supposed to work. Instead, every time I added more features, the AUC dropped. Below 0.5 sometimes. Meaning the model was now actively misleading — it would've been better to ignore it entirely and flip a coin.&lt;/p&gt;

&lt;p&gt;My ceiling was 0.581. I couldn't break it no matter what I did.&lt;/p&gt;

&lt;p&gt;I stepped away from the problem for a week. Talked it through with a friend who actually knows this domain. Nothing clicked. I was out of moves.&lt;/p&gt;

&lt;p&gt;Then Karpathy &lt;a href="https://x.com/karpathy/status/2030371219518931079" rel="noopener noreferrer"&gt;posted about autoresearch&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Gold Wasn't the Model
&lt;/h2&gt;

&lt;p&gt;The post generated a ton of hype. For two days I kept asking myself: how do I use what he built on my problem? His project was about training a small language model — not a classification problem like mine. On the surface, nothing transferred.&lt;/p&gt;

&lt;p&gt;But that was the wrong question. The interesting part wasn't what Karpathy was training. It was &lt;em&gt;how&lt;/em&gt;. A fixed, uncheat-able validation metric. An agent that modifies only the training script. A loop that runs while you sleep. The scientific method, automated.&lt;/p&gt;

&lt;p&gt;I had a problem sitting unfinished. I had the method. I started a tmux session from my iPhone on Friday night and let it run.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happened Next
&lt;/h2&gt;

&lt;p&gt;By experiment 30, the agent declared it had exhausted all options. I didn't accept that — I just asked it questions. That conversation unlocked something unexpected: a technique I'd never heard of that jumped AUC from 0.581 to 0.628 in one step.&lt;/p&gt;

&lt;p&gt;From there, across 165 experiments, the agent built a system that pushed AUC to &lt;strong&gt;0.6747&lt;/strong&gt; — a 15.6% gain from a dataset I was ready to abandon. And the dynamic that made it work — agent explores, hits a ceiling, human nudges, agent continues — repeated itself throughout the entire run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://barazany.dev/blog/what-karpathys-autoresearch-unlocked-for-me" rel="noopener noreferrer"&gt;Read the full story with the complete results table and methodology →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The full post covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The exact stacking architecture that broke through the 0.58 ceiling&lt;/li&gt;
&lt;li&gt;How "rubber duck debugging" with an AI agent led to techniques I didn't know existed&lt;/li&gt;
&lt;li&gt;The complete experiment-by-experiment results table (0.581 → 0.6747)&lt;/li&gt;
&lt;li&gt;What happens when the agent spawns its own research sub-agent mid-run&lt;/li&gt;
&lt;li&gt;Why staying close to what's emerging isn't optional anymore&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>llm</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Claude Code's Compaction Engine: What the Source Code Actually Reveals</title>
      <dc:creator>Jonathan Barazany</dc:creator>
      <pubDate>Tue, 31 Mar 2026 22:43:23 +0000</pubDate>
      <link>https://dev.to/johnib/claude-codes-compaction-engine-what-the-source-code-actually-reveals-2o4</link>
      <guid>https://dev.to/johnib/claude-codes-compaction-engine-what-the-source-code-actually-reveals-2o4</guid>
      <description>&lt;p&gt;A few months ago I wrote about &lt;a href="https://barazany.dev/blog/context-engineering-what-keeps-ai-agents-from-losing-their-minds" rel="noopener noreferrer"&gt;context engineering&lt;/a&gt; - the invisible logic that keeps AI agents from losing their minds during long sessions. I described the patterns from the outside: keep the latest file versions, trim terminal output, summarize old tool results, guard the system prompt.&lt;/p&gt;

&lt;p&gt;I also made a prediction: naive LLM summarization was a band-aid. The real work had to be deterministic curation. Summary should be the last resort.&lt;/p&gt;

&lt;p&gt;Then Claude Code's repository surfaced publicly. I asked Claude to analyze its own compaction source code.&lt;/p&gt;

&lt;p&gt;The prediction held. And the implementation is more thoughtful than I expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Tiers, Not One
&lt;/h2&gt;

&lt;p&gt;Claude Code's compaction system isn't a single mechanism - it's three tiers applied in sequence, each heavier than the last.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 1&lt;/strong&gt; runs before every API call. It does lightweight cleanup: clearing old tool results, keeping only the most recent five, replacing the rest with &lt;code&gt;[Old tool result content cleared]&lt;/code&gt;. Fast, cheap, no model involved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 2&lt;/strong&gt; operates at the API level - server-side strategies that handle thinking blocks and tool result clearing based on token thresholds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 3&lt;/strong&gt; is the full LLM summarization. A structured 9-section summary: intent, technical concepts, files touched, errors and fixes, all user messages, pending tasks, current work. The model reasons through the conversation before committing to the summary - a chain-of-thought scratchpad that gets stripped afterward. It's sophisticated. It's also the last resort.&lt;/p&gt;

&lt;p&gt;This architecture confirms exactly what the first article argued: summarization is expensive and lossy. You reach for it only when everything else has already run.&lt;/p&gt;

&lt;h2&gt;
  
  
  But Here's the Problem
&lt;/h2&gt;

&lt;p&gt;My first instinct when reading about Tier 1 was: if the conversation is cached, deleting old messages invalidates the cache. And cache invalidation is brutally expensive - instead of a 90% discount on tokens, you're paying 1.25x for cache writes. You've just made compaction cost more than the tokens you saved.&lt;/p&gt;

&lt;p&gt;So how does Claude Code solve this? The answer involves a mechanism called &lt;code&gt;cache_edits&lt;/code&gt; that surgically removes tool results without touching the cached prefix, a summarization call that piggybacks on the main conversation's cache key (the alternative showed a 98% miss rate), and a reconstruction process that rebuilds the entire session state after compaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://barazany.dev/blog/claude-codes-compaction-engine" rel="noopener noreferrer"&gt;Read the full analysis on my blog →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The full post covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How &lt;code&gt;cache_edits&lt;/code&gt; preserve the prompt cache during cleanup&lt;/li&gt;
&lt;li&gt;Why the summarization call reuses your own cache key (and what happens when it doesn't)&lt;/li&gt;
&lt;li&gt;The complete post-compaction reconstruction process&lt;/li&gt;
&lt;li&gt;How cache economics shaped every architectural decision in the system&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>devtools</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
