<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:media="http://search.yahoo.com/mrss/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:custom="https://www.oreilly.com/rss/custom"

	>

<channel>
	<title>Radar</title>
	<atom:link href="https://www.oreilly.com/radar/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.oreilly.com/radar</link>
	<description>Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology</description>
	<lastBuildDate>Thu, 11 Jun 2026 10:59:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.oreilly.com/radar/wp-content/uploads/sites/3/2025/04/cropped-favicon_512x512-160x160.png</url>
	<title>Radar</title>
	<link>https://www.oreilly.com/radar</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>When Context Collapses: Teaching Agents to Detect and Recover from Lost Memory</title>
		<link>https://www.oreilly.com/radar/when-context-collapses-teaching-agents-to-detect-and-recover-from-lost-memory/</link>
				<comments>https://www.oreilly.com/radar/when-context-collapses-teaching-agents-to-detect-and-recover-from-lost-memory/#respond</comments>
				<pubDate>Thu, 11 Jun 2026 10:59:13 +0000</pubDate>
					<dc:creator><![CDATA[Andrew Stellman]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18901</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/When-context-collapses.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/When-context-collapses-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[Or, how I learned to stop worrying about compaction and love the file system]]></custom:subtitle>
		
				<description><![CDATA[This is the eighth article in a series on agentic engineering and AI-driven development.&#160;Read part one&#160;here, part two&#160;here, part three&#160;here, part four&#160;here, part five&#160;here, part six&#160;here, and part seven here. &#8220;640K ought to be enough for anybody.&#8221;—Bill Gates (allegedly) If you&#8217;re building AI agents that do complex, multistep work, you&#8217;re going to run into context [&#8230;]]]></description>
								<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>This is the eighth article in a series on agentic engineering and AI-driven development.&nbsp;Read part one&nbsp;<a href="https://www.oreilly.com/radar/the-accidental-orchestrator/" target="_blank" rel="noreferrer noopener">here</a>, part two&nbsp;<a href="https://www.oreilly.com/radar/keep-deterministic-work-deterministic/" target="_blank" rel="noreferrer noopener">here</a>, part three&nbsp;<a href="https://www.oreilly.com/radar/the-toolkit-pattern/" target="_blank" rel="noreferrer noopener">here</a>, part four&nbsp;<a href="https://www.oreilly.com/radar/ai-is-writing-our-code-faster-than-we-can-verify-it/" target="_blank" rel="noreferrer noopener">here</a>, part five&nbsp;<a href="https://www.oreilly.com/radar/ai-code-review-only-catches-half-of-your-bugs/" target="_blank" rel="noreferrer noopener">here</a></em>, <em> part six&nbsp;<a href="https://www.oreilly.com/radar/why-doesnt-anyone-teach-developers-about-context-management/" target="_blank" rel="noreferrer noopener">here</a>, and part seven <a href="https://www.oreilly.com/radar/your-ai-agent-already-forgot-half-of-what-you-told-it/" target="_blank" rel="noreferrer noopener">here</a>.</em></p>
</blockquote>



<p class="wp-block-paragraph"><em>&#8220;640K ought to be enough for anybody.&#8221;—Bill Gates (allegedly)</em></p>



<p class="wp-block-paragraph">If you&#8217;re building AI agents that do complex, multistep work, you&#8217;re going to run into context loss. The agent&#8217;s working memory fills up, older information gets silently dropped or compressed, and the agent keeps going without realizing it&#8217;s forgotten something. This article, the third in my Radar article trilogy about context management, walks through a pattern I&#8217;ve been refining for detecting and recovering from that problem, which I call the <strong>externalize-recognize-rehydrate pattern</strong> (or <strong>ERR</strong>, which I think is actually a pretty good acronym for an error recovery pattern): save your agent&#8217;s state to files on disk, detect when context has degraded, and reload from those files to recover. The individual techniques are standard practice in agent and skill engineering—checkpointing, progress files, state verification—but the real power comes from combining them into a coherent workflow that you can use live or build into your agents. I&#8217;ll walk through each step with specific prompts you can adapt for your own agents and coding sessions.</p>



<p class="wp-block-paragraph">Which brings me to memory. Gates has said on multiple occasions that he never actually said that quote at the top of this article, but it endures because it captures one of the core limitations of that era, one that people struggled with constantly, in a way that we can laugh about now. Around that time I was using a 286 with 1 MB of RAM. That&#8217;s megabytes, not gigabytes. MS-DOS 3.3 gave me 640K of conventional memory plus 384K of upper memory, and I spent a lot of time figuring out how to use every bit of it. I configured memory managers, loaded device drivers high, used (and wrote!) terminate-and-stay-resident programs that moved themselves out of conventional memory to free up space, and generally treated memory as a resource that required active, deliberate engineering. There was a lot I wanted to do that didn&#8217;t fit into 640K, and like most people at the time, I went to some lengths to compensate for the memory limitations.</p>



<p class="wp-block-paragraph">We&#8217;re at the 640K stage of AI development. The context window is the new RAM ceiling. Most of today&#8217;s models give you somewhere between 200K and 2M tokens of working memory (and, like memory in the late 1980s and early 1990s, those numbers are growing all the time), and if you&#8217;re building agents that do complex multistep work, you will hit that ceiling. When you do, the AI starts compacting: compressing or dropping older parts of the conversation to make room. And just like running out of conventional memory on a 286, things stop working right and you&#8217;re not sure why.</p>



<p class="wp-block-paragraph">In 20 years we&#8217;ll be looking back at today&#8217;s puny context windows and wondering how developers in the 2020s managed to get anything done with just a few million tokens. Because none of this is new. In case you don&#8217;t believe me, here&#8217;s a photo of my dad at Princeton in the early 1970s working on an Evans and Sutherland LDS-1 graphics computer, the first commercial vector graphics machine, connected to a PDP-10 mainframe:</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1600" height="1225" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-12-1600x1225.png" alt="Keep on truckin" class="wp-image-18902" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-12-1600x1225.png 1600w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-12-300x230.png 300w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-12-768x588.png 768w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-12-1536x1176.png 1536w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-12.png 1964w" sizes="(max-width: 1600px) 100vw, 1600px" /></figure>



<p class="wp-block-paragraph">The actual LDS-1 is in the large cabinet in the background, directly behind the monitor. Sitting next to it, just out of the picture, is an even larger cabinet that holds a memory unit with <em>16K of magnetic core memory</em> (technically 8K words).</p>



<p class="wp-block-paragraph">So you can imagine that just a decade later, 640K in a tiny PC that fit on your desktop seemed extravagant.</p>



<p class="wp-block-paragraph">In the last two articles in this series (“<a href="https://www.oreilly.com/radar/why-doesnt-anyone-teach-developers-about-context-management/" target="_blank" rel="noreferrer noopener">Why Doesn’t Anyone Teach Developers About Context Management?</a>” and “<a href="https://www.oreilly.com/radar/your-ai-agent-already-forgot-half-of-what-you-told-it/" target="_blank" rel="noreferrer noopener">Your AI Agent Already Forgot Half of What You Told It</a>”), I talked about what context is and why context management matters, and I shared practical techniques and prompts for keeping important information in files instead of leaving it in the AI&#8217;s context window. This article gets more technical. I want to build on those strategies and talk about how to build agents that can detect when they&#8217;ve lost context and recover from it on their own.</p>



<h2 class="wp-block-heading"><strong>Brute-forcing my way through context loss</strong></h2>



<p class="wp-block-paragraph">I&#8217;ve been doing this kind of context management for a while now, long before the specific tools I&#8217;m about to describe existed. But a recent crash gave me a clean example of what the process looks like in its most brute-force form.</p>



<p class="wp-block-paragraph">I was working in Copilot with a seven-step plan, going through it one step at a time, having another AI review each step before moving on. Steps one and two went fine. When it came time to do step three and I gave it the prompt, it jumped straight to step four. This kind of thing can be really frustrating, because it seems like an AI smart enough to implement a complex feature in code should be able to (ahem) count to four.</p>



<p class="wp-block-paragraph">The key to not getting frustrated when the AI loses track of steps or can&#8217;t seem to count from prompt to prompt is to remember what it&#8217;s good at and how it remembers things. If the AI you&#8217;re using does that, check the conversation history. You&#8217;ll probably see something like &#8220;summarizing conversation history&#8221; or &#8220;compacting conversation&#8221; somewhere above your last message. That&#8217;s telling you that the AI lost track of where it was because that count was literally purged from its memory.</p>



<p class="wp-block-paragraph">AIs are good at carrying out an instruction. They&#8217;re bad at keeping track of their own state over a long conversation, and the way they manage their memory is a big part of that. This article is about finding ways to build your AI tools so you&#8217;re not relying on them to do the thing they&#8217;re worst at.</p>



<p class="wp-block-paragraph">But compaction isn&#8217;t the only way your AI loses context. A few weeks ago I was deep into a long session with Copilot, working through a multiphase code review. I&#8217;d spent a while building up context with the AI about my codebase and the decisions we&#8217;d made together. I was about to move on to the next phase, and then I got this:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1552" height="964" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-13.png" alt="Phase B" class="wp-image-18903" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-13.png 1552w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-13-300x186.png 300w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-13-768x477.png 768w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-13-1536x954.png 1536w" sizes="(max-width: 1552px) 100vw, 1552px" /></figure>



<p class="wp-block-paragraph">The entire context was wiped, which could have been a really frustrating problem, since I had a long history with the session, and it had built up a lot of knowledge about what we were doing. This turned out to be a bug in Opus 4.6&#8217;s interaction with Copilot&#8217;s conversation history, and I&#8217;ve seen other people hit the same thing. I was staring at a fresh prompt with nothing in it.</p>



<p class="wp-block-paragraph">So I did something that, in retrospect, is a pretty good brute-force version of what this whole article is about. I recognized the context was gone (hard to miss when the whole conversation disappears). I copied the entire conversation out of Copilot and pasted it into a text file. Then I gave the new session a prompt:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">We were in the middle of a long conversation, then I got an error and the entire context was wiped. I saved a copy of the conversation in #file:chat_history.txt, read it and bring yourself back up to speed.</p>
</blockquote>



<p class="wp-block-paragraph">And it worked! This brought the new session back to where I needed it to be.</p>



<p class="wp-block-paragraph">That simple error and recovery actually outlines a pretty good pattern for dealing with context loss:</p>



<ol class="wp-block-list">
<li><strong>Externalize the state.</strong> Get the important information out of the conversation and into a file on disk, where it won&#8217;t disappear when the context window reshuffles.</li>



<li><strong>Recognize the loss.</strong> Notice that the agent&#8217;s working context has been wiped or degraded, whether that&#8217;s obvious (like a crash) or subtle (like output that quietly stops making sense).</li>



<li><strong>Rehydrate from the file.</strong> Point a new session at that file and let it rebuild its understanding from what&#8217;s written down.</li>
</ol>



<p class="wp-block-paragraph">The individual mechanics are well-documented across cognitive science (cognitive offloading, task resumption), software engineering (the Memento pattern, React hydration), and knowledge management (the SECI model). I&#8217;m not claiming to have invented any of them. But the specific abstraction of these three phases into a unified, named pattern applied to AI context management is, as far as I can tell, new. It&#8217;s synthesis and codification, not invention.</p>



<p class="wp-block-paragraph">In this case I did it with copy and paste, which isn&#8217;t particularly elegant, but it worked for me. But this is a blunt instrument, because a raw conversation dump is both too much and too little: it&#8217;s too much because it&#8217;s full of noise, like tool calls, dead ends, back-and-forth that doesn&#8217;t matter anymore; and it&#8217;s too little because the context that got silently compressed away during the session is already gone. When you build these mechanisms into agents and skills, you can do it in a much more subtle and automated way.</p>



<h2 class="wp-block-heading"><strong>Externalize: Add two layers of state to your agent</strong></h2>



<p class="wp-block-paragraph">The idea behind <strong>externalization</strong>, or periodically saving your agent&#8217;s state, came out of a conversation I was having with an AI assistant while building the <a href="https://github.com/andrewstellman/quality-playbook" target="_blank" rel="noreferrer noopener">Quality Playbook</a>, an open source AI coding skill that runs structured code reviews. The playbook runs a structured code review as a single process, but that process could easily turn into a 15-million-token request if you tried to do it all in one shot. I described in the <a href="https://www.oreilly.com/radar/your-ai-agent-already-forgot-half-of-what-you-told-it/" target="_blank" rel="noreferrer noopener">previous article in this series</a> how I broke it into six phases, and that was only possible because the context for each phase had already been externalized. Each phase reads its inputs from files, does its work, writes its outputs to files, and stops. The next phase picks up from the files, not from whatever the agent remembers. If this sounds like the familiar advice to ask the AI to plan before you ask it to implement, it&#8217;s the same principle applied to context management. Separating each step and persisting the output means you can inspect it, and the next step doesn&#8217;t depend on the agent&#8217;s memory.</p>



<p class="wp-block-paragraph">But what should those files contain? I found that the AI is actually good at figuring that out. At some point I asked the assistant:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Would it make sense for the agent to record more context in files as it progresses, to make sure nothing is dropped along the way? It should work even if you break it into separate prompts, because the result from each step is persisted. Plus, we can audit its reasoning for debugging and improvement.</p>
</blockquote>



<p class="wp-block-paragraph">That prompt was all it took. The assistant designed the file structure itself: a progress tracker that records which phase is active and what&#8217;s been completed, a JSONL artifact file (JSONL is just a file with a bundle of JSON objects, with one record per line) where each pass appends its output, and a set of brief documents describing the purpose of each phase. You don&#8217;t need to overengineer this. Tell the agent what you&#8217;re trying to preserve and let it figure out the file layout.</p>



<p class="wp-block-paragraph">What emerged falls into two categories that I think of as execution continuity and task continuity:</p>



<ul class="wp-block-list">
<li><strong>Execution continuity</strong> is the state the agent needs to resume work in the middle of a task: what step it&#8217;s on, what it&#8217;s completed, what decisions it&#8217;s made so far. These files change constantly as the agent works.<br></li>



<li><strong>Task continuity</strong> is the broader context that doesn&#8217;t change during execution: what the whole task is about, what success looks like, what the structural constraints are. These files are written once and read at every resumption.</li>
</ul>



<p class="wp-block-paragraph">When an agent needs to resume after suspected compaction, it reads back both layers. The task continuity files anchor it back to what the whole endeavor is about. The execution continuity files put it back in the middle of the work. Together, they give the agent enough information to continue without relying on anything that might have been compacted.</p>



<p class="wp-block-paragraph">The key is that externalization isn&#8217;t something you do once at the beginning of a task. You want the agent saving its state at frequent checkpoints so that if compaction happens mid-run, the most recent checkpoint is close to where the agent was working. Here&#8217;s the kind of instruction I gave the agent for tasks that processed records one at a time:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Update the progress file after every single record, not in batches. Write the output line first, then update the progress file with the new cursor and a fresh timestamp. If the progress file&#8217;s timestamp falls behind the output file&#8217;s, you&#8217;re batching and that&#8217;s wrong.</p>
</blockquote>



<p class="wp-block-paragraph">The frequency matters because context can compact at any point. If the agent only saves state at the end of a long run, compaction in the middle means losing everything since the start. If it checkpoints after every unit of work, the worst case is losing one unit.</p>



<p class="wp-block-paragraph">Two-layer externalization survives context reshaping, not only outright context loss. Even if the agent&#8217;s context window isn&#8217;t full, if the context has been reorganized or reprioritized (a compression that reshapes without truncating), the agent can reload the external files and know for certain what the ground truth is.</p>



<h2 class="wp-block-heading"><strong>Recognize: Detecting loss from inside the agent</strong></h2>



<p class="wp-block-paragraph">The second step in the pattern is to <strong>recognize</strong> that your agent has lost context, and it turns out to be the hardest part (at least with today&#8217;s AI technology). When the context window fills up, the AI compacts silently, and the agent keeps working without realizing it&#8217;s lost information. The agent can&#8217;t tell you it&#8217;s forgotten something, because it doesn&#8217;t know it forgot. Detecting that change turns out to be a nontrivial problem; I&#8217;ll walk you through an approach that helped me, and keep it general enough so you can do the same thing. The copy-and-paste approach works when the context loss is obvious, like a crash that wipes your whole conversation. But most context loss isn&#8217;t that visible.</p>



<p class="wp-block-paragraph">I described context compaction in the <a href="https://www.oreilly.com/radar/your-ai-agent-already-forgot-half-of-what-you-told-it/" target="_blank" rel="noreferrer noopener">previous article</a>, but it&#8217;s worth restating the core problem from the agent&#8217;s perspective. Different tools handle context overflow differently: Some truncate older messages; some compress conversations into summaries; some use a sliding window. But they all have the same effect. Information disappears from the agent&#8217;s working context, and the agent doesn&#8217;t get notified.</p>



<p class="wp-block-paragraph">This was a challenge when I built the Quality Playbook, because it runs multiple passes over a codebase, each one reading source files, extracting requirements, and checking coverage. Each pass can involve enough work that it fills the context window multiple times over. And when context compacts mid-pass, the agent doesn&#8217;t know it happened. It keeps working, but the output starts silently degrading. So I started building mechanisms for the agent to detect compaction and recover by reading back the files it had written earlier. The patterns that came out of that work are general enough to apply to anyone building agents that need to survive context pressure.</p>



<p class="wp-block-paragraph">From the agent&#8217;s perspective, compaction is seamless. It&#8217;s tracking state, referencing decisions made earlier in the conversation, and then at some point the earlier context is gone. But the agent can&#8217;t tell the difference between &#8220;I never knew that&#8221; and &#8220;I knew it but lost it.&#8221; It tries to reference something and finds nothing, or finds a compressed version that lost the nuance. And because the agent doesn&#8217;t know it lost anything, it doesn&#8217;t know it needs to recover.</p>



<p class="wp-block-paragraph">This invisibility is the core problem. But it turns out you can work around it, and the next two sections walk through how.</p>



<h2 class="wp-block-heading"><strong>Building a detection mechanism</strong></h2>



<p class="wp-block-paragraph">Once you have files on disk, the question is what specifically to check and how to know when something has gone wrong. I landed on a mechanism while building the Quality Playbook&#8217;s requirement extraction pipeline. The playbook processes source documents in multiple passes, and each pass appends its output to a JSONL artifact file. After each unit of work, the agent also writes a progress record to a separate file: what it just finished, what it found, and where it should pick up next.</p>



<p class="wp-block-paragraph">The detection mechanism comes from two rules I gave the agent. The idea is that the progress file tracks a cursor, which is just a position marker that tells the agent which record to process next. If the agent writes a record to the output file but then loses context before updating the progress file, those two files will be out of sync.</p>



<p class="wp-block-paragraph">The agent didn&#8217;t need to understand any of that upfront; I just described the rules in plain language and let it figure out the implementation. The first rule establishes an invariant between the output file and the progress file:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Cursor advances only after the line is on disk. Write the summary line to the output file first, then update the progress file. The cursor must always equal the index of the next record that still needs to be processed.</p>
</blockquote>



<p class="wp-block-paragraph">The second rule told the agent how to check that invariant on startup:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">On startup, read the progress file. Resume from its cursor value. Verify continuity: the last line in the output file should equal cursor minus one. If not, roll the cursor back to match disk state and report the discrepancy.</p>
</blockquote>



<p class="wp-block-paragraph">If the progress file says the cursor is at record 381, but the last line in the output file is record 379, something happened. The context compacted and the agent lost track of where it was. The divergence between the two files is the signal.</p>



<p class="wp-block-paragraph">This worked because files on disk don&#8217;t change when context compacts. They&#8217;re written once and then read repeatedly. If what the agent thinks it knows doesn&#8217;t match what&#8217;s actually in the files, something shifted in the agent&#8217;s memory, not on disk. I ended up folding this check into a preamble that every session started with:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">If this session has experienced auto-compaction, re-read the pass specification from disk. Do not try to reconstruct it from the compacted summary. Read the progress file. Read the last record of the JSONL artifact and confirm its index equals the cursor minus one. If not, roll the cursor back to match disk state. Disk is the source of truth. The conversation is not.</p>
</blockquote>



<p class="wp-block-paragraph">That preamble ran at the top of every session. During one particularly intensive day of pipeline development, I ran over a hundred Claude Code sessions with that exact instruction. Most of them completed without hitting compaction. But the ones that did hit it recovered cleanly, because the preamble told the agent exactly what to check and exactly what to do when the check failed.</p>



<p class="wp-block-paragraph">The specific prompts I used are tied to the Quality Playbook&#8217;s file structure, but the technique generalizes. If you&#8217;re building any agent that does multistep work, you can adapt the same approach. Here&#8217;s a version you could drop into a session preamble or an agent&#8217;s system prompt:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Before continuing any task, read your progress file and your most recent output file. Compare them: does the progress file say you&#8217;ve completed work that isn&#8217;t reflected in the output? If so, trust the output file, roll back your progress to match, and note the discrepancy. Do not rely on what you remember from the conversation. The files on disk are the source of truth.</p>
</blockquote>



<p class="wp-block-paragraph">The wording doesn&#8217;t have to be precise. What matters is the structure: tell the agent where to look, what to compare, and which source to trust when they disagree.</p>



<h2 class="wp-block-heading"><strong>But didn&#8217;t you just say the AI can&#8217;t detect its own compaction?</strong></h2>



<p class="wp-block-paragraph">Right, and it can&#8217;t. What I described above isn&#8217;t the agent detecting compaction. It&#8217;s the agent running a deterministic check against files on disk and finding a discrepancy. The agent doesn&#8217;t need to know that compaction happened. It just needs to notice that two files disagree. Think of the agent as an amnesiac clerk. You don&#8217;t ask the clerk to remember what they did yesterday. You make the clerk check the physical ledger every time they sit down at the desk. If their notes disagree with the ledger, they&#8217;re trained to trust the ledger.</p>



<p class="wp-block-paragraph">If you saw Christopher Nolan&#8217;s breakout movie <em>Memento</em>, you can think of your agent as Leonard Shelby, the character played by Guy Pearce with anterograde amnesia. You couldn&#8217;t ask Leonard to remember what he did yesterday. He had to check his tattoos every time he woke up. If his tattoos disagreed with what he&#8217;s seeing, he trusts the tattoo (which leads to a major plot point, which I won&#8217;t spoil). Again, this isn&#8217;t a new idea either. I mentioned the <a href="https://en.wikipedia.org/wiki/Memento_pattern" target="_blank" rel="noreferrer noopener">Memento pattern</a> earlier, which is literally named after this movie.</p>



<p class="wp-block-paragraph">This is a classic distributed systems technique. In double-entry bookkeeping, you maintain two independent records of the same transaction and reconcile them regularly. If they disagree, you investigate. You don&#8217;t need to know why they diverged; the divergence itself is the signal. A two-phase commit works the same way: write the data first, then update the record that says the data was written. If you find data without a matching record, or a record without matching data, something went wrong between the two phases.</p>



<p class="wp-block-paragraph">That&#8217;s exactly what the cursor invariant does. The agent writes the output line first, then updates the progress file. If those two files are out of sync, something happened between the two writes. The agent doesn&#8217;t detect compaction. It detects a broken invariant, and it&#8217;s been told that when the invariant breaks, the files on disk win.</p>



<p class="wp-block-paragraph">Three things make this work. First, the check is purely deterministic: read two files, compare two numbers, act on the result. There&#8217;s no reasoning involved, no judgment call about whether the agent &#8220;feels&#8221; like it lost context. I wrote about this principle in “<a href="https://www.oreilly.com/radar/keep-deterministic-work-deterministic/" target="_blank" rel="noreferrer noopener">Keep Deterministic Work Deterministic</a>”; you never want an AI making decisions that a file comparison can make for it. Second, the files on disk don&#8217;t change when context compacts. They&#8217;re the stable reference point that the agent&#8217;s memory gets checked against. Third, the instruction to run the check lives in the system prompt or preamble, which is generally preserved even when conversation context gets compacted. The check survives the thing it&#8217;s designed to detect.</p>



<h2 class="wp-block-heading"><strong>Rehydrate: Reading back the state</strong></h2>



<p class="wp-block-paragraph"><strong>Rehydration</strong> is the process of reading back externalized state and rebuilding the agent&#8217;s working context. Once the agent detects compaction (or, more specifically and accurately, has enough evidence from the filesystem that compaction occurred), the recovery step is to read back the externalized files and rebuild. For the Quality Playbook, rehydration meant:</p>



<ol class="wp-block-list">
<li>Read the phase brief to re-anchor the purpose of this pass</li>



<li>Read the progress file to know which unit is active and what&#8217;s been completed</li>



<li>Read the tail of the JSONL artifact to confirm the last successfully written record</li>



<li>Recompute the next unit of work from those files</li>
</ol>



<p class="wp-block-paragraph">This is different from just continuing without detection. Without detection, the agent tries to pick up where it left off and hopes it still has enough context. With detection, the agent knows something happened and deliberately reloads state before continuing.</p>



<p class="wp-block-paragraph">You can make the rehydration process itself auditable. Instead of silently reading the files and resuming, have the agent write down what it learned:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Read the progress file and the JSONL artifact. Write a summary of what you learned: what pass is running, what unit is active, what the cursor position is, and how many requirements have been extracted so far. Then continue from there.</p>
</blockquote>



<p class="wp-block-paragraph">Writing a rehydration summary serves two purposes. It gives you visibility into what the agent understood and whether it rehydrated correctly. And it forces the agent to process the external files explicitly rather than just loading them into context. Explicit processing is more reliable than silent loading because the agent has to commit to an interpretation, and you can read that interpretation and catch mistakes.</p>



<p class="wp-block-paragraph">You can adapt this approach to any agent workflow where work happens in steps. The specific files and cursor values are particular to my pipeline, but the underlying technique is general: have the agent write its progress to a file after each step, and check that file against its output at the start of every session. And this advice isn&#8217;t just for writing agents or skills. Even in a live session with Claude Code, Cursor, or Copilot, you can tell the agent to periodically write a summary of what it&#8217;s done and what it plans to do next to a file on disk. If the session crashes or the context gets long enough to compact, you can point a new session at that file and pick up where you left off. The key is getting the state out of the conversation and onto disk before you need it.</p>



<h2 class="wp-block-heading"><strong>Context management is an architectural concern</strong></h2>



<p class="wp-block-paragraph">Every technique I&#8217;ve described in these articles comes down to the same principle: Important information shouldn&#8217;t live only in the agent&#8217;s context window. The previous articles covered how to put that information on disk. This one covers how to make the agent aware of its own limitations so it can recover when context pressure gets too high.</p>



<p class="wp-block-paragraph">An agent that can detect its own degradation and correct for it is fundamentally more reliable than one that just keeps going. When the agent knows how to stop, check itself against ground truth, and reload what it lost, context pressure becomes a recoverable event instead of a slow, silent failure.</p>



<p class="wp-block-paragraph">This concludes my mini-series trilogy of articles about context management. The first article in this series was about understanding what context is and why it disappears. The second was about getting important information out of the conversation and onto disk before you need it. This one is about closing the loop: making the agent aware of its own limitations so it can detect degradation and recover from it. Together, they add up to treating context as an engineering problem rather than something you hope works out.</p>



<p class="wp-block-paragraph">These are still early days. Context windows will get larger, compaction will get smarter, and some of the workarounds in this article will eventually be unnecessary. But the underlying principle won&#8217;t change: If your agent&#8217;s ability to do its job depends on information, that information needs to live somewhere more durable than working memory. That was true for my dad&#8217;s 32KB core memory at Princeton, it was true for my 640K of conventional RAM, and it&#8217;s true for today&#8217;s 200K-token context windows.</p>



<p class="wp-block-paragraph"><em>The <a href="https://github.com/andrewstellman/quality-playbook" target="_blank" rel="noreferrer noopener">Quality Playbook</a> and <a href="https://github.com/andrewstellman/octobatch" target="_blank" rel="noreferrer noopener">Octobatch</a> are open source projects where these techniques are used in production. Both are built using AI-driven development and available for exploration if you want to see how this looks in practice.</em></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><em>Disclosure: Aspects of the approach described in this article are the subject of US Provisional Patent Application No. 64/044,178, filed April 20, 2026, by the author. The open source Quality Playbook project (Apache 2.0) includes a patent grant to users of that project under the terms of the Apache 2.0 license.</em></p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/when-context-collapses-teaching-agents-to-detect-and-recover-from-lost-memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>The PM&#8217;s Playbook for Shipping AI Features That Actually Work in Production</title>
		<link>https://www.oreilly.com/radar/the-pms-playbook-for-shipping-ai-features-that-actually-work-in-production/</link>
				<comments>https://www.oreilly.com/radar/the-pms-playbook-for-shipping-ai-features-that-actually-work-in-production/#respond</comments>
				<pubDate>Wed, 10 Jun 2026 10:55:56 +0000</pubDate>
					<dc:creator><![CDATA[Gaurav Savla]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18892</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-PMs-playbook-for-shipping-AI-features-that-actually-work-in-production.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-PMs-playbook-for-shipping-AI-features-that-actually-work-in-production-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
		
				<description><![CDATA[The demo to production Death Valley If you&#8217;ve worked on an AI feature, you know the feeling. You start building something that you are excited about, set launch timelines. The model spits out a perfect response, the prototype works magically, and everybody in the room is mentally calculating how big this product will be when [&#8230;]]]></description>
								<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>The demo to production Death Valley</strong></h2>



<p class="wp-block-paragraph">If you&#8217;ve worked on an AI feature, you know the feeling. You start building something that you are excited about, set launch timelines. The model spits out a perfect response, the prototype works magically, and everybody in the room is mentally calculating how big this product will be when we launch. I&#8217;ve been in that room a lot many times and it&#8217;s fun.</p>



<p class="wp-block-paragraph">Then you try to test before you ship.</p>



<p class="wp-block-paragraph">Latency spikes to 10 seconds on mobile. The model starts hallucinating on edge cases that happen to represent 15% of actual user queries. Your A/B test shows no statistically significant engagement lift because the variance in AI outputs makes traditional hypothesis testing basically meaningless. The safety team flags 340 failure cases in the first week, and you’re now debugging nondeterministic cases that fail in creative, novel ways every single day.</p>



<p class="wp-block-paragraph">Most often than not, it&#8217;s not a model problem but an engineering discipline problem. Shipping an AI product is very different from traditional software. I&#8217;ve figured this out the hard way. This playbook shares my learnings.</p>



<h2 class="wp-block-heading"><strong>Latency budgets</strong></h2>



<p class="wp-block-paragraph">Every AI feature comes with a latency tax. Large language model inference takes time. We&#8217;re talking 500 milliseconds to 5 or even 50 seconds depending on model size, input length, and infrastructure setup. For consumer products where people expect sub-200-millisecond interactions, this is a hard constraint you have to design around.</p>



<p class="wp-block-paragraph">The mistake I see most often is teams measuring only p50 latency. A feature with 800 milliseconds p50 sounds fine until you discover the p90 is 15 seconds. That means 10 in every 100 users sit there waiting for 15+ seconds. At scale, that&#8217;s thousands of terrible experiences per day.</p>



<p class="wp-block-paragraph">The way I think about it is you define your latency budget by interaction type, not globally: <strong>Synchronous interactions</strong>, where the user is staring at a spinner, need to resolve under 1 second.<strong> Progressive interactions</strong>,<strong> </strong>where output streams token by token, need first token in under 500 milliseconds and full response under 5 seconds. <strong>Asynchronous interactions</strong>, where the user keeps doing other stuff, can take up to 20 seconds with a progress indicator.</p>



<p class="wp-block-paragraph">You also need to measure cold starts separately. The first request after a model loads into memory can be 10 times slower than subsequent requests, and if your traffic is bursty, cold starts will disproportionately punish your most engaged users arriving during peak hours.</p>



<p class="wp-block-paragraph">Besides, you also need to budget for the full pipeline, not just inference. A typical AI feature pipeline including input preprocessing (tokenization, context assembly, and prompt construction), model inference, output postprocessing (parsing, formatting, safety filtering, etc.), and a full response delivery adds up. Optimizing inference while ignoring the rest is like tuning your engine while driving on flat tires.</p>



<p class="wp-block-paragraph">Lastly, use streaming aggressively for generative features. Pushing tokens to the user as they&#8217;re generated instead of waiting for the full response changes how users perceive latency.&nbsp; A four-second response that starts appearing at 300 milliseconds feels dramatically faster than one that pops in all at once. Perception is reality when it comes to user experience.</p>



<h2 class="wp-block-heading"><strong>Designing fallbacks</strong></h2>



<p class="wp-block-paragraph">Traditional software fails in boring, predictable ways. AI features fail in novel, unpredictable, and occasionally creative ways. I once saw a model respond to a product recommendation query with a poem about loneliness. Your fallback strategy needs to be considerably more sophisticated than a try/catch block.</p>



<p class="wp-block-paragraph">I think about fallbacks as a hierarchy. First, model fallback: When your primary model fails, drop to a simpler, faster, and more reliable model. Most failure cases get handled without the user ever knowing. Second, cache fallback: For queries similar to stuff you&#8217;ve seen before, serve a cached response. Third, template fallback: When generation fails completely, fall back to prewritten templates. Degraded beats dead every time. Fourth, graceful omission: Sometimes the best fallback is to simply not show the AI feature at all rather than showing a broken version.</p>



<p class="wp-block-paragraph">The design principle underneath all of this is that users should never encounter an unhandled AI failure. Every failure mode maps to a specific level, and transitions between levels should be invisible whenever you can manage it.</p>



<h2 class="wp-block-heading"><strong>Quality measurement</strong></h2>



<p class="wp-block-paragraph">Quality in traditional software is binary. The button works or it doesn&#8217;t. AI feature quality is continuous and subjective, and it changes depending on context. I&#8217;ve landed on a four-layer quality pyramid.</p>



<p class="wp-block-paragraph">The foundation is safety, and it&#8217;s nonnegotiable. Does the output contain harmful content, PII, or made-up facts? This layer is binary, and you measure it with automated classifiers running against 100% of outputs.</p>



<p class="wp-block-paragraph">The second layer is factual correctness, which is domain specific. Is the output actually right? For a coding assistant that means generated code compiles and passes tests. For a writing tool it means grammatical, stylistically appropriate output. You measure this with domain specific evaluation suites.</p>



<p class="wp-block-paragraph">The third layer is usefulness, and it&#8217;s user centered. Did the person actually benefit? Track acceptance rate, edit distance, time to task completion, and repeat usage. This is where traditional product metrics meet AI specific ones.</p>



<p class="wp-block-paragraph">The fourth layer is delight, which is experimental. Does the output feel good? Hardest to measure but often most important for adoption. Sometimes the numbers say the feature works but users&#8217; guts say it doesn&#8217;t. This layer catches that gap.</p>



<h2 class="wp-block-heading"><strong>A/B testing AI features</strong></h2>



<p class="wp-block-paragraph">A/B testing AI features is fundamentally harder than traditional features because AI outputs are nondeterministic. The same user doing the same thing twice might get different outputs, introducing variance that traditional frameworks weren&#8217;t built to handle.</p>



<p class="wp-block-paragraph">The core challenge is that intratreatment variance inflates the sample size you need for statistical significance, often by three to five times. If you&#8217;re running your AI experiment with normal sample size assumptions, you&#8217;re probably looking at noise and calling it signal.</p>



<p class="wp-block-paragraph">Then there&#8217;s the metric selection problem. A chatbot generating entertaining but factually wrong responses might show amazing engagement numbers while actively misleading users. You have to measure engagement and quality together. &#8220;Engaged interactions where quality score exceeds threshold&#8221; is more meaningful than raw engagement alone.</p>



<p class="wp-block-paragraph">The temporal problem matters too. AI feature value changes over time as users learn how to work with it. Short experiments will underestimate long-term value if there&#8217;s a learning curve, or overestimate it if there&#8217;s a novelty bump.</p>



<p class="wp-block-paragraph">My practical guidance: budget two to three times more time and traffic for AI experiments than traditional ones. Lean on Bayesian methods as they handle high variance better. And always pair quantitative tests with qualitative research. Ten user interviews will surface failure modes that no amount of statistical analysis will catch.</p>



<h2 class="wp-block-heading"><strong>Model drift monitoring</strong></h2>



<p class="wp-block-paragraph">Model drift is the slow, invisible rot of AI output quality over time, and there are multiple culprits.</p>



<p class="wp-block-paragraph">Data drift happens because the world changes and user behavior evolves. A model trained on 2024 data performs worse on 2026 queries referencing new concepts, slang, and cultural moments.</p>



<p class="wp-block-paragraph">Provider drift happens because third-party APIs change without your consent. <a href="https://www.ciodive.com/news/ChatGPT-OpenAI-GPT4-LLM-behavior-Stanford-UC-Berkeley/688683/" target="_blank" rel="noreferrer noopener">OpenAI acknowledged</a> that GPT-4&#8217;s behavior shifted measurably between March and June 2023, and <a href="https://arxiv.org/abs/2307.09009" target="_blank" rel="noreferrer noopener">Stanford researchers documented significant performance swings</a>. The fix: Pin your model versions so updates happen on your schedule, after your testing.</p>



<p class="wp-block-paragraph">Evaluation drift is the subtlest form. Even your quality metrics can become inadequate and the evaluation criteria that made sense at launch might become inadequate as usage patterns shift and user expectations change. Quarterly reviews of your evaluation suites are essential.</p>



<p class="wp-block-paragraph">At minimum you need daily automated quality evaluations on 1% to 5% of production traffic, weekly analysis of input distribution characteristics, and monthly human evaluation of 100 to 500 examples. Shipping an AI feature without drift monitoring is like deploying a service without alerting. You won&#8217;t know it&#8217;s broken until your users tell you, and by then they&#8217;re angry.</p>



<h2 class="wp-block-heading"><strong>Evaluation frameworks</strong></h2>



<p class="wp-block-paragraph">How do you know if your AI feature is good enough? You need two fundamentally different approaches, and you genuinely need both.</p>



<p class="wp-block-paragraph">Automated evaluation gives you speed. Build a golden dataset of 500 to 2,000 labeled examples, train a classifier or use a capable model as judge, and validate against human judgment quarterly targeting 85% agreement. Automated evals chew through thousands of examples per hour, making them essential for velocity. The pitfall: They miss novel failure modes not in the training data.</p>



<p class="wp-block-paragraph">Human evaluation catches what automation misses. Structure it with five to seven evaluators mixing domain experts and representative users. Use a consistent rubric covering accuracy, helpfulness, tone, completeness, and safety. Run weekly during development, monthly in production. The trade-offs: expensive at $15 to $30 per example, slow with 24 to 72 hour turnaround, and subject to human biases. Manage by rotating evaluators and capping sessions at two hours.</p>



<p class="wp-block-paragraph">The model as judge approach is an increasingly viable middle ground. Judging quality is often easier than generating it, which means a model can reliably evaluate outputs even for tasks where it couldn&#8217;t produce them itself. Use it for high-volume evaluation but always validate against human judgment.</p>



<h2 class="wp-block-heading"><strong>Graceful degradation and prompt engineering</strong></h2>



<p class="wp-block-paragraph">Graceful degradation means when capabilities decrease, the experience gets worse smoothly instead of falling off a cliff. Design for capability levels, not binary states. Define four to five levels with specific behaviors at each. For example, for an AI writing assistant: Level 5 is full capability with real-time suggestions, tone adjustment, and structure recommendations. Level 4 is delayed suggestions appearing after a two- to three-second pause because latency is up. Level 3 is basic suggestions only like grammar and spelling with no style feedback. Each level is a deliberate design decision, not an accident.</p>



<p class="wp-block-paragraph">Make degradation invisible when possible. Users shouldn&#8217;t see a &#8220;broken&#8221; experience. They see a less detailed one. That&#8217;s a huge difference psychologically. However,&nbsp; when the degradation is significant enough that users will notice, proactive communication like &#8220;AI suggestions are temporarily limited&#8221; builds trust infinitely more than silently pushing poor-quality outputs.</p>



<p class="wp-block-paragraph">Prompt engineering in production is software engineering. In production, prompts are code, and they need version control, testing, monitoring, and maintenance. Version controls every prompt. Parameterize prompts, don&#8217;t hardcode context. Production prompts should be templates with clearly defined injection points for user context, system state, and dynamic instructions. This makes them testable because you can inject known inputs and verify outputs, and it makes them maintainable because changing how you handle context shouldn&#8217;t require rewriting the entire prompt from scratch.</p>



<p class="wp-block-paragraph">Test prompts against regression suites. Maintain 200 to 500 test cases covering the full distribution of expected inputs, including edge cases and adversarial inputs. Run the suite against every prompt change before deployment.</p>



<p class="wp-block-paragraph">Monitor prompt performance in production. Track output quality metrics like acceptance rate, user edits, and regeneration requests, segmented by prompt version. When you deploy a new version, compare its production metrics against the previous one for at least 72 hours before calling it stable. This is basically canary deployment for prompts.</p>



<h2 class="wp-block-heading"><strong>Ship it right</strong></h2>



<p class="wp-block-paragraph">These systems aren&#8217;t optional add ons you can bolt on after launch. Every feature I&#8217;ve seen fail was built first with plans to &#8220;add production hardening later.&#8221; Later never comes.</p>



<p class="wp-block-paragraph">AI features are probabilistic and nondeterministic, and they change over time without anyone touching them. Build these systems, staff them properly, and treat them with the same seriousness you&#8217;d give your core infrastructure. The gap between demo and production is wide, but it&#8217;s absolutely crossable if you build the right bridge.</p>



<p class="wp-block-paragraph"><em>Note: The research work pertaining to this article was done in a personal capacity. Views are of my own and do not reflect my employer&#8217;s views in any way.</em></p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/the-pms-playbook-for-shipping-ai-features-that-actually-work-in-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>The Subsidy Ended: What Tool-Using Agents Actually Cost</title>
		<link>https://www.oreilly.com/radar/the-subsidy-ended-what-tool-using-agents-actually-cost/</link>
				<comments>https://www.oreilly.com/radar/the-subsidy-ended-what-tool-using-agents-actually-cost/#respond</comments>
				<pubDate>Tue, 09 Jun 2026 11:09:17 +0000</pubDate>
					<dc:creator><![CDATA[Bennie Haelen]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18887</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-subsidy-ended.png" 
				medium="image" 
				type="image/png" 
				width="1200" 
				height="896" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-subsidy-ended-160x160.png" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[Usage-based billing didn’t make agents expensive. It made their existing costs visible, and visibility turns agent economics into a governance problem.]]></custom:subtitle>
		
				<description><![CDATA[On June 1, GitHub Copilot&#8217;s usage-based billing became active for all Copilot plans, and developers reacted quickly and loudly. A Pro plan still costs $10, but it now comes with a monthly pool of AI credits. Those credits are priced at a penny each, and they’re consumed according to the model used and the tokens [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">On June 1, GitHub Copilot&#8217;s <a href="https://github.blog/changelog/2026-06-01-updates-to-github-copilot-billing-and-plans/" target="_blank" rel="noreferrer noopener">usage-based billing became active</a> for all Copilot plans, and developers reacted quickly and loudly. A Pro plan still costs $10, but it now comes with a monthly pool of AI credits. Those credits are priced at a penny each, and they’re consumed according to the model used and the tokens processed, including input, output, and cached tokens. For a heavy agentic session running a frontier model, that makes spend feel very different from a flat subscription.</p>



<p class="wp-block-paragraph">That’s the news, and it’s worth understanding, but it isn’t the important part. Nothing about the underlying cost of agentic work actually changed on June 1. The tokens were always being consumed, the loops were always running, and the tool calls were always expanding the context. What changed is that the meter became visible. A workload that had been quietly subsidized under a flat rate started showing up as an itemized bill.</p>



<h2 class="wp-block-heading"><strong>Where the tokens go</strong></h2>



<p class="wp-block-paragraph">To see why the bill landed so hard, it helps to compare two things that look similar and bill very differently. A chat completion is close to a single transaction. You send a prompt, the model sends an answer, and you pay roughly once for the input and once for the output. A tool-using agent doesn’t work that way at all. An agent doesn’t answer a question so much as work toward it, and it works by looping. It reasons about the task, calls a tool, reads the result, reasons again, calls another tool, and continues until it decides it’s finished.</p>



<p class="wp-block-paragraph">Every pass through that loop carries a cost that’s easy to miss. In many agent harnesses, each turn carries forward a large share of the accumulated context: prior messages, tool descriptions, retrieved files, and tool results. Even when some of that context is cached, summarized, or pruned, the system is still doing metered work to preserve enough state for the next decision. The final answer you actually wanted is only a thin slice of what you paid for. The loop is the bill.</p>



<p class="wp-block-paragraph">This is why agent cost doesn’t scale politely. It scales with the number of turns, and the number of turns scales with how much discovery the agent has to do, which in turn scales with how vague the request was and how much irrelevant context it’s dragging along. A clean, well-scoped task might finish in three turns, while the same task posed as an open-ended question might wander through 15, each carrying the cost of everything that came before it. Under a flat rate, that difference was invisible. Under usage-based billing, it’s the difference between a small interaction and an expensive one.</p>



<h2 class="wp-block-heading"><strong>Tool design is now part of the cost model</strong></h2>



<p class="wp-block-paragraph">I wrote recently about a <a href="https://www.linkedin.com/pulse/hidden-input-tax-your-mcp-tools-bennie-haelen-eqflc/" target="_blank" rel="noreferrer noopener">hidden tax on Model Context Protocol servers</a>: the way an overstuffed tool catalog quietly degrades a model&#8217;s ability to route to the right tool. Bloated descriptions, overlapping responsibilities, and vague parameters make the model&#8217;s job harder and its choices worse. That argument was about accuracy. The billing change adds a second invoice for the same bloat, and this one is denominated in dollars.</p>



<p class="wp-block-paragraph">The tool catalog is often part of what gets carried through the agent&#8217;s loop. A tool described in three tight sentences and a tool described in three rambling paragraphs may both function, but the second one pays rent in the context window every time an agent has it loaded. Multiply that across a catalog of 40 tools and a workflow that runs a dozen turns, and the cost of verbose tool design stops being a rounding error. Tool design was already a correctness discipline. It’s now a cost discipline as well. The same audit that tightens routing accuracy tightens the bill.</p>



<h2 class="wp-block-heading"><strong>Where prompt discipline runs out</strong></h2>



<p class="wp-block-paragraph">There’s a layer of this that individual users can control, and it’s worth knowing because the savings are real and immediate. Two patterns matter most, and I’ve been handing both to the engineers on a pilot I run for a large healthcare organization. They aren’t magic tricks. They’re ways to keep the agent out of unnecessary discovery loops.</p>



<p class="wp-block-paragraph">The first pattern is about input. Prompt the agent like a short requirement rather than a broad question. A request such as &#8220;look at the encounter data and tell me what you find&#8221; forces the agent into discovery mode, where it burns turns figuring out what you meant, and every one of those turns carries the full context forward. Compare that to a prompt that front-loads the specifics by naming the project and the table, naming the date field to filter on, stating the output shape you want, and calling out anything that should be excluded. A better prompt would be: &#8220;Using the curated clinical project and the silver-zone encounters table, show total encounters by month for calendar year 2025, use admission_date_time for inclusion, and return one row per month ordered chronologically.&#8221; The second prompt collapses the loop. The agent has what it needs on the first turn, so it does the work instead of interviewing you for it.</p>



<p class="wp-block-paragraph">In practice, the difference isn’t just polish. The vague version forces the agent to discover the data model, infer the date semantics, choose an aggregation, and decide on a display format. The specific version turns the task into a bounded query. That difference shows up in accuracy, latency, and cost.</p>



<p class="wp-block-paragraph">The second pattern is about output, and it’s the lever most people overlook. Ask for plain text or Markdown during the intermediate steps, and save rich HTML formatting for the final, confirmed deliverable. Formatted output is expensive to generate, and requirements shift. If you ask for a polished HTML report on the first pass and then change a filter, you pay full output-token freight to regenerate all that layout, often more than once. The cheaper habit is to validate the numbers in text and format only at the end.</p>



<p class="wp-block-paragraph">These patterns work, and they also have a ceiling. Both of them put the entire burden of cost control on the user, and they hold only as long as every user exercises the discipline on every prompt. The day someone reverts to &#8220;tell me what you find,&#8221; the savings evaporate, and the only thing standing between the team and a surprise invoice is a budget cap that reports the overspend after it has already happened.</p>



<h2 class="wp-block-heading"><strong>Cost is a governance problem, not a budgeting one</strong></h2>



<p class="wp-block-paragraph">That fragility is the real lesson. A budget cap is a backstop rather than a control. It will stop a runaway, but it tells you that you overspent rather than why, and it does nothing to make the next run cheaper. Treating cost as a budgeting problem leaves you forever reacting to the meter, while treating it as an architecture problem lets you build the savings in once and stop relying on everyone&#8217;s good behavior.</p>



<p class="wp-block-paragraph">That means the controls that matter belong on the platform rather than in individual prompts. By the platform I don’t mean the agent itself, the coding assistant or chat client a developer drives day-to-day, and I don’t mean the model or a router sitting beneath it. I mean the control plane that sits above the agents, the layer where an organization enforces policy, access, observability, and now cost across every agent and model its developers touch. An administrative console that gives IT visibility into who is doing what and which capabilities they can install is an early, narrow instance of it. A router that sends planning to a cheap model is one feature that belongs there. The platform is where the rules live, and the agent is a consumer of those rules rather than the place you set them. The platform should route models by task, using cheaper models for planning and reserving frontier models for work that earns the price. It should bound the loop, requiring the agent to check in after a fixed number of iterations. It should cap tool-result payloads so a careless query cannot dump a million rows into the context window. It should default intermediate work to plain text, making the cheap path the path of least resistance instead of something users have to remember.</p>



<p class="wp-block-paragraph">Every one of those controls is something a user can approximate by hand and something the platform can simply guarantee. This is the same principle I keep returning to in the context of data access, where safe behavior cannot depend on the person at the keyboard remembering the rules. Prompts guide behavior. Guardrails make the cheaper and safer behavior the default. Cost governance is guardrails as control plane, with a dollar sign attached, enforced at the same layer where you already enforce who is allowed to see which row.</p>



<h2 class="wp-block-heading"><strong>The pattern, not the vendor</strong></h2>



<p class="wp-block-paragraph">It would be a mistake to read this as only a GitHub story. GitHub is the current example because its change is visible and recent, but usage-based billing for agentic work is the direction of travel for many AI tools. The economics under the hood are similar: Agentic workloads turn single answers into loops of model calls, tool calls, and context management. The flat-rate subsidy was always going to come under pressure once the workload shifted from autocomplete to autonomy.</p>



<p class="wp-block-paragraph">The organizations that treat June 1 as a pricing event will optimize a few prompts, grumble, and move on until the next vendor changes its meter. The ones that treat it as an architecture signal will push the cost controls down into the platform, where they hold regardless of which provider is counting which token. That’s the more durable place to stand. The bill didn’t get bigger this month. It got honest, and an honest bill is the kind you can engineer against.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/the-subsidy-ended-what-tool-using-agents-actually-cost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Long-Running Agents</title>
		<link>https://www.oreilly.com/radar/long-running-agents/</link>
				<comments>https://www.oreilly.com/radar/long-running-agents/#respond</comments>
				<pubDate>Mon, 08 Jun 2026 15:59:06 +0000</pubDate>
					<dc:creator><![CDATA[Addy Osmani]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18883</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/Long-running-agents-image-created-with-Adobe-Firefly.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/Long-running-agents-image-created-with-Adobe-Firefly-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
		
				<description><![CDATA[The following article originally appeared on Addy Osmani’s blog and is being reposted here with the author’s permission. A long-running AI agent can keep making progress over hours, days, or weeks. It can do this across many context windows and sandboxes, recover from failure, leave structured artifacts behind, and resume where it left off. For [&#8230;]]]></description>
								<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>The following article originally appeared on <a href="https://addyosmani.com/blog/long-running-agents/" target="_blank" rel="noreferrer noopener">Addy Osmani’s blog</a> and is being reposted here with the author’s permission.</em></p>
</blockquote>



<p class="wp-block-paragraph">A long-running AI agent can keep making progress over hours, days, or weeks. It can do this across many context windows and sandboxes, recover from failure, leave structured artifacts behind, and resume where it left off.</p>



<p class="wp-block-paragraph">For two years the dominant image of an “AI agent” has been a chat window with a clever loop in it. You type a goal; the agent calls some tools; you watch tokens stream by; you stop watching when the work runs out of patience or the context window fills up. That paradigm got us a long way, but it has a ceiling. The model forgets. It declares “task complete” when it isn’t. It reintroduces a bug it fixed nine turns ago. The whole thing is structured around a single sitting.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1375" height="768" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image.jpeg" alt="Long-running AI agents" class="wp-image-18884" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image.jpeg 1375w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-300x168.jpeg 300w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-768x429.jpeg 768w" sizes="(max-width: 1375px) 100vw, 1375px" /></figure>



<p class="wp-block-paragraph">Long-running agents are what comes next. The idea is easy to state: an agent that keeps making forward progress on a goal across many sessions and many sandboxes, possibly many days or weeks, while leaving the workspace clean enough that the next session can pick up where the last one left off. The engineering is harder. You have to solve for persistence, recovery, and verification in a way that doesn’t just paper over the cracks. You have to build a state layer that lives outside the model’s context window, and you have to design the handoff between sessions so the agent doesn’t lose its mind when it wakes up and finds itself in a different sandbox with a different context window.</p>



<p class="wp-block-paragraph">This post is my attempt to lay out what’s changed, who’s pushing on it, and how an engineer can use long-running agents today without writing the whole thing from scratch.</p>



<h2 class="wp-block-heading">What “long-running” actually means</h2>



<p class="wp-block-paragraph">“Long-running” used to mean at least three different things in practice, and it helps to keep them separate.</p>



<p class="wp-block-paragraph"><strong>Long-horizon reasoning</strong>. The agent has to plan and execute over many dependent steps. This is mostly a model-quality story: coherence, planning, the ability to recover from a wrong turn 10 steps ago. METR has been tracking this with their <em>time horizon</em> metric, which estimates how long a task a frontier model can complete with 50% reliability. The headline finding is that the metric has been <a href="https://metr.org/time-horizons/" target="_blank" rel="noreferrer noopener">doubling roughly every seven months</a> since 2019, and their <a href="https://metr.org/blog/2026-1-29-time-horizon-1-1/" target="_blank" rel="noreferrer noopener">TH1.1 update</a> earlier this year doubled the count of eight-hour-plus tasks in the eval set. If that curve holds, frontier agents complete tasks at the day scale by 2028 and the year scale by 2034.</p>



<p class="wp-block-paragraph"><strong>Long-running execution</strong>. The agent’s <em>process</em> runs for hours or days. Maybe it’s a coding job, maybe it’s a research sweep, maybe it’s a 24-7 monitoring service. The model might be invoked thousands of times across the run. This is mostly a <em>harness</em> story, and it’s the one this post is mostly about.</p>



<p class="wp-block-paragraph"><strong>Persistent agency</strong>. The agent has an identity that outlives any single task. It accumulates memory, learns user preferences, and is always available. This is the <a href="https://docs.cloud.google.com/agent-builder/agent-engine/memory-bank/overview" target="_blank" rel="noreferrer noopener">Memory Bank</a> flavor of long-running.</p>



<p class="wp-block-paragraph">In practice the three blur together. A real production agent does long-horizon reasoning <em>inside</em> a long-running execution <em>backed by</em> persistent agency. But the engineering problems are different in each, and so are the products that solve them.</p>



<h2 class="wp-block-heading">Why this matters</h2>



<p class="wp-block-paragraph">There are two reasons I believe this work matters a lot right now.</p>



<p class="wp-block-paragraph">The first is a phase change in what’s economically feasible to delegate. An agent that runs for 10 minutes can answer a question, summarize a doc, fix a small bug. An agent that runs for 10 hours can own an entire feature, finish a migration that was on the backlog for six quarters, or do the kind of overnight research sweep that used to require a junior analyst. One of Anthropic’s <a href="https://www.anthropic.com/news/claude-sonnet-4-5" target="_blank" rel="noreferrer noopener">Claude Sonnet announcements</a> put concrete numbers on this last fall: 30+ hours of autonomous coding in internal tests, including <a href="https://venturebeat.com/ai/anthropics-new-claude-can-code-for-30-hours-think-of-it-as-your-ai-coworker" target="_blank" rel="noreferrer noopener">one run</a> that produced an 11,000-line Slack-style app. That’s already past the threshold where the answer to “Should I delegate this?” is no longer obvious.</p>



<p class="wp-block-paragraph">The second is that persistence changes what the agent <em>is</em>. A stateless agent answers your question and disappears. A long-running one accumulates context: which competitor moved which way last week, which test flaked twice on Tuesday, what you usually mean by “the dashboard.” Anthropic’s <a href="https://www.anthropic.com/research/project-vend-1" target="_blank" rel="noreferrer noopener">Project Vend</a> was the most public early demonstration of this. They had a Claude instance run an actual office vending business for a month, managing inventory, setting prices, talking to suppliers. It failed in informative ways, and <a href="https://www.anthropic.com/research/project-vend-2" target="_blank" rel="noreferrer noopener">the second phase</a> ran much better, but the point wasn’t profitability. The point was watching what kinds of weird coherence problems show up when an agent has to maintain identity across weeks instead of turns.</p>



<p class="wp-block-paragraph">Those are the same problems every team building production agents now hits.</p>



<h2 class="wp-block-heading">The three walls every long-running agent hits</h2>



<p class="wp-block-paragraph">Three walls show up in basically every write-up I’ve read this year.</p>



<p class="wp-block-paragraph"><strong>Finite context</strong>. Even a 1M-token window fills. And <a href="https://addyosmani.com/blog/agent-harness-engineering/" target="_blank" rel="noreferrer noopener">context rot</a>, the steady degradation of model performance as the window gets full, kicks in well before the hard limit. A 24-hour run is not going to fit in any context window the field has on its roadmap. Something has to give.</p>



<p class="wp-block-paragraph"><strong>No persistent state</strong>. A new session starts blank. Anthropic’s framing in their <a href="https://www.anthropic.com/research/long-running-Claude" target="_blank" rel="noreferrer noopener">scientific computing post</a> is the cleanest version I’ve seen: “Imagine a software project staffed by engineers working in shifts, where each new engineer arrives with no memory of what happened on the previous shift.” Without an explicit persistence story, every shift change is a productivity disaster.</p>



<p class="wp-block-paragraph"><strong>No self-verification</strong>. Models reliably skew positive when they grade their own work. Asked “Are you done?” they answer “yes” more often than they should. Without a separate signal that the work meets a bar, you get the agent that ships at 30% complete with full confidence.</p>



<p class="wp-block-paragraph">Long-running agent designs are mostly answers to these three problems. The major labs have converged on similar shapes of answer, but with very different surface area.</p>



<h2 class="wp-block-heading">The Ralph loop: One of the simpler practitioner versions of long-running agents</h2>



<p class="wp-block-paragraph">The Ralph loop (sometimes called the Ralph Wiggum technique) is one of “simpler” practitioner version of long-running agents, popularized by <a href="https://ghuntley.com/ralph/" target="_blank" rel="noreferrer noopener">Geoffrey Huntley</a> and <a href="https://github.com/snarktank/ralph" target="_blank" rel="noreferrer noopener">Ryan Carson</a>. The reference implementation is <a href="https://ghuntley.com/ralph/" target="_blank" rel="noreferrer noopener">literally a bash script</a> that loops:</p>



<ol class="wp-block-list">
<li>Pick the next unfinished task from a list (prd.json or equivalent).</li>



<li>Build a prompt with the task, the relevant context, and any persistent notes.</li>



<li>Call the agent.</li>



<li>Run tests or other checks.</li>



<li>Append what happened to progress.txt.</li>



<li>Update the task list (done, failed, blocked).</li>



<li>Go back to step 1.</li>
</ol>



<p class="wp-block-paragraph">The reason it works is the same reason any of the harnesses below work: State lives outside the agent’s context. <code>prd.json</code> is the plan, <code>progress.txt</code> is the lab notes, and <code>AGENTS.md</code> is the rolling rulebook. The agent itself is amnesiac, but the filesystem isn’t. Each iteration starts fresh and reads enough state from disk to keep going. Carson’s <a href="https://github.com/snarktank/compound-product" target="_blank" rel="noreferrer noopener">Compound Product</a> extends the idea by chaining multiple loops (an analysis loop that reads daily reports, a planning loop that emits a PRD, an execution loop that writes the code), which is roughly the open source version of the planner-generator-evaluator triad Anthropic landed on independently.</p>



<p class="wp-block-paragraph">I went deeper on all of this in “<a href="https://addyosmani.com/blog/self-improving-agents/" target="_blank" rel="noreferrer noopener">Self-Improving Coding Agents</a>”: task list structure, progress files, QA gates, monitoring, the failure modes you’ll actually hit. The short version is that you can build a working long-running agent in an evening with a bash script and a JSON file. Most of what Google and Anthropic have productized is the work of making this pattern recoverable, secure, and observable at scale.</p>



<p class="wp-block-paragraph">The big-lab stories below are different ways of paying for that production-readiness.</p>



<h2 class="wp-block-heading">Anthropic: Harnesses, then the brain/hands/session split</h2>



<p class="wp-block-paragraph">Anthropic has been the most public about the engineering. Two posts are worth reading end to end.</p>



<p class="wp-block-paragraph">The first is “<a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents" target="_blank" rel="noreferrer noopener">Effective Harnesses for Long-Running Agents</a>,” which lays out a two-agent harness for autonomous full stack development. An initializer agent runs once at the start of a project to set up the environment, expand the prompt into a structured <code>feature-list.json</code>, and write an <code>init.sh</code> that future sessions will run on boot. A coding agent is then woken up over and over, each session asked to make incremental progress on one feature, run tests, leave a <code>claude-progress.txt</code> note, and commit. A test ratchet (“it is unacceptable to remove or edit tests because this could lead to missing or buggy functionality”) sits in the prompt to stop the very common failure of an agent deleting failing tests to “make them pass.” <a href="https://www.infoq.com/news/2026/04/anthropic-three-agent-harness-ai/" target="_blank" rel="noreferrer noopener"><em>InfoQ</em>’s writeup</a> extends this into a planner, generator, and evaluator triad, on the same logic that separating generation from evaluation matters because models grade their own work too generously.</p>



<p class="wp-block-paragraph">The second is “<a href="https://www.anthropic.com/engineering/managed-agents" target="_blank" rel="noreferrer noopener">Scaling Managed Agents: Decoupling the Brain from the Hands</a>,” the architectural post behind <a href="https://platform.claude.com/docs/en/managed-agents/overview" target="_blank" rel="noreferrer noopener">Claude Managed Agents</a> (Anthropic’s hosted runtime, launched in early April). The argument is that an agent has three components that should be independently replaceable. The Brain is the model and the harness loop that calls it. The Hands are sandboxed, ephemeral execution environments where tools actually run. The Session is an append-only event log of every thought, tool call, and observation.</p>



<p class="wp-block-paragraph">This sounds abstract, but it isn’t. Here’s Anthropic’s framing: “Every component in a harness encodes an assumption about what the model can’t do on its own.” When you couple them, an assumption that goes stale (e.g., the model used to need an explicit planner and now plans natively) means the whole system has to change at once. When you decouple them, the harness becomes stateless, sandboxes become <em>cattle, not pets</em>, and a brain crash doesn’t lose the run. A fresh container calls <code>wake(sessionId)</code> and reconstitutes the state from the log. They reported <a href="https://www.anthropic.com/engineering/managed-agents" target="_blank" rel="noreferrer noopener">time-to-first-token dropped ~60% at p50 and over 90% at p95</a> just from being able to start inference before the sandbox is ready.</p>



<p class="wp-block-paragraph">The session-as-event-log idea is the part most teams underappreciate. It is what makes a long-running agent recoverable. Without it, a container failure is a session failure and you’re debugging into a stale snapshot. With it, the agent’s memory is a queryable artifact that lives outside whatever process happens to be running at the moment.</p>



<p class="wp-block-paragraph">For the scientific computing crowd, Anthropic’s “<a href="https://www.anthropic.com/research/long-running-Claude" target="_blank" rel="noreferrer noopener">long-running Claude</a>” post reduces all of this to a simpler stack: <code>CLAUDE.md</code> as a living plan the agent edits as it learns, <code>CHANGELOG.md</code> as portable lab notes, <code>tmux</code> plus <code>SLURM</code> plus <code>git</code> as the execution and coordination layer, and the Ralph loop, a <code>for</code> loop that kicks the agent back into context whenever it claims completion and asks if it’s <em>really</em> done. Their flagship case study is a Boltzmann solver Claude Opus 4.6 built over a few days that reached subpercent agreement with a reference CLASS implementation. Months to years of researcher time, compressed.</p>



<p class="wp-block-paragraph">Same patterns across all three posts: an explicit plan file, an explicit progress file, structured handoffs between sessions, separate generation from evaluation, and a loop that refuses to let the agent stop early.</p>



<h2 class="wp-block-heading">Cursor: Planners, workers, judges</h2>



<p class="wp-block-paragraph">Cursor’s “<a href="https://cursor.com/blog/scaling-agents" target="_blank" rel="noreferrer noopener">Scaling Long-Running Autonomous Coding</a>” is the other essential read this year. They walked into walls that Anthropic mostly papered over.</p>



<p class="wp-block-paragraph">Their first attempt was a flat coordination model: equal-status agents writing to shared files with locks. It became a bottleneck and made the agents risk averse, churning rather than committing. Their second attempt swapped locks for optimistic concurrency control, which removed the bottleneck but didn’t fix the coordination problem. The third design is what’s running in production now and what they describe as solving most of the problem:</p>



<ul class="wp-block-list">
<li>Planners continuously explore the codebase and emit tasks. They can recursively spawn subplanners.</li>



<li>Workers are focused executors. They don’t coordinate with each other and they don’t worry about the big picture.</li>



<li>Judges decide when an iteration is finished and when to restart.</li>
</ul>



<p class="wp-block-paragraph">Two things stand out from the post. One: “A surprising amount of the system’s behavior comes down to how we prompt the agents” more than the harness or the model. Two: Different models slot into different roles. Their reported finding is that a GPT model was better than Opus for <em>extended autonomous work</em> specifically because Opus tended to stop early and take shortcuts. Same task, different role, different model. The matching is becoming part of the design surface.</p>



<p class="wp-block-paragraph">This pairs with <a href="https://cursor.com/blog/composer" target="_blank" rel="noreferrer noopener">Composer 2</a> (their proprietary frontier coding model that ships in <a href="https://cursor.com/changelog/2-0" target="_blank" rel="noreferrer noopener">Cursor 3</a>) and their background cloud agents: long-running tasks that run on Anysphere’s cloud infrastructure rather than your laptop. Eight-hour refactors and codebase-wide migrations survive a closed lid. You can start a task locally, hit <em>run in cloud</em> when you realize it’ll take 30 minutes, and reattach later from your phone. Each agent runs in an isolated Git worktree and merges back via PR. The handoff between local and remote is the part most teams haven’t figured out yet, and Cursor’s bet is that it has to be its own product surface.</p>



<p class="wp-block-paragraph">The shape ends up close to Anthropic’s: Roles are split, sessions are durable, judges sit beside the worker, and a long task runs in a cloud sandbox with Git as the coordination substrate.</p>



<h2 class="wp-block-heading">Google: Long-running agents on the Agent Platform</h2>



<p class="wp-block-paragraph">Google’s announcement at <a href="https://cloud.google.com/blog/products/ai-machine-learning/introducing-gemini-enterprise-agent-platform" target="_blank" rel="noreferrer noopener">Cloud Next ’26</a> folded Vertex AI into the Gemini Enterprise Agent Platform and turned long-running agents into a named product, with named SLAs.</p>



<p class="wp-block-paragraph">The pieces that matter for this post:</p>



<ul class="wp-block-list">
<li>Agent Runtime supports agents that “run autonomously for days at a time” with sub-second cold starts and on-demand sandbox provisioning. The launch post’s example use case is a sales prospecting sequence that takes a week to play out, which is roughly the right shape for it.</li>



<li>Agent Sessions persist conversation and event history. You can pin them to a custom session ID that maps to your own CRM or DB record, so the agent’s state lives next to the business state instead of in a separate AI silo.</li>



<li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/scale/memory-bank">Agent Memory Bank</a> is the persistent long-term memory layer, generally available as of Next ’26. It curates memories from sessions, scopes them to a user identity, and exposes a search API so the next agent invocation can pull what’s relevant. Payhawk reported that auto-submitting expenses through a Memory Bank-backed agent cut submission time by over 50%.</li>



<li>Agent Sandbox handles hardened code execution.</li>



<li>Agent-to-Agent Orchestration, Agent Registry, Agent Identity, Agent Gateway, Agent Observability, and Agent Simulation cover basically every operational concern you’d otherwise build by hand for a production fleet, including the cryptographic-identity-and-audit-log story enterprises actually need to ship.</li>
</ul>



<p class="wp-block-paragraph">Architecturally this is the same brain/hands/session split Anthropic described, just productized at platform scale and bundled with <a href="https://google.github.io/adk-docs/" target="_blank" rel="noreferrer noopener">ADK</a> (the code-first dev kit) and Agent Studio (the visual one). If you’re building inside Google Cloud, you don’t have to design a session log or a memory store from scratch anymore. You wire an ADK agent into Memory Bank and Sessions, deploy onto Agent Runtime, and the persistence question is answered.</p>



<p class="wp-block-paragraph">Notice how much this looks like the pattern Anthropic and Cursor describe, just unbundled into named services with SLAs. Three years ago you’d have built all of this yourself. Now you pick which version of “decoupled brain, hands, and session” you want to rent.</p>



<h2 class="wp-block-heading">Five patterns for long-running agents in production</h2>



<p class="wp-block-paragraph">Shubham Saboo and I <a href="https://x.com/GoogleCloudTech/status/2046989964077146490" target="_blank" rel="noreferrer noopener">wrote up</a> five design patterns we’ve seen separate working long-running agents from demos. They aren’t Google-specific, but they map cleanly onto the primitives Agent Runtime now exposes, so it’s worth walking through them here in shortened form.</p>



<p class="wp-block-paragraph"><strong>Checkpoint-and-resume</strong>. The most common multiday failure is context loss. An agent processes 200 documents over four hours, hits an error on document 201, and without a checkpoint you start from scratch. Treat the agent like a long-running server process: write intermediate state to disk, checkpoint every N units of work, recover from failures. The Agent Runtime sandbox gives you a persistent filesystem, but choosing the right checkpoint granularity (not every step, not only the end) is on you.</p>



<p class="wp-block-paragraph"><strong>Delegated approval (human-in-the-loop)</strong>. Most “human-in-the-loop” implementations are: serialize state to JSON, fire a webhook, hope someone responds. The state goes stale, the notification gets buried, the agent re-deserializes into a slightly different world. Long-running runtimes let the agent pause in place with full execution state intact: reasoning chain, working memory, tool history, pending action. Hours of human time pass, the agent consumes zero compute, and it resumes with subsecond latency. Mission Control is Google’s inbox for this. The pattern works regardless of vendor.</p>



<p class="wp-block-paragraph"><strong>Memory-layered context</strong>. A seven-day agent needs more than session state. Memory Bank handles long-term curated memory, Memory Profiles add low-latency lookups, and the failure mode you’ll hit in production is memory drift: The agent learns a procedural shortcut from a few atypical interactions and starts applying it broadly. Govern memory like you govern microservices. Agent Identity controls who can read and write which banks. Agent Registry tracks which version of which agent is running. Agent Gateway enforces policy on the wire. The auditing question stops being “What are my agents doing?” and becomes “What are my agents remembering, and how is that changing their behavior?”</p>



<p class="wp-block-paragraph"><strong>Ambient processing</strong>. Not every long-running agent talks to a human. Some sit on a Pub/Sub stream or a BigQuery table and act on events as they arrive: content moderation, anomaly detection, inbox triage. The architectural decision worth making early is to not hardcode policy into the agent. Define it in the Gateway and the fleet picks up policy changes without redeploys. Ambient agents run unsupervised for long stretches, and the only sane way to update a hundred of them is to update the policy layer once.</p>



<p class="wp-block-paragraph"><strong>Fleet orchestration</strong>. In real systems, you rarely have one agent. A coordinator delegates subtasks to specialists (a Lead Researcher Agent, a Scoring Agent, an Outreach Agent), each running independently for different durations. Each specialist gets its own Identity (so the Outreach Agent can’t read financial data meant for Scoring), its own policy enforcement, its own Registry entry. This is the same coordinator/worker shape distributed systems have used for decades. What’s new is that ADK handles it declaratively with graph-based workflows, and a bad deployment in one specialist doesn’t cascade to the others.</p>



<p class="wp-block-paragraph">The patterns compose. A compliance system might use checkpointing for document processing, delegated approval for review gates, memory layering for cross-session knowledge, and fleet orchestration to coordinate the specialists. The opening question is always the same: What’s the longest uninterrupted unit of work your agent needs to perform? Minutes, and you don’t need long-running agents. Hours or days, and these patterns are where to start. The <a href="https://x.com/GoogleCloudTech/status/2046989964077146490" target="_blank" rel="noreferrer noopener">full write-up with code samples</a> covers each pattern in depth.</p>



<h2 class="wp-block-heading">So how do you actually build one today?</h2>



<p class="wp-block-paragraph">This is the practical question, and it has a different answer depending on what you’re building.</p>



<p class="wp-block-paragraph"><strong>You’re a developer who wants long-running coding work on your own repo</strong>. Just use <a href="https://addyosmani.com/blog/agent-harness-engineering/" target="_blank" rel="noreferrer noopener">Claude Code</a> (or Antigravity, Cursor, or Codex). The harness is already there. Treat your <code>AGENTS.md</code> like a pilot’s checklist: short, every line earned by a real failure. Add hooks for typecheck and lint that surface failures back to the agent. Write a plan file before the agent starts. Use <a href="https://addyosmani.com/blog/self-improving-agents/" target="_blank" rel="noreferrer noopener">the Ralph loop</a> when the agent claims it’s done and you don’t believe it. For multihour or overnight jobs, run in a worktree so a closed laptop doesn’t kill the run, and have it commit progress every meaningful unit of work. This is the path most people should take, and it’s where the most leverage is right now.</p>



<p class="wp-block-paragraph"><strong>You’re building a hosted agent product</strong>. Don’t build the runtime. Pick a managed one. The three real options today: <a href="https://cloud.google.com/products/gemini-enterprise-agent-platform" target="_blank" rel="noreferrer noopener">Google’s Agent Platform</a> (Agent Engine + Memory Bank + Sessions), <a href="https://platform.claude.com/docs/en/managed-agents/overview" target="_blank" rel="noreferrer noopener">Claude Managed Agents</a>, or roll something on top of <a href="https://google.github.io/adk-docs/">ADK</a>, the <a href="https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk" target="_blank" rel="noreferrer noopener">Claude Agent SDK</a>, or <a href="https://platform.openai.com/docs/codex" target="_blank" rel="noreferrer noopener">Codex SDK</a> and host it yourself. The trade-off is the usual one. Managed gets you the brain/hands/session split, observability, identity, and an audit trail out of the box. Self-hosted gets you control and the ability to use weird models for weird roles (Cursor’s pattern). For most teams, the right starting point is a managed runtime plus your own ADK or SDK code for the actual loop.</p>



<p class="wp-block-paragraph"><strong>You’re doing something autonomous and operational (monitoring, research, ops)</strong>. Memory Bank-style persistence is what you want, and it’s the part that doesn’t exist in Claude Code. ADK + Memory Bank + Cloud Run + Cloud Scheduler is the cleanest stack I’ve seen for “agent runs every N hours, accumulates state, alerts on a threshold.” This is also where Cursor’s planner/worker/judge split starts to matter more than it does for IDE coding, because the work is genuinely parallel and the failure modes are different.</p>



<p class="wp-block-paragraph">A few things matter regardless of which path you take.</p>



<p class="wp-block-paragraph"><em>Write down the done condition before the agent starts.</em> This is the single highest-leverage move for long runs. The Anthropic harness post calls it the feature list; Cursor calls it the planner’s task spec. Either way, it’s an external file with explicit, testable completion criteria, and it exists so the agent can’t quietly redefine <em>done</em> midrun.</p>



<p class="wp-block-paragraph"><em>Separate the evaluator from the generator.</em> Self-grading is the failure mode. A planner/worker/judge pipeline, or a generator/evaluator pair, is a real architectural pattern, not a stylistic preference. Even if it’s the same model in different roles with different prompts.</p>



<p class="wp-block-paragraph"><em>Invest in the session log, not just the prompt.</em> The append-only event log is what makes the agent recoverable, debuggable, and auditable. If you can’t reconstruct what the agent did in the last 24 hours from durable storage, what you have is a long-running shell script that happens to call an LLM, not a long-running agent.</p>



<p class="wp-block-paragraph"><em>Treat compaction and context resets as first class.</em> Anthropic is explicit that summarization-as-compaction wasn’t enough for very long jobs; they had to do full context resets where the harness tears the session down and rebuilds it from a structured handoff file. It is essentially how humans onboard a new engineer.</p>



<h2 class="wp-block-heading">There are some real limitations right now</h2>



<p class="wp-block-paragraph">A few things are still genuinely unsolved.</p>



<p class="wp-block-paragraph"><strong>Cost</strong>. A 24-hour run with a frontier model and a few tools is not cheap. Without budgets, circuit breakers, and a hard cap on tool spend, an agent can quietly burn through a week’s API budget in an afternoon. This is solvable, but it’s an explicit step you have to take.</p>



<p class="wp-block-paragraph"><strong>Security</strong>. A long-running agent with API keys, cloud access, and the ability to run shell commands has a much larger attack surface than a chat session. The brain/hands separation pattern matters here too: Credentials should be unreachable from the sandbox where model-generated code runs, which is one of the benefits Anthropic calls out for Managed Agents.</p>



<p class="wp-block-paragraph"><strong>Alignment drift</strong>. Over many context windows, agents drift. The original goal gets summarized, then resummarized, then loses fidelity. This is the part hooks and judges exist to defend against. It is also the most common reason “the agent went off and did something I didn’t ask for.”</p>



<p class="wp-block-paragraph"><strong>Verification</strong>. Auditing 24 hours of autonomous activity is a real human-time problem. Observability and structured artifacts (PRs, commits, briefings, test runs) are how you make this tractable. Without them, you’re scrolling logs and you’ll miss what matters.</p>



<p class="wp-block-paragraph"><strong>The human role</strong>. This is the one I keep coming back to. Defining work crisply enough that an agent can run for a day on it is harder than doing the work yourself. The skill that’s appreciating in value isn’t writing code. It’s writing specs that survive contact with an autonomous executor.</p>



<h2 class="wp-block-heading">Where this is going</h2>



<p class="wp-block-paragraph">Google, Anthropic, and Cursor have converged on roughly the same shape. Separate the model loop from the execution sandbox from the durable session log. Split planning from generation from evaluation. Bake in compaction, hooks, and context resets. Expose memory as a managed service that any agent invocation can query.</p>



<p class="wp-block-paragraph">Surface area is what differs. Google’s Agent Platform is the enterprise-stack version, with the identity and audit trail story baked in. The patterns underneath are the same. Claude Managed Agents is “Anthropic’s harness, hosted.” Cursor’s background agents are “long-running coding, pulled out of the IDE and into the cloud.”</p>



<p class="wp-block-paragraph">The harder problems for the next year aren’t in any of those layers individually. They’re in the coordination above them. Many long-running agents on a shared codebase. Agents that read their own traces and patch their own harnesses. Harnesses that assemble tools and context just in time for a task instead of being preconfigured at startup. That’s where the agent stops looking like a smarter chat window and starts looking like a colleague who’s been on the project longer than you have.</p>



<p class="wp-block-paragraph">The model is still load-bearing. But the gap between a chat window and an agent you can leave running overnight is mostly in the state, sessions, and structured handoffs wrapped around it. That’s where I’d spend my learning time right now.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/long-running-agents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>The AI Agents Stack (2026 Edition)</title>
		<link>https://www.oreilly.com/radar/the-ai-agents-stack-2026-edition/</link>
				<comments>https://www.oreilly.com/radar/the-ai-agents-stack-2026-edition/#respond</comments>
				<pubDate>Mon, 08 Jun 2026 10:56:59 +0000</pubDate>
					<dc:creator><![CDATA[Paolo Perrone]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18870</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-AI-agents-stack.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-AI-agents-stack-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[Six layers between your LLM and a production agent]]></custom:subtitle>
		
				<description><![CDATA[The following article originally appeared on Paolo Perrone’s The AI Engineer Substack and is being reposted here with the author’s permission. Your team picks LangGraph for a customer support chatbot. Three weeks in, you&#8217;ve got 14 nodes in a state graph, a custom checkpointer writing to Redis, and retry logic for tool calls that fail [&#8230;]]]></description>
								<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>The following article originally appeared on </em><a href="https://theaiengineer.substack.com/p/the-ai-agents-stack-2026-edition" target="_blank" rel="noreferrer noopener"><em>Paolo Perrone’s </em>The AI Engineer<em> Substack</em></a><em> and is being reposted here with the author’s permission.</em></p>
</blockquote>



<p class="wp-block-paragraph">Your team picks LangGraph for a customer support chatbot. Three weeks in, you&#8217;ve got 14 nodes in a state graph, a custom checkpointer writing to Redis, and retry logic for tool calls that fail once a week. The agent answers refund questions. It calls one API. A 50-line script on the OpenAI SDK with two MCP servers would have done the same thing. But nobody mapped which layers the problem actually needed.</p>



<p class="wp-block-paragraph">In November 2024, Letta published an <a href="https://www.letta.com/blog/ai-agents-stack" target="_blank" rel="noreferrer noopener">AI agents stack diagram</a> that became the default reference for half the engineering teams I talk to. If you&#8217;ve seen a &#8220;layers of an agent&#8221; visual on LinkedIn or pinned in a Slack channel, it probably traces back to that article.</p>



<p class="wp-block-paragraph">That diagram is 14 months old now, and a lot has changed since. MCP didn&#8217;t exist yet. Memory was still treated as a subset of your vector database. Nobody was shipping provider-native agent SDKs. Eval wasn&#8217;t even on the map. The stack has six layers in 2026, and at least three of them didn&#8217;t exist as distinct categories when Letta drew the original.</p>



<p class="wp-block-paragraph">So we drew it from scratch. This is the 2026 version.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="639" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-3.png" alt="The minimum viable agent stack in 2026" class="wp-image-18871" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-3.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-3-300x274.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<h2 class="wp-block-heading"><strong>TL;DR</strong></h2>



<p class="wp-block-paragraph">That&#8217;s the starting stack. Add complexity when something specific breaks, not before.</p>



<h2 class="wp-block-heading"><strong>What are we even mapping?</strong></h2>



<p class="wp-block-paragraph">Before the stack, there was a loop. In “<a href="https://theaiengineer.substack.com/p/what-is-an-ai-agent" target="_blank" rel="noreferrer noopener">What Is an AI Agent?</a>,” we defined an agent as the think-act-observe cycle: The model reasons about a task, takes an action (calls a tool, writes to memory), observes the result, and loops until the task is done. That loop is the atomic unit. Everything in this issue is infrastructure that makes that loop work reliably, at scale, in production.</p>



<p class="wp-block-paragraph">The agent stack is not the LLM stack. A chatbot needs inference and maybe RAG. An agent needs state management across multistep execution, tool access governed by protocols, memory that persists across sessions, autonomous reasoning loops, and guardrails that constrain behavior in real time. That&#8217;s a fundamentally different set of infrastructure problems.</p>



<p class="wp-block-paragraph">We&#8217;re mapping the six layers between your LLM and a production agent. We&#8217;re not covering training infrastructure, data pipelines, or model fine-tuning. Those are adjacent stacks. We covered RAG in depth in <a href="https://theaiengineer.substack.com/p/what-is-rag-retrieval-augmented-generation" target="_blank" rel="noreferrer noopener">Issue #5</a>. Today we’re zooming out to show where RAG fits in the bigger picture.</p>



<p class="wp-block-paragraph">Three things redrew the map between 2024 and 2026. MCP standardized tool connectivity, and the entire tools layer is new because of it. Reasoning models changed what agents can do autonomously, with single-call agents replacing some multistep chains. And memory became a first-class architectural primitive, not an afterthought bolted onto a vector database.</p>



<h3 class="wp-block-heading"><strong>How to evaluate each layer</strong></h3>



<p class="wp-block-paragraph">When choosing tools at each layer, ask three questions. <em>How much state do you need to manage?</em> A stateless tool caller and a multi-session agent that learns over time are different engineering problems, and the layers where state management is hardest (memory, frameworks) are where most teams get stuck. <em>How much vendor lock-in can you tolerate?</em> MCP is an open standard, provider SDKs are not, and every tool choice either increases or decreases how painful your next migration will be. <em>And how hard is it to go from demo to production?</em> Some layers (model serving) have almost no gap, while others (eval, guardrails) have a massive one. The layer where you feel that gap most is the one to invest in first.</p>



<p class="wp-block-paragraph">We take each layer from the bottom up, starting with the most stable and ending with the least mature.</p>



<h2 class="wp-block-heading"><strong>Layer 1: Models and inference</strong></h2>



<p class="wp-block-paragraph"><em>How you run the model that powers your agent: call an API, use a managed open weight provider, or self-host.</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="305" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-4.png" alt="Models &amp; inference: key players" class="wp-image-18872" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-4.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-4-300x131.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="wp-block-paragraph">The inference layer changed more in tone than in substance. Reasoning models like o1, o3, DeepSeek R1, and Claude with extended thinking shifted what agents can plan and execute. Agents that previously needed multistep chains can now solve problems in a single reasoning call. Open weight models like Llama 3.3, DeepSeek V3, and Qwen 2.5 closed the quality gap dramatically, so &#8220;always use the biggest closed model&#8221; is no longer default advice. The emerging pattern is to prototype on closed source and deploy on open weight.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">The honest take: This layer is commoditizing. Model differences matter less each quarter. The real decision is the cost and latency trade-off, not which model is &#8220;smartest.&#8221;</p>
</blockquote>



<p class="wp-block-paragraph">On the evaluation side, API calls are stateless. Send a request, get a response. Nothing to manage. Lock-in risk runs high for closed APIs because each model reasons differently, so switching providers means retuning prompts, adjusting for different failure modes, and retesting your eval suite. It&#8217;s low for open weight, where you can swap the model and keep the infra. The prototype-to-production gap is the smallest of any layer. Your demo API call is the same as your production API call.</p>



<p class="wp-block-paragraph">Self-host when your agent call volume makes API pricing untenable or when you need sub-100ms latency that API round-trips can&#8217;t deliver.</p>



<h2 class="wp-block-heading"><strong>Layer 2: Protocols and tools</strong></h2>



<p class="wp-block-paragraph"><em>How your agent calls external tools and APIs: through MCP servers, browser automation, or agent-to-agent protocols.</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="336" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-5.png" alt="Protocols &amp; tools: key players" class="wp-image-18873" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-5.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-5-300x144.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="wp-block-paragraph">This layer didn&#8217;t exist as a distinct category in 2024. Every framework had its own JSON schema for tool definitions. Now MCP is the standard, with 97M monthly SDK downloads, adoption by OpenAI, Google, and Microsoft, and a donation to the Linux Foundation.</p>



<p class="wp-block-paragraph">Browser Use exploded in parallel, hitting 78K GitHub stars in under a year. Nobody was shipping browser agents in production in 2024. And agents can now talk to other agents. IBM launched ACP, and Google launched A2A. Neither is standard yet, but the problem they solve (agents coordinating with other agents) is real and growing.</p>



<p class="wp-block-paragraph">Security is the open problem. Endor Labs <a href="https://www.endorlabs.com/learn/classic-vulnerabilities-meet-ai-infrastructure-why-mcp-needs-appsec" target="_blank" rel="noreferrer noopener">analyzed 2,614 MCP servers</a> and found 82% prone to path traversal and 67% to code injection.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">The honest take: The protocol debate is over. MCP won. The only question left is how you lock down your MCP servers before someone exploits them.</p>
</blockquote>



<p class="wp-block-paragraph">State management is nonexistent here. Your agent calls a tool, gets a response, done. No session, no memory between calls. Lock-in risk is low because MCP is an open standard, so if you build MCP servers, any MCP-compatible agent can use them. The prototype-to-production gap is medium. Your demo MCP server works until someone sends a malicious tool description. Security and governance are the gap.</p>



<p class="wp-block-paragraph">MCP standardized how agents use tools. It says nothing about how agents talk to each other. ACP and A2A are trying to solve that, but neither has reached critical mass. If you need multi-agent coordination today, you&#8217;re building it yourself at the framework layer. We covered MCP in depth in <a href="https://theaiengineer.substack.com/p/what-is-mcp" target="_blank" rel="noreferrer noopener">Issue #4</a>.</p>



<h2 class="wp-block-heading"><strong>Layer 3: Memory and knowledge</strong></h2>



<p class="wp-block-paragraph"><em>How your agent stores and retrieves what it knows: in-context state, vector search, or persistent memory across sessions.</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="288" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-6.png" alt="Memory &amp; knowledge: key players" class="wp-image-18874" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-6.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-6-300x123.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="wp-block-paragraph">All three tiers feed into the same place: The context window your agent sees on every call.</p>



<p class="wp-block-paragraph">In 2024, memory meant &#8220;pick a vector database and do RAG.&#8221; In 2026, memory is a first-class architectural primitive with three distinct tiers. Context windows got massive. Gemini hit 1M+ tokens, Claude 200K. Bigger windows didn&#8217;t kill the need for memory. They changed the trade-off: What do you stuff in-context versus what do you retrieve on demand?</p>



<p class="wp-block-paragraph">&#8220;Context engineering&#8221; replaced &#8220;prompt engineering&#8221; as the core discipline. Instead of writing a better prompt, you architect what information the agent sees on every call. Memory blocks appeared as named, structured fields in the context window that the agent can read and overwrite every turn. Instead of dumping everything into the system prompt, the agent manages its own state: what to keep, what to update, what to drop.</p>



<p class="wp-block-paragraph">On the infrastructure side, pgvector became the default for teams that don&#8217;t need a dedicated vector database. It&#8217;s just Postgres with an extension. GraphRAG emerged as a second retrieval option: follow relationships between entities instead of matching embeddings, with Neo4j leading this space. Sleep-time compute, where agents process information during idle time, is research stage but signals where tier 3 is heading.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">The honest take: Most teams overcomplicate memory. Start with conversation history in Postgres and a structured system prompt. Add vector search when your history exceeds context limits. Add agentic memory management only when your agent needs to learn across sessions.</p>
</blockquote>



<p class="wp-block-paragraph">This IS the state layer. You&#8217;re deciding what your agent remembers, how it retrieves it, and when it forgets. Highest complexity in the stack. Lock-in risk is medium. pgvector is portable because it&#8217;s just Postgres, while specialized tools like Mem0 or Zep are harder to migrate away from. The prototype-to-production gap is large. Demo memory works because context windows are big enough. Production memory breaks when conversations get long and your agent starts forgetting the important parts.</p>



<p class="wp-block-paragraph">In-context memory breaks down when agents need to share memory across instances or maintain state across model provider switches. That&#8217;s where dedicated memory infrastructure like Letta, Zep, and Mem0 earns its keep.</p>



<h2 class="wp-block-heading"><strong>Layer 4: Frameworks and SDKs</strong></h2>



<p class="wp-block-paragraph"><em>How you wire together the model calls, tool use, and control flow that make your agent work: a provider&#8217;s built-in toolkit (SDK), a graph-based framework like LangGraph, or raw code.</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="384" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-7.png" alt="Frameworks &amp; SDKs: key players" class="wp-image-18875" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-7.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-7-300x165.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="wp-block-paragraph">Every major AI lab now ships its own agent SDK. OpenAI has the Agents SDK (evolved from Swarm). Google released ADK. Microsoft has Semantic Kernel and AutoGen. Hugging Face built smolagents. Two years ago, LangChain was the only game. Now you pick between three camps: provider SDKs that are fast to start but locked to one model, graph-based frameworks like LangGraph that are portable but require more setup, or no framework at all. That choice didn&#8217;t exist in 2024.</p>



<p class="wp-block-paragraph">LangGraph solidified as the graph-based orchestration leader with v1.0 released October 2025 and production deployments at Uber, JPMorgan, LinkedIn, and Klarna. LangChain agents are now built on LangGraph under the hood. Meanwhile, the &#8220;build it yourself&#8221; camp grew. Teams that tried LangChain in 2024 and fought the abstraction are now writing thin wrappers over provider APIs + MCP. No framework means full control. This works until your agent needs state management or complex branching.</p>



<p class="wp-block-paragraph">A quick note on naming: &#8220;LangChain&#8221; and &#8220;LangGraph&#8221; are not the same thing. LangChain is the integration layer handling model connectors, tool calling, and prompt templates. LangGraph is the orchestration engine managing state, control flow, and graphs. Most production teams use both together, but LangGraph is where the agent logic lives.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">The honest take: Most teams pick too much framework. If your agent calls a model and a few tools, you don&#8217;t need LangGraph. A provider SDK and a couple of tool calls will get you to production faster than any graph.</p>
</blockquote>



<p class="wp-block-paragraph">Provider SDKs manage state for you. LangGraph makes you define every state transition explicitly. Build-it-yourself means you roll your own. Lock-in risk is the highest in the stack. Your orchestration code doesn&#8217;t port. A LangGraph agent rewritten for CrewAI is a new codebase. Provider SDKs are worse because you&#8217;re locked to one model too. The prototype-to-production gap is large. Demo works because nothing goes wrong. Production means handling tool failures, retries, timeouts, and humans who need to approve before the agent acts.</p>



<p class="wp-block-paragraph">The framework you pick determines your migration cost. Provider SDKs are fastest to start but lock you to one model. LangGraph is portable but complex. Building your own gives you full control until your agent outgrows your wrapper. MCP is the one layer that transfers across all three camps.</p>



<h2 class="wp-block-heading"><strong>Layer 5: Eval and observability</strong></h2>



<p class="wp-block-paragraph"><em>How you measure whether your agent is doing its job: tracing runs, scoring outputs, and catching regressions before users do.</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="336" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-8.png" alt="Eval &amp; observability: key players" class="wp-image-18876" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-8.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-8-300x144.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="wp-block-paragraph">This layer barely existed in 2024. Now it&#8217;s the gap. <a href="https://www.langchain.com/state-of-agent-engineering" target="_blank" rel="noreferrer noopener">LangChain&#8217;s State of Agent Engineering</a> survey found 89% of teams with production agents have implemented observability, but only 52% have evals. That 37-point gap is where production quality dies.</p>



<p class="wp-block-paragraph">&#8220;Evaluation as infrastructure&#8221; is converging on three tiers: fast checks on every PR (Did the agent call the right tools?), nightly regression suites that use an LLM to judge output quality, and continuous production monitoring that alerts when agent performance drifts. New agent-specific benchmarks have emerged too, including Context-Bench for memory management, Recovery-Bench for error recovery, and Terminal-Bench for coding agents.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">The honest take: Most teams skip eval until something breaks in production. By then they&#8217;re debugging blind. The teams that don&#8217;t have this problem built evals before they deployed.</p>
</blockquote>



<p class="wp-block-paragraph">State management matters here because your agent runs 12 steps, step 3 picked the wrong tool, and steps 4–12 were doomed from there. If your eval only checks the final output, you&#8217;ll never know why. Lock-in risk is moderate. Most tools export OpenTelemetry traces, so switching observability providers is doable, but switching eval frameworks means rebuilding your test suites. The prototype-to-production gap is the biggest of any layer. Most prototypes have zero eval. You don&#8217;t feel the pain until production users find the failures for you.</p>



<p class="wp-block-paragraph">Current eval tools are strongest for single-turn and tool-calling evaluation. Multi-agent evaluation, long-horizon task assessment, and evaluating agents that learn over time are all unsolved problems. If your agent does any of those, you&#8217;ll need custom eval infrastructure beyond what the platforms offer today.</p>



<h2 class="wp-block-heading"><strong>Layer 6: Guardrails and safety</strong></h2>



<p class="wp-block-paragraph"><em>How you stop your agent from doing things it shouldn&#8217;t: filtering inputs, authorizing tool calls, and validating outputs.</em></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="336" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-9.png" alt="Guardrails &amp; safety: key players" class="wp-image-18877" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-9.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-9-300x144.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="wp-block-paragraph">Agent guardrails became a separate discipline from LLM guardrails. In 2024, guardrails meant input/output filters on a model. In 2026, your agent calls tools, spends money, and takes actions. Guardrails now means authorizing tool calls, enforcing rate limits, and validating what the agent actually did.</p>



<p class="wp-block-paragraph">The &#8220;guardrails before action&#8221; pattern emerged from teams that learned the hard way. They now enforce authorization at the tool execution layer, not the output layer. By the time you filter the response, the agent already sent the email. OWASP published the MCP Top 10 (beta), which is the first real security checklist for tool-connected agents. Deployment is still DIY. LangGraph Cloud and Bedrock Agents exist, but most production teams are still deploying with FastAPI and their own infra. This layer is where you&#8217;ll spend the most unplanned engineering time.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">The honest take: This is the least mature layer in the stack. No dominant framework, no established patterns. You&#8217;re writing policy code from scratch.</p>
</blockquote>



<p class="wp-block-paragraph">Guardrails need to know what the agent is doing right now to decide what it shouldn&#8217;t do next. That means tracking agent state in real time. Lock-in risk is low because most guardrails are custom policy code you write yourself. NeMo Guardrails is the closest thing to a framework, but you&#8217;ll still write most rules from scratch. The prototype-to-production gap is effectively infinite. Your demo has no guardrails because nobody&#8217;s trying to break it. Production will.</p>



<p class="wp-block-paragraph">Current guardrails tools focus on single-agent systems. If you&#8217;re running multi-agent workflows where agents delegate to each other, guardrail propagation across agent boundaries is an unsolved problem. You&#8217;ll need custom authorization logic.</p>



<h2 class="wp-block-heading"><strong>What are you building?</strong></h2>



<p class="wp-block-paragraph">This is the decision that cuts through the framework confusion. The agent type determines which layers you invest in and which tools to pick at each one.</p>



<p class="wp-block-paragraph">A <strong>stateless tool caller</strong> answers questions from a knowledge base, looks up an order, or checks inventory. You need a provider SDK, MCP, and Postgres. No framework, no vector database. This is a weekend project.</p>



<p class="wp-block-paragraph">A <strong>multistep workflow</strong> processes a refund end to end, reviews a PR across five files, or triages and routes support tickets. Steps depend on each other, things fail in the middle, and humans need to approve before the agent acts. You need LangGraph, MCP, and eval. Build evals before you deploy because these agents break silently.</p>



<p class="wp-block-paragraph">An <strong>agent that learns</strong> remembers your preferences across sessions, gets better at your codebase over time, or tracks project context across weeks. You need a memory-first architecture, a vector DB, and eval. Orchestration is the easy part. The hard part is deciding what to remember, what gets dropped, and how you stop old context from polluting new answers.</p>



<p class="wp-block-paragraph">A <strong>multi-agent system</strong> has agents that delegate to other agents, split a research task across specialists, or run parallel workstreams. You need the full stack. Two agents passing context to each other is already hard to debug. Five is impossible without trace-level evals on every handoff. Build eval infrastructure before you build the second agent.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1400" height="867" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-10.png" alt="Pick your stack" class="wp-image-18878" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-10.png 1400w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-10-300x186.png 300w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-10-768x476.png 768w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></figure>



<h2 class="wp-block-heading"><strong>Coding agents: All 6 layers in action</strong></h2>



<p class="wp-block-paragraph">Coding agents like Cursor, Claude Code, Codex, and Windsurf are the most proven application of the AI agents stack. All six layers, working together.</p>



<p class="wp-block-paragraph">At the inference layer, these tools serve hundreds of millions of daily requests. Cursor routes between Claude, GPT-4, and its own fine-tuned models depending on the task. At the protocols layer, MCP servers connect to editors, terminals, filesystems, and Git, which is how the agent reads your code and runs commands. The memory layer uses codebase-aware retrieval with reranking. The agent doesn&#8217;t read your whole repo. It retrieves the files that matter for this specific edit.</p>



<p class="wp-block-paragraph">At the framework layer, these are custom orchestration systems with RL loops. Not LangGraph, not a provider SDK. Purpose-built control flow for code generation, review, and iteration. At the eval layer, Cursor retrains its acceptance-rate model every 90 minutes based on whether users accept or reject suggestions. That&#8217;s eval running in production, continuously. And at the guardrails layer, sandboxed execution prevents runaway agents. The agent can write code and run it, but inside a container that limits what it can touch.</p>



<h2 class="wp-block-heading"><strong>The AI agent stack cheat sheet</strong></h2>



<p class="wp-block-paragraph">Every layer scored on the three questions from the evaluation framework: How much state do you need to manage? How much vendor lock-in can you tolerate? And how hard is it to go from demo to production?</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="700" height="478" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-11.png" alt="The agent stack cheat sheet" class="wp-image-18879" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-11.png 700w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-11-300x205.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<h2 class="wp-block-heading"><strong>The bigger picture</strong></h2>



<p class="wp-block-paragraph">Most teams are building like it&#8217;s still 2024. They pick LangGraph before they know if they need state. They add a vector database before they&#8217;ve outgrown Postgres. They design multi-agent architectures before they&#8217;ve shipped one agent that works. The decision flowchart above exists because a tool-calling chatbot and a multi-agent research system share almost no infrastructure. Treat them the same and you&#8217;ll overbuild the first and underbuild the second.</p>



<p class="wp-block-paragraph">The teams that got past this run evals on every deploy, not once a quarter. Their guardrails sit at the tool call layer, not the output layer. Their memory architecture was designed, not inherited from whatever the framework defaulted to. Most teams ship the opposite: no evals, output-only filtering, and a system prompt that grows until the context window chokes. The gap isn&#8217;t talent or budget. It&#8217;s knowing which layers matter for your specific agent instead of half-building all six.</p>



<p class="wp-block-paragraph">The stack is going to collapse. Provider SDKs are already absorbing memory, tool calling, and basic eval into a single API. By early 2027, most teams won&#8217;t build each layer separately. They&#8217;ll get an increasingly opinionated stack from their model provider and that will be fine for 80% of use cases. The other 20%, agents at scale where the defaults break, will still build custom at every layer. But even then, when something fails in production, you need to know which layer failed. That&#8217;s what this article is for.</p>



<h2 class="wp-block-heading">Sources</h2>



<ol class="wp-block-list">
<li>“<a href="https://www.letta.com/blog/ai-agents-stack" target="_blank" rel="noreferrer noopener">The AI Agents Stack</a>,” Letta, November 2024.</li>



<li>“<a href="https://www.anthropic.com/news/donating-the-model-context-protocol-and-establishing-of-the-agentic-ai-foundation" target="_blank" rel="noreferrer noopener">Donating the Model Context Protocol and Establishing the Agentic AI Foundation</a>,” Anthropic, December 2025.</li>



<li>“<a href="https://www.stackone.com/blog/ai-agent-tools-landscape-2026/" target="_blank" rel="noreferrer noopener">120+ Agentic AI Tools Mapped Across 11 Categories [2026]</a>,” StackOne, February 2026.</li>



<li>Henrik Plate and Darren Meyer, <em><a href="https://www.endorlabs.com/lp/dependency-management-report" target="_blank" rel="noreferrer noopener">Dependency Management Report</a></em>, Endor Labs, January 2026.</li>



<li>Jason Liu, <a href="https://jxnl.co/writing/2025/08/28/context-engineering-index/" target="_blank" rel="noreferrer noopener">Context Engineering Series: Building Better Agentic RAG Systems</a>, August 2025.</li>



<li>“<a href="https://www.langchain.com/blog/langchain-langgraph-1dot0" target="_blank" rel="noreferrer noopener">LangChain and LangGraph Agent Frameworks Reach v1.0 Milestones</a>,” LangChain, October 2025.</li>



<li><em><a href="https://www.langchain.com/state-of-agent-engineering" target="_blank" rel="noreferrer noopener">State of Agent Engineering</a></em>, LangChain, December 2025.</li>



<li>Yunfei Bai, Allie Colin, Kashif Imran, and Winnie Xiong, “<a href="https://aws.amazon.com/blogs/machine-learning/evaluating-ai-agents-real-world-lessons-from-building-agentic-systems-at-amazon/" target="_blank" rel="noreferrer noopener">Evaluating AI Agents: Real-World Lessons from Building Agentic Systems at Amazon</a>,” Amazon, February 2026.</li>



<li><a href="https://github.com/OWASP/www-project-mcp-top-10/" target="_blank" rel="noreferrer noopener">OWASP MCP Top 10</a>, OWASP.</li>
</ol>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/the-ai-agents-stack-2026-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>This Week in AI: Production Viability</title>
		<link>https://www.oreilly.com/radar/this-week-in-ai-production-viability/</link>
				<comments>https://www.oreilly.com/radar/this-week-in-ai-production-viability/#respond</comments>
				<pubDate>Fri, 05 Jun 2026 15:55:20 +0000</pubDate>
					<dc:creator><![CDATA[Michelle Smith]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[This Week in AI]]></category>
		<category><![CDATA[Podcast]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18861</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/0642572383770_This_Week_in_AI_Cover-scaled.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2560" 
				height="2560" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/0642572383770_This_Week_in_AI_Cover-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[Metacognition, what OpenAI’s finance move is really about, and why tokenmaxxing is a trap]]></custom:subtitle>
		
				<description><![CDATA[On this week’s episode, host and the founder of AI advisory firm Intelligence Briefing Andreas Welsch brought together Maya Mikhailov, cofounder and CEO of Savvi AI, and Doug Shannon, generative AI and intelligent automation leader, to cover a handful of interconnected topics that practitioners are navigating right now: OpenAI’s push into personal finance, the role [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">On this week’s episode, host and the founder of AI advisory firm <a href="https://www.intelligence-briefing.com" target="_blank" rel="noreferrer noopener">Intelligence Briefing</a> Andreas Welsch brought together Maya Mikhailov, cofounder and CEO of <a href="https://www.savviai.com/" target="_blank" rel="noreferrer noopener">Savvi AI</a>, and Doug Shannon, generative AI and intelligent automation leader, to cover a handful of interconnected topics that practitioners are navigating right now: OpenAI’s push into personal finance, the role of <a href="https://www.linkedin.com/feed/update/urn:li:activity:7462494796318748673/?trk=public_post_embed_social-actions-reactions" target="_blank" rel="noreferrer noopener">metacognition</a> in AI-assisted technical work, the growing backlash against token-based productivity metrics, and the new role of forward-deployed engineer. Together, these stories sketch a picture of an industry that’s good at generating output but is still figuring out what output is worth.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="This Week in AI: Production Viability with Andreas Welsch, Maya Mikhailov, and Doug Shannon" width="500" height="281" src="https://www.youtube.com/embed/inQlD1CzUg8?start=1&amp;feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading"><strong>Why OpenAI wants your bank account data</strong></h2>



<p class="wp-block-paragraph">When OpenAI announced it was <a href="https://openai.com/index/personal-finance-chatgpt/" target="_blank" rel="noreferrer noopener">analyzing users’ transaction data</a> in partnership with financial institutions, the coverage focused on the consumer benefit: a smarter way to track spending, comparable to what Credit Karma or Mint offered but with a more conversational interface.</p>



<p class="wp-block-paragraph">But that’s not all the company’s interested in, or even the main thing. Maya reframed the stakes: “What OpenAI wants to do is figure out consumer intent.” Being able to access users’ financial data is less about helping people manage their money and more about completing a profile the company can then monetize. OpenAI already builds a surprisingly accurate picture of users from their chat histories. Add transaction data and you get specifics that weren’t there before: what someone is saving for, what they’re anxious about, where their money is actually going. That’s a data asset worth a great deal to advertisers.</p>



<p class="wp-block-paragraph">We’ve seen this pattern before, and as Andreas noted, companies have long held (and used) potentially invasive data to recommend products. The <a href="https://www.nytimes.com/2012/02/19/magazine/shopping-habits.html" target="_blank" rel="noreferrer noopener">Target pregnancy prediction story</a> is now more than a decade old, but it’s still being taught in business school, including by Andreas, precisely because it illustrates how behavioral data can be combined to infer things people haven’t explicitly disclosed—and spotlights the fine line between effective recommendations and those that feel <em>too</em> personalized, reminding consumers just how much information companies have on them. Companies’ profile-building capability hasn’t changed, but AI chat adds a new wrinkle, said Maya. A conversational interface makes disclosure feel natural, so the knowledge graph based on your chat history is very powerful. And these tools are also better positioned to share recommendations than traditional avenues. “By having this style that is agreeable, that is engaging,” Maya explained, “those recommendations are going to be a lot stickier than what a fragment of a sentence I type into a regular search engine.”</p>



<h2 class="wp-block-heading"><strong>Metacognition as a professional skill</strong></h2>



<p class="wp-block-paragraph">When you delegate thinking to a system that averages across a massive range of inputs to produce an answer, you need to know when that answer is good enough and when it isn’t.</p>



<p class="wp-block-paragraph">“We’re essentially being averaged out,” Doug said. The model is doing many things behind the scenes to find a mean response. The human’s job is to ask questions about the questions, to push past the first answer, and to know whether their own judgment is still in the loop. That’s why Doug’s been pushing for a renewed interest in metacognition, or “thinking about thinking.” Offloading cognitive load that’s peripheral to your work is fine, Doug and Maya agreed. Offloading the reasoning that’s central to your job’s value—what Doug called cognitive surrender—is where organizations get into trouble.</p>



<p class="wp-block-paragraph">The future advantage won’t come from access to AI. Everyone will have some kind of access to it. The advantage will come from knowing what to offload, what to question, and what should never leave human judgment. This is a skill-development question as much as a philosophical one. The people who’ll be most effective with AI tools aren’t the ones who use them most; they’re the ones who understand what to hand off and what to keep. That requires domain knowledge, judgment about when a model’s answer is plausible but wrong, and enough fluency with how these systems work to recognize when you’re being handed an average instead of an answer.</p>



<h2 class="wp-block-heading"><strong>Tokenmaxxing and the wrong incentive</strong></h2>



<p class="wp-block-paragraph">The <a href="https://en.wikipedia.org/wiki/Token_maxxing" target="_blank" rel="noreferrer noopener">tokenmaxxing</a> debate seems to be coming to a head. Amazon <a href="https://www.cnet.com/tech/services-and-software/amazon-ai-leaderboard-tokenmaxxing/" target="_blank" rel="noreferrer noopener">abolished its AI productivity leaderboard</a> after employees started gaming it by writing inefficient code to rack up token usage. And one company reportedly burned through <a href="https://www.axios.com/2026/05/28/ai-spending-roi-enterprise-costs" target="_blank" rel="noreferrer noopener">$500M in Anthropic tokens in a single month</a> after failing to set limits. The companies encouraging tokenmaxxing are incentivizing the wrong metrics, Maya argued. It’s like determining which bakery is best by the amount of flour it uses. The right question is “Are we making a quality product?”</p>



<p class="wp-block-paragraph">Andreas shared his own vibe coding experience as an example of how token consumption and technical debt compound in practice. A developer starts with a modest plan and burns through their quota running agents in half an hour. They upgrade to a higher tier, paying five times more, but now the sunk-cost logic kicks in. As Andreas pointed out, now they feel like they “should also be getting five times more the value out of [their subscription],” so scope expands from a single tool into a unified business operating system. Three weeks later, the accumulated complexity has outpaced the ability to evaluate it: Repeated security audits keep surfacing new issues, each pass generating recommendations that require cybersecurity expertise most vibe coders don’t have. Here’s where Doug’s point about metacognition applies: The more a builder stays actively involved in understanding what the system is actually doing, the better their judgment about whether it is working. For less engaged users, the risk is accepting the output, shipping the debt, and discovering the consequences later.</p>



<p class="wp-block-paragraph">Most of the misalignment originates in the gap between what executives expect from AI and what practitioners deal with day-to-day. Executives see a capability that could change the slope of productivity, Maya explained. Engineers and analysts live with the technical debt, the version control problems, and the regulatory constraints that don’t disappear because you have a better code completion tool. The leaderboard problem is a symptom of that disconnect.</p>



<p class="wp-block-paragraph">GitHub’s recent shift from unlimited to usage-based pricing for Copilot is likely to realign these incentives faster than any internal policy change would. When more CFOs start seeing the actual bills, the leaderboards will all come down.</p>



<p class="wp-block-paragraph">Doug identified a related problem emerging with the “cognitive surrender” to LLMs. When organizations encourage employees to pipe internal processes, proprietary logic, and institutional knowledge into foundation models without governance, they’re not just running up token bills. They’re giving away the operational knowledge that differentiates them. Process documentation, workflow logic, and institutional memory about why certain decisions were made are all forms of intellectual property, and once they’re encoded into a general-purpose model, the organization’s advantage from them diminishes.</p>



<h2 class="wp-block-heading"><strong>Forward-deployed engineers aren’t enough on their own</strong></h2>



<p class="wp-block-paragraph">Is the answer to these challenges to put a skilled engineer directly inside the customer environment to translate between what a model produces and what an organization actually needs? That’s the promise of the forward-deployed engineer (FDE) approach popularized by AI firms. Doug and Maya both had some criticisms of the model.</p>



<p class="wp-block-paragraph">Maya’s objection was structural. Enterprise AI deployment isn’t a matter of adding capability on top of existing infrastructure. Organizations arrive with siloed data, legacy systems, and regulatory constraints that no forward-deployed engineer can resolve on technical skill alone. You can’t “just sprinkle some AI on it, and it’ll work just by a package of tokens,” she said. Engineers have to know the context behind why certain data can’t be used or why a particular model can’t be deployed in a regulated context. FDEs coming into an organization fresh don’t have this understanding and as a result may undo decisions that were made carefully and for reasons that aren’t written down anywhere obvious.</p>



<p class="wp-block-paragraph">Doug’s concern was about communication. FDEs, in his experience, tend to arrive with strong technical instincts and limited organizational context. They get into the work quickly but struggle to communicate across the full stack of stakeholders involved. That’s why business analysts exist, to understand the customers’ problems and what the process actually is before engineers can address them. Skip that step and you get technically correct output that solves the wrong problem.</p>



<p class="wp-block-paragraph">What both Maya and Doug were underscoring is that AI deployment at the enterprise level is fundamentally a <em>context</em> problem. The models are capable. What’s hard is knowing which capability to apply, where to do it, and with what constraints in place. That knowledge doesn’t live in the model; it lives in the people who’ve worked inside the organization long enough to know why things are the way they are.</p>



<h2 class="wp-block-heading"><strong>The measurement problem</strong></h2>



<p class="wp-block-paragraph">All the topics in this episode circle back to the same question: What are we actually measuring, and what incentives are we setting in place with those measurements? Token counts and lines of code don’t always correlate to the outcomes companies want. You need human expertise and a contextual knowledge of the business to figure out what goals you want to achieve and what to measure to ensure you get there.</p>



<p class="wp-block-paragraph">On next Monday’s episode of <em>This Week in AI</em>, RecoMind founder Miguel Fierro joins host Christina Stathopoulos to discuss responsible AI, multimodal content creation, and more on how LLMs are changing personalization and user understanding. Miguel will also lead a live demo that offers a glimpse of the next generation of recommendation experiences—<a href="https://www.oreilly.com/live/this-week-in-ai.html" target="_blank" rel="noreferrer noopener">register here</a>.</p>



<p class="wp-block-paragraph">We’ll continue to publish our takeaways here on Radar each Friday and share full episodes on <a href="https://www.youtube.com/watch?v=g4cfjz5AKxY&amp;list=PL055Epbe6d5bJEhT7_ZzOeJZ6gPyUzYpS" target="_blank" rel="noreferrer noopener">YouTube</a>, <a href="https://open.spotify.com/show/033kJS2BG1teGunxmtsU1r" target="_blank" rel="noreferrer noopener">Spotify</a>, <a href="https://podcasts.apple.com/us/podcast/this-week-in-ai/id1896798047" target="_blank" rel="noreferrer noopener">Apple</a>, or wherever you get your podcasts.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/this-week-in-ai-production-viability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>I Let an AI Agent Run 40 Experiments While I Slept</title>
		<link>https://www.oreilly.com/radar/i-let-an-ai-agent-run-40-experiments-while-i-slept/</link>
				<comments>https://www.oreilly.com/radar/i-let-an-ai-agent-run-40-experiments-while-i-slept/#respond</comments>
				<pubDate>Fri, 05 Jun 2026 10:27:18 +0000</pubDate>
					<dc:creator><![CDATA[Vanchhit Khare]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18855</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/I-let-an-AI-agent-run-40-experiments-while-I-slept.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/I-let-an-AI-agent-run-40-experiments-while-I-slept-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[A linter ruined half of them.]]></custom:subtitle>
		
				<description><![CDATA[I set up an AI agent on a rented GPU, pointed it at a training script, and went to bed. By morning it had run 40 experiments, improved validation loss by 5.9%, and cut memory usage from 44 GB to 17 GB. It also spent four hours chasing a bug that a linter introduced behind [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">I set up an AI agent on a rented GPU, pointed it at a training script, and went to bed. By morning it had run 40 experiments, improved validation loss by 5.9%, and cut memory usage from 44 GB to 17 GB. It also spent four hours chasing a bug that a linter introduced behind its back. The agent never flagged it. I only found out because the numbers stopped improving and I started reading logs.</p>



<p class="wp-block-paragraph">The setup was based on <a href="https://github.com/karpathy/autoresearch" target="_blank" rel="noreferrer noopener">Andrej Karpathy’s autoresearch project</a>: Give an agent one file it can edit (train.py), one metric to optimize (validation bits per byte), a fixed five-minute training budget per experiment, and Git for checkpointing. If an experiment beats the current best, keep the commit. If not, revert. Loop forever. Karpathy’s own run produced <a href="https://x.com/karpathy/status/2031135152349524125" target="_blank" rel="noreferrer noopener">700 experiments and 20 genuine improvements</a> across 48 hours, an 11% speedup on already-optimized code. Shopify’s Tobi Lütke <a href="https://x.com/tobi/status/2032212531846971413" target="_blank" rel="noreferrer noopener">pointed the same pattern at Liquid</a>, their templating engine, and got 53% faster rendering from 93 automated commits. The pattern clearly works. The question is what breaks when you run it yourself.</p>



<h2 class="wp-block-heading">The first failure: Agents fixing agents</h2>



<p class="wp-block-paragraph">Before running autoresearch, I had a separate problem. I had 15 custom skills for Claude Code (think reusable prompt templates with tool access, structured inputs, and specific behaviors). Most of them were broken when dispatched as parallel background agents. Vague descriptions meant the system couldn’t figure out when to invoke them. Missing tool permissions caused silent failures. Duplicate scopes between similar skills created routing confusion.</p>



<p class="wp-block-paragraph">So I used the same pattern: dispatch background agents in parallel, one per skill, each tasked with reading the skill definition, identifying problems, and rewriting it. 13 out of 15 came back improved. Descriptions got specific. Dead references to nonexistent files were removed. Tool permissions were added. Two skills were left untouched because the agents couldn’t find anything wrong with them. The whole batch took under an hour.</p>



<p class="wp-block-paragraph">But here’s what I didn’t expect. Three of the “improved” skills had subtle regressions. One agent removed an AskUserQuestion gate that was there for a reason, because the gate’s purpose wasn’t documented and the agent read it as unnecessary friction. Another agent rewrote a skill description so precisely that it stopped triggering on the fuzzy, misspelled queries real users actually type. I caught these during manual review, but if I had trusted the parallel output without checking, three skills would have silently degraded in production.</p>



<h2 class="wp-block-heading">The second failure: The linter in the loop</h2>



<p class="wp-block-paragraph">Then I started the training loop. The agent worked through hyperparameters methodically. It halved the batch size early (experiment 4), which turned out to be the single biggest win: more gradient steps in the same five-minute window. It reduced model depth from eight to seven layers, dropped weight decay from 0.2 to 0.05, and tuned the learning rate schedule. Each change was small. The cumulative effect was a 5.9% improvement in validation loss and a 60% reduction in peak GPU memory.</p>



<p class="wp-block-paragraph">Out of 40 experiments, the agent kept nine, discarded 28, and crashed three. That keep/discard ratio felt about right. Most ideas don’t work. The point of automation isn’t to have better ideas. It’s to try bad ones faster.</p>



<p class="wp-block-paragraph">Then the numbers plateaued. Experiments 30 through 38 produced nothing worth keeping. I started digging through the logs and found something I hadn’t expected: A linter running on the remote machine had been silently modifying a hyperparameter in train.py. It changed SCALAR_LR from 0.5 to 0.3 every time the agent saved the file. The agent would set the value, commit, and run the experiment, but the linter would alter the file between the save and the execution. The agent had no way to detect this because it checked Git diffs, not the runtime state of the file. Every experiment after a certain point was running with a learning rate the agent never chose.</p>



<p class="wp-block-paragraph">I lost roughly four hours of compute to this. The agent kept going, proposing new ideas, running experiments, logging results. From its perspective nothing was wrong. The experiments ran, produced numbers, and the numbers were plausible. There was no crash, no error, no alert.</p>



<h2 class="wp-block-heading">Why this matters beyond my GPU bill</h2>



<p class="wp-block-paragraph">Gartner predicts <a href="https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027" target="_blank" rel="noreferrer noopener">over 40% of agentic AI projects will be canceled</a> by the end of 2027, citing escalating costs and inadequate risk controls as the primary drivers. My overnight session was a toy example: a single GPU, a small model, and a low-stakes experiment. But the failure pattern scales. An agent that can’t detect when its inputs are being modified between decisions will make the same class of error whether it’s tuning hyperparameters or managing a production pipeline.</p>



<p class="wp-block-paragraph">The autoresearch constraints are smart: one file, one metric, and Git for state. But they assume the environment is stable. Nobody checks whether something outside the loop is modifying the file between commits. The agent optimizes within its sandbox, and the sandbox has a hole in the wall that nobody thought to look for.</p>



<p class="wp-block-paragraph">Anyone who has run distributed systems recognizes this. When the linter changed that hyperparameter, it was the equivalent of someone editing a database record between a read and a write. We solved that problem years ago with compare-and-swap, optimistic locking, checksums. We just haven’t brought any of it to autonomous AI workflows. The SkyPilot team recently <a href="https://blog.skypilot.co/scaling-autoresearch/" target="_blank" rel="noreferrer noopener">scaled autoresearch to 16 GPUs and 910 experiments</a>. At that scale, an undetected environment mutation doesn’t cost you four hours. It costs you a cluster.</p>



<p class="wp-block-paragraph">Next time I run autoresearch, I’ll add a file integrity check before every experiment. It’s three lines of code, but it would have saved me four hours and produced a better final result. The agent did its job. The environment didn’t.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/i-let-an-ai-agent-run-40-experiments-while-i-slept/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>The Tidy House</title>
		<link>https://www.oreilly.com/radar/the-tidy-house/</link>
				<comments>https://www.oreilly.com/radar/the-tidy-house/#respond</comments>
				<pubDate>Thu, 04 Jun 2026 16:25:11 +0000</pubDate>
					<dc:creator><![CDATA[Tim O’Reilly]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18849</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-tidy-house.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/The-tidy-house-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[DJ Patil on why the hardest part of AI adoption is organizational, not technical]]></custom:subtitle>
		
				<description><![CDATA[DJ Patil has spent the past several months on a listening tour. Wherever he travels, he finds a local university, pings faculty and students and anyone else who wants to show up, and runs an AMA. He&#8217;s heard from grad students who can&#8217;t get callbacks, hospital administrators dealing with federal policy changes that land like [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">DJ Patil has spent the past several months on a listening tour. Wherever he travels, he finds a local university, pings faculty and students and anyone else who wants to show up, and runs an AMA. He&#8217;s heard from grad students who can&#8217;t get callbacks, hospital administrators dealing with federal policy changes that land like a change in the laws of physics, and executives who can&#8217;t forecast their AI spending past six months. He&#8217;s trying to synthesize all of it and help reframe the wider conversation.</p>



<p class="wp-block-paragraph">DJ co-coined the term &#8220;data scientist,&#8221; served as America&#8217;s first chief data scientist under President Obama, and was chief scientist at LinkedIn. He&#8217;s a longtime O&#8217;Reilly author, going back to <em><a href="https://www.oreilly.com/library/view/building-data-science/BLDNGDST0001/" target="_blank" rel="noreferrer noopener">Building Data Science Teams</a></em> and <em><a href="https://www.oreilly.com/library/view/ethics-and-data/9781492043898/" target="_blank" rel="noreferrer noopener">Ethics and Data Science</a></em>, and he&#8217;s on the founding team at <a href="https://www.devoted.com/" target="_blank" rel="noreferrer noopener">Devoted Health</a>, where he&#8217;s spent the past decade building the kind of data infrastructure most organizations are still struggling to put in place. He calls it “the tidy house.” He sat down with me to talk about &#8220;the broken promise&#8221; in the job market that is driving AI sentiment, and why weak data infrastructure is a big part of the gap between what AI can do and what most institutions can actually absorb.</p>



<h2 class="wp-block-heading">The broken promise</h2>



<p class="wp-block-paragraph">What DJ keeps hearing on his tour is anger and angst. One word that keeps coming up is &#8220;terrified.&#8221; Workers are worried about layoffs. Meanwhile, students, including those from top-tier universities like MIT, Carnegie Mellon, and UC Berkeley, have been applying to 300+ internships and getting fewer than 10 callbacks. Many had zero offers going into the summer. And the industry&#8217;s response has been to tell them to learn more AI and burn more tokens. What it comes down to, DJ explained, is “effectively a broken promise”:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">We said, “Go to college, get these things, you&#8217;re going to get an internship, you&#8217;re going to get job training, you&#8217;re going to pay off your student loans, and then you&#8217;re going to have all the other things that are part of that social contract.”</p>



<p class="wp-block-paragraph">What the students are feeling for the first time [is]. . .“Wait, if I can&#8217;t get this internship, . . .I&#8217;m fundamentally off trajectory from getting this job.” And it doesn&#8217;t have to be a technical person. It could be someone that is in marketing. It could be someone that&#8217;s in the liberal arts. It could be a researcher.&nbsp;.&nbsp;.&nbsp;.There are plenty of students that I have talked to who are supposed to be going to a doctoral PhD program or a medical school or something like that. The slots aren&#8217;t there because of the overall budget impacts. And so whether you call it AI impact or economic reframing, the thing is broken.</p>
</blockquote>



<p class="wp-block-paragraph">This is where both DJ and I have been trying to build a counter narrative. The story coming from the AI labs is destructive: “We&#8217;re going to put all of you out of work, and we&#8217;ll figure out the rest once the intelligence explosion arrives.” That&#8217;s bad PR for AI, but it’s also magical thinking. An economy is a circulatory system. You can&#8217;t put your customers out of work and at the same time expect that the economy will hum along as usual. A catastrophic recession could easily interrupt the funding that keeps AI on its growth path and the concentration of value that they assume will fund universal basic income and an expanded safety net.</p>



<p class="wp-block-paragraph">That’s why I’m a fan of <a href="https://www.oreilly.com/radar/the-missing-mechanisms-of-the-agentic-economy/" target="_blank" rel="noreferrer noopener">mechanism design</a>: start from the outcome you want, then figure out the rules of the game that produces it. Right now, they’ve designed a game that concentrates all the value in the hands of AI first movers. They could be designing a game that generates value throughout the economy. But they aren’t building affordances for that.</p>



<p class="wp-block-paragraph">YouTube ContentID is a good example of mechanism design leading to economic value creation. When unauthorized music use by online video creators triggered a backlash from rights holders, YouTube replied to the takedown notices with a way for both the people who owned the music and the people who wanted to use it to get paid. A whole creator economy came out of that design choice. The labs have the same opportunity in front of them and mostly aren&#8217;t taking it.</p>



<p class="wp-block-paragraph">DJ had one concrete mechanism in mind:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Imagine OpenAI and Anthropic and Microsoft.&nbsp;.&nbsp;.get together and [say], “If you&#8217;re building something for your local community, we&#8217;ll fully subsidize the token cost for some period of time.”.&nbsp;.&nbsp;.We&#8217;re talking about marginal token usage relatively on the spectrum of things, but the potential innovation and use of AI to help local communities could be astounding. You&#8217;re not putting anybody out of a job with that.&nbsp;.&nbsp;.&nbsp;.You&#8217;re filling the holes that already exist in the system.</p>
</blockquote>



<p class="wp-block-paragraph">The <a href="https://openaifoundation.org/news/update-on-the-openai-foundation#our-mission" target="_blank" rel="noreferrer noopener">OpenAI Foundation just announced</a> it will put $1 billion into public-benefit projects this year, including $250 million aimed at building economic futures. It&#8217;s a start. But it mostly seems designed to ameliorate the bad effects of AI rather than to forestall them by building a more inclusive AI future. If the labs start investing in the human-plus-AI economy rather than just studying the job losses, the payoff to local communities could be real.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="The Broken Promise with DJ Patil" width="500" height="281" src="https://www.youtube.com/embed/OAwI4G_MxYg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">A makerspace to bridge the internship gap</h2>



<p class="wp-block-paragraph">DJ&#8217;s plan is to build a bridge. He&#8217;s launching a program, basically a makerspace, for students who don&#8217;t have an internship this summer. Over two four-week sprints, an initial cohort will get mentors, speakers, and the space to explore whatever they&#8217;re interested in. It doesn&#8217;t have to be AI. Whether they’re doing investigative journalism, screenwriting, or building civic tech, participants will get some experience with current tools and produce a tangible asset they can use to prove what they know. As I told DJ in our conversation, I think he’s really on to something, and I&#8217;d love O&#8217;Reilly to be part of what he’s building.</p>



<p class="wp-block-paragraph">There&#8217;s a kind of person who has always been at the center of the O&#8217;Reilly community and never waited for a job description. High school and college dropouts who started companies, built open source software packages, or otherwise took the future into their own hands. People who looked around, found something that needed doing, and did it. DJ is one of them. He&#8217;s a community college kid who learned from a good local library, from the <a href="https://www.oreilly.com/content/a-short-history-of-the-oreilly-animals/" target="_blank" rel="noreferrer noopener">books with the “funny animals” on the cover</a>, and from open source. That path is still open. The early O&#8217;Reilly business came out of exactly this instinct. We were a tech-writing consulting shop, and when we ran out of paid work, we wrote manuals that didn&#8217;t exist yet but that we thought were needed. Later, when there were big conferences for every corporate technology and none for open source, we ran the first one for Perl. Conferences became a whole new business for us. You look for the gap and you fill it.</p>



<p class="wp-block-paragraph">DJ pushes the same idea down to the level of the neighborhood:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">If you want to feel rewarded, go fix something in your neighborhood. Go help out the food pantry. Go help out the local foster child care system. Go help out.&nbsp;.&nbsp;.parks and rec. Use those skills to go do something, and then you&#8217;re going to see.&nbsp;.&nbsp;.people respond in a different way.&nbsp;.&nbsp;.&nbsp;.The target-rich area for problems is massive. You just have to look.</p>
</blockquote>



<p class="wp-block-paragraph">I&#8217;ve never bought the jobless-future story. Back when I wrote <em><a href="https://www.oreilly.com/tim/wtf-book.html" target="_blank" rel="noreferrer noopener">WTF?</a></em> in 2016, I pointed out that there is so much around us that needs to be made better. The constraint has never been a shortage of problems. AI gives us new tools for solving them. It should be a way to put people <em>to work</em>, not <em>out of work</em>.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="A Makerspace to Bridge the Internship Gap with DJ Patil" width="500" height="281" src="https://www.youtube.com/embed/bzE88bDjvJo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">The organization is the AI bottleneck</h2>



<p class="wp-block-paragraph">DJ has also been visiting hospitals and clinics and talking to CIOs and CTOs as part of the tour, and what he&#8217;s seeing is alarming.</p>



<p class="wp-block-paragraph">The federal changes to Medicaid and the Affordable Care Act are landing on systems that were already near collapse. Hospitals that depended on outpatient procedures like colonoscopies for margin are watching volumes drop 20% to 30% because people can&#8217;t afford insurance. Some are running $1 million a day behind, a $300 to $400 million shortfall for the year.</p>



<p class="wp-block-paragraph">At the same time, AI companies are telling those same hospitals to move into the new world, and partly because of the “you will soon be replaced” narrative from the AI labs, labor is responding the way the Kaiser nurses did in California, where any use of AI was off the table as a bargaining condition. As DJ pointed out, we can’t afford to disregard AI when it has the potential to automate the most painful parts of healthcare workers’ jobs and let them “do the job they&#8217;re trained for” without the administrative burden. Businesses need to change not just their narrative but their strategy. They need to be saying, “We’re going to use AI to help you do more for our customers. We’re going to make your job more human and let the machines deal with the BS.”</p>



<p class="wp-block-paragraph">There’s a version of this where the efficiencies AI creates get plowed back into better patient care. There&#8217;s also the version that&#8217;s actually happening in most places, where private equity captures the savings as profit. The difference is institutional design, and that&#8217;s where reform isn&#8217;t happening. I saw this directly with a <a href="http://codeforamerica.org" target="_blank" rel="noreferrer noopener">Code for America</a> project called <a href="https://www.clearmyrecord.org/" target="_blank" rel="noreferrer noopener">Clear My Record</a>. A California initiative had turned a number of petty crimes into misdemeanors, but very few people were petitioning to have their status changed. We started using software to streamline an absurdly convoluted criminal record expungement process, but then we asked ourselves why we were helping people fill out forms that shouldn&#8217;t exist. The law had already changed the record. The process should have been a database update, not something that required a petition to the court. That’s the kind of problem AI was born to solve. It can help us refactor old stuck processes and move to something way better.</p>



<p class="wp-block-paragraph">Done right, DOGE could have been an opportunity to carry out that kind of real institutional change at scale. Instead it became a wrecking ball, and it&#8217;s given the whole idea of institutional reform a bad name.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Organizational Capacity Is the Bottleneck with DJ Patil" width="500" height="281" src="https://www.youtube.com/embed/BHsqVllEZPQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">The Silicon Valley default assumes that incumbents will just get disrupted by startups, the way media was by Google and Meta and retail was by Amazon. There&#8217;s some truth to that. But disruption takes much longer than people think, and in a domain as central as healthcare or government services, the delay means real harm to real people. Healthcare is a third of the economy. You can&#8217;t just let it fail and rebuild it fresh while people depend on it for survival.</p>



<h2 class="wp-block-heading">Data infrastructure is the competitive advantage</h2>



<p class="wp-block-paragraph">DJ&#8217;s term for the alternative he&#8217;s living with at Devoted is “the tidy house.” He built the boring infrastructure years before LLMs existed, and that&#8217;s why the company could move the moment AI arrived. People don&#8217;t think about having well organized, effective data infrastructure as the deep secret behind enterprise AI adoption, but DJ is right. As we work on O&#8217;Reilly&#8217;s own transformation and talk with our customers about what&#8217;s holding them back, it&#8217;s a huge part of the problem.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">One of the ways we&#8217;ve tried to make this work is fundamentally still data 101, unified data environments, data flows that are clean, that have a lot of organization.&nbsp;.&nbsp;.&nbsp;.Because we invested so heavily in that infrastructure, the dumb, boring, painful parts of making sure you&#8217;ve got a really great data warehouse, great data engineering pipes, all of the metadata that goes with it, when AI shows up, you get to use it right away. Now you get to focus on the orchestration, the harness, all those pieces.</p>
</blockquote>



<p class="wp-block-paragraph">While other organizations are reconstructing ETL inside context windows and paying for it in GPU costs, Devoted&#8217;s team gets to work on the actual clinical problems. As DJ put it, transforming a healthcare system is &#8220;like walking and chewing gum while balancing bowling balls on your head and on a unicycle,&#8221; with the laws of physics changing on you the whole time. The organizations that come through it will be the ones that did the unglamorous work of keeping clean, flowing data with its lineage and metadata intact. The ones that didn&#8217;t will keep paying to reconstruct context they should have had all along.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Keeping a Tidy House with DJ Patil" width="500" height="281" src="https://www.youtube.com/embed/73vf3GeP20g?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">The pharmacists who built their own agents</h2>



<p class="wp-block-paragraph">The tidy house pays off when you put the tools in the hands of people who already know the domain. At Devoted, clinicians are building things without waiting for a product manager to learn the problem first. These frontline workers have already spent decades understanding it.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">A pharmacist. . .says, “Hey, you know what? I&#8217;m really worried when I see these kinds of drugs show up together. That&#8217;s not a good thing. . . .Why don&#8217;t I have an agent that alerts me every time this happens? I should just automate it because maybe one of the patients gets prescribed something by another provider and we don&#8217;t see it.” So the pharmacist [says,]. . .”I&#8217;m just going to build that agent.” Now I&#8217;ve got an agent always looking for bad drug interactions. And another pharmacist says, “I&#8217;ve got my own version of that.” . . .So I say, “Hey, agent, I want you to go ask all the pharmacists that we have a quick survey of what might be happening. . . .What are the universe of things that we should be watching out for?” Now I&#8217;ve got a robust medical layer. . .looking out and protecting all of our members from bad drug interactions. Having the right infrastructure makes it possible to act on decades of accumulated judgment distributed throughout the organization.</p>
</blockquote>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="The Pharmacists Who Built Their Own Agents with DJ Patil" width="500" height="281" src="https://www.youtube.com/embed/bHqxMWVbP44?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">The histogram is still the most powerful product</h2>



<p class="wp-block-paragraph">You don&#8217;t need exotic tooling to get value out of data, and DJ punctured the assumption that you do.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Oftentimes, I tell people, the most powerful data product you can build is still a histogram. Just give me a distribution of what&#8217;s going on.&nbsp;.&nbsp;.&nbsp;.AI gives us a tremendous opportunity to let people [access this data quickly], but we&#8217;ve got to figure out the guardrails, so people don&#8217;t ask [questions] or get answers.&nbsp;.&nbsp;.[without realizing] that there&#8217;s a flaw in how they&#8217;re asking it.</p>
</blockquote>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="The Histogram Is Still the Most Powerful Data Product with DJ Patil" width="500" height="281" src="https://www.youtube.com/embed/xBBjws9NIIo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">Every time a new technology empowers employees to make innovative use of corporate data, there is resistance. We’ve been in this loop since the beginning of the data movement, DJ explained. The stewards of the data warehouse stand at the gate and say, “You shall not pass!” Then democratization breaks it open, and the gatekeepers reconstitute themselves in the next era. Hadoop did it last time. LLMs are doing it now, and the temptation to insist that only experts can use the tools correctly is as strong as it&#8217;s ever been. You do need ways to catch errors. But the goal should always be access.</p>



<h2 class="wp-block-heading">The real opportunity is in the layers above AI models</h2>



<p class="wp-block-paragraph">DJ and I also talked about the new discipline forming inside computer science, engineering the trade-offs between conventional software and LLMs, when to reach for a local or open weight model, and understanding what inference actually costs against the value it returns.</p>



<p class="wp-block-paragraph">Getting that right requires an expanded view of mechanism design. While this isn’t how economists talk about it, many advances in technology are really just that: redesigning the rules of a game to get better outcomes. Pay-per-click advertising started as a crude auction that sold to the highest bidder, and then Google refined it into something that worked. Rob McCool wired a web server to a database with CGI and ushered in a decade of invention of new mechanisms for data-driven websites. Or take Apache Kafka, which DJ reminded us began as a project to help LinkedIn rein in its Splunk bill and only later became the foundation for a company and an ecosystem.</p>



<p class="wp-block-paragraph">We&#8217;re at the front of an architectural innovation cycle now, and the biggest opportunities are not in the models themselves but in the layers above them. That’s also where a renaissance of open source for the AI era could happen.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="The Future of Software Will Be Shaped by Microeconomics with Tim O&amp;apos;Reilly" width="500" height="281" src="https://www.youtube.com/embed/ZLffZO_GHzs?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p class="wp-block-paragraph">DJ and I are both, as he says, &#8220;this giant human LLM, summarizing and distilling all the things we&#8217;re hearing&#8221; from a lot of people. What we&#8217;re hearing is that the technology is mostly ready, but our institutions are not. What&#8217;s lagging is the organizational and economic infrastructure that lets universities, hospitals, data teams, and the labs themselves actually deploy what&#8217;s been built.</p>



<p class="wp-block-paragraph">It’s time to get busy!</p>



<p class="wp-block-paragraph"><em>On June 10, Harper Reed, cofounder of 2389 Research, will join me to talk about why the future of software depends on creativity, serendipity, and building weird stuff. And on July 9, Trail of Bits cofounder and CEO Dan Guido will stop by to share his playbook for going AI native. You can register to attend them live <a href="https://www.oreilly.com/live/live-with-tim/" target="_blank" rel="noreferrer noopener">here</a>. You can also follow </em>Live with Tim O’Reilly<em> on <a href="https://www.youtube.com/playlist?list=PL055Epbe6d5YQ8t30jyo1D6XuSpe8uhAG" target="_blank" rel="noreferrer noopener">YouTube</a>, <a href="https://open.spotify.com/show/79YLK6OLSAJam4kcd8w3Kw" target="_blank" rel="noreferrer noopener">Spotify</a>, <a href="https://podcasts.apple.com/us/podcast/live-with-tim-oreilly/id1896312725" target="_blank" rel="noreferrer noopener">Apple</a>, or wherever you get your podcasts.</em></p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/the-tidy-house/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Predict, Don&#8217;t Enumerate</title>
		<link>https://www.oreilly.com/radar/predict-dont-enumerate/</link>
				<comments>https://www.oreilly.com/radar/predict-dont-enumerate/#respond</comments>
				<pubDate>Thu, 04 Jun 2026 10:57:44 +0000</pubDate>
					<dc:creator><![CDATA[Michael Roytman]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18846</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/Predict-dont-enumerate.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/Predict-dont-enumerate-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[An AI lab just endorsed a predictive model for defense.]]></custom:subtitle>
		
				<description><![CDATA[A third of the way into a security-operations guide that Anthropic published in April 2026, wedged between a recommendation to patch CISA&#8217;s Known Exploited Vulnerabilities list and a suggestion to automate your deployment pipeline is a small recommendation: &#8220;Use EPSS to prioritize the rest.&#8221; For anyone who has worked on a vulnerability backlog in the [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">A third of the way into a <a href="https://claude.com/blog/preparing-your-security-program-for-ai-accelerated-offense" target="_blank" rel="noreferrer noopener">security-operations guide</a> that Anthropic published in April 2026, wedged between a recommendation to patch CISA&#8217;s Known Exploited Vulnerabilities list and a suggestion to automate your deployment pipeline is a small recommendation: &#8220;Use EPSS to prioritize the rest.&#8221; For anyone who has worked on a vulnerability backlog in the last decade, the sentence is an acknowledgment of a widely felt but often unspoken fact about security programs: They have become machine-scale problems of signal to noise.</p>



<p class="wp-block-paragraph">EPSS (Exploit Prediction Scoring System) is a statistical model that takes a known software flaw, runs it through a set of signals about what attackers are actually doing across the internet, and returns a probability that the flaw will be exploited in the next 30 days. It isn’t an LLM, and it does no reasoning or prompt engineering. It predicts. The company endorsing it is the same company whose newest model can surface thousands of novel, exploitable vulnerabilities in production software, many of them two or three decades old, most of them still unpatched.</p>



<p class="wp-block-paragraph">As far as we can tell, this is the first time a frontier AI lab has publicly endorsed a purpose-built predictive model as the right tool for a defensive problem. LLM labs usually recommend LLMs. That Anthropic did not is worth noting, but the recommendation itself isn’t news to the practitioners it’s aimed at. It’s a description of what they’ve been doing.</p>



<h2 class="wp-block-heading"><strong>The quiet consensus</strong></h2>



<p class="wp-block-paragraph">The volume problem isn’t new. Anyone running a scanner against a large enterprise estate in 2015 was already generating hundreds of thousands of findings per month. Anyone running one against a cloud environment in 2020 was generating millions. Enterprises have spent the better part of a decade staring at dashboards where the number of open critical findings was larger than the capacity of the team supposed to fix them. In other words, cybersecurity has become machine scale.</p>



<p class="wp-block-paragraph">Risk-based vulnerability management, as a product category, has existed since around 2018. EPSS, as a public resource, has been usable since 2021. More than 120 vendors embed it today into their products. The field has had access to a predictive baseline for years.</p>



<p class="wp-block-paragraph">What has been missing is an external justification to change the status quo recommendations from auditors, model risk management teams, and even boards. Auditors want a clear set of expectations, making grading more objective and therefore easier to evaluate. Compliance frameworks like CVSS (Common Vulnerability Scoring System) because CVSS is <em>easy</em>, but implementing something more efficient has historically required that aforementioned external push. A working CISO could tell you she had stopped treating every vulnerability scored a severity 9.8/10 by CVSS as an emergency in 2019, but she would also tell you she still kept CVSS in the report.</p>



<p class="wp-block-paragraph">Anthropic&#8217;s guidance is useful because it makes the private consensus public. Patch what you know to be exploited, then use EPSS above a threshold based on the team’s capacity or risk tolerance. DHS CISA’s practice of publishing known exploited vulnerabilities since November of 2021 is just additional proof that the existing methodologies were being overwhelmed by scale and lack of signal.</p>



<h2 class="wp-block-heading">Why prediction, stated plainly</h2>



<p class="wp-block-paragraph">In 2014, at Black Hat, Dan Geer, then the chief information security officer of In-Q-Tel, asked the first principles question: Are vulnerabilities in software sparse or dense? Sparse meant finite, meaning every fix measurably shrank the attack surface. Dense meant weeds in a field. Geer could not answer the question because the data were not in.</p>



<p class="wp-block-paragraph">Eight years later, Jonathan Spring at Carnegie Mellon&#8217;s Software Engineering Institute tied vulnerability enumeration to the halting problem and showed, in theory, that for any sufficiently complex piece of deployed software, there are always more undiscovered flaws.</p>



<p class="wp-block-paragraph">The AI-driven discovery results of the last 18 months have made the density argument impossible to wave off even in a compliance review. A 27-year-old bug in OpenBSD. A 16-year-old bug in FFmpeg that five million fuzzing runs never caught. Disclosed findings, by the developers&#8217; own accounting, are less than 1% of what has been found. But again, the volume was already a problem. With the coming release of its newest model, Mythos, Anthropic is telling teams to plan for an order of magnitude more findings over the next 24 months.</p>



<p class="wp-block-paragraph">Static severity scoring can’t survive the volume problem, because it’s a human-scale solution for a machine scale problem. Neither can any process that treats every critical finding as an emergency. The threshold for action has to be probabilistic, measurable, and defensible. That’s what a predictive model is for, and that’s what working teams have been using in noisy large enterprise environments.</p>



<h2 class="wp-block-heading">Pointing machines and knowing machines</h2>



<p class="wp-block-paragraph">Geer returned to his 2014 question in the summer of 2025, <a href="https://www.lawfaremedia.org/article/ai-and-secure-code-generation" target="_blank" rel="noreferrer noopener">writing with Dave Aitel in <em>Lawfare</em></a>. The piece gives the industry a vocabulary for a distinction it has been fudging:</p>



<p class="wp-block-paragraph">A vulnerability in the code isn’t automatically a threat. A buffer overflow is a hazard. It becomes a risk only if an attacker can exploit it reliably, in this environment, against these controls, through this traffic. Bugs are abundant but the ability to weaponize a particular bug against a particular target is much rarer.</p>



<p class="wp-block-paragraph">The industry, they wrote, has built a pointing machine. It enumerates.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>Even children learn early to point and name—but knowing the word “dog” doesn’t reveal whether the animal might bite. In cybersecurity, we’ve built systems that similarly point and name vulnerabilities without understanding whether they’re truly dangerous. By embracing AI solely for pattern recognition, we’ve created a powerful “pointing machine” that identifies possible threats but does not comprehend their actual impact. What we need instead is a “knowing machine,” capable of understanding how code functions within complex, real-world environments, recognizing not just hazards but the full context of how and whether those hazards might become genuine risks.</em></p>
</blockquote>



<p class="wp-block-paragraph">A knowing machine is a system that understands how code behaves in a particular environment and recognizes the context that turns a hazard into a risk. A predictive model is how you build a knowing machine. EPSS is the clearest public example: It covers every published CVE and is updated daily.</p>



<h2 class="wp-block-heading">Global isn’t local</h2>



<p class="wp-block-paragraph">EPSS is a global model. It sees what attackers are doing across the whole of the internet. It picks up patterns in exploitation activity that severity scores never could. What it can’t see is any particular organization&#8217;s environment. It doesn’t know which assets carry the data the business actually cares about. It doesn’t know what compensating controls are in place, where remediation is risky, or how your telemetry and history change the odds.</p>



<p class="wp-block-paragraph">A 9.8 with a 97% global probability of exploitation and a 9.8 with a 0.1% probability are not the same animal. Neither are two organizations applying the same EPSS threshold to the same CVE on different assets. One has the vulnerable code path exposed to the internet, behind a web application firewall that doesn’t inspect the relevant protocol. The other has the same CVE on an internal system that accepts authenticated input from a single service account. A scanner can’t tell them apart. A global model can’t tell them apart. Their actual risk profiles are orders of magnitude apart.</p>



<p class="wp-block-paragraph">Local context is where most security teams have been stuck the entire time, and where the next decade of the field is going to be fought.</p>



<h2 class="wp-block-heading">What a local knowing machine actually requires</h2>



<p class="wp-block-paragraph">Pair a better pointing machine with a faster remediation engine and all you’ve done is increase the speed at which you produce churn, breakage and wasted effort. You’ll also spend a king&#8217;s ransom in agent tokens fixing vulnerabilities that were never dangerous in your environment.</p>



<p class="wp-block-paragraph">In contrast to an omniscient scanner, a local model trains on the specific environment being defended: asset inventory, application topology, reachability, deployed controls, attack telemetry observed on-site, and the history of the organization&#8217;s own remediations and their outcomes. The model produces probabilities specific to the enterprise. Most organizations already have the inputs, scattered across CMDBs, endpoint agents, firewall logs, ticketing systems and scanner output. This context is precisely what attackers (whether they’re using good old fashioned metasploit or Mythos with an infinite budget) are lacking in their models. The context becomes an asymmetrical advantage for defenders, perhaps the only one that exists.</p>



<h2 class="wp-block-heading">The policy shifts that actually matter</h2>



<p class="wp-block-paragraph">The interventions that will decide whether a security program survives the next 24 months aren’t purely technical. A CISO can put most of them in motion without buying anything.</p>



<p class="wp-block-paragraph">Rewrite the SLA. Most vulnerability-management SLAs are organized by severity. Criticals in 15 days, highs in 30, mediums in 90. That structure was built for a world where the count of open criticals was small enough to matter. It’s now actively harmful, because it forces teams to spend the same effort on a 9.8 nobody is exploiting and a 7.5 that’s under active attack. SLAs should be rewritten in terms of probability of exploitation and asset exposure, not severity. A CISO who can’t get that past her GRC team can at least add a second tier that makes the probability-based cut enforceable alongside the severity-based one.</p>



<p class="wp-block-paragraph">Change what the board sees. If the monthly security report counts the numbers of vulnerabilities, exposures or findings in different buckets (“critical,” “open past 30 days,” etc.), the organization is being managed to the wrong metric. The metric should be exploitability-weighted exposure over time, with a second line for predicted versus observed exploitation. Boards will accept this once somebody explains it. This beats showing them a number that has no relationship to risk and is growing exponentially as new LLM models are released. More to the point: A great team can do amazing <em>volumes</em> of remediation work, and risk can still rise because they’re measuring and remediating the wrong thing. An efficient, context-rich team can do far less work and meaningfully move the probability of an event down.</p>



<p class="wp-block-paragraph">Invest in telemetry. The single most valuable instrument a security program can build is a feedback loop between what was prioritized and what was exploited. If the loop shows you were wrong, the model improves. If the loop does not exist, you will keep being wrong indefinitely (or just not being aware of misses).</p>



<p class="wp-block-paragraph">Fix the compliance conversation. The reason CVSS survives is regulatory inertia. PCI, HIPAA, and most state breach-notification frameworks still reference severity. The CISOs who will come out of the next two years in the best shape are the ones who engage their auditors now, in writing, about what a probabilistic prioritization framework looks like under the existing rules.</p>



<p class="wp-block-paragraph">Staff for the bottleneck, which isn’t scanning. The industry has spent a decade hiring people to find bugs. The bottleneck now is deciding which bugs matter, getting the fixes deployed, and measuring whether the prioritization was correct. The job descriptions should reflect this. A security-data engineer may be able to increase efficiency to meet SLAs more than increasing capacity would.</p>



<p class="wp-block-paragraph">None of this requires a new product. All of it requires a CISO willing to say, out loud, that the old dogma is broken and that the new one will be managed by data and probabilities. That is the shift Anthropic&#8217;s five-word sentence was really announcing. The technology is available and the models are here—both the LLM-based ones to find the vulnerabilities and the predictive knowing machines to prioritize efficiently.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/predict-dont-enumerate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Context as Code</title>
		<link>https://www.oreilly.com/radar/context-as-code/</link>
				<comments>https://www.oreilly.com/radar/context-as-code/#respond</comments>
				<pubDate>Wed, 03 Jun 2026 11:00:14 +0000</pubDate>
					<dc:creator><![CDATA[Artur Huk]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18837</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/Context-as-code.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/Context-as-code-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[Build-time governance in the era of infinite syntax]]></custom:subtitle>
		
				<description><![CDATA[As syntax becomes cheap and abundant, architectural control becomes the scarce resource. Effective governance starts upstream, where intent, constraints, and threat models shape the agent’s working context before generation begins. The goal isn’t better prompting but build-time boundaries that prevent structurally invalid code from entering the system. The Frankenstein factories The dark factories (as Dan [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">As syntax becomes cheap and abundant, architectural control becomes the scarce resource. Effective governance starts upstream, where intent, constraints, and threat models shape the agent’s working context before generation begins. The goal isn’t better prompting but build-time boundaries that prevent structurally invalid code from entering the system.</p>



<h2 class="wp-block-heading">The Frankenstein factories</h2>



<p class="wp-block-paragraph">The <a href="https://www.oreilly.com/radar/dark-factories-rise-of-the-trycycle/" target="_blank" rel="noreferrer noopener">dark factories</a> (as Dan Shapiro calls them) are running. Tokens fly through trycycles, features ship overnight, and codebases are ported before breakfast. The velocity is real. And <a href="https://www.oreilly.com/radar/comprehension-debt-the-hidden-cost-of-ai-generated-code/" target="_blank" rel="noreferrer noopener">comprehension debt</a> (a term coined by Addy Osmani) is compounding in silence behind it.</p>



<p class="wp-block-paragraph">What this era is producing, at scale, deserves its own name: Frankenstein factories. Not a critique of any single approach but a description of a structural condition—generation engines so effective at producing working syntax that they have industrialized the creation of architecturally ungovernable systems. The creature walks out of the laboratory impressive, functional, and alive on delivery day.</p>



<p class="wp-block-paragraph">The crisis arrives the day someone must govern it. To govern a system means to hold it accountable to its design boundaries—the ability to look at it and reliably say <em>why</em> it works, <em>what</em> is permitted to touch what, and to categorically prevent forbidden state changes before they happen. Victor&#8217;s catastrophe was not the act of creation but the absent governing frame.</p>



<p class="wp-block-paragraph">For prototyping or shipping features fast, unconstrained generation is a powerful tool. It optimizes for velocity, and it delivers. But for enterprise payment systems, insurance underwriting engines, logistics orchestrators, and regulated platforms, the question is not &#8220;Does the code ship?&#8221; but &#8220;Who is liable when it does the wrong thing?&#8221; Here, automating the word &#8220;YES&#8221; to every feature request does not solve the problem. It industrializes it.</p>



<p class="wp-block-paragraph">Consider a standard Jira ticket: &#8220;Add an email notification after a successful payment.&#8221;</p>



<p class="wp-block-paragraph">A junior developer might attempt to wedge the email-sending logic directly into the <code>PaymentProcessor</code> class. A senior architect catches this in code review: &#8220;No. Fire a <code>PaymentSuccessEvent</code> to the message bus.&#8221; That human friction—the architectural &#8220;No&#8221;—keeps the system maintainable.</p>



<p class="wp-block-paragraph">Unconstrained AI agents lack this assertiveness. By default, they are the ultimate yes-men.</p>



<p class="wp-block-paragraph">Hand that same ticket to a standard coding agent and it will not argue about bounded contexts. It will burn tokens until it produces 300 lines of syntactically perfect code, import an SMTP library directly into the core of your billing domain, and submit a pull request. The tests will pass; conventional feature tests make no assertion about bounded contexts. The CI pipeline will go green. And structurally, the system is now a disaster.</p>



<p class="wp-block-paragraph">This happens not through malice but because of how agentic loops are built. Without explicit architectural constraints, the system&#8217;s emergent behavior is to fulfill immediate user intent. The agent is orchestrated to ship the feature, not to defend the architecture. Comprehension debt is the structural consequence: AI generates syntax faster than human beings can read or govern it. Expecting a probabilistic model to enforce structural integrity on its own is a category error. Without a governing frame, the agent will always take the path of least resistance to a &#8220;YES.&#8221;</p>



<p class="wp-block-paragraph">You cannot fix code overproduction by hiring more people to read it nor by running the generation loop faster. The only scalable answer is to build a concrete riverbed <em>before</em> you turn on the water.</p>



<p class="wp-block-paragraph">If the current era automates the word &#8220;YES,&#8221; we should automate the word &#8220;NO.&#8221;</p>



<p class="wp-block-paragraph">Securing the runtime environment prevents the monster from escaping. But to prevent it from being built in the first place, we need to step back into the IDE and the CI/CD pipeline. We need to govern <em>generation</em>.</p>



<h2 class="wp-block-heading">The great softening: Shifting risk from build time to runtime</h2>



<p class="wp-block-paragraph">Compilers never guaranteed correct software. You could write catastrophic logically broken systems in C, Java, or any other compiled language. But compilers served a crucial engineering purpose: They deterministically governed a specific layer of structural risk.</p>



<p class="wp-block-paragraph">By enforcing hard execution constraints—syntax validity, type compatibility, linkage rules, and executable viability—the compiler acted as an automated boundary. It didn’t verify business intent, domain correctness, or architectural quality. What it did was eliminate an entire class of low-level structural failure <em>before</em> execution ever began.</p>



<p class="wp-block-paragraph">That delegation of risk is one of the quiet triumphs of software engineering. Our discipline has always advanced by mechanizing one class of guarantees so humans can focus on the next layer of abstraction. We automated machine-level structural correctness so engineers could spend their cognitive energy on application logic. Later, we pushed more guarantees upward, into schemas, testing, static analysis, architectural patterns, and operational controls.</p>



<p class="wp-block-paragraph">Over time, we also deliberately softened certain boundaries in exchange for speed. Dynamic languages, richer runtimes, reflection, and increasingly abstract frameworks all traded deterministic compile-time guarantees for developer velocity and flexibility. The newly exposed risk was absorbed elsewhere: runtime validation, automated testing, observability, and engineering discipline.</p>



<p class="wp-block-paragraph">Today, with agentic AI, we are softening boundaries again, more radically than ever before.</p>



<p class="wp-block-paragraph">Natural language has become a high-level control plane for software generation. Arbitrary text increasingly shapes executable behavior. And in that shift, we have blurred one of the oldest boundaries in computing: the separation between <em>data</em> and <em>instructions</em>.</p>



<p class="wp-block-paragraph">Outside the model, that boundary still exists. Systems enforce permission scopes, schema contracts, sandboxing, and execution policies. But inside the inference context, those protections collapse into the same token stream.</p>



<p class="wp-block-paragraph">System prompts, retrieved documents, user messages, tool outputs, and external content all flow through the same neural weights. There is no hard privilege boundary between instruction and input. Modern models may resist naive attacks like &#8220;Ignore previous instructions,&#8221; but they remain vulnerable to indirect injections disguised as legitimate operational context. A malicious instruction embedded in a customer email, a webpage, or a tool response is not processed as passive data. It can become behavioral influence.</p>



<p class="wp-block-paragraph">Inside the context window, untrusted text can shape control flow. That is the real softening.</p>



<p class="wp-block-paragraph">We are generating syntax at machine speed, but we have dissolved the structural gate that once constrained how systems were built. The result is a massive shift of risk from build time to runtime. Code that appears structurally sound during generation may violate architectural boundaries, introduce unsafe execution paths, or become behaviorally compromised the moment hostile context enters the loop.</p>



<p class="wp-block-paragraph">The conclusion is straightforward: The fact that AI-generated code runs is no longer a meaningful proxy for system correctness.</p>



<p class="wp-block-paragraph">Syntax is abundant. Execution is easy. Structural governance is what is missing.</p>



<p class="wp-block-paragraph">We outsourced the writing of logic to machines, but we did not build a deterministic boundary that governs what those machines are allowed to generate.</p>



<p class="wp-block-paragraph">If we want control back, we cannot rely on human code review at machine speed. We must rebuild the build-time gate.</p>



<h2 class="wp-block-heading">From dependency bloat to tailor-made architecture</h2>



<p class="wp-block-paragraph">For decades, the industry&#8217;s default response to complexity was abstraction by accumulation: monolithic frameworks, sprawling dependency trees, and ever-thicker layers of indirection. Importing a 50-megabyte library to avoid repetitive boilerplate was a rational trade-off when developer time and cognitive bandwidth were the scarce resources. For AI agents, that trade-off changes.</p>



<p class="wp-block-paragraph">This is not an argument against foundational infrastructure. Mature primitives—like SQLAlchemy in Python or Spring Boot in Java—remain essential precisely because their conventions are widely learned and predictable. The problem isn’t abstraction but opacity. When core business logic disappears behind proprietary decorators, internal frameworks, or custom orchestration layers, execution becomes a black box. An agent cannot safely reason about code it cannot trace. It needs direct visibility into causality: what changes state, what enforces invariants, and where responsibilities begin and end. Hidden flow degrades reasoning into guesswork; guesswork silently becomes architectural drift.</p>



<p class="wp-block-paragraph">At the same time, AI drives the cost of procedural code toward zero. Boilerplate is no longer expensive. Clarity is. The design question shifts from &#8220;How much can we abstract away?&#8221; to &#8220;How much must remain explicit for safe reasoning?&#8221; The answer is tailor-made architecture: thin infrastructure, explicit domain logic, hard boundaries, and narrowly scoped components with visible contracts. The value is no longer in how much code you avoid writing but in how clearly the system declares its boundaries.</p>



<p class="wp-block-paragraph">That same opacity also breaks verification. AI review can catch local defects, risky patterns, and implementation mistakes, but it remains blind to architectural drift and missing business intent unless those constraints are explicitly encoded. After all, if you ask a model to review code generated from the exact same vague Jira ticket, do you actually get verification, or do you just engineer a circular hallucination, where the AI politely revalidates its own blind spots?</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1536" height="1024" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image.png" alt="Tailor-made architecture gives generated syntax a clear structure without dissolving system boundaries." class="wp-image-18838" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image.png 1536w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-300x200.png 300w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-768x512.png 768w" sizes="auto, (max-width: 1536px) 100vw, 1536px" /><figcaption class="wp-element-caption"><em>Figure 1. Tailor-made architecture gives generated syntax a clear structure without dissolving system boundaries.</em></figcaption></figure>



<h2 class="wp-block-heading">The Context Compilation Pattern</h2>



<p class="wp-block-paragraph">The Context Compilation Pattern governs <em>generation</em> in the IDE and the CI/CD pipeline before a single syntactically plausible line ever reaches a human reviewer. If the Decision Intelligence Runtime (DIR) is the vault door that protects execution in production, context compilation is the blueprint that prevents the monster from being built in the lab.</p>



<p class="wp-block-paragraph">This is not &#8220;prompt engineering,&#8221; which merely asks a probabilistic model for a better answer. What we need is build-time governance: two layers of defense assembled before the LLM inference is even triggered. The first is structured context injection (assembling the prompt from prioritized artifacts). The second is postgeneration static verification (deterministic AST checks that enforce rules no probabilistic model can override). The prompt structure biases generation toward compliant solutions; the static checks make declared, machine-verifiable boundary violations impossible to merge.</p>



<p class="wp-block-paragraph">Deterministic build-time governance is not a return to formal software specification (like UML), nor is it merely &#8220;prompt engineering disguised as Markdown.&#8221; It’s a mechanical constraint on the generation space that makes explicitly declared boundary violations rejectable by design. Context compilation does not eliminate architectural review or replace engineering judgment. Instead, it ensures that the agent operates within a defined riverbed of allowed structural invariants.</p>



<p class="wp-block-paragraph">Engineering evolves whenever implicit rules become explicit declarations. Application development is now crossing that boundary. The senior engineer&#8217;s new job is <em>declarative boundary engineering</em>: explicitly declaring what the system is absolutely forbidden from doing.</p>



<p class="wp-block-paragraph">The failure is not in the frameworks. The failure is in the process: pointing an unconstrained AI agent at a codebase full of invisible magic and expecting a CI/CD pipeline designed for human-generated code to catch what goes wrong. The answer is to build a compiler for the agent&#8217;s context.</p>



<p class="wp-block-paragraph">The Context Compilation Pattern is the staged pipeline that makes this concrete.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1056" height="1600" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-1-1056x1600.png" alt="The Context Compilation Pattern pipeline, enforcing build-time constraints through deterministic artifact assembly and dual verification." class="wp-image-18839" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-1-1056x1600.png 1056w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-1-198x300.png 198w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-1-768x1164.png 768w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-1-1013x1536.png 1013w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-1.png 1274w" sizes="auto, (max-width: 1056px) 100vw, 1056px" /><figcaption class="wp-element-caption"><em>Figure 2. The Context Compilation Pattern pipeline, enforcing build-time constraints through deterministic artifact assembly and dual verification.</em></figcaption></figure>



<h3 class="wp-block-heading">Step 1: The context artifacts</h3>



<p class="wp-block-paragraph">The most strategically valuable code in your repository may no longer live in <code>src/</code>. It lives in <code>/context</code>. The pipeline consumes versioned artifacts such as <code>intent.md</code>, <code>boundaries.md</code>, and <code>threat-model.md</code>, each authored by a specialist before a single line of code is generated. (Ownership and role responsibilities are covered in “Artifact-Bound Roles and Accountability” below.) What matters here is that these files are the <em>inputs</em> to the compiler: Without them, there’s nothing to compile.</p>



<p class="wp-block-paragraph">To prevent cognitive overlap, their roles must be fiercely separated: <code>boundaries.md</code> declares <em>structural invariants</em> (e.g., dependency direction, allowed communication paths, and event emission), whereas <code>threat-model.md</code> models <em>adversarial constraints </em>as declarative abuse scenarios (e.g., prompt injection and secrets exfiltration) that must be mechanically blocked.</p>



<p class="wp-block-paragraph"><code>boundaries.md</code> warrants a precise definition, because it anchors the entire build-time governance model. In practice, boundaries are typically defined at module or bounded-context granularity (e.g., <code>/billing/*</code> or <code>/risk/*</code>), not per class or per repository. They are implemented using <strong>hybrid artifacts</strong>: a natural language document designed to constrain the LLM, tightly paired with a deterministic rule for the CI runner.</p>



<p class="wp-block-paragraph">Consider this concrete example of how an architectural boundary is explicitly declared and enforced:</p>



<p class="wp-block-paragraph"><strong>1. <code>boundaries.md</code> (for the LLM context)<br></strong>This Markdown file is injected into the agent’s prompt. It defines the vocabulary, architectural constraints, and allowed interactions.</p>



<pre class="wp-block-code"><code>Module: Billing
Ontology: Order, Invoice, PaymentEvent
Rule: Zero external network I/O is allowed in this domain. You must NEVER import requests or smtplib.</code></pre>



<p class="wp-block-paragraph"><strong>2. <code>semgrep-rule.yml</code> (for the CI/CD runner)</strong><br>This static file goes to the CI pipeline to mechanize the boundary. It ensures the code check is fully deterministic.</p>



<pre class="wp-block-code"><code>rules:
  # Block forbidden imports at the module boundary
  - id: block-external-io-in-billing
    patterns:
      - pattern-either:
          - pattern: import smtplib
          - pattern: import requests
    message: "Architecture Violation: External I/O is strictly forbidden in the billing domain."
    severity: ERROR
    languages: &#91;python]
    paths:
      include: &#91;"src/billing/**"]

  # Domain layer must not talk to DB driver directly
  - id: block-db-driver-in-domain
    patterns:
      - pattern-either:
          - pattern: import sqlalchemy
          - pattern: from sqlalchemy import ...
          - pattern: import psycopg2
          - pattern: from psycopg2 import ...
    message: "Architecture Violation: Domain layer must use Repository abstraction, not database drivers directly."
    severity: ERROR
    languages: &#91;python]
    paths:
      include:
        - "src/billing/domain/**"</code></pre>



<p class="wp-block-paragraph">Crucially, these Semgrep/CI rules are human-authored (or human-reviewed) precommit artifacts. We don’t rely on an LLM to generate the security gates on the fly. The AI reads the Markdown to guide its generation; the CI runner executes the static YAML to enforce the boundary.</p>



<p class="wp-block-paragraph">If these artifacts stay current, they actively govern the generated codebase. Stale or malformed context becomes context debt: The pipeline will enforce strictly whatever was declared, even if the declaration is wrong. Governance artifacts are production code. They require strict versioning, explicit ownership, and periodic review just like the executable logic they constrain. That’s why core artifacts like <code>boundaries.md</code> require rigorous peer review, not just casual updates.</p>



<h3 class="wp-block-heading">Step 2: The context compiler</h3>



<p class="wp-block-paragraph">Dumping all Markdown files into the system prompt is sometimes acceptable for small projects and small artifacts. But as the codebase grows or the context window fills with too many competing constraints, models begin to suffer from &#8220;lost in the middle&#8221; degradation and silently ignore what matters most.</p>



<p class="wp-block-paragraph">The term “context compiler&#8221; might sound like a magical enterprise heavy-lift, but the reality is entirely mundane. In its simplest form, it’s just a deterministic context assembly layer combined with a routing mechanism.</p>



<p class="wp-block-paragraph">Instead of treating context as a flat pile of documents, the compiler assembles it into an ordered structure. Because different artifacts apply to different parts of the project, <code>boundaries.md</code> in the <code>/billing</code> module might enforce strict isolation, while the one in /frontend might be much more permissive.</p>



<p class="wp-block-paragraph">In practice, the compiler may take one of these forms:</p>



<p class="wp-block-paragraph"><strong>Manual selection:</strong> The developer simply points their IDE or agent to a structured set of Markdown files.</p>



<p class="wp-block-paragraph"><strong>A mundane script:</strong> A basic Python or bash script that understands a directory structure. It concatenates the <code>.md</code> files to build the LLM&#8217;s system prompt and hands the <code>.yml</code> files directly to the CI runner.</p>



<p class="wp-block-paragraph"><strong>Tool-mediated context protocols:</strong> Dedicated mechanisms (e.g., MCP) that allow the agent to query the workspace and dynamically assemble the required boundaries directly within the IDE, bypassing the need for manual script invocation.</p>



<p class="wp-block-paragraph">Consider a practical directory structure:</p>



<pre class="wp-block-code"><code>/context
  /global
    coding-standards.md
  /domain
    /billing
      boundaries.md
      threat-model.md
      semgrep-rule.yml
    /risk
      boundaries.md
      threat-model.md
      semgrep-rule.yml
    /frontend
      boundaries.md
      threat-model.md
      semgrep-rule.yml</code></pre>



<p class="wp-block-paragraph">When generating code for the billing module, the script reads <code>/global</code> and <code>/billing</code>. The compiler simply scopes the rules based on the directory, perfectly focusing the agent&#8217;s attention on the boundaries that matter while wiring the corresponding YAML rules for deterministic CI verification.</p>



<h3 class="wp-block-heading">Step 3: Strict boundary hierarchy (resolving conflicts)</h3>



<p class="wp-block-paragraph">When faced with conflicting instructions, LLMs don’t throw a compilation error. They hallucinate a dangerous compromise. The compiler prevents this by enforcing a deterministic precedence of declared constraints before the prompt is assembled:</p>



<p class="wp-block-paragraph"><strong>Threat model &gt; Boundaries &gt; Coding standards &gt; Intent + acceptance criteria</strong></p>



<p class="wp-block-paragraph">Security and architectural boundaries unconditionally overrule feature delivery. This operates at two levels. At the prompt level (soft enforcement), constraint ordering biases generation toward compliant solutions. At the postgeneration level (hard enforcement), deterministic code checks parse the generated syntax, verify structural invariants, and instantly fail the build on violation.</p>



<p class="wp-block-paragraph">&#8220;Resolution&#8221; in this context does not mean an LLM philosophically negotiating between two Markdown files. It means <em>deterministic rejection via CI</em>. If the <code>intent.md</code> asks to &#8220;email a receipt to the user,&#8221; but <code>boundaries.md</code> forbids external network calls in the billing module, an unconstrained AI might try to generate an SMTP call. The conflict is mechanically &#8220;resolved&#8221; when the CI pipeline runs a static rule (derived from <code>semgrep-rule.yml</code>) and instantly fails the build. The developer (context orchestrator) must then intervene and change the design to use an event bus instead. The hierarchy is enforced by deterministic code analysis, not LLM reasoning. A rejected build is not necessarily a rejected business need; it’s a signal that declared boundaries and intended capability must be reconciled explicitly before regeneration. (This mechanical rejection physically executes during the adversarial verification phase in step 5).</p>



<p class="wp-block-paragraph">We do not use AI for this validation. We use existing, proven AST tools and code linters like <a href="https://semgrep.dev/" target="_blank" rel="noreferrer noopener">Semgrep</a>, <a href="https://bandit.readthedocs.io/" target="_blank" rel="noreferrer noopener">Bandit</a>, or <a href="https://codeql.github.com/" target="_blank" rel="noreferrer noopener">CodeQL</a> to enforce these boundaries in CI/CD.</p>



<p class="wp-block-paragraph">However, we must be precise about what this governance actually achieves. Deterministic checks enforce invariants, not the architecture as a whole. You can statically enforce forbidden imports, forbidden outbound I/O, strict layering, and schema conformance. You cannot statically enforce domain semantics, aggregate ownership correctness, subtle coupling, or conceptual cohesion. Deterministic verification doesn’t prove architectural correctness. It proves compliance with explicitly declared structural invariants.</p>



<h3 class="wp-block-heading">Step 4: Generation</h3>



<p class="wp-block-paragraph">Context as code matters only if generated syntax is verified against the same boundaries that shaped it. With a compiled, conflict-free context hierarchy, the developer agent generates code inside an isolated user space sandbox. In this fleeting fraction of a second, the agent inside the developer&#8217;s IDE consumes the narrowed, precompiled system prompt and outputs the actual <code>payment_service.py</code>. Its role is constrained synthesis: translating the boundaries in <code>boundaries.md</code> and the imperatives in <code>intent.md</code> into code.</p>



<h3 class="wp-block-heading">Step 5: Adversarial verification (negative space)</h3>



<p class="wp-block-paragraph">This phase checks whether the generated code crossed a forbidden boundary. Before the development cycle begins, the adversarial context provider defines threat vectors in <code>threat-model.md</code>. Because a Markdown file only guides the LLM softly, the governance platform engineer bridges the gap to determinism by translating those declarative threats into matching executable rules (like <code>semgrep-rule.yml</code>) wired into the CI gates. If the threat model identifies server-side request forgery or secrets exfiltration as a risk for the <code>/frontend</code> module, the corresponding CI rule parses the generated code and instantly fails the build if a known attack pattern or insecure execution sink is detected.</p>



<p class="wp-block-paragraph">The pipeline doesn’t ask an LLM to read the Markdown and assess if the code is safe. It mechanically executes the prewritten rules derived from it. If a generative agent helps draft the rule set, it does so before the cycle in an isolated sandbox, and a human reviews the result before it enters CI. Step 5 doesn’t prove overall correctness; it proves that declared structural and security boundaries are enforced.</p>



<p class="wp-block-paragraph">Like any static gate, deterministic boundary checks trade flexibility for safety and will occasionally reject valid implementations. That friction is intentional: Explicit override and artifact refinement are part of the governance loop.</p>



<p class="wp-block-paragraph">AI code review may identify suspicious code, but it cannot certify that declared boundaries survived generation. Step 5 therefore relies on deterministic CI rules, not on a probabilistic model interpreting the pull request.</p>



<h3 class="wp-block-heading">Step 6: Acceptance verification (positive space)</h3>



<p class="wp-block-paragraph">This phase checks whether the generated code solves the business problem. The <code>acceptance-criteria.md</code> defines the expected behavior not as a vague user story, but as a machine-executable contract (e.g., using Gherkin syntax):</p>



<pre class="wp-block-code"><code>Scenario: Successful payment emits notification
  Given a valid payment of 100 EUR
  When the transaction completes
  Then the PaymentSuccessEvent is published to the message bus</code></pre>



<p class="wp-block-paragraph">The CI pipeline parses this exact Markdown block and runs the corresponding test suite. Step 6 provides what step 5 cannot: verification against a declared delivery contract.</p>



<p class="wp-block-paragraph">The code is approved only when it passes adversarial checks <em>and</em> satisfies the acceptance criteria. Without step 5, the system could violate structural boundaries. Without step 6, it could implement the wrong intent. Both contracts must hold.</p>



<h2 class="wp-block-heading">Artifact-bound roles and accountability</h2>



<p class="wp-block-paragraph">The traditional SDLC is a linear cascade: Requirements flow to architecture, then to code, then to QA. In an era where a machine generates 10,000 lines of syntax in the time it takes to fetch a coffee, that handoff is a fatal bottleneck.</p>



<p class="wp-block-paragraph">In the context matrix, specialists define parallel, independent constraint vectors <em>before</em> generation begins. The titles on business cards stay the same. The artifacts they produce change entirely.</p>



<figure class="wp-block-table"><table><tbody><tr><td><strong>Old role</strong></td><td><strong>New role</strong></td><td><strong>Artifact</strong></td><td><strong>Responsibility</strong></td></tr><tr><td>Business analyst</td><td><strong>Intent definer</strong></td><td><code>intent.md</code> + <br><code>acceptance-criteria.md</code></td><td>Define the &#8220;what&#8221; and the deterministic proof that it was delivered</td></tr><tr><td>Software architect</td><td><strong>World builder</strong></td><td><code>boundaries.md</code></td><td>Define domain ontology, architectural invariants, and allowed interaction patterns</td></tr><tr><td>QA &amp; security engineer</td><td><strong>Adversarial context provider</strong></td><td><code>threat-model.md</code></td><td>Define threat vectors and abuse paths <em>before</em> generation</td></tr><tr><td>Platform engineer/DevOps</td><td><strong>Governance platform engineer</strong></td><td>Compiler pipeline + CI gates (<code>semgrep-rule.yml</code>)&nbsp;</td><td>Operationalize declared constraints into nonbypassable enforcement gates</td></tr><tr><td>Developer</td><td><strong>Context orchestrator</strong></td><td><code>coding-standards.md</code> + critical code</td><td>Resolve artifact conflicts, steer generation workflows, implement critical paths, and refine context quality</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">In this model, accountability is distributed and artifact bound. Rather than handing off work downstream, each role owns specific upstream activities and constraints.</p>



<ul class="wp-block-list">
<li><strong>The intent definer (formerly business analyst):</strong> Owns the business reality. They translate user needs into <code>intent.md</code> and define hard <code>acceptance-criteria.md</code> (like BDD scenarios or API contracts). Their job is to formulate requirements so strictly that the pipeline can automatically prove delivery, acting as the first line of defense against vague &#8220;vibe coding.&#8221;</li>



<li><strong>The world builder (formerly software architect):</strong> Owns the structural gravity. They write <code>boundaries.md</code> to establish the domain ontology and hard architectural boundaries. Instead of reviewing pull requests for drift, their daily activity is defining what modules are allowed to communicate and declaring the structural invariants the generated code must respect.</li>



<li><strong>The adversarial context provider (formerly QA and security):</strong> Owns the negative space. They anticipate failure modes and define threat vectors via <code>threat-model.md</code>. Their responsibility is identifying the precise abuse paths that the CI pipeline must block, ensuring an LLM never tests its own code.</li>



<li><strong>The governance platform engineer (formerly platform engineer/DevOps):</strong> Owns the enforcement machinery. They build the context compiler pipeline and operationalize declared constraints into nonbypassable enforcement gates. Their responsibility is the deterministic enforcement pipeline that executes declared governance artifacts at precommit and CI/CD boundaries.</li>



<li><strong>The context orchestrator (formerly developer):</strong> Owns generation orchestration and critical handwritten paths. This is a hybrid reality, not the end of programming. They write <code>coding-standards.md</code>, manually implement zero-trust paths, and resolve runtime exception requests. For the bulk of the system, their focus shifts to a meta-level: resolving conflicting constraints, tuning the prompt&#8217;s signal-to-noise ratio, and debugging why a given artifact failed to govern the agent properly.</li>
</ul>



<p class="wp-block-paragraph">When a failure occurs, the investigation shifts from &#8220;What was the agent thinking?&#8221; to &#8220;Which contract failed to govern?&#8221; Because the pipeline deterministically enforces what was explicitly declared, failures are no longer opaque hallucinations. They’re traceable collisions between artifact boundaries. A structural flaw cleanly points to an unbounded <code>boundaries.md</code>. When the pipeline is green and the contracts are honest, the orchestrator acts as a firewall against process failure, not a scapegoat for undocumented assumptions.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1600" height="780" src="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-2-1600x780.png" alt="The decision boundary architecture: Context compilation governs generation, ROA structures intent, and DIR validates execution." class="wp-image-18841" srcset="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-2-1600x780.png 1600w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-2-300x146.png 300w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-2-768x375.png 768w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-2-1536x749.png 1536w, https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/image-2.png 2048w" sizes="auto, (max-width: 1600px) 100vw, 1600px" /><figcaption class="wp-element-caption"><em>Figure 3. The decision boundary architecture: Context compilation governs generation, ROA structures intent, and DIR validates execution.</em></figcaption></figure>



<h2 class="wp-block-heading">The economics of governance</h2>



<p class="wp-block-paragraph">Context compilation makes economic sense only when the cost of architectural failure exceeds the cost of explicit governance. It adds upfront design work and cognitive overhead, so its value depends on how expensive a wrong system decision would be.</p>



<p class="wp-block-paragraph">For rapid prototyping, throwaway utility scripts, marketing sites, or low-stakes internal tools—where the worst-case consequence of a hallucination is a misaligned dashboard—let the generative engines run unconstrained. Velocity is the only thing that matters.</p>



<p class="wp-block-paragraph">For safety-critical automation, trading platforms, healthcare orchestrators, and regulated enterprise systems, the economics invert. Velocity without deterministic boundaries is simply the speed at which you accumulate liability. A single unconstrained agent importing an insecure dependency into a payment core costs orders of magnitude more than the engineer-hours spent writing a <code>boundaries.md</code> contract.</p>



<p class="wp-block-paragraph">You don’t build a bank vault door for a garden shed. You apply context compilation where the systemic cost of emergent architectural failure is catastrophic.</p>



<h2 class="wp-block-heading">Automating the word &#8220;NO&#8221;</h2>



<p class="wp-block-paragraph">When code generation becomes cheap, architectural entropy tends to scale with it. That makes post hoc code review less effective, especially when reviewers spend their attention on machine-generated boilerplate. A more durable approach is <em>context review</em>: peer review of the declarative constraints that shape what the machine is allowed to build. A reviewed <code>boundaries.md</code> can guide many later development cycles. A reviewed pull request usually governs only a single change.</p>



<p class="wp-block-paragraph">The discipline has shifted from imperative engineering of procedures to declarative engineering of boundaries.</p>



<p class="wp-block-paragraph">Let’s return to the Jira ticket that started this discussion: &#8220;Add an email notification after a successful payment.&#8221;</p>



<p class="wp-block-paragraph">The business analyst submits the <code>intent.md</code>. Before the developer agent sees the prompt, the context compiler activates—at the precommit gate or via tool-mediated context protocols (e.g., script or MCP) in the IDE—before a line is written. It retrieves the architect&#8217;s <code>boundaries.md</code>, which states, &#8220;The <code>/domain</code> module has zero external dependencies. No network calls.&#8221; The SMTP import collides with that boundary instantly. Even if the agent generates the import, the build will not survive it—the prompt biases generation toward compliant solutions, and the deterministic static check in step 5 rejects it at the declared boundary. The Frankenstein is caught in the pipeline, not discovered in production three release cycles later.</p>



<p class="wp-block-paragraph">Code generation is becoming abundant. Architectural discipline is becoming scarce.</p>



<p class="wp-block-paragraph">Context as code governs what may be generated. Responsibility-oriented agents govern what may be proposed. Decision Intelligence Runtime governs what may be executed. Three boundaries. One governing frame.</p>



<p class="wp-block-paragraph">The highest-value engineering skill is no longer writing syntax. It’s engineering the conditions under which correct syntax can emerge.</p>



<p class="wp-block-paragraph">That is the ability to automate the word &#8220;NO.&#8221;</p>



<p class="wp-block-paragraph"><em>This article concludes the three-part series on engineering boundaries in agentic AI. The repository at <a href="https://github.com/huka81/decision-intelligence-runtime" target="_blank" rel="noreferrer noopener">github.com/huka81/decision-intelligence-runtime</a> contains an open source reference implementation of the concepts described in this series.</em></p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/context-as-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Radar Trends to Watch: June 2026</title>
		<link>https://www.oreilly.com/radar/radar-trends-to-watch-june-2026/</link>
				<comments>https://www.oreilly.com/radar/radar-trends-to-watch-june-2026/#respond</comments>
				<pubDate>Tue, 02 Jun 2026 10:58:22 +0000</pubDate>
					<dc:creator><![CDATA[Mike Loukides]]></dc:creator>
						<category><![CDATA[Radar Trends]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18834</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2023/06/radar-1400x950-7.png" 
				medium="image" 
				type="image/png" 
				width="1400" 
				height="950" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2023/06/radar-1400x950-7-160x160.png" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[Developments in policy and governance, infrastructure and ops, AI models, and more]]></custom:subtitle>
		
				<description><![CDATA[Coauthored with Claude Agents are making the transition from performing tasks to running operations. The Cloudflare and Stripe partnership ships an agent that opens accounts, registers domains, and deploys an application on its own (details), while Stripe/Tempo and iWallet have each published machine-to-machine payment protocols to make that kind of work a standard. Office documents, [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>Coauthored with Claude</em></p>



<p class="wp-block-paragraph">Agents are making the transition from performing tasks to running operations. The Cloudflare and Stripe partnership ships an agent that opens accounts, registers domains, and deploys an application on its own (<a href="https://www.infoworld.com/article/4165857/are-we-ready-to-give-ai-agents-the-keys-to-the-cloud-cloudflare-thinks-so.html" target="_blank" rel="noreferrer noopener">details</a>), while Stripe/Tempo and iWallet have each published machine-to-machine payment protocols to make that kind of work a standard. Office documents, browser sessions, and, in one announcement, the phone interface itself are next on the list. View the expanded role of agents as an opportunity for humans to accomplish more.</p>



<h2 class="wp-block-heading">AI Models</h2>



<p class="wp-block-paragraph">The model menagerie keeps expanding in size and shape. Open weight contenders run at frontier capability on modest hardware, while specialist models for voice, conversation timing, and privacy filtering take over what used to be features inside one general chat model. Treat your prompts and skills as portable; the model behind them will change.</p>



<ul class="wp-block-list">
<li>Anthropic has <a href="https://www.anthropic.com/news/claude-opus-4-8" target="_blank" rel="noreferrer noopener">released</a> Opus Claude 4.8. This model is not Mythos, which they expect to release soon. Opus 4.8 is a “modest improvement” that claims better results on coding and greater likelihood of informing users when it is uncertain about claims. Changes to the agents may be more important. Claude Code now has the ability to plan solutions to large problems involving hundreds of subagents (“dynamic workflows”); Cowork can control the effort put into solving a problem.</li>



<li>Cohere&#8217;s <a href="https://cohere.com/blog/command-a-plus" target="_blank" rel="noreferrer noopener">Command A+</a> is an open weight mixture-of-experts model with 218B parameters, 25B active. It’s competitive with frontier models and requires relatively little hardware to run: Two H100s isn&#8217;t small, but it&#8217;s not a data center either.</li>



<li>Google&#8217;s announcements at this year’s I/O conference include <a href="https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-omni/" target="_blank" rel="noreferrer noopener">Omni</a>, a new model that takes any kind of input (video, audio, image) and generates any kind of output; <a href="https://ai.google.dev/gemini-api/docs/interactions/whats-new-gemini-3.5" target="_blank" rel="noreferrer noopener">Gemini 3.5 Flash</a>, a fast and efficient update to their coding model; <a href="https://gemini.google/overview/agent/spark/" target="_blank" rel="noreferrer noopener">Gemini Spark</a>, a personal agent; and <a href="https://blog.google/products-and-platforms/platforms/android/android-xr-io-2026/" target="_blank" rel="noreferrer noopener">intelligent eyewear</a>, another attempt at smart glasses.</li>



<li>Alibaba has <a href="https://qwen.ai/blog?id=qwen3.7" target="_blank" rel="noreferrer noopener">announced</a> Qwen3.7-Max, its most capable model.</li>



<li>Thinking Machines has <a href="https://thinkingmachines.ai/blog/interaction-models/" target="_blank" rel="noreferrer noopener">announced</a> a research preview of interaction models. These models support natural conversation flow. The model can wait for a speaker to finish, interrupt the speaker, respond when the speaker interrupts the model, and keep track of time.</li>



<li>OpenAI has <a href="https://openai.com/index/advancing-voice-intelligence-with-new-models-in-the-api/" target="_blank" rel="noreferrer noopener">released</a> new voice models: GPT-Realtime-2, GPT-Realtime-Translate, and GPT-Realtime-Whisper. They’re moving from call-and-response models to models that can take part in conversations, reason, and take actions.</li>



<li>OpenRouter published cost studies for both <a href="https://openrouter.ai/announcements/opus-47-tokenizer-analysis" target="_blank" rel="noreferrer noopener">Claude Opus 4.7</a> and <a href="https://openrouter.ai/announcements/gpt55-cost-analysis" target="_blank" rel="noreferrer noopener">GPT-5.5</a>. GPT-5.5 raised the token price but reduced the number of tokens in a typical conversation. Claude kept prices the same, but conversations tend to require more tokens. What&#8217;s the impact on your monthly bill?</li>



<li>Google has <a href="https://arstechnica.com/ai/2026/05/googles-gemma-4-open-ai-models-use-speculative-decoding-to-get-up-to-3x-faster/" target="_blank" rel="noreferrer noopener">updated</a> its Gemma 4 models, claiming that they triple token generation speed. They use a technique called <a href="https://x.com/googlegemma/status/2051694045869879749" target="_blank" rel="noreferrer noopener">multi-token prediction</a> (MTP) to draft a sequence of tokens with a very small model and then approve those tokens with the large model.</li>



<li>IBM released <a href="https://research.ibm.com/blog/granite-4-1-ai-foundation-models" target="_blank" rel="noreferrer noopener">Granite 4.1</a>, a collection of small models (30B parameters and down).</li>



<li>An academic paper describes “<a href="https://arxiv.org/abs/2510.22977" target="_blank" rel="noreferrer noopener">the reasoning trap</a>,” a phenomenon in which training models for increased reasoning also increases hallucinations about tool use.</li>



<li><a href="https://talkie-lm.com/chat" target="_blank" rel="noreferrer noopener">Talkie</a> is an LLM that was trained only on data from 1931 and earlier. If you want to know what it was like to live during the start of the Depression, this is the LLM to ask.</li>



<li>OpenAI has <a href="https://openai.com/index/introducing-openai-privacy-filter/" target="_blank" rel="noreferrer noopener">announced</a> a <a href="https://huggingface.co/openai/privacy-filter" target="_blank" rel="noreferrer noopener">privacy filter model</a>. This is a small specialized model (1.5B) that can run on phones and other small devices. It removes personally identifiable information (PII) from text documents.</li>
</ul>



<h2 class="wp-block-heading">Software Development</h2>



<p class="wp-block-paragraph">We are beginning to see anecdotal evidence that the brief era of <a href="https://thenewstack.io/opus-4-8-claude-smarter-token-discipline-urgent/" target="_blank" rel="noreferrer noopener">tokenmaxxing is coming to an end</a>. Agents may increase productivity, but they can also use tokens at an astonishing rate. So can the latest models, like Anthropic’s Claude 4.8 with new features like dynamic workflows. Employers are realizing that the only way to measure productivity is to look at the quality of an employee’s work rather than relying on an artificial (and easily gameable) metric like token use. Teams that use AI effectively will be disciplined about token use; they’ll choose lower cost (or local) models where possible, reaching for expensive models like Claude 4.8 Opus only when necessary.</p>



<ul class="wp-block-list">
<li>The Agentic AI Foundation is <a href="https://aaif.io/blog/mcp-is-growing-up/" target="_blank" rel="noreferrer noopener">updating</a> the MCP protocol, with a <a href="https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/" target="_blank" rel="noreferrer noopener">release candidate</a> scheduled for July 28. Changes include making MCP a stateless protocol, adding a process for creating extensions, and aligning authorization with the OAuth and OpenID standards.</li>



<li>Google is <a href="https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/" target="_blank" rel="noreferrer noopener">dropping Gemini CLI</a> and putting all of its effort behind <a href="https://antigravity.google/" target="_blank" rel="noreferrer noopener">Antigravity</a>, its agentic software development platform. There are desktop and command line versions of Antigravity, but unlike Gemini CLI, neither are open source.</li>



<li>What shall we call <a href="https://steve-yegge.medium.com/welcome-to-gas-city-57f564bb3607" target="_blank" rel="noreferrer noopener">Gas City</a>, created by Julian Knutsen and Chris Sells? Gas Town 2.0? Steve Yegge says it&#8217;s an SDK for building your own &#8220;dark factories&#8221; by deploying teams of collaborating agents in any topology. It&#8217;s &#8220;a pivotal moment in the Mad Max school of agent orchestration.&#8221;</li>



<li>The problem with agentic programming is that agents serve individuals, not groups, and programming is a team sport. Is <a href="https://www.lukew.com/ff/entry.asp?2153" target="_blank" rel="noreferrer noopener">collaborative steering</a> (context management for groups) an answer?</li>



<li>GitHub has <a href="https://github.com/features/preview/github-app" target="_blank" rel="noreferrer noopener">released</a> a preview of its Copilot app, a stand-alone desktop application for coding with AI. It’s completely integrated with GitHub; for example, you can launch tasks directly from GitHub issues.</li>



<li>If you think tokenmaxxing is your path to promotion, check out <a href="https://github.com/dtnewman/burn-baby-burn" target="_blank" rel="noreferrer noopener">burn-baby-burn</a>. It does what it says: burns lots of tokens, fast, using the LLM of your choice. We hope it&#8217;s a parody, but we bet it works.</li>



<li>Mitchell Hashimoto <a href="https://x.com/mitchellh/status/2055039647924007222" target="_blank" rel="noreferrer noopener">tweets</a> that Anthropic&#8217;s rewrite of Bun from Zig to Rust demonstrates that programming languages are now fungible. Programming language lock-in has ended; programs can easily move from one language to another.</li>



<li><a href="https://github.com/NVIDIA/OpenShell?utm_source=the+new+stack&amp;utm_medium=referral&amp;utm_content=inline-mention&amp;utm_campaign=tns+platform" target="_blank" rel="noreferrer noopener">OpenShell</a> is a <a href="https://thenewstack.io/nvidia-openshell-agent-runtime/" target="_blank" rel="noreferrer noopener">runtime environment</a> built with security in mind from the ground up. It’s intended to be used as a secure environment for running agents. Every agent runs in its own sandbox; an external gateway manages credentials and policies.</li>



<li>OpenAI is <a href="https://community.openai.com/t/openai-is-winding-down-the-fine-tuning-api-and-platform-discussion-thread/1380522" target="_blank" rel="noreferrer noopener">shutting down</a> its API for fine-tuning its models. <a href="https://x.com/bradenjhancock/status/2053309599248453999?s=20" target="_blank" rel="noreferrer noopener">They say</a> the current models are better and don&#8217;t require significant fine-tuning. As <em>Latent Space</em> <a href="https://www.latent.space/p/ainews-the-end-of-finetuning" target="_blank" rel="noreferrer noopener">points out</a>, this doesn&#8217;t necessarily mean the end of fine-tuning as a discipline, particularly for open models. But it may be a signal. Drew Breunig <a href="https://www.dbreunig.com/2026/05/10/overfitting-the-harness.html" target="_blank" rel="noreferrer noopener">writes</a> about what this means for agents and harnesses.</li>



<li>Anthropic has <a href="https://claude.com/blog/collaborate-with-claude-across-excel-powerpoint-word-and-outlook" target="_blank" rel="noreferrer noopener">released</a> Claude for Office 365, allowing users to run sessions that cross Word, Excel, and PowerPoint. Integration with Outlook is coming, though Claude for Outlook is currently a separate product.</li>



<li>A <a href="https://developers.openai.com/codex/app/chrome-extension?utm_source=the+new+stack&amp;utm_medium=referral&amp;utm_content=inline-mention&amp;utm_campaign=tns+platform" target="_blank" rel="noreferrer noopener">plugin to Chrome allows Codex to use Chrome</a> for browser tasks that require you to be logged in—for example, reading email.</li>



<li><a href="https://www.firecrawl.dev/" target="_blank" rel="noreferrer noopener">Firecrawl</a> is an API that agents can use to interact with websites in a human way. It enables agents to search for the latest data, interact with the site, and return the results at scale.</li>



<li>Drew Breunig&#8217;s “<a href="https://www.dbreunig.com/2026/05/04/10-lessons-for-agentic-coding.html" target="_blank" rel="noreferrer noopener">10 Lessons for Agentic Coding</a>” is an invaluable list of tips, including &#8220;Implement to learn.&#8221; Letting an agent write all the code is easy, but when you really need to learn something, write it by hand first.</li>



<li><a href="https://github.com/aattaran/deepclaude" target="_blank" rel="noreferrer noopener">Deepclaude</a> configures Claude&#8217;s autonomous agent loop to use DeepSeek V4 Pro rather than one of Anthropic&#8217;s models. It&#8217;s a good way to save (DeepSeek costs much less per token) and experiment with open models. (Fair warning: The name deepclaude may change.)</li>



<li>OpenAI has announced <a href="https://chatgpt.com/codex/for-work/" target="_blank" rel="noreferrer noopener">Codex for Work</a>, an assistant that&#8217;s designed for office work rather than software development.</li>



<li><a href="https://github.com/kanwas-ai/kanwas" target="_blank" rel="noreferrer noopener">Kanwas</a> is a new tool for sharing context across agents. It can be used by workgroups to collaborate on projects.</li>



<li><a href="https://mikeoss.com/" target="_blank" rel="noreferrer noopener">Mike</a> is an open source AI trained for legal work and designed to run locally.</li>



<li>GitHub is <a href="https://arstechnica.com/ai/2026/04/github-will-start-charging-copilot-users-based-on-their-actual-ai-usage/" target="_blank" rel="noreferrer noopener">transitioning</a> to <a href="https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/" target="_blank" rel="noreferrer noopener">usage-based billing for Copilot</a>.</li>



<li>OpenAI and Qualcomm are reportedly <a href="https://thenextweb.com/news/openai-qualcomm-ai-phone-agents-replace-apps" target="_blank" rel="noreferrer noopener">working on a phone</a> where the user interface is an agent. There won&#8217;t be any apps; the agent will do everything.</li>
</ul>



<h2 class="wp-block-heading">Infrastructure and Operations</h2>



<p class="wp-block-paragraph">The infrastructure questions of the moment are whether agents can transact and deploy without humans, and whether the platforms that host open source can stay reliable enough to keep that work going. Watch for GitHub alternatives to become competitive. And watch AI Together, a cloud company that hosts hundreds of open source models.</p>



<ul class="wp-block-list">
<li><a href="https://www.withlanai.com/products/tokentuner" target="_blank" rel="noreferrer noopener">TokenTuner</a> helps control AI costs by <a href="https://thenewstack.io/lanai-token-tuner-tokenmaxxing/" target="_blank" rel="noreferrer noopener">identifying</a> where companies can use lower-cost models productively. It attempts to match token usage to business outcomes, and evaluates individuals and teams on how effectively they use their token budget.</li>



<li>In partnership with <a href="https://projects.dev/" target="_blank" rel="noreferrer noopener">Stripe</a>, <a href="https://blog.cloudflare.com/agents-stripe-projects/" target="_blank" rel="noreferrer noopener">Cloudflare</a> now has an <a href="https://www.infoworld.com/article/4165857/are-we-ready-to-give-ai-agents-the-keys-to-the-cloud-cloudflare-thinks-so.html" target="_blank" rel="noreferrer noopener">agent that can create a new account</a>, start a subscription, register a domain name with DNS, and deploy an application without human intervention aside from granting permission.</li>



<li>Stripe and Tempo have <a href="https://thenewstack.io/ai-agent-payment-protocols/" target="_blank" rel="noreferrer noopener">released</a> the Machine Payments Protocol (MPP), and iWallet has laid out a roadmap for the Autonomous Settlement Protocol (ASP). These new protocols are designed to facilitate machine-to-machine transactions, transactions that have to be designed without a human in the loop.</li>



<li>The <a href="https://www.latent.space/p/ainews-the-inference-inflection" target="_blank" rel="noreferrer noopener">Inference Era</a> is when inference, rather than training, drives AI usage, cost, and infrastructure. GPUs remain important, but the relative demand for CPUs increases.</li>



<li>GitHub is in danger of losing its place at the center of the open source ecosystem. <a href="https://www.theregister.com/2026/04/29/github_says_sorry_and_says/" target="_blank" rel="noreferrer noopener">Problems with uptime</a> are causing projects to find homes elsewhere—<a href="https://www.theregister.com/2026/04/29/mitchell_hashimoto_ghostty_quitting_github/" target="_blank" rel="noreferrer noopener">most recently, Ghostty</a>.</li>



<li><a href="https://www.together.ai/" target="_blank" rel="noreferrer noopener">Together AI</a> operates a cloud AI platform that’s designed <a href="https://rokosbas.beehiiv.com/p/may-20-2026" target="_blank" rel="noreferrer noopener">specifically for inference</a> rather than training and that provides API access to over 200 open weight models. As AI use increases, the ability to run models and provide answers efficiently becomes more important than the ability to train new models.</li>
</ul>



<h2 class="wp-block-heading">Security</h2>



<p class="wp-block-paragraph">The patch window is shrinking to zero, and the attacker&#8217;s toolkit and the defender&#8217;s toolkit now include the same AI models. Any vulnerability disclosed today is being exploited tonight. The good news is that defenders running these tools at scale can close gaps faster than ever; the bad news is that the race never ends.</p>



<ul class="wp-block-list">
<li><a href="https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-their-ssd-activity/" target="_blank" rel="noreferrer noopener">FROST</a> is a new technology for surreptitiously discovering what websites a user is visiting. It’s based on measuring the I/O operations on the user’s SSD. FROST requires no interaction from the user and runs entirely in the browser.</li>



<li>Regrettably, neither arcane prompt injection attacks nor cryptocurrency scams are news. But it warms a ham radio enthusiast&#8217;s heart to see <a href="https://www.dexerto.com/entertainment/x-user-tricks-grok-into-sending-them-200000-in-crypto-using-morse-code-3361036/" target="_blank" rel="noreferrer noopener">Morse code used in a prompt injection to scam a crypto trading bot</a>.</li>



<li>TeamPCP, a cybercriminal collective, has <a href="https://arstechnica.com/information-technology/2026/05/a-hacker-group-is-poisoning-open-source-code-at-an-unprecedented-scale/" target="_blank" rel="noreferrer noopener">attacked GitHub</a> by installing a poisoned extension to VS Code. GitHub announced that nearly 4,000 repositories have been compromised, all belonging to GitHub itself; no customer repositories have become victims. But anyone who installs corrupted code from GitHub&#8217;s own repositories is vulnerable.</li>



<li><em><a href="https://berryvilleiml.com/docs/no-security-meter-ai.pdf" target="_blank" rel="noreferrer noopener">No Security Meter for AI</a></em> provides an excellent look into the state of AI security.</li>



<li>Cloudflare&#8217;s <a href="https://blog.cloudflare.com/cyber-frontier-models/" target="_blank" rel="noreferrer noopener">report</a> on Project Glasswing and Claude Mythos is worth reading. Mythos is especially noteworthy for its ability to chain vulnerabilities. In real life, few vulnerabilities are exploitable on their own; they become vulnerable when they are used in combination with others.</li>



<li>Daniel Stenberg <a href="https://daniel.haxx.se/blog/2026/05/11/mythos-finds-a-curl-vulnerability/" target="_blank" rel="noreferrer noopener">reports</a> that Mythos found five potential vulnerabilities in <a href="https://curl.se/" target="_blank" rel="noreferrer noopener">curl</a>, of which one was legitimate. The low count isn&#8217;t surprising, given the quality of the curl team&#8217;s work. What&#8217;s significant is that Mythos was able to find a legitimate vulnerability in software that had been thoroughly audited by humans, traditional tools, and AI.</li>



<li><a href="https://arman-bd.hashnode.dev/i-left-port-22-open-on-the-internet-for-54-days-here-s-who-showed-up" target="_blank" rel="noreferrer noopener">Who showed up?</a> A security researcher ran a honeypot with port 22 open for 54 days, and logged every attempt to log in: 269,000 connection attempts from 7,556 unique IP addresses.</li>



<li>GitHub&#8217;s dependency scanning service for its MCP server is now in <a href="https://github.blog/changelog/2026-05-05-dependency-scanning-with-github-mcp-server-is-in-public-preview/?utm_source=the+new+stack&amp;utm_medium=referral&amp;utm_content=inline-mention&amp;utm_campaign=tns+platform" target="_blank" rel="noreferrer noopener">public preview</a>. It checks code changes for vulnerable dependencies before committing code or opening a pull request.</li>



<li><a href="https://jorijn.com/en/blog/copy-fail-cve-2026-31431-linux-kernel-bug-explained/" target="_blank" rel="noreferrer noopener">Copy.fail</a> is a recently discovered Linux kernel vulnerability that allows unprivileged processes to escalate privileges, and it was exploited within a day of its release. Unlike most vulnerabilities, running infected programs in a container does not offer protection. The time from release of a zero-day to exploitation in the wild is indeed shrinking.</li>



<li>OpenAI&#8217;s <a href="https://thenextweb.com/news/openai-chatgpt-advanced-security-yubico-passkeys" target="_blank" rel="noreferrer noopener">Advanced Account Security</a> requires a physical key or passkey for access; there are no passwords. Hardware keys are provided by Yubico or a compatible hardware token.</li>



<li><a href="https://techcrunch.com/2026/04/30/after-dissing-anthropic-for-limiting-mythos-openai-restricts-access-to-cyber-too/" target="_blank" rel="noreferrer noopener">GPT-5.5 Cyber</a> is a version of GPT-5.5 that has been trained as a security tool. As Anthropic did with Mythos, OpenAI is limiting access to a small group of trusted users.</li>



<li>The Firefox team has <a href="https://blog.mozilla.org/en/firefox/ai-security-zero-day-vulnerabilities/" target="_blank" rel="noreferrer noopener">used Claude Mythos to find 271 previously unknown vulnerabilities</a> in Firefox. While this finding is terrifying, they conclude that defenders now have the advantage. Once you know the vulnerabilities, it&#8217;s possible to close the gap between defenders and attackers.</li>



<li>Claude Code can <a href="https://bdtechtalks.com/2026/04/27/claude-code-api-token-leak/" target="_blank" rel="noreferrer noopener">leak credentials</a> and other secrets to public repos and package registries. When you select &#8220;allow always&#8221; for a specific command, the command and its credentials are stored in a subdirectory of .claude. This directory can inadvertently be incorporated into a package.</li>
</ul>



<h2 class="wp-block-heading">Policy and Governance</h2>



<ul class="wp-block-list">
<li>The ArXiv preprint repository has <a href="https://xcancel.com/tdietterich/status/2055000956144935055" target="_blank" rel="noreferrer noopener">clarified</a> its code of conduct for AI users. Submitters are responsible for their papers and will be banned for a year if they submit papers that use AI-generated content inappropriately. This includes hallucinated content, references, and plagiarism.</li>



<li>Look to China for new approaches to <a href="https://thenextweb.com/news/china-data-governance-global-standard" target="_blank" rel="noreferrer noopener">data governance</a>. China is treating data as a national resource and building the infrastructure for a data economy.</li>
</ul>



<h2 class="wp-block-heading">Web</h2>



<ul class="wp-block-list">
<li>At its I/O conference, Google <a href="https://blog.google/products-and-platforms/products/search/search-io-2026/#powerful-ai" target="_blank" rel="noreferrer noopener">announced</a> that traditional search will be replaced by AI search, powered by Gemini 3.5 Flash. Both AI search and traditional search (which is really AI-powered) have proven useful. What happens when you eliminate one of the options?</li>



<li><a href="https://www.xda-developers.com/linux-running-inside-pdf-file/" target="_blank" rel="noreferrer noopener">Linux running in a PDF</a>? The PDF format supports JavaScript, and C can be compiled to JavaScript.</li>
</ul>



<h2 class="wp-block-heading">Biology</h2>



<ul class="wp-block-list">
<li>Colossal Biosciences has <a href="https://www.technologyreview.com/2026/05/19/1137471/colossal-biosciences-is-growing-chickens-in-a-3d-printed-container/" target="_blank" rel="noreferrer noopener">developed</a> a 3D-printed artificial eggshell that’s capable of raising chicks from embryos.</li>



<li>Brazil has <a href="https://www.economist.com/the-americas/2026/05/21/why-brazils-government-is-obsessed-with-vaccines" target="_blank" rel="noreferrer noopener">invested heavily</a> in vaccines and has created a single-shot vaccine against Dengue fever. The country is striving for “medical sovereignty,” a concept that’s clearly related to data sovereignty and AI sovereignty.</li>
</ul>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/radar-trends-to-watch-june-2026/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>AI Sovereignty and the Architecture of Participation</title>
		<link>https://www.oreilly.com/radar/ai-sovereignty-and-the-architecture-of-participation/</link>
				<comments>https://www.oreilly.com/radar/ai-sovereignty-and-the-architecture-of-participation/#respond</comments>
				<pubDate>Mon, 01 Jun 2026 16:05:58 +0000</pubDate>
					<dc:creator><![CDATA[Tim O’Reilly]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18818</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/Image-by-ChatGPT-5.5-Earth-from-space-at-night-as-a-federated-distributed-network.png" 
				medium="image" 
				type="image/png" 
				width="512" 
				height="288" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/Image-by-ChatGPT-5.5-Earth-from-space-at-night-as-a-federated-distributed-network-160x160.png" 
				width="160" 
				height="160" 
			/>
		
		
				<description><![CDATA[Adam Tooze recently shared a piece from The Economist about Brazil&#8217;s push for what it calls &#8220;medical sovereignty,&#8221; the determination to make its own vaccines and the active ingredients that go into its medicines rather than depend on supply chains it doesn&#8217;t control. Brazil already produces a large share of its own medicines through public [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">Adam Tooze recently <a href="https://adamtooze.substack.com/p/top-links-1115-claiming-medical-sovereignty" target="_blank" rel="noreferrer noopener">shared</a> a piece from <em>The Economist</em> about <a href="https://www.economist.com/the-americas/2026/05/21/why-brazils-government-is-obsessed-with-vaccines" target="_blank" rel="noreferrer noopener">Brazil&#8217;s push for what it calls &#8220;medical sovereignty,&#8221;</a> the determination to make its own vaccines and the active ingredients that go into its medicines rather than depend on supply chains it doesn&#8217;t control. Brazil already produces a large share of its own medicines through public institutions like Fiocruz and Butantan, but a lot of the underlying inputs still come from abroad, and the pandemic made clear the cost of that dependence. So the country is trying to build the capacity to make the things it most needs to survive. The economist behind a lot of this thinking is <a href="https://marianamazzucato.com/" target="_blank" rel="noreferrer noopener">Mariana Mazzucato</a>, whose mission-oriented approach treats public procurement as a tool to build national capacity rather than just buy finished goods. (<a href="https://foreignpolicy.com/2024/01/26/brazil-lula-industrial-policy-economy-mission-mazzucato/" target="_blank" rel="noreferrer noopener"><em>Foreign Policy</em> has a good overview</a>.)</p>



<p class="wp-block-paragraph">I think we&#8217;re going to see a lot more of this, and not only in medicine. The same impulse is driving the quest for sovereign AI, as countries decide they don&#8217;t want their access to a foundational technology to run through a handful of American or Chinese companies. You can see it too in Europe&#8217;s and Japan&#8217;s new willingness to take responsibility for their own military destiny rather than assume the United States will always be there.</p>



<p class="wp-block-paragraph">Most commentators describe all of this as decoupling, the unwinding of a connected world. That reading is too narrow.</p>



<h2 class="wp-block-heading">Free trade was an architecture of participation that broke</h2>



<p class="wp-block-paragraph">Much like open source software and the World Wide Web, free trade was supposed to have what I call “<a href="https://asimovaddendum.substack.com/p/the-architecture-of-participation" target="_blank" rel="noreferrer noopener">an architecture of participation</a>.” The most important thing about the web and open source wasn&#8217;t openness for its own sake. It was that there were no central gatekeepers. Anyone could add to the richness of the system without asking permission as long as they followed the rules of the communication protocols that allowed independently-developed pieces to work together. In addition, value circulated among the participants instead of being extracted to a center, and the system got better the more people used it. That is a very different thing from a system that is merely large and connected.</p>



<p class="wp-block-paragraph">Free trade was also supposed to work like that. The theory, going back to Smith and Ricardo, was that specialization and exchange would make everyone better off, and that the connections would be mutual. What we actually got over the past few decades looks more like the platform dominance we see in big tech than the original vision of a commons built around shared exchange. A handful of large and powerful countries and firms set the terms and the smaller players are forced to take what is on offer. Despite the language of free trade, the experience for many countries was closer to colonialism, just with a new narrative.</p>



<p class="wp-block-paragraph">Overall, under the neoliberal order (whose reign, as <a href="https://global.oup.com/academic/product/the-rise-and-fall-of-the-neoliberal-order-9780197519646" target="_blank" rel="noreferrer noopener">Gary Gerstle explains</a>, is now ending), free trade became far less egalitarian, inclusive, and generative than it could have been. Less powerful countries ended up in roughly the position that small businesses occupy on Amazon, or developers occupy on the app stores: free to participate, on terms they don&#8217;t control, with much of the value they create flowing back to the hub.</p>



<p class="wp-block-paragraph">Brazil&#8217;s response (and that of many others) should not be seen as a retreat from the world. It is a refusal to be participate <em>only as a buyer</em>, or as a source of raw materials.</p>



<p class="wp-block-paragraph">That&#8217;s why decoupling is the wrong word. Decoupling means cutting the connections. What these countries seem to want is to stay connected but to build real capacity of their own, so that no single supplier can switch them off. That&#8217;s closer to federation than to separation. A federated system is still a system, and its nodes still interoperate. But no node is wholly at the mercy of another, and value circulates among them rather than collecting at the center. A trading order in which the gains pool at a few hubs is brittle and eventually illegitimate, in the same way that a platform economy that strip-mines its participants eventually provokes regulation and revolt.</p>



<p class="wp-block-paragraph">I put the increasingly visible quest for <a href="https://www.mckinsey.com/featured-insights/mckinsey-explainers/what-is-sovereign-ai" target="_blank" rel="noreferrer noopener">sovereign AI</a>, and the role of open source models and open source agentic protocols and harnesses in enabling that sovereignty, into the same bucket. I remember back in the early days of open source software when Michael Tiemann, whose pioneering open source company Cygnus Solutions had just been acquired by Red Hat, told me “What we really sell at Red Hat is control. The ability to control your own destiny.”</p>



<p class="wp-block-paragraph">As companies are increasingly at the mercy of <a href="https://www.theinformation.com/newsletters/ai-agenda/rising-ai-costs-becoming-problem-investors" target="_blank" rel="noreferrer noopener">unexpected token pricing changes by the big centralized players</a>, this same quest for sovereignty is playing out at the level of organizations. Open source AI, including not just open source and open weight models but open agentic protocols, agentic harnesses, and portable memory, are increasingly an essential part of the sovereignty toolkit.</p>



<p class="wp-block-paragraph">The national technology sovereignty movements should take a lesson from the open source movement. The heart of open source is its architecture of participation. It is a force for innovation and value creation to the extent that it frees up the ability of people to solve their own problems and contribute their solutions to a low-friction global commons.</p>



<h2 class="wp-block-heading">Is capture the inevitable fate of any architecture of participation?</h2>



<p class="wp-block-paragraph">The pattern of open architectures leading to a wave of innovation, winners emerging, consolidating their power and then turning to the dark side seems to be a natural part of the technology cycle. The web broke Microsoft’s dominance over the personal computer software ecosystem only to give rise to a new generation of gatekeepers. Cory Doctorow called this cycle “<a href="https://en.wikipedia.org/wiki/Enshittification" target="_blank" rel="noreferrer noopener">enshittification</a>.” I’ve told my own version of that story using the language of economics in “<a href="https://www.oreilly.com/radar/rising-tide-rents-and-robber-baron-rents/" target="_blank" rel="noreferrer noopener">Rising Tide Rents and Robber Baron Rents</a>.”</p>



<p class="wp-block-paragraph">The instinct after capture is to try to rebuild the thing that got captured, only this time with better rules. Mastodon and Bluesky tried to rebuild Twitter&#8217;s social layer with cleaner governance, and neither has succeeded at the scale they hoped for. Critics might say that it was because Mastodon stayed pure and never made itself easy enough to use, while Bluesky looked federated without really being so. But more importantly, reinventing what we used to have, or what we think we used to have, is rarely the path forward. You have to build something new.</p>



<p class="wp-block-paragraph">Each country building its own answer to the latest frontier models is the Mastodon move. The winning move is to operate at a layer the centralized model structurally can&#8217;t reach. Open agent protocols that let services from different providers interoperate (the work that MCP and the emerging agent stack are beginning to do) are one such layer. AI accountable to local democratic and legal institutions is another such layer. Domain-specific AI built around problems the global market won&#8217;t serve (the tropical disease vaccine analogue) is another. None of these is a smaller copy of what the hyperscalers offer. But there’s one more important layer to consider: infrastructure.</p>



<h2 class="wp-block-heading">Where are the servers?</h2>



<p class="wp-block-paragraph"><a href="https://ai-disclosures.org/" target="_blank" rel="noreferrer noopener">Ilan Strauss</a> made a useful point in our conversation about these ideas. Ilan noted that AI is one of the most global forms of capital we&#8217;ve ever built, trained on the whole of the internet and runnable more or less anywhere, and the sovereignty rhetoric is partly an attempt to give something inherently placeless a place. The technology wants to be everywhere at once. The people who live with its consequences want some say over it where they are.</p>



<p class="wp-block-paragraph">The placelessness of AI is only half of the truth, though. The other half is that AI is physically place-bound. The model weights are placeless. The data centers, the chips, the electrical grid, and the water for cooling are very much somewhere.</p>



<p class="wp-block-paragraph">The comparison with Brazil’s medical sovereignty reinforces this point. Brazil’s challenge isn’t to invent new drugs to compete with Pfizer, but to build the capacity to manufacture existing vaccines, and eventually to build the capacity to invent vaccines for diseases the West ignores. Fiocruz and Butantan matter not because they hold patents but because they are physical institutional capacity rooted in Brazilian soil: the labs, the cold chains, the regulatory capacity, the trained workforce, and access to the active pharmaceutical ingredients. That&#8217;s what medical sovereignty really means in practice. It is infrastructure plus the institutions that run it.</p>



<p class="wp-block-paragraph">The same is becoming true for AI. Open weights matter. They&#8217;re closer, though, to the patent than to the lab. Even if Qwen, Kimi, DeepSeek, Llama, Gemma, Granite, and whatever comes next are fully open, running them at scale requires data centers that cost tens of billions to build, chips whose supply chains a handful of countries control, and electricity grids that have to be expanded substantially to carry the load. The countries pursuing sovereign AI seriously seem to understand this. The EU&#8217;s AI Gigafactories program, India&#8217;s IndiaAI mission, the Gulf compute buildouts, the Singapore and Japan strategies, are all infrastructure plays first and model plays second.</p>



<p class="wp-block-paragraph">Infrastructure is the layer where capture is hardest to undo. You can distill or fine tune a model far more easily than you can build a new continent’s worth of data centers or conjure the necessary electricity from a fragile power grid. If the architecture of participation for AI is defined only at the model layer, the infrastructure layer below will quietly recapture, over years, everything that was won above. Open weights running on three companies’ servers is not sovereignty.</p>



<p class="wp-block-paragraph">Building physical infrastructure capable of carrying a generation&#8217;s worth of economic activity is exactly the kind of mission the public sector used to take on, before we convinced ourselves the market would handle it. Mazzucato’s argument is that public procurement and public capacity-building are the real engines of foundational technology. AI sovereignty without industrial policy is wishful thinking.</p>



<p class="wp-block-paragraph">Industrial policy should aim to reinvent 20th century infrastructure, not just copy it. Can we use the enormous rebuild of infrastructure for the AI era to leapfrog the past? The analogy with centralized power grids and decentralized solar reminds us that local control does not have to be a localized version of the hyperscaler pattern. Might we envision a future where there is an intelligence grid that seamlessly uses frontier models in massive data centers and local models controlled by the user as dictated by considerations like cost, privacy, specialized knowledge, and user preferences? Creating the software to manage such an interoperable intelligence grid should be a high priority for the AI open source community. We need an orchestrator not just for agents but also for models and even for data center capacity.</p>



<h2 class="wp-block-heading">Could federated AI give us a new pattern for the economy?</h2>



<p class="wp-block-paragraph">In a previous piece about AI and markets, &#8220;<a href="https://asimovaddendum.substack.com/p/the-third-artificial-intelligence" target="_blank" rel="noreferrer noopener">The Third Artificial Intelligence</a>&#8221; I picked up Richard Danzig&#8217;s argument that markets and the bureaucracies that underpin nation states are themselves artificial intelligences, information-processing mechanisms older than the machine kind. The question with all three is who designs and builds them, what they optimize for, and what feedback loops govern them.</p>



<p class="wp-block-paragraph">We&#8217;re about to spend a lot of effort working out how AI should be organized both across nations and across organizations, whether it concentrates in a few firms and a few countries or whether it can be built as something more federated, where smaller players have genuine capacity and the value they create flows back to them. The choices we are now making about how AI is organized, at the model layer, the protocol layer, and the infrastructure layer, are also choices about how economic activity will be organized for at least a generation. If we manage to get that architecture right for AI, it may give us a working pattern for the thing we&#8217;ve so far failed to get right for trade. If we get it wrong, we&#8217;ll most likely reproduce, at the level of intelligence itself, the same concentration that free trade has produced in goods and the existing internet platforms produced online.</p>



<p class="wp-block-paragraph">The technology wants to be everywhere at once. The people who live with its consequences want some say over it where they are. The infrastructure that resolves that tension will be a federation of models, a federation of protocols and code, and a federation of capacity. We need an architecture of participation all the way down the stack, and all the way up.</p>



<p class="wp-block-paragraph"><em>The final section of this piece benefited greatly from questions and comments raised by Ilan Strauss and <a href="https://www.oreilly.com/people/mike-loukides/" target="_blank" rel="noreferrer noopener">Mike Loukides</a>, as well as from previous conversations with Richard Danzig.</em></p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/ai-sovereignty-and-the-architecture-of-participation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>SaaS Is Not Dead Yet</title>
		<link>https://www.oreilly.com/radar/saas-is-not-dead-yet/</link>
				<comments>https://www.oreilly.com/radar/saas-is-not-dead-yet/#respond</comments>
				<pubDate>Mon, 01 Jun 2026 11:01:35 +0000</pubDate>
					<dc:creator><![CDATA[Mike Loukides]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18822</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/SaaS-is-not-dead-yet.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/06/SaaS-is-not-dead-yet-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
		
				<description><![CDATA[With the rise of agents, many people have been proclaiming that the age of software as a service (SaaS) is over. Who needs to subscribe to a service when you can create your own software with a few English-language prompts and a few dollars spent on tokens? Your own software, most likely a skill that [&#8230;]]]></description>
								<content:encoded><![CDATA[
<p class="wp-block-paragraph">With the rise of agents, many people have been proclaiming that the age of software as a service (SaaS) is over. Who needs to subscribe to a service when you can create your own software with a few English-language prompts and a few dollars spent on tokens? Your own software, most likely a skill that runs in an agent, will have exactly the features you want: no more, no less.</p>



<p class="wp-block-paragraph">But whenever someone talks about the death of SaaS, there’s something wrong with the picture. It’s simply that work is about groups and teams, and so far, programming with agents is about individuals. A related challenge is that SaaS companies are good at building dashboards and generating reports for humans, but agents need the raw data, not a representation of the data.</p>



<p class="wp-block-paragraph">Think about the teamwork required for a good sales team. Someone needs a database to keep track of their customer info. It’s easy to get Claude, Gemini, or GPT to build that, using SQLite for a backend and putting a reasonable web frontend on it. You could also do that fairly quickly with Ruby on Rails, but AI makes it even easier. But what about the salesperson at the next desk? She needs similar CRM software, and she can create it with Claude, Gemini, or GPT. No problem. But it won’t be exactly the same; it will reflect her needs and preferences. Soon you have a team of salespeople in which everyone has their own personal CRM. They’re all similar, but slightly different. They may use different backends (Filemaker, SQLite, MySQL, or maybe a corporate Oracle instance); they have similar-but-slightly-different schemas (one has a single field for customer address, another has separate street, city, state, and country fields); and they don’t interoperate.</p>



<p class="wp-block-paragraph">That’s the simplest possible case. How do you generate company-wide reports if everyone has their own version of the data? How do you know if you’re succeeding or failing if everyone on the team has their own version of the metrics? Everyone has become their own silo.</p>



<p class="wp-block-paragraph">The company is not paying subscription fees to a vendor like Salesforce, but is this really progress? If anything, we need to make sharing data and metrics easier, not more difficult. On top of that, a product like Salesforce has hundreds of features. Most people don’t need most of them, but there’s a good chance that almost everyone needs one feature that nobody else needs. And there’s always the features you don’t know you need, ways to get value from data that you haven’t thought of. There’s value in buying a bundle that goes beyond your immediate requirements.</p>



<p class="wp-block-paragraph">There’s certainly a lot good about enabling people to develop their own tools. I guarantee that if we had Claude Code 30 years ago, I would have vibe-coded my own skills for managing the authors I was working with. I would have vibe-coded some of the crazy tools I wrote to translate from one document format to another. (WordPerfect to troff? Why?) Now that we have agentic programming, I may never write my own tools again. But the SaaS scenario highlights something missing from the agentic picture. We don’t have tools for sharing or collaboration. Nobody buys a Salesforce subscription for themselves. It’s a departmental or corporate resource, shared between many people. And the ability to share easily is precisely what agentic programming lacks. I’ve built some of my own Claude tools and skills, but it’s very difficult to share them with other people at O’Reilly. <a href="https://www.linkedin.com/posts/openai-for-business_today-were-introducing-skills-in-beta-for-activity-7435743335107084288-yHR9/">ChatGPT Skills for Business and Enterprise</a> hints at the ability to share skills among team members and some ability to generate them collaboratively, though it’s hard to find evidence that it delivers. I think we’re seeing a symptom of technological overreach. It’s easy to assume something is &#8220;easy&#8221; when it isn’t: &#8220;You just generate a .md file and put it in the corporate GitHub.&#8221; That process has a lot of friction, particularly for users who aren’t technical.</p>



<p class="wp-block-paragraph">To make skills really useful across a company, we need:</p>



<ul class="wp-block-list">
<li><strong>Sharing.</strong> This can be a Git server that’s registered as a private marketplace and then configured via a corporate administrative dashboard. Publishing skills to the marketplace would remain the province of Git-aware users, and that’s a problem.</li>



<li><strong>Requirements.</strong> We don’t want everyone to build a personal toolset; that’s the problem we’re trying to solve. How do you resolve differences between users who want slightly different things? What does the PRD for a skill look like?</li>



<li><strong>Collaboration.</strong> Aside from Google Docs, the current state of widely used collaboration tools is poor. Suffice it to say that working on different branches of a Git repo and merging changes may work for professional programmers, but not for anyone else.</li>



<li><strong>Testing.</strong> Tests and evals for agents (related, but not the same) are topics that we don’t yet understand well. But if you’re going to empower users to use and create agentic tools for creating projections and writing reports, you need to know they won’t backfire. Skills also behave like any other AI application: They drift over time. Even after they’re published, they need to be evaluated regularly to see if they still perform correctly.</li>



<li><strong>Versioning.</strong> Like any software—and we need to recognize that agentic tools and skills are software, even if they’re written in English—it will be important to update them as requirements change and as LLM behavior drifts. It’s important to keep track of versions and for users to update their skills to the latest version easily. Again, this is a matter of wrapping Git appropriately for nontechnical users.</li>



<li><strong>Security.</strong> Security for intelligent agents is still poorly understood. We know about prompt injection, but we also know that it’s a problem that can’t be solved yet. And attackers are still finding novel ways to inject malicious prompts. What vulnerabilities might agentic skills and tools have if they can access corporate data?</li>
</ul>



<p class="wp-block-paragraph">While the democratization of programming doesn’t threaten SaaS companies, intelligent agents pose a deeper challenge. In “<a href="https://asimovaddendum.substack.com/p/the-salesforce-of-agents-wont-be" target="_blank" rel="noreferrer noopener">The Salesforce of Agents Won’t Be Salesforce, the Google of Agents Won’t Be Google</a>,” Jesus Rodriguez points out that the future for services like Salesforce and Google isn’t web UIs and dashboards; it’s APIs that are designed for agents. These APIs require a different kind of data: not something that a human can glance at to get a quick feel for what’s happening, but “structured state, task objectives, relationship graphs, permissioned memory, machine-readable sales playbooks, and reliable APIs for updating intent.” Humans need the data compression that you get from a dashboard. Agents want the data itself, and they’ll take care of the compression. SaaS companies can become the system of record that is responsible for delivering accurate data. What they need to recognize is that their real customer may not be a human user; the customer will be an agent, and that will affect everything from marketing strategy and product design to pricing.</p>



<p class="wp-block-paragraph">I wouldn’t claim that Salesforce or Google can’t or won’t build APIs to help companies access their own data. SaaS remains relevant, but it’s a different kind of SaaS than we have now. Companies like Salesforce know what data is available and how to work with it. Designing and building the data infrastructure that’s needed to provide next-generation SaaS isn’t trivial, and doing the programming in English rather than C++ doesn’t make it easier. Companies like Salesforce and Google know what needs to be built. They’re likely to offer their own collections of agentic skills as a starting point, alongside APIs. But large, established companies are ripe to be blindsided if they move slowly—and it’s difficult for large institutions to move quickly.</p>



<p class="wp-block-paragraph">SaaS companies have momentum—or inertia, which to a physicist is the same thing. They have to change, but they aren’t threatened by AI, agents, and user-defined skills. Providing APIs that have been designed to provide data in formats that machines can use should be an obvious next step. If they die, it will be because they don’t adapt. But there’s nothing new about that.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/saas-is-not-dead-yet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Open Source Ecosystems</title>
		<link>https://www.oreilly.com/radar/open-source-ecosystems/</link>
				<comments>https://www.oreilly.com/radar/open-source-ecosystems/#respond</comments>
				<pubDate>Fri, 29 May 2026 11:00:08 +0000</pubDate>
					<dc:creator><![CDATA[Ilan Strauss]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18814</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/Open-source-ecosystems.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/Open-source-ecosystems-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[When open strategy meets private tactics]]></custom:subtitle>
		
				<description><![CDATA[The following article originally appeared on the Asimov&#8217;s Addendum Substack and is being reposted here with the author&#8217;s permission. Bill Gurley&#160;has an excellent article on what he calls&#160;open source strategy,&#160;which we recommend reading. There is a lot to debate about his concluding argument in particular: that open-weight models are central to keeping the AI market [&#8230;]]]></description>
								<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>The following article originally appeared on the</em> <a href="https://asimovaddendum.substack.com/p/open-source-ecosystems" target="_blank" rel="noreferrer noopener">Asimov&#8217;s Addendum</a> <em>Substack and is being reposted here with the author&#8217;s permission.</em></p>
</blockquote>



<p class="wp-block-paragraph"><a href="https://p3institute.substack.com/p/from-open-source-software-to-open" target="_blank" rel="noreferrer noopener">Bill Gurley</a>&nbsp;has an excellent article on what he calls&nbsp;<em>open source strategy,&nbsp;</em>which we recommend reading. There is a lot to debate about his concluding argument in particular: that open-weight models are central to keeping the AI market rent-free. The limits of open-weight AI as the primary open source strategy are surely considerable though, if it still requires expensive hardware to run on, and&nbsp;<a href="https://www.oreilly.com/pub/a/tim/articles/architecture_of_participation.html" target="_blank" rel="noreferrer noopener">if the architecture ultimately remains monolithic</a>—rather than composable and protocol-centric.</p>



<p class="wp-block-paragraph">A related consideration comes from Anthropic’s<a href="https://www.anthropic.com/news/anthropic-acquires-stainless" target="_blank" rel="noreferrer noopener">&nbsp;recent acquisition of Stainless</a>—a startup that generates SDKs, command-line tools, and MCP servers from API specifications. This illustrates that open protocols like MCP, even when publicly governed,<sup data-fn="6732a4b0-bcdf-41ae-a355-761cc861ab6b" class="fn"><a href="#6732a4b0-bcdf-41ae-a355-761cc861ab6b" id="6732a4b0-bcdf-41ae-a355-761cc861ab6b-link">1</a></sup>&nbsp;remain exposed at their complementary layers to private actors capturing rents. (Protocol openness does not eliminate this and instead probably enables it, by enabling market growth).</p>



<p class="wp-block-paragraph">We asked Claude to analyze this acquisition, going beyond the press releases. Its first pass overstated parts of the competitive-denial story; what follows is what survived it taking a closer look:</p>



<ol class="wp-block-list">
<li><strong>Complement capture, not protocol capture.</strong>&nbsp;MCP—the standard that lets AI agents talk to other software—remains open, and its governance has been handed to an independent foundation. What Anthropic bought is the company that turned that standard into something most developers could actually use.&nbsp;<em>Stainless was the dominant tool for taking an ordinary business API</em>&nbsp;(say, a hotel booking system or a customer database) and converting it into something an AI agent could call through MCP. The open standard is still open. The path most developers walked to use it has now been bought.<br></li>



<li><strong>This isn’t a one-off—the whole layer is consolidating.</strong>&nbsp;Stainless wasn’t alone in this market. Its main competitor, Fern, was<a href="https://buildwithfern.com/post/stainless-pricing-alternatives" target="_blank" rel="noreferrer noopener">&nbsp;bought by Postman in January 2026</a>. Anthropic bought Stainless four months later, in May 2026. That leaves&nbsp;<a href="https://www.speakeasy.com/" target="_blank" rel="noreferrer noopener">Speakeasy</a>&nbsp;as the only major independent player, plus an open-source fallback called&nbsp;<a href="https://openapi-generator.tech/" target="_blank" rel="noreferrer noopener">OpenAPI Generator</a>&nbsp;that most developers consider too rough for production use without significant manual work. In under five months, two of the three serious companies in this part of the market have been absorbed into larger platforms.&nbsp;<em>The Stainless deal is more visible because of who bought it and why, but the broader pattern matters more: an entire layer of AI infrastructure is being pulled inside platform owners</em>.<br></li>



<li><strong>Moat migration.</strong> The gap in raw model capability between Anthropic, OpenAI, and Google has narrowed considerably and continues to close, and the implication is that model quality alone is unlikely to be the principal basis of competitive advantage over the next two years. What may distinguish the leading firms instead <em>is the quality of the developer experience around their models: how easily a business or an engineer can build something useful on top of a given model, how cleanly the tooling integrates with existing systems, and how reliable the connectors are over time.</em></li>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Stainless was founded by Alex Rattray, formerly of Stripe.&nbsp;<em>Stripe built its market position largely on unusually well-designed developer tools</em>, and Stainless was, in effect, an attempt to apply the same approach to the layer between AI APIs and the rest of the software economy. Anthropic has acquired the team that knows how to do this.</p>
</blockquote>



<li><strong>Pricing logic, with caveats on denial.</strong>&nbsp;Stainless was last valued at&nbsp;<a href="https://www.analyticsinsight.net/news/anthropic-acquires-stainless-for-over-300m-to-strengthen-ai-sdk-and-tool-access" target="_blank" rel="noreferrer noopener">$150M in December 2025</a>; at &gt;$300M five months later, this is a roughly 2x strategic markup, not acqui-hire arithmetic. Removing a critical-path external dependency on Anthropic’s own SDKs, while denying it to a tight set of competitors, is rational at that price—but the denial logic is partial.&nbsp;<em>Speakeasy is a viable substitute, and OpenAI was reportedly already migrating off Stainless. The friction tax falls hardest on smaller players who lack the engineering bench to absorb migration cost</em>.</li>
</ol>



<p class="wp-block-paragraph">…The press release calls it “extending reach”; the <em>InfoWorld</em> read—“last-mile developer experience”—is closer, but the complement-capture component, even if partial, is real.</p>



<p class="wp-block-paragraph">-*-</p>



<p class="wp-block-paragraph">Now, while Claude might be overstating some of the market risks associated with this acquisition (you tell us?), it shows that open source’s impacts are highly conditional on its dependencies and should never be analyzed in isolation from the market’s software stack and architecture. This is equally true for open weight models—being dependent on data, compute, and distribution—as it is for open protocols like MCP, dependent on constant API translations and access. Tracking those interdependencies is what a full ecosystem view involves and is helpful to undertake in order to consider where chokepoints might arise, and in turn, where&nbsp;<em>open source strategy</em>&nbsp;might eventually fail or be captured.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">Footnotes</h3>


<ol class="wp-block-footnotes"><li id="6732a4b0-bcdf-41ae-a355-761cc861ab6b">In this case by the<a href="https://www.linuxfoundation.org/press/agentic-ai-foundation" target="_blank" rel="noreferrer noopener"> Agentic AI Foundation under the Linux Foundation</a> <a href="#6732a4b0-bcdf-41ae-a355-761cc861ab6b-link" aria-label="Jump to footnote reference 1"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/21a9.png" alt="↩" class="wp-smiley" style="height: 1em; max-height: 1em;" />︎</a></li></ol>]]></content:encoded>
							<wfw:commentRss>https://www.oreilly.com/radar/open-source-ecosystems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Your AI Agent Already Forgot Half of What You Told It</title>
		<link>https://www.oreilly.com/radar/your-ai-agent-already-forgot-half-of-what-you-told-it/</link>
				<pubDate>Thu, 28 May 2026 10:59:36 +0000</pubDate>
					<dc:creator><![CDATA[Andrew Stellman]]></dc:creator>
						<category><![CDATA[AI & ML]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">https://www.oreilly.com/radar/?p=18803</guid>

		
					<media:content 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/Your-AI-agent-already-forgot-half-of-what-you-told-it.jpg" 
				medium="image" 
				type="image/jpeg" 
				width="2304" 
				height="1792" 
			/>

			<media:thumbnail 
				url="https://www.oreilly.com/radar/wp-content/uploads/sites/3/2026/05/Your-AI-agent-already-forgot-half-of-what-you-told-it-160x160.jpg" 
				width="160" 
				height="160" 
			/>
		
				<custom:subtitle><![CDATA[How to keep agents and skills from losing track mid-workflow]]></custom:subtitle>
		
				<description><![CDATA[This is the seventh article in a series on agentic engineering and AI-driven development.&#160;Read part one&#160;here, part two&#160;here, part three&#160;here, part four&#160;here, part five&#160;here, and part six here. This is the latest article in my Radar series on AI-driven development and agentic engineering, and I have to admit that this one took a bit of [&#8230;]]]></description>
								<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>This is the seventh article in a series on agentic engineering and AI-driven development.&nbsp;Read part one&nbsp;<a href="https://www.oreilly.com/radar/the-accidental-orchestrator/" target="_blank" rel="noreferrer noopener">here</a>, part two&nbsp;<a href="https://www.oreilly.com/radar/keep-deterministic-work-deterministic/" target="_blank" rel="noreferrer noopener">here</a>, part three&nbsp;<a href="https://www.oreilly.com/radar/the-toolkit-pattern/" target="_blank" rel="noreferrer noopener">here</a>, part four&nbsp;<a href="https://www.oreilly.com/radar/ai-is-writing-our-code-faster-than-we-can-verify-it/" target="_blank" rel="noreferrer noopener">here</a>, part five&nbsp;<a href="https://www.oreilly.com/radar/ai-code-review-only-catches-half-of-your-bugs/" target="_blank" rel="noreferrer noopener">here</a></em>, <em>and part six <a href="https://www.oreilly.com/radar/why-doesnt-anyone-teach-developers-about-context-management/" target="_blank" rel="noreferrer noopener">here</a>.</em></p>
</blockquote>



<p class="wp-block-paragraph">This is the latest article in my Radar series on AI-driven development and agentic engineering, and I have to admit that this one took a bit of a turn I wasn&#8217;t expecting.</p>



<p class="wp-block-paragraph">In my <a href="https://www.oreilly.com/radar/why-doesnt-anyone-teach-developers-about-context-management/" target="_blank" rel="noreferrer noopener">last article</a> I talked about context and context management and I promised to give you some real practical tips for using it. It was originally meant to be about specific, practical context management techniques that were really helpful to me building <a href="https://github.com/andrewstellman/octobatch" target="_blank" rel="noreferrer noopener">Octobatch</a> and the <a href="https://github.com/andrewstellman/quality-playbook" target="_blank" rel="noreferrer noopener">Quality Playbook</a>, two open source projects where I work with AIs to plan and orchestrate all of the work and every line of code is written by AI tools like Claude Code and Cursor.</p>



<p class="wp-block-paragraph">But as I was writing this, I found that I&#8217;d adapted those same techniques to my work writing articles like this one. Which is surprising! I&#8217;ve been doing all this work finding ways to help people developing AI skills improve context management, so their skills run more efficiently. It turns out that those same exact techniques apply to anyone using AI tools, even when you&#8217;re using chatbots like Claude.ai or ChatGPT.</p>



<p class="wp-block-paragraph">Full disclosure: I use multiple AI tools to manage this article series. My primary tools are Claude Cowork for brainstorming and managing my article research, notes, and backlog and Gemini&#8217;s mobile app for reading drafts aloud and taking my notes while I&#8217;m away from my desk. And I want to tell you about something that happened while I was using those tools, because I think it really helps show why context management isn&#8217;t just a problem for developers.</p>



<p class="wp-block-paragraph">While I was writing this article, I was using Gemini&#8217;s mobile app to read the draft aloud and take my notes. Partway through the session I asked it to go back and check whether there were earlier notes it hadn&#8217;t incorporated yet. It told me it didn&#8217;t have access to the previous notes, which seemed weird and insane, since we had <em>just taken those notes a few prompts earlier in the session</em>. I could scroll back up and see them earlier in the conversation, but somehow it didn&#8217;t &#8220;know&#8221; about them.</p>



<p class="wp-block-paragraph">Here&#8217;s what happened. Gemini had compacted our conversation without telling me, and the notes from the first half of the session were just&#8230; gone.</p>



<p class="wp-block-paragraph">If you&#8217;ve ever had a web chat AI just seem to forget things you talked about earlier, you&#8217;ve experienced context compaction, just like I did. Understanding even the basics of context and context windows can make a big difference in preventing that kind of frustration.</p>



<p class="wp-block-paragraph">This all reminded me of something I wrote more than two decades ago in <em><a href="https://learning.oreilly.com/library/view/applied-software-project/0596009488/" target="_blank" rel="noreferrer noopener">Applied Software Project Management</a></em> (back in 2005!): &#8220;Important information is discovered during the discussion that the team will need to refer back to during the development process, and if that information is not written down, the team will have to have the discussion all over again.&#8221;</p>



<p class="wp-block-paragraph">Jenny Greene and I wrote that about human teams and project meetings, but it applies to AI sessions just as well.</p>



<p class="wp-block-paragraph">Which brings me back to context, which I wrote about in my last article, and which I&#8217;ll write more about in the next one, because it&#8217;s one of the most important concepts to keep top of mind when working with AI.</p>



<h3 class="wp-block-heading"><strong>Context loss may be invisible, but that doesn&#8217;t make it any less frustrating</strong></h3>



<p class="wp-block-paragraph"><strong>Context</strong> is everything the AI is holding in its working memory during a conversation: what you&#8217;ve told it, what it&#8217;s told you, any files or instructions it&#8217;s read, and whatever internal notes the system has made along the way. All of that lives in a fixed-size <strong>context window</strong>—think of that as your AI&#8217;s short-term memory, the stuff it&#8217;s thinking about right now—and when the window fills up, the AI has to start letting things go. Different tools handle this differently: Some truncate older messages, some compress the conversation into a summary (which means details get lost even though the summary looks complete), and some just start behaving inconsistently so you can&#8217;t tell whether the AI forgot something or never understood it in the first place. The result is the same: The AI loses track of things you told it, decisions you made together, or details it noticed earlier in the session. And it won&#8217;t tell you it forgot. It&#8217;ll just keep generating confident-sounding output based on whatever it still has.</p>



<p class="wp-block-paragraph">Before we dive in a little deeper, I want to do a quick jargon check. If you&#8217;ve seen the terms &#8220;skills&#8221; and &#8220;agents&#8221; floating around but aren&#8217;t sure what they are, think of skills as libraries for AIs and agents as interactive executables. Those aren&#8217;t perfectly precise definitions, but if you&#8217;re a developer they&#8217;re close enough for this discussion.</p>



<p class="wp-block-paragraph">When you&#8217;re coding skills and agents, you run into context problems quickly. The work you&#8217;re asking the AI to do is often complex enough that the context window fills up, and the AI has to start compacting: compressing or dropping older parts of the conversation to make room for new ones. Compaction always seems to happen at the most frustrating and inconvenient time, which makes sense when you think about it. You hit context limits precisely when you&#8217;ve put the most information into the conversation, which is exactly when losing that information costs you the most.</p>



<p class="wp-block-paragraph">That&#8217;s why I think it can often help to think of AIs as having the same shortcomings that human teams do, except those shortcomings are exaggerated by their AI nature. A person who forgets something from a meeting last week might remember it when you remind them. An AI that lost something to context compaction won&#8217;t, because the information is gone. But there&#8217;s something you can do about it, and it turns out the techniques that help are the same whether you&#8217;re building autonomous AI skills or just trying to get a chatbot to remember what you told it 20 minutes ago.</p>



<p class="wp-block-paragraph">I&#8217;ve landed on four techniques that I come back to over and over again. Each one exists because at some point the AI forgot something important and I responded by putting that thing in a file where it couldn&#8217;t be forgotten. None of them require special tooling. And to my surprise, all of these techniques have turned out to be useful for both building software and managing a writing project like this one, whether I&#8217;m chatting with Claude, ChatGPT, or Gemini, or using a desktop tool like Claude Cowork or Codex. These are the techniques I find most valuable:</p>



<ul class="wp-block-list">
<li><strong>Split discovery from documentation:</strong> Don&#8217;t ask the AI to figure something out and produce polished output in the same pass.</li>



<li><strong>Use handoff documents, not continuation prompts:</strong> Before closing a stale session, have the AI write down everything the next session needs to know.</li>



<li><strong>Give the AI an acceptance criterion, not a procedure:</strong> Tell it what &#8220;done&#8221; looks like instead of spelling out the steps.</li>



<li><strong>Use spec documents as the bridge between AI tools:</strong> Make a shared document the single source of truth that all your tools read from.</li>
</ul>



<h3 class="wp-block-heading"><strong>Split discovery from documentation</strong></h3>



<p class="wp-block-paragraph">When you ask an AI to do something complex, you&#8217;re often asking it to do two things at once without realizing it. You&#8217;re asking it to figure something out and produce polished output at the same time. The problem is that figuring things out takes attention, and producing output takes attention, and the model only has so much of it. When you combine both tasks in the same prompt, the model starts cutting corners on one of them, and you can&#8217;t tell which one it shortchanged.</p>



<p class="wp-block-paragraph">I ran into this with the <a href="https://github.com/andrewstellman/quality-playbook" target="_blank" rel="noreferrer noopener">Quality Playbook</a>, an open source AI coding skill I built that runs structured code reviews against any codebase. One of the things it does is derive requirements from source code: It reads through the code, identifies what the code promises to do (I call these behavioral contracts), and then produces a requirements document. Originally this all happened in a single pass. The problem was that single-pass requirement generation ran out of attention after about 70 requirements. The model forgot behavioral contracts it had noticed earlier in the code, and the forgetting was completely invisible. There was no stack trace or error message, just incomplete output and no way to know what was missing. I fixed it by splitting the work into two separate prompts:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>Read each source file and write down every behavioral contract you observe as a simple list in CONTRACTS.md.</em></p>



<p class="wp-block-paragraph"><em>Read CONTRACTS.md and the documentation, then derive requirements from them and write REQUIREMENTS.md.</em></p>
</blockquote>



<p class="wp-block-paragraph">Then a third pass checks whether every contract has a corresponding requirement, and if there are gaps, goes back to step one for the files with gaps.</p>



<p class="wp-block-paragraph">The key idea is that CONTRACTS.md is external memory. When the model &#8220;forgets&#8221; about a behavioral contract it noticed earlier, that forgetting is normally invisible. With a contracts file, every observation is written down before any requirements work begins, so an uncovered contract is a visible, greppable gap. You can see what was forgotten and fix it.</p>



<p class="wp-block-paragraph">The principle: Don&#8217;t ask the AI to figure out what exists and write formatted output in the same pass. The model runs out of attention trying to do both at once. Whenever you&#8217;re asking an AI to do something complex, consider whether you&#8217;re actually asking it to do two things at once. &#8220;Analyze this codebase and write a report&#8221; is two tasks. &#8220;Read this document and suggest improvements&#8221; is two tasks. Split them, and let the first pass write its observations to a file before the second pass starts working with them.</p>



<h3 class="wp-block-heading"><strong>Use handoff documents, not continuation prompts</strong></h3>



<p class="wp-block-paragraph">Anyone who&#8217;s spent a long session with an AI coding tool has felt the moment when the context starts to go stale. The AI stops tracking details it was handling fine an hour ago, or it contradicts something it said earlier. The session gets slow, and you&#8217;re often restarting because the AI seems to have gotten bogged down and filled up on what you told it. You get the sense that if you keep going, you&#8217;re going to spend more time correcting it than making progress.</p>



<p class="wp-block-paragraph">Most developers respond to their session getting too long in one of two ways: They push through the problem, or they start a fresh one and try to reexplain everything from scratch. Both of those approaches can cause the AI to lose context. The first loses it to compaction; the second loses it to incomplete reexplanation. And both are frustrating! Specifically because you just spent so much time building up all that context with the AI.</p>



<p class="wp-block-paragraph">There&#8217;s a third option. Before you close the session, ask the AI to write a handoff document: a file that captures everything the next session needs to know, written while the current session still has full context. The key is that you&#8217;re asking the AI to write this while the relevant details are still fresh in the working context, and in a way that it or another AI can read.</p>



<p class="wp-block-paragraph">I built this into the Quality Playbook as a core part of how phases communicate. When I split the playbook from a single prompt to independent phases, I needed each phase to run as a completely independent session with no context carryover. So each phase got its own kickoff prompt as a standalone file. Here&#8217;s the structure each one follows:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>Write a handoff document that a fresh session could use to pick up this work cold. Include everything it would need to know.</em></p>
</blockquote>



<p class="wp-block-paragraph">Every kickoff opens with what prior phases accomplished, includes explicit boundaries about what&#8217;s frozen, and names which future phase owns each piece of remaining work, because without it the AI will helpfully start doing Phase 3 work while you&#8217;re still in Phase 2. Each phase also ends with a required forward-looking handoff where the completing agent writes down what the next session needs to know.</p>



<p class="wp-block-paragraph">The principle: Each handoff is a complete state snapshot. The incoming AI agent never needs to read prior kickoff prompts or chat history. Everything it needs is in the current handoff file: current state, uncommitted changes, immediate next task, pending tasks, file locations, and anything that was discovered during the prior session. A fresh AI session can pick it up cold.</p>



<p class="wp-block-paragraph">If you&#8217;re deep into a Claude Code or Copilot session and you can feel the context getting stale, ask the AI to write a handoff document before you close the session. Tell it to include everything a fresh session would need to continue the work. Then start a new session and point it at that file. A fresh session with a good handoff document will usually outperform a stale session, because it&#8217;s starting with clean context instead of compacted, fragmented context.</p>



<h3 class="wp-block-heading"><strong>Give the AI an acceptance criterion, not a procedure</strong></h3>



<p class="wp-block-paragraph">When you give an AI a multistep task, the natural instinct is to spell out the steps. First do this, then do that, then combine the results. The problem is that step-by-step procedures are the first thing the AI forgets when the context window fills up. It&#8217;ll skip steps, merge phases, or quietly drop tasks, and there&#8217;s nothing in the procedure itself that would help the AI notice what it missed. The procedure tells the AI what to do, but it doesn&#8217;t tell the AI what &#8220;done&#8221; looks like.</p>



<p class="wp-block-paragraph">I learned this the hard way with the Quality Playbook. The playbook runs multiple iteration passes over a codebase, and the results need to be cumulative. It keeps a list of all the bugs it finds in the code being tested in a file called BUGS.md. Early on, I gave the AI a procedure to run four times and then update that file:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>First run the main pass, then run four iteration passes, then merge the findings into BUGS.md.</em></p>
</blockquote>



<p class="wp-block-paragraph">The AI did not respond well to that instruction.</p>



<p class="wp-block-paragraph">It turns out that when you ask an AI to do a very complex task a specific number of times, it can lose count. In fact, from my experimentation, it seems that count is one of the first casualties of context compaction. Most of the time the AI decided three iterations was enough, or merged findings from only two passes, and no matter how many different ways I tried to rephrase that instruction, there was nothing I could come up with that prevented the problem.</p>



<p class="wp-block-paragraph">However, everything changed when I replaced the &#8220;run four times&#8221; instruction with an <strong>acceptance criterion</strong>, or a specific condition that tells the AI when to stop looping:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>You are done only when BUGS.md contains the cumulative findings from the main run plus all four itration passes.</em></p>
</blockquote>



<p class="wp-block-paragraph">Even when the AI lost track of intermediate steps, it could check the output against the criterion and know whether it was finished. And I could verify the output against the same criterion, which gave me a way to audit the agent&#8217;s work without watching every step.</p>



<p class="wp-block-paragraph">In developer terms, the AI is really bad at loops like <em>for (i = 0; i &lt; 4; i++)</em> because it loses track of the value of the iterator <em>i</em> when it compacts its context. But it&#8217;s really good at loops like <em>while (!done)</em> because it can check <em>done</em> based on the current state without relying on history.</p>



<p class="wp-block-paragraph">The principle behind all this is that an acceptance criterion survives context pressure because the AI can always check &#8220;Am I done?&#8221; against a concrete test. This is actually the same principle behind test-driven development: write the test before the code so you know when you&#8217;re done. The acceptance criterion is the test for your AI session. When you&#8217;re giving an AI a task that has multiple steps, don&#8217;t describe the steps. Describe what &#8220;done&#8221; looks like, and let the AI figure out how to get there.</p>



<h3 class="wp-block-heading"><strong>Use spec documents as the bridge between AI tools</strong></h3>



<p class="wp-block-paragraph">Most developers working with AI don&#8217;t use just one tool. You might use Claude for design, Cursor for coding, and Copilot for quick edits. You might even use multiple models inside the same tool, like GPT-5.5 and Opus 4.7 in separate Copilot chats inside VS Code. It&#8217;s common to have one model for coding, another for review, and a third for orchestration and project management. The problem is that none of these tools or chats know what you told the others. Claude doesn&#8217;t know what you decided with Cursor. Two separate Copilot chats in the same editor don&#8217;t share context. You&#8217;re the one carrying context between them, and that&#8217;s exactly the kind of lossy handoff that causes drift. A design decision you made in one conversation gets lost or distorted by the time it reaches the tool that needs to implement it.</p>



<p class="wp-block-paragraph">The fix is to make the spec document the single source of truth that all your AI tools read from. I used this when building a game prototype, where I had Claude handling design and planning and Cursor doing the coding. They never talked to each other directly, so the spec documents served as the shared contract: Claude wrote the specs, and Cursor read them. The rule I followed was simple:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>Never tell the AI coder something that isn&#8217;t already in the specs. If you make a design decision in conversation, write it into the spec first, then point the coder at the spec.</em></p>
</blockquote>



<p class="wp-block-paragraph">If I made a design decision in a conversation with Claude, that decision had to be written into the spec before I told Cursor about it. If I discovered something during implementation, I wrote it into the appropriate doc first, then pointed the coder at it. The spec was always the single source of truth. When Claude and I changed the wound topology (removing one wound type, promoting another), we updated the docs first, then told Cursor to reread them. When we decided to add a new UI element, we wrote it into the UI spec first, then told Cursor to reread the doc.</p>



<p class="wp-block-paragraph">The key was including rationale in the specs. Not just &#8220;show 5 progressive labels&#8221; but why: &#8220;The player shouldn&#8217;t be told what they&#8217;re fighting. They should discover it.&#8221; This helps the AI coder make better decisions when the spec doesn&#8217;t cover an edge case because it knows the intent behind the requirement.</p>



<p class="wp-block-paragraph">The principle: The spec document is the shared context that all your tools can read. It prevents the drift that happens when design intent lives only in chat history that the other tool can&#8217;t see. This technique works any time you&#8217;re using more than one AI tool on the same project, which at this point is most projects.</p>



<h3 class="wp-block-heading"><strong>How these techniques combine: Managing this article series</strong></h3>



<p class="wp-block-paragraph">Those four practices came out of AI-driven development work, but they apply to almost any AI work. And while these techniques emerged for me while working on agents and skills, I think it&#8217;s valuable to demonstrate them in a nondevelopment context, so I&#8217;ll share an example from my work on the article series you&#8217;re reading now.</p>



<p class="wp-block-paragraph">Over time, the process for how my AI assistant and I manage this article backlog evolved organically in conversation, but it was never written down anywhere except in the AI&#8217;s context window. Which means every time the session compacted or I started a fresh chat, the process was gone and I had to reexplain it. I caught this when the AI did something slightly wrong and I wanted to confirm we were on the same page. So I asked:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>Every time I suggest a new article idea, you add an entry to the backlog, and then create a new markdown file with the source material, right?</em></p>
</blockquote>



<p class="wp-block-paragraph">That&#8217;s split discovery from documentation. I didn&#8217;t say &#8220;document our process.&#8221; I said &#8220;confirm what we do.&#8221; Discovery first, then documentation as a separate step. If I&#8217;d said &#8220;write up our process&#8221; without confirming first, the AI might have written something plausible but wrong, and I wouldn&#8217;t have caught the discrepancy.</p>



<p class="wp-block-paragraph">Once we&#8217;d confirmed the process, I asked the AI to create two files. <strong>AGENTS.md</strong> is an emerging standard for AI-readable project context—a single file that tells any AI session what it needs to know about a project. You can learn more about the convention at <a href="https://agents.md/" target="_blank" rel="noreferrer noopener">agents.md</a>. <strong>CONTEXT.md</strong> serves a similar role as a bootstrapping document—it&#8217;s less established as a standard, but the practice of asking the AI to dump everything it knows into a context file so the next session can pick it up cold has been one of the most valuable habits I&#8217;ve developed. Here&#8217;s the prompt I used:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>Update the backlog file to explain what it is and how we maintain it. Create a CONTEXT.md with everything you&#8217;d need to bootstrap a new chat. Create an AGENTS.md to make it easy to bootstrap with a single-line prompt.</em></p>
</blockquote>



<p class="wp-block-paragraph">That prompt is a handoff document. I was explicitly asking the AI to write down everything it knew while it still had full context, specifically because I knew that context would be lost to compaction. The CONTEXT.md file is a handoff from this session to whatever fresh session picks up the work next week.</p>



<p class="wp-block-paragraph">Notice what I didn&#8217;t say. I didn&#8217;t give step-by-step instructions for what should go in those files. I said &#8220;everything you would need to bootstrap this process again in case we lost it&#8221; and &#8220;a complete dump of all of the context you would need to bootstrap a new chat and get it to the point where this current chat is.&#8221; Those are acceptance criteria, not procedures. The AI had to figure out what belonged in those files. If I&#8217;d given it a procedure (&#8220;first write the publication history, then the voice rules, then the file locations&#8221;), it would have followed the list and missed anything I forgot to include. The acceptance criterion is harder to satisfy but more robust: the test is &#8220;Could a fresh session bootstrap from these files alone?&#8221;</p>



<p class="wp-block-paragraph">And the AGENTS.md file itself is a spec document as a bridge between tools. It&#8217;s the shared contract that any AI session, whether it&#8217;s Claude, Gemini, Cowork, or a fresh chat, can read to get aligned with the project. This session wrote it; the next session reads it. The two sessions never communicate directly, so the spec file bridges the gap between them.</p>



<p class="wp-block-paragraph">That&#8217;s all four practices in two prompts, applied to something as ordinary as managing a writing project. It didn&#8217;t require pipelines or codebases or batch orchestration. The practices work because they solve the same underlying problem regardless of the domain: important information living in the AI&#8217;s context window instead of on disk.</p>



<h3 class="wp-block-heading"><strong>Context management is a development skill</strong></h3>



<p class="wp-block-paragraph">Every practice I&#8217;ve described in this article and the last one is something developers have always been told to do: write things down, record your rationale, be deliberate about what you save and what you let go, write ADRs and design docs and inline comments explaining nonobvious choices. We&#8217;ve always known we should do more of it. When you&#8217;re working with AI, the cost of not doing it becomes immediate and visible.</p>



<p class="wp-block-paragraph">The practices in this article all come down to the same thing: putting the important information in files where compaction can&#8217;t touch it, so you can see what the AI knows and verify that it matches reality. In the next article, I&#8217;ll go deeper on the debugging angle: how to use externalized files to understand what your AI is actually doing, with practical techniques that work even if you&#8217;re not building agents but are just using a chatbot.</p>



<p class="wp-block-paragraph"><em>The <a href="https://github.com/andrewstellman/quality-playbook" target="_blank" rel="noreferrer noopener">Quality Playbook</a> is open source and works with GitHub Copilot, Cursor, and Claude Code. It&#8217;s also available as part of <a href="https://awesome-copilot.github.com/#file=skills%2Fquality-playbook%2FSKILL.md" target="_blank" rel="noreferrer noopener">awesome-copilot</a>.</em></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><em>Disclosure: Aspects of the approach described in this article are the subject of US Provisional Patent Application No. 64/044,178, filed April 20, 2026 by the author. The open source Quality Playbook project (Apache 2.0) includes a patent grant to users of that project under the terms of the Apache 2.0 license.</em></p>
]]></content:encoded>
										</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 93/101 objects using Memcached
Page Caching using Disk: Enhanced (Page is feed) 
Minified using Memcached

Served from: www.oreilly.com @ 2026-06-11 11:02:09 by W3 Total Cache
-->