<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Luhui Dev</title>
    <description>The latest articles on DEV Community by Luhui Dev (@luhuidev).</description>
    <link>https://dev.to/luhuidev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3812586%2Fae3fdf39-429c-4db4-8f7a-71835412451a.jpeg</url>
      <title>DEV Community: Luhui Dev</title>
      <link>https://dev.to/luhuidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luhuidev"/>
    <language>en</language>
    <item>
      <title>The Bumps and Bruises of Building Multi-Agent Systems</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Fri, 04 Sep 2026 11:02:38 +0000</pubDate>
      <link>https://dev.to/luhuidev/the-bumps-and-bruises-of-building-multi-agent-systems-57gd</link>
      <guid>https://dev.to/luhuidev/the-bumps-and-bruises-of-building-multi-agent-systems-57gd</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When you first build a Multi-Agent system, its form is very appealing.&lt;/p&gt;

&lt;p&gt;One agent plans, another executes, and a third reviews. Add a researcher, programmer, tester, and supervisor, and the console fills with tasks, messages, and tool calls. Several agents running at once looks impressively professional.&lt;/p&gt;

&lt;p&gt;But the deeper I went, the clearer the other side became: &lt;strong&gt;the work is split, but responsibility is not; messages are sent, but information is not actually acted on; the review flow finishes, but the result is still unusable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With one agent, failures are usually legible. It misunderstood the request, a tool call failed, or it wrote incorrect code. You can normally trace one execution path back to the cause. Multi-Agent systems distribute the failure across task decomposition, context transfer, shared state, role permissions, and acceptance criteria. A mundane failure at the end may have started ten turns earlier.&lt;/p&gt;

&lt;p&gt;After building Plan-Exec flows, adding Supervisors to execution agents, and following experiments from Anthropic, Google, and Cursor, I have settled on one view:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-Agent does not turn one smart person into a company. It turns one model's problems into a set of organizational problems.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here are seven practical lessons.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Five named roles do not mean a task can be divided into five parts
&lt;/h2&gt;

&lt;p&gt;The easiest thing to do in Multi-Agent design is define roles: a product manager understands the request, an architect designs the solution, a programmer writes code, a tester validates it, and a CEO makes the final decision.&lt;/p&gt;

&lt;p&gt;It reads well because it copies the shape of a human organization. In execution, it often does not work that way.&lt;/p&gt;

&lt;p&gt;While designing a Plan-Exec workflow, I saw a Planner produce a seemingly complete task list while the Executor had no idea what verifiable artifact each step should produce. One task said “analyze the geometric relationships in the image”; another said “draw the figure from the analysis.” But nobody specified whether the first agent should return prose, a structured relation graph, or executable geometry DSL. The first agent wrote an analysis; the second looked at the image again. &lt;strong&gt;The division of labor added only one more act of retelling.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In an analysis of seven Multi-Agent systems and more than two hundred execution traces, the Berkeley team found that about 41.77% of failures were specification and system-design failures: agents disregarding requirements, ineffective roles, repeated steps, lost context, and ambiguous completion.[1]&lt;/p&gt;

&lt;p&gt;The issue is not that role names lack detail. Human roles come with accumulated experience, responsibility boundaries, professional standards, and shared defaults. Putting “you are a senior test engineer” in a system prompt adds linguistic context; it does not create those institutions.&lt;/p&gt;

&lt;p&gt;Roles are narrative. Interfaces are engineering. If a subtask has no clear input, output, completion criterion, and failure state, it should not be handed to another agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Apparently parallel tasks often hide an unbreakable chain of thought
&lt;/h2&gt;

&lt;p&gt;Multi-Agent systems work well for research, and that is unsurprising. Investigating dozens of companies, searching several repositories for vulnerabilities, or collecting scattered facts from many pages can be split by object or direction. One unsuccessful branch does not break the others.&lt;/p&gt;

&lt;p&gt;But Anthropic's Research team explicitly notes that tasks with extensive shared context and mutual dependencies are not a good fit for today's Multi-Agent systems. Coding is especially relevant: the truly independent pieces are usually fewer than they first appear.[2]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parallelism can shorten the amount of work. It cannot shorten dependencies.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Google Research reached a similar conclusion across 180 agent configurations. On financial tasks that supported parallel analysis, centralized Multi-Agent systems outperformed one agent by 80.9%. On PlanCraft, which emphasizes continuous planning, every Multi-Agent architecture declined by 39% to 70%.[3]&lt;/p&gt;

&lt;p&gt;Every handoff needs the current state to be explained again. One agent compresses its full judgment into an output; the next reconstructs the situation from that output. Continuous reasoning becomes fragments, and the system spends more tokens explaining itself than solving the task.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. As agent count grows, duplicate work grows first
&lt;/h2&gt;

&lt;p&gt;Multi-Agent logs create an easy illusion: agents search simultaneously, the Supervisor issues tasks, executors call tools in turns, and the interface continuously says “analyzing,” “validating,” and “improving.” The system looks busy.&lt;/p&gt;

&lt;p&gt;Look closer and you often find similar search results, equivalent analyses, and project context repeatedly read by different agents. More tokens were spent, but not proportionally more information was produced.&lt;/p&gt;

&lt;p&gt;MAST reports repeated steps as its most common individual failure, at 17.14%. One plain example: a user asked for the first ten tracks of a playlist. The Spotify agent could return all of them at once, but the orchestrator had ten exchanges and retrieved one track each time.[1]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is usually not a missing model capability. It is a system that does not know the right granularity for allocating work.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is another pattern in development. A Supervisor sees a wrong output and gives broad natural-language feedback. The Executor cannot locate a particular defect, so it reruns the entire task. The new result differs slightly, the Supervisor checks again, and neither agent repairs a known issue. They merely sample the same area repeatedly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some Multi-Agent systems are not collaborating. They are manufacturing reading material for one another.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Give a task pool to autonomous agents, and hard work often gets no owner
&lt;/h2&gt;

&lt;p&gt;An attractive design lets equal agents inspect a shared task pool and decide what to do next. It matches the intuition of &lt;strong&gt;emergent collaboration&lt;/strong&gt;: no fixed flow, just agents claiming work, updating state, and waiting for each other's output.&lt;/p&gt;

&lt;p&gt;Cursor tried this in long-running coding experiments. Agents coordinated through shared files and locks intended to prevent duplicate claiming. Agents held locks for a long time, forgot to release them, exited while holding them, or edited files without taking them. With twenty agents, effective throughput was equivalent to only one to three agents; most time was spent waiting.&lt;/p&gt;

&lt;p&gt;Removing pessimistic locking and switching to optimistic concurrency reduced file contention, but brought back ownership problems. Agents selected local, safe, easy changes; no one took on the difficult, risky core work. Small commits accumulated while the hardest part of the project did not move.[4]&lt;/p&gt;

&lt;p&gt;This resembles diffusion of responsibility in human organizations. The difference is that an agent feels neither deadline pressure nor career consequences for avoiding difficult work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A final delivery cannot emerge reliably from workers with no final owner.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Information posted to the group is not information known by the system
&lt;/h2&gt;

&lt;p&gt;In Multi-Agent systems, a crucial fact often appears but has no effect on later actions.&lt;/p&gt;

&lt;p&gt;MAST records a case where a Phone Agent discovered a special API requirement for username format but did not communicate that constraint explicitly to the Supervisor. The Supervisor did not ask, kept trying the wrong format, and the task failed.[1]&lt;/p&gt;

&lt;p&gt;I see this regularly in real execution. A Supervisor notices a wrong point in a geometry figure but says only “the figure does not fully match the prompt,” so the execution agent adjusts line styling. An agent discovers a contradiction in the requirements but places it as an ordinary note at the end of its response; the next agent continues with the original plan.&lt;/p&gt;

&lt;p&gt;Natural-language messages carry tone, priority, and an action cue for people. An agent receives only context. Unless the system explicitly distinguishes constraints, decisions, and blockers, &lt;strong&gt;it may not understand why a fact matters.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Copying one model ten times creates ten similar blind spots
&lt;/h2&gt;

&lt;p&gt;We often assume that if one agent can be wrong, three agents voting must be safer; if an execution agent misses an issue, a Reviewer will find it. That logic requires their errors to be relatively independent.&lt;/p&gt;

&lt;p&gt;When agents use the same model, similar prompts, and the same source material, &lt;strong&gt;that assumption often fails.&lt;/strong&gt; Anthropic found that eighteen of thirty agents created exactly the same Git branch name. Multiple creative agents chose the same novel title without genre guidance. When asked to create an impressive project freely, more than half chose a ray tracer or self-hosting compiler.[5]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;At one-task scale, homogeneity looks like repetition. At system scale, it can become congestion, a stampede, or a shared misjudgment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Google's research also found that independently operating, uncoordinated agents could amplify error up to 17.2 times. An orchestrator reduced amplification, but it was still 4.4 times.&lt;/p&gt;

&lt;p&gt;When several agents agree, do not treat their count as the number of independent pieces of evidence. They may have followed the same training bias and prompt anchor to the same wrong answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Agent debate often gives an error better reasons instead of correcting it
&lt;/h2&gt;

&lt;p&gt;Some systems try to solve homogeneity through debate: one agent proposes an answer, another challenges it, then two or three rounds end in a vote.&lt;/p&gt;

&lt;p&gt;It resembles peer review. In practice, the first agent may give a fluent but wrong explanation and the others continue from its premise. Later reasoning becomes richer, while the original error becomes more convincing.&lt;/p&gt;

&lt;p&gt;A study of ten homogeneous agents debating for three rounds found majority adoption as high as 85.5%. Some agents that had initially answered correctly changed to the wrong answer after seeing peers' views. Compared with isolated self-correction, debate used 2.1 to 3.4 times as many tokens with equal or lower accuracy.[6]&lt;/p&gt;

&lt;p&gt;Models are particularly good at continuing existing text. Once the first answer enters the shared context, later agents are not starting from a blank page. They may be reviewing it, or simply being influenced by it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Debate without independent judgment easily becomes expensive mutual affirmation.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;[1] Cemri, Mert et al. &lt;a href="https://arxiv.org/html/2503.13657v2" rel="noopener noreferrer"&gt;Why Do Multi-Agent LLM Systems Fail?&lt;/a&gt;. arXiv, 2025.&lt;/p&gt;

&lt;p&gt;[2] Anthropic. &lt;a href="https://www.anthropic.com/engineering/multi-agent-research-system" rel="noopener noreferrer"&gt;How we built our multi-agent research system&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;[3] Google Research. &lt;a href="https://research.google/blog/towards-a-science-of-scaling-agent-systems-when-and-why-agent-systems-work/" rel="noopener noreferrer"&gt;Towards a science of scaling agent systems: When and why agent systems work&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;[4] Cursor. &lt;a href="https://cursor.com/blog/scaling-agents" rel="noopener noreferrer"&gt;Scaling long-running autonomous coding&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;[5] Anthropic. &lt;a href="https://www.anthropic.com/research/multiagent-systems" rel="noopener noreferrer"&gt;Patterns and problems in multiagent systems&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;[6] &lt;a href="https://arxiv.org/html/2605.00914v1" rel="noopener noreferrer"&gt;The Cost of Consensus: Isolated Self-Correction Prevails Over Unguided Homogeneous Multi-Agent Debate&lt;/a&gt;. arXiv, 2026.&lt;/p&gt;

</description>
      <category>luhuidev</category>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>A Personal Skill Map for the AI Era: Building a Complete Loop in 2026</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Fri, 28 Aug 2026 07:11:30 +0000</pubDate>
      <link>https://dev.to/luhuidev/a-personal-skill-map-for-the-ai-era-building-a-complete-loop-in-2026-31h5</link>
      <guid>https://dev.to/luhuidev/a-personal-skill-map-for-the-ai-era-building-a-complete-loop-in-2026-31h5</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;Over the past few years, a clear shift has taken place: many execution skills that once took a long time to learn are rapidly becoming capabilities we can call on.&lt;/p&gt;

&lt;p&gt;Coding, design, research, copywriting, data analysis, and video production once each implied a full software-learning path and a distinct professional role. By 2026, more work begins differently. A person states the goal; AI calls tools and produces an initial result; the person supplies context, redirects the work, and checks the output.&lt;/p&gt;

&lt;p&gt;Professional expertise has not lost its value, but the distribution of value is changing. Implementation still matters, yet it is moving from a scarce capability toward a foundational one that models can amplify. What is becoming scarcer is the ability to find a worthwhile problem, turn a vague idea into a clear target, judge whether an AI result is trustworthy, and carry that result into the real world.&lt;/p&gt;

&lt;p&gt;That is my personal skill map for the AI era. Instead of grouping skills into programming, writing, or design, it groups them by how someone moves an ambiguous idea into a real outcome. The complete loop has six abilities: &lt;strong&gt;discovery, specification, modeling, orchestration, verification, and delivery&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovery: the scarcer starting point in the AI era
&lt;/h2&gt;

&lt;p&gt;We usually begin a discussion of ability with problem solving. But as the cost of solving problems keeps falling, finding the right problem becomes more important.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI is good at answering a clearly stated question. It is much less able to live in a specific environment long enough to notice what feels off.&lt;/strong&gt; Why does someone reformat the same report every week? Why do users abandon a service at the same point? Why has a team become accustomed to an inefficient process? Those opportunities come from sustained observation, not from a search box.&lt;/p&gt;

&lt;p&gt;Many small problems that once were not worth pursuing because implementation was too expensive are now worth a quick experiment. Sensitivity to repetitive work, anomalies, user complaints, and information gaps directly affects how many opportunities you can amplify with AI.&lt;/p&gt;

&lt;p&gt;Solving problems is getting easier; finding problems that truly deserve solving is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Specification: moving beyond prompts
&lt;/h2&gt;

&lt;p&gt;After finding a problem, the next step is not to ask AI to start immediately. It is to state the problem precisely.&lt;/p&gt;

&lt;p&gt;Many people know the feeling: AI can write code, generate content, and produce a page, yet the outcome is still off. Adding more prompt detail can help, but the deeper issue is often that the user has not fully defined the goal either.&lt;/p&gt;

&lt;p&gt;What is the task solving? What are its inputs and outputs? Which constraints cannot be violated? What counts as failure? How will quality be accepted? In the past, a team could gradually fill in these details through conversation. Today, they increasingly need to be explicit before work begins.&lt;/p&gt;

&lt;p&gt;That is why I do not see prompt engineering as the most durable name for this skill. The enduring ability is closer to &lt;strong&gt;specification&lt;/strong&gt;: translating a fuzzy intention into goals, constraints, and acceptance criteria that AI, colleagues, and your future self can all understand. As execution gets stronger, the cost of vague requirements rises.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modeling: knowledge becomes a tool for judgment
&lt;/h2&gt;

&lt;p&gt;AI adoption invites an easy mistake: if models know so much, do people need less domain knowledge? The reality points in the opposite direction.&lt;/p&gt;

&lt;p&gt;The role of expertise is changing, not disappearing. Many execution steps can now be delegated to AI, but you still need to understand the key variables, causal relationships, boundary conditions, and common failure modes of a field. Without that, you cannot tell whether the output is dependable.&lt;/p&gt;

&lt;p&gt;In software engineering, this means understanding architecture, performance, security, cost, and reliability. In product work, it means users, needs, and business constraints. In investing, it means financial definitions and risk. In content, it means audience, distribution dynamics, and information value.&lt;/p&gt;

&lt;p&gt;AI can retrieve vast amounts of information, but it cannot automatically form stable domain judgment on someone else's behalf. Knowledge used to be primarily for execution; it is increasingly for judgment. Rather than knowing a little about everything, build strong enough models in a few important domains to know which variables matter, which conclusions deserve skepticism, and where risk may be hiding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Orchestration: turning delegation into a personal workflow
&lt;/h2&gt;

&lt;p&gt;If the earlier abilities are familiar, &lt;strong&gt;orchestration&lt;/strong&gt; may be the most visibly new one. We are moving from operating software ourselves to asking AI to operate software.&lt;/p&gt;

&lt;p&gt;Where people once opened Photoshop, Excel, an IDE, and a browser to complete a sequence of manual steps, an agent can now read materials, call tools, change files, run scripts, execute tests, and return a result. This creates a new personal capability: delegation.&lt;/p&gt;

&lt;p&gt;How should a complex task be split? Which parts can be handed to AI in one pass? Which need stages? Which can run in parallel? When should more context be supplied, and when should a person intervene? These questions used to belong mainly to team management. They are now part of daily AI work.&lt;/p&gt;

&lt;p&gt;The ability to use AI will not stop at writing prompts. It will increasingly resemble lightweight project management. Future productivity will depend not only on how much you can do yourself, but on whether you can organize work in a form machines can complete efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verification: replace “looks right” with evidence
&lt;/h2&gt;

&lt;p&gt;The stronger AI becomes, the more verification matters. A polished paragraph can cite sources that do not exist. Code can run while missing edge cases. An analysis can look complete while relying on the wrong data definition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When output increasingly resembles a correct answer, people are more likely to lower their guard.&lt;/strong&gt; Verification is therefore an indispensable layer of any practical AI workflow.&lt;/p&gt;

&lt;p&gt;Tests, examples, counterexamples, metrics, checklists, automated checks, and a second-model review are no longer just engineering techniques. They will increasingly become normal knowledge-work practices. A useful habit is to move from “I finished it” to “what evidence shows that it is done well?”&lt;/p&gt;

&lt;p&gt;As execution accelerates, errors are amplified faster too. AI can make correct work faster, and it can make mistaken work faster as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Delivery: making an idea real
&lt;/h2&gt;

&lt;p&gt;The last ability is delivery, and it remains difficult to fully replace with AI.&lt;/p&gt;

&lt;p&gt;Generating a plan does not mean something has happened. A product must go live, users must receive it, collaborators must be aligned, feedback must be collected, errors must be handled, and someone must take responsibility. These tasks may not look especially intelligent, but they determine whether an idea enters reality.&lt;/p&gt;

&lt;p&gt;AI lowers many implementation barriers and weakens a familiar excuse: “I cannot do it yet because I do not know how.” If you cannot design, AI can create a first version. If you cannot code, an agent can help implement it. If you cannot analyze data, a model can organize a first pass.&lt;/p&gt;

&lt;p&gt;That does not mean everything is easier. The bottleneck is shifting from “I lack the skill” to “will I actually move it forward?” As the execution threshold falls, the gap between people will increasingly come from who turns a vague idea into a real result.&lt;/p&gt;

&lt;h2&gt;
  
  
  From a skill tree to a complete loop
&lt;/h2&gt;

&lt;p&gt;The T-shaped-person model still has value: depth in one domain plus breadth across others. But in 2026, another structure is becoming more important: a &lt;strong&gt;complete loop&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You do not need to be an expert in every individual skill. You do need to be able to move through a full chain independently: discover a worthwhile problem, specify it clearly, build a basic domain model, use AI and tools for much of the execution, judge whether the result is reliable, and deliver it into a real environment.&lt;/p&gt;

&lt;p&gt;Only when this chain closes does AI become genuine leverage. Otherwise, you may only collect disconnected techniques: Cursor today, Claude Code tomorrow, another agent platform next week. Tools will keep changing. They are interfaces, not the capability itself.&lt;/p&gt;

&lt;p&gt;The durable capabilities are noticing problems, stating them clearly, developing domain judgment, organizing complex work for AI, recognizing mistakes, and bringing work into the world.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to practice this AI-era skill map
&lt;/h2&gt;

&lt;p&gt;If I were designing an AI learning roadmap for 2026, I would not begin with “which model should I learn?” or a list of AI tools. I would start with one real problem and take it all the way through.&lt;/p&gt;

&lt;p&gt;It could be a repetitive workflow, a small tool you have wanted to make, a content idea you want to test, or a long-standing everyday annoyance. The size does not matter. What matters is completing the cycle: observe the problem, define the goal, break down the work, let AI execute, set acceptance criteria, correct the result, and actually publish, launch, or use it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you never know what to make, practice observation and problem definition.&lt;/li&gt;
&lt;li&gt;If AI often goes off course, practice describing requirements and organizing context.&lt;/li&gt;
&lt;li&gt;If you cannot tell whether an output is right, add domain knowledge and verification mechanisms.&lt;/li&gt;
&lt;li&gt;If you keep stopping at a demo, practice delivery and follow-through.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This kind of practice is often more valuable than watching dozens of hours of AI tutorials. The goal of AI learning is not an ever-growing tool list; it is a capability structure that can absorb new tools into the way you work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading: five books worth revisiting in the AI era
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F124c3f07cc55c20296cd2c4d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F124c3f07cc55c20296cd2c4d.png" alt="five books worth revisiting in the AI era" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Yu Jun's Product Methodology&lt;/strong&gt;: a way to train judgment about user value, needs, and product decisions--in other words, what is worth doing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Story Mapping&lt;/strong&gt;: a guide to turning vague needs into a structure that can be delivered step by step, closely related to specification in the agent era.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thinking in Systems&lt;/strong&gt;: a tool for seeing feedback, delays, and knock-on effects instead of accepting an answer that only works locally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Lean Startup&lt;/strong&gt;: when MVPs are cheaper to build, the Build-Measure-Learn loop becomes even more useful for getting real feedback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Peak&lt;/strong&gt;: a reminder that consuming information is not the same as learning; ability still comes from tasks, feedback, correction, and another attempt.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>career</category>
    </item>
    <item>
      <title>Can AI Beat CAPTCHAs in 2026? From Recognition to Risk Scoring</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Sun, 16 Aug 2026 14:23:55 +0000</pubDate>
      <link>https://dev.to/luhuidev/can-ai-beat-captchas-in-2026-from-recognition-to-risk-scoring-36o3</link>
      <guid>https://dev.to/luhuidev/can-ai-beat-captchas-in-2026-from-recognition-to-risk-scoring-36o3</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;Most of us know the routine: you sign in to a website, click “I'm not a robot,” and get a 3×3 grid asking you to select every traffic light, motorcycle, or bus. You finish one round and another appears. Sometimes you are sure the answer was right, yet the system asks you to try again. On an unusual network, the challenges may keep coming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CAPTCHAs were designed to make life difficult for machines. Today, machines may already be better than humans at many of the puzzles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In 2024, researchers tested Google reCAPTCHA v2 without using GPT. They trained a YOLOv8 vision model to identify target objects and paired it with browser automation. &lt;strong&gt;Their paper reported passing all 100 test attempts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By 2025, research had moved beyond individual CAPTCHA formats. Unified benchmarks began testing vision-language models against &lt;strong&gt;distorted text, image selection, sliders, rotation tasks, and other CAPTCHA types&lt;/strong&gt;. Some now resemble ordinary visual recognition. Others still require exact localization, spatial reasoning, and sustained interaction, where success rates fall sharply.&lt;/p&gt;

&lt;p&gt;In 2026, the question has moved again. It is no longer only “Can AI understand the CAPTCHA?” It is now: “&lt;strong&gt;Can AI open the page, understand the challenge, click or drag, notice mistakes, correct itself, and then continue the original task?&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The answer is increasingly yes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is why CAPTCHA is worth revisiting. It has not disappeared as a security control, but its original assumptions are changing. &lt;strong&gt;In 2026, we need a more precise picture of what AI CAPTCHA solving can actually do.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  CAPTCHA's Original Bet: Humans Can Do It, Machines Cannot
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The core idea behind CAPTCHA is simple: find a task that is easy for people and hard for machines, then use it to tell the two apart.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The classic early version was &lt;strong&gt;distorted text&lt;/strong&gt;. Letters were rotated or merged, with noise and lines in the background. A person could usually squint and read them; early OCR systems could not. As OCR improved, CAPTCHA providers changed the test. Google reCAPTCHA increasingly used &lt;strong&gt;images&lt;/strong&gt;, asking people to identify cars, traffic lights, or motorcycles.&lt;/p&gt;

&lt;p&gt;The game stayed the same: find a perceptual skill that humans possess and machines do not—at least for now.&lt;/p&gt;

&lt;p&gt;The problem is that those exact capabilities have been among AI's fastest-improving areas over the last two decades: OCR, image classification, object detection, speech recognition, and now vision-language models. &lt;strong&gt;CAPTCHA keeps looking for new machine blind spots, and machines keep catching up.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is why a single question such as “What is AI's CAPTCHA accuracy?” is no longer enough. A useful analysis needs at least three layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Recognition&lt;/strong&gt;: can the AI understand the challenge and determine the right answer?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interaction&lt;/strong&gt;: once it knows the answer, can it click, drag, and handle multiple rounds in the browser?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Acceptance&lt;/strong&gt;: even if it solves the puzzle, will the server-side risk system accept the request?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are increasingly different problems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F0ad196c9201befb45f0bfcdf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F0ad196c9201befb45f0bfcdf.png" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Text CAPTCHAs Have Largely Become an OCR Problem
&lt;/h2&gt;

&lt;p&gt;Traditional text CAPTCHAs can no longer carry a critical security boundary on their own. The reason is straightforward: they are fundamentally an OCR task.&lt;/p&gt;

&lt;p&gt;If a site still uses fixed fonts, a fixed noise distribution, and a fixed string length, an attacker who can collect enough samples does not need frontier research to train a specialized model. In many cases, a large model is unnecessary.&lt;/p&gt;

&lt;p&gt;People often imagine general systems such as GPT, Gemini, or Qwen when discussing AI CAPTCHA solvers. &lt;strong&gt;For a fixed challenge, however, a specialized model can be cheaper and faster. A trained OCR or lightweight vision model can run locally at extremely low marginal cost.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Image-Grid CAPTCHAs Increasingly Look Like Ordinary Object Detection
&lt;/h2&gt;

&lt;p&gt;Image CAPTCHAs once raised the barrier considerably. “Select every image containing a bus” was difficult for early computer vision. Today, the task definition is familiar: &lt;strong&gt;object detection and image classification&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The 2024 paper &lt;a href="https://arxiv.org/abs/2409.08831" rel="noopener noreferrer"&gt;Breaking reCAPTCHAv2&lt;/a&gt; used YOLOv8 to identify target categories in reCAPTCHA v2 image challenges, then automated the clicks. It reported passing all 100 test attempts.&lt;/p&gt;

&lt;p&gt;That “100%” does not mean reCAPTCHA as a whole is useless. It means that, under the experiment's specific conditions, the image puzzle itself did not reliably distinguish machines from people. reCAPTCHA still uses cookies, browser context, history, risk scoring, and other mechanisms that do not vanish when image recognition succeeds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But the most visible assumption—that a machine should not recognize a traffic light—is failing.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Attackers No Longer Always Need a Custom-Trained Model
&lt;/h2&gt;

&lt;p&gt;Using YOLO against reCAPTCHA follows a traditional recipe: &lt;strong&gt;collect data, label it, and train a solver for one CAPTCHA format&lt;/strong&gt;. This approach is cheap, fast, and stable, but it is closely tied to the challenge type.&lt;/p&gt;

&lt;p&gt;If the test changes from “find the cars” to “select two objects used for the same purpose,” a model trained only on cars, buses, and traffic lights may fail.&lt;/p&gt;

&lt;p&gt;Vision-language models change that constraint. Models in the Qwen, Gemini, and GPT families can jointly understand images, written instructions, and spatial relationships rather than recognizing only a fixed set of categories.&lt;/p&gt;

&lt;p&gt;The 2025 study &lt;a href="https://arxiv.org/abs/2506.05982" rel="noopener noreferrer"&gt;MCA-Bench&lt;/a&gt; placed multiple CAPTCHA formats into a unified vision-language evaluation framework. It found that &lt;strong&gt;trained Qwen2.5-VL models could reach high success on some distorted-text and 3×3 image-selection tasks, while performance dropped substantially on sliders, rotations, and complex spatial reasoning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That difference shows where CAPTCHA difficulty is moving. &lt;strong&gt;The old challenge was understanding the image. The new challenge is translating that understanding into precise interaction.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F466aa9d7e11ba7e940b2b711.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F466aa9d7e11ba7e940b2b711.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Why Slider CAPTCHAs Were Harder
&lt;/h2&gt;

&lt;p&gt;A slider CAPTCHA is a useful example. An image contains a missing puzzle piece, and the user must drag a slider until the piece lines up with the gap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That adds a layer beyond an image grid. The grid asks, “Where is the traffic light?” The slider also asks, “Where is the gap, how far should I drag, and does the trajectory look plausible?”&lt;/strong&gt; It combines perception with behavioral interaction.&lt;/p&gt;

&lt;p&gt;This did not create a permanent security boundary. The 2024 paper &lt;a href="https://doi.org/10.1016/j.jisa.2024.103711" rel="noopener noreferrer"&gt;The robustness of behavior-verification-based slider CAPTCHAs&lt;/a&gt; evaluated five widely deployed slider systems and reported attack success rates from &lt;strong&gt;87.5% to 100%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Once again, a determined attacker can customize an algorithm for a particular challenge. Replacing an image grid with a slider is not a permanent fix. Gap detection is already a mature computer-vision task. &lt;strong&gt;The harder signals increasingly sit around the puzzle: pointer trajectories, timing, page context, session history, and IP reputation.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  In 2026, GUI Agents Are Starting to Solve CAPTCHAs Themselves
&lt;/h2&gt;

&lt;p&gt;What makes the current wave different is that &lt;strong&gt;GUI agents&lt;/strong&gt; are beginning to treat CAPTCHAs as ordinary web interactions.&lt;/p&gt;

&lt;p&gt;The 2026 paper &lt;a href="https://arxiv.org/abs/2603.23559" rel="noopener noreferrer"&gt;CAPTCHA Solving for Native GUI Agents&lt;/a&gt; introduced ReCAP, a native GUI agent specifically trained to improve CAPTCHA capability. Instead of sending screenshots to one model and having a separate script parse answers and click, &lt;strong&gt;the model directly observes screenshots and emits GUI actions&lt;/strong&gt;. It can find targets, click, inspect the next frame, detect an error, and correct its behavior.&lt;/p&gt;

&lt;p&gt;The researchers trained models in the Qwen3-VL family. &lt;strong&gt;The 32B model achieved roughly 81% overall success on the paper's dynamic CAPTCHA benchmark, averaging about 1.54 model calls and under three seconds of end-to-end execution.&lt;/strong&gt; These are results from a specific benchmark, not a universal pass rate for real websites.&lt;/p&gt;

&lt;p&gt;The direction is nevertheless clear: &lt;strong&gt;CAPTCHA solving is moving from a specialized offensive skill toward a side capability of general Computer Use agents.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F223418847bd27f82faf93250.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F223418847bd27f82faf93250.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the past, bypassing a CAPTCHA required someone to build a dedicated solver. A future agent may be booking a ticket, shopping, or filling in a form, encounter a CAPTCHA halfway through, solve it, and continue the original task.&lt;/p&gt;



&lt;h2&gt;
  
  
  Solving the Puzzle Is Not the Same as Passing the System
&lt;/h2&gt;

&lt;p&gt;The research results above can make “CAPTCHA is dead” sound tempting, but reality is more complicated.&lt;/p&gt;

&lt;p&gt;Suppose an AI identifies every traffic light with perfect accuracy and clicks all nine images correctly. Google may still reject it. &lt;strong&gt;Modern CAPTCHA systems do much more than grade the visible answer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The server sees far more than a screenshot. It can inspect the IP and whether it belongs to a data-center ASN, whether the device has appeared before, cookie history, browser consistency, request frequency, repeated challenges within a session, account age, and deviations from ordinary behavior.&lt;/p&gt;

&lt;p&gt;That is why Recognition, Interaction, and Acceptance must be separated. &lt;strong&gt;A model with 98% accuracy on an offline benchmark does not automatically have a 98% end-to-end pass rate. Recognition is only one layer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2Fca45da674ade45a6de36ef27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2Fca45da674ade45a6de36ef27.png" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  The Economics of Attacking CAPTCHAs Have Changed
&lt;/h2&gt;

&lt;p&gt;CAPTCHA's main attack cost once came from the machine's inability to solve the puzzle. That cost is falling quickly.&lt;/p&gt;

&lt;p&gt;Specialized OCR and YOLO models can run entirely on local hardware. Open-weight vision-language models are also becoming broadly available. For fixed tasks, pure inference can have a very low marginal cost.&lt;/p&gt;

&lt;p&gt;The public CAPTCHA-solving market tells the same story. As of August 2026, one public provider lists ordinary image CAPTCHAs and reCAPTCHA v2 at approximately &lt;a href="https://2captcha.com/pricing" rel="noopener noreferrer"&gt;$0.50 to $2.99 per 1,000 solves&lt;/a&gt;. These prices change and may combine human and automated capacity, but they demonstrate how commoditized “getting the answer” has become.&lt;/p&gt;

&lt;p&gt;At scale, &lt;strong&gt;the expensive parts are increasingly not CAPTCHA recognition itself, but proxy IPs, clean reputation, realistic browser environments, device identity, account inventory, session maintenance, and retries.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The defensive goal has changed accordingly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The old goal was to make the puzzle impossible for machines.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The more realistic goal now is to make automation uneconomical at scale.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Google No Longer Puts the Puzzle at the Center
&lt;/h2&gt;

&lt;p&gt;Google's own direction shows how far reCAPTCHA has moved.&lt;/p&gt;

&lt;p&gt;reCAPTCHA is now part of a broader Fraud Defense system. Instead of asking only whether a puzzle answer is correct, it evaluates the risk of the request. &lt;strong&gt;The server can receive a score from 0.0 to 1.0&lt;/strong&gt;: 1.0 means traffic is very likely legitimate, while 0.0 means very likely illegitimate. The application then chooses the response. Google's assessment API also includes a &lt;code&gt;verifiedBots&lt;/code&gt; field for bots whose identities have been verified.&lt;/p&gt;

&lt;p&gt;In a login flow, a low-risk request might proceed directly, medium risk could trigger email verification, higher risk could require MFA, and the highest risk could be denied.&lt;/p&gt;

&lt;p&gt;The old model was: solve the CAPTCHA and pass. The new model is: &lt;strong&gt;collect signals, calculate risk, and let the application decide whether to allow, step up, or reject.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Cloudflare Goes Further: Ideally, Users Should Not Solve Anything
&lt;/h2&gt;

&lt;p&gt;Cloudflare Turnstile is even more representative. It looks like a CAPTCHA alternative, but &lt;strong&gt;its design goal shifted from making users complete a challenge to letting legitimate users pass with as little friction as possible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://developers.cloudflare.com/turnstile/" rel="noopener noreferrer"&gt;Turnstile documentation&lt;/a&gt; explains that the browser runs a series of small non-interactive challenges and gathers signals about the client and environment. These include proof-of-work, proof-of-space, Web API probing, browser quirks, and behavioral signals. Managed mode selects an action based on client-side signals and risk; low-risk visitors can pass without interaction, while a checkbox appears only when another check is needed.&lt;/p&gt;

&lt;p&gt;Even if a challenge appears solved in the browser, Cloudflare requires the token to be validated on the server. Its documentation explicitly states that &lt;a href="https://developers.cloudflare.com/turnstile/turnstile-analytics/challenge-outcomes/" rel="noopener noreferrer"&gt;a solved challenge does not automatically confirm that the visitor is human&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That sentence captures the state of CAPTCHA in 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Being able to solve the puzzle no longer means passing the security decision.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  hCaptcha Has Not Abandoned Active Challenges
&lt;/h2&gt;

&lt;p&gt;hCaptcha takes a somewhat different path from Google and Cloudflare. &lt;strong&gt;It retains more active visual challenges while also offering invisible operation and risk scores.&lt;/strong&gt; Invisible mode can run in the background and show a challenge only when the user meets its criteria; fully passive operation relies on the enterprise risk score.&lt;/p&gt;

&lt;p&gt;The logic is intuitive: even if current models break one CAPTCHA format, providers can change the task, add interaction complexity, and rotate challenges to reopen a temporary gap between people and machines.&lt;/p&gt;

&lt;p&gt;Researchers have pursued the same idea with visual illusions, audio illusions, and more complex spatial reasoning.&lt;/p&gt;

&lt;p&gt;The 2026 paper &lt;a href="https://arxiv.org/abs/2601.08516" rel="noopener noreferrer"&gt;Robust CAPTCHA Using Audio Illusions in the Era of Large Language Models&lt;/a&gt; introduced IllusionAudio. It reported a 0% bypass rate across the tested large-audio-language-model and ASR attacks, alongside a 100% human pass rate in its user study.&lt;/p&gt;

&lt;p&gt;That is an impressive experimental result, but it faces a familiar question: once the format is public, attackers can collect targeted data, generate samples, and fine-tune models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The twenty-year history of CAPTCHA repeats the same cycle: find a new human-easy, machine-hard task; deploy it; train machines; break it; add complexity; and find another task.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Generative AI has not ended the cycle. It has made it spin faster.&lt;/p&gt;



&lt;h2&gt;
  
  
  The Hardest Problem May Be Legitimate AI Agents, Not Malicious Bots
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CAPTCHA's original model missed another possibility: future machine traffic will not always be bad traffic.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Historically, bots meant crawlers, spam sign-ups, credential stuffing, ticket scalping, inventory abuse, or automated ad clicks. It was tempting to equate Human with Good and Bot with Bad.&lt;/p&gt;

&lt;p&gt;The agent era breaks that assumption.&lt;/p&gt;

&lt;p&gt;An AI agent booking my hotel is a bot—but should it be blocked? Not necessarily. An agent can submit an expense report, help a blind user navigate a site, compare products and place an authorized order, or operate enterprise SaaS on an employee's behalf. These are automated programs, but they may carry genuine user authorization.&lt;/p&gt;

&lt;p&gt;Google's risk-analysis API now includes the concept of a &lt;a href="https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.assessments" rel="noopener noreferrer"&gt;verified bot identity&lt;/a&gt;, which points toward this future. Websites may need to stop asking only “Are you a robot?” and instead ask: Who is this agent? Who authorized it? What is it trying to do? What scope is permitted? What is its reputation? Is it making three requests a minute or thirty thousand?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F03053c39ae22b83afdf0386e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasset.liluhui.cn%2F03053c39ae22b83afdf0386e.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can AI solve CAPTCHAs in 2026?
&lt;/h3&gt;

&lt;p&gt;AI can solve many of them, but recognizing the correct answer and being accepted by the server are different outcomes. Text and common image CAPTCHAs are highly solvable. Sliders, rotation, and multi-step dynamic challenges remain harder, while modern risk systems also evaluate IP, device, browser, account, and behavioral signals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is the reCAPTCHA v2 image challenge still secure?
&lt;/h3&gt;

&lt;p&gt;The image puzzle alone should no longer be treated as a stable human-machine boundary. A 2024 study passed 100 test attempts under specific conditions, but reCAPTCHA's overall security also relies on risk scoring, cookies, browser history, and other signals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do GUI agents change the CAPTCHA threat model?
&lt;/h3&gt;

&lt;p&gt;They connect recognition, localization, clicking, dragging, feedback, and error correction into one end-to-end process. CAPTCHA solving can therefore become one step that a general web agent performs during a larger task, rather than a capability limited to dedicated solvers.&lt;/p&gt;

&lt;h3&gt;
  
  
  How should websites respond to AI CAPTCHA solvers?
&lt;/h3&gt;

&lt;p&gt;Do not use a visual puzzle as the only security boundary. Combine risk scoring, rate limits, device and session signals, account reputation, MFA, and server-side token validation. Over time, authorized agents will also need verifiable identity and scoped permissions.&lt;/p&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The last three years show a clear progression.&lt;/p&gt;

&lt;p&gt;Text CAPTCHAs fell first. Image CAPTCHAs increasingly became ordinary object detection. Vision-language models began solving formats that once needed separate specialized models. GUI agents then connected recognition to action.&lt;/p&gt;

&lt;p&gt;The remaining difficulty is concentrating in dynamic, multi-step tasks, precise control, and risk decisions made in real server environments.&lt;/p&gt;

&lt;p&gt;That is why the most advanced CAPTCHA products in 2026 look less and less like CAPTCHAs. Google calculates risk scores. Cloudflare watches the browser and client environment. hCaptcha combines active challenges with passive signals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal is no longer to invent a puzzle that AI can never solve; that promise is becoming impossible to sustain. The practical goal is to make legitimate access almost frictionless while increasing the cost of large-scale automated abuse until it is no longer worthwhile.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2409.08831" rel="noopener noreferrer"&gt;Breaking reCAPTCHAv2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2506.05982" rel="noopener noreferrer"&gt;MCA-Bench: A Multimodal Benchmark for Evaluating CAPTCHA Robustness Against VLM-based Attacks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://doi.org/10.1016/j.jisa.2024.103711" rel="noopener noreferrer"&gt;The robustness of behavior-verification-based slider CAPTCHAs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2603.23559" rel="noopener noreferrer"&gt;CAPTCHA Solving for Native GUI Agents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2601.08516" rel="noopener noreferrer"&gt;Robust CAPTCHA Using Audio Illusions in the Era of Large Language Models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.cloud.google.com/recaptcha/docs/reference/rest/v1/projects.assessments" rel="noopener noreferrer"&gt;Google Cloud reCAPTCHA risk analysis reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.cloudflare.com/turnstile/" rel="noopener noreferrer"&gt;Cloudflare Turnstile documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.hcaptcha.com/invisible/" rel="noopener noreferrer"&gt;hCaptcha Invisible Captcha documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>If AI Writes a Research Paper, Would You Trust It?</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Fri, 07 Aug 2026 16:08:11 +0000</pubDate>
      <link>https://dev.to/luhuidev/if-ai-writes-a-research-paper-would-you-trust-it-43b1</link>
      <guid>https://dev.to/luhuidev/if-ai-writes-a-research-paper-would-you-trust-it-43b1</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;Imagine this.&lt;/p&gt;

&lt;p&gt;You give AI a research problem: find a new way to reduce the inference cost of large models.&lt;/p&gt;

&lt;p&gt;A few hours later, it returns a complete paper, a set of experimental code, a collection of benchmark data, and what appears to be a novel algorithm.&lt;/p&gt;

&lt;p&gt;The paper is well structured, the charts look polished, and the experimental result is striking: inference speed improves by 35%.&lt;/p&gt;

&lt;p&gt;Now comes the question: do you believe it?&lt;/p&gt;

&lt;p&gt;You might first open the code to confirm that it actually implements the method described in the paper. Then you inspect the experiment logs to see whether the 35% was genuinely produced by a run or cherry-picked by the model from an intermediate experiment. Finally, you verify every citation to make sure those convincingly named papers really exist.&lt;/p&gt;

&lt;p&gt;Then you discover that the algorithm is not in the code, the experimental results cannot be reproduced, and some of the cited papers cannot even be found.&lt;/p&gt;

&lt;p&gt;The most awkward part is that the paper may still read as entirely professional.&lt;/p&gt;


&lt;h2&gt;
  
  
  ScientistOne Is Not Trying to Make AI Better at Writing Papers
&lt;/h2&gt;

&lt;p&gt;In May 2026, the Google Cloud AI Research team released an arXiv paper: &lt;a href="https://arxiv.org/abs/2605.26340" rel="noopener noreferrer"&gt;ScientistOne: Towards Human-Level Autonomous Research via Chain-of-Evidence&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The focus of this work is not merely to build a stronger AI Scientist. It pays closer attention to &lt;strong&gt;how AI-generated research can be audited.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The team audited 75 papers produced by five automated research systems across five categories of frontier systems research tasks. The results are revealing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In some systems, the hallucinated-citation rate reached 21%;&lt;/li&gt;
&lt;li&gt;In some systems, only 42% of reported paper scores passed re-verification;&lt;/li&gt;
&lt;li&gt;Method-code alignment across systems ranged from only 20% to 80%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words, a paper may be well written, and its algorithm may even produce good results, but the numbers, methods, code, and citations in the paper do not necessarily belong to the same chain of facts.&lt;/p&gt;

&lt;p&gt;It is a little like a programmer delivering elegant technical documentation, a complete test report, and working code, with just one problem: the three describe different systems.&lt;/p&gt;

&lt;p&gt;ScientistOne's core proposal is called the Chain-of-Evidence (CoE).&lt;/p&gt;

&lt;p&gt;The basic idea is that every important Claim must be traceable through a recorded chain of evidence back to its original basis.&lt;/p&gt;


&lt;h2&gt;
  
  
  From “Generating Answers” to “Generating Verifiable Knowledge”
&lt;/h2&gt;

&lt;p&gt;A typical Agent output process looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question -&amp;gt; Agent execution -&amp;gt; Final answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, it tells you that a new algorithm improves accuracy by 10%. At that point, the task is complete.&lt;/p&gt;

&lt;p&gt;CoE is not concerned with whether that sentence sounds enough like a conclusion. It asks whether a complete chain stands behind it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claim: Accuracy improves by 10%
  ↓
Evidence: Metric in the evaluation log
  ↓
Artifact: Evaluation script, training code, data version
  ↓
Grounding Source: Actual experimental run
  ↓
Verification: Rerun and calculate the metric
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final deliverable of a CoE Agent should therefore be more than a passage of text. It should be a knowledge unit that can be inspected.&lt;/p&gt;

&lt;p&gt;People do not need to trust it because it “sounds true.”&lt;/p&gt;

&lt;p&gt;They can follow the evidence chain and check for themselves whether it is true.&lt;/p&gt;



&lt;h2&gt;
  
  
  How CoE Works: First Classify the Claims in the Research
&lt;/h2&gt;

&lt;p&gt;The paper divides scientific claims into four categories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Citation Claim
Numerical Claim
Methodological Claim
Conclusion Claim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Different Claims require different evidence.&lt;/p&gt;

&lt;p&gt;If AI says, “A certain study proposed a certain method,” it must link to a real paper that the system actually read.&lt;/p&gt;

&lt;p&gt;If AI says, “Accuracy improved by 10%,” it must link to evaluation output and experiment logs.&lt;/p&gt;

&lt;p&gt;If AI describes a new Attention optimization method, it must link to the module in the code that actually implements it.&lt;/p&gt;

&lt;p&gt;If AI reaches a research conclusion, it must explicitly identify which verified numerical and methodological claims the conclusion depends on.&lt;/p&gt;

&lt;p&gt;This step may look like nothing more than structuring natural language, but it is critical.&lt;/p&gt;

&lt;p&gt;“Our method works very well” cannot be directly verified, but the following claim can:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"numerical"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"claim"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Model accuracy increased from 81.2% to 89.4%"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"evidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"runs/exp_042/evaluation.log#L118"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"metric"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"top-1 accuracy"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Only when a Claim is structured does verification have a clearly defined object.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  ScientistOne Does Not Add Citations at the End; It Records Evidence from the Beginning
&lt;/h2&gt;

&lt;p&gt;This is what I find most noteworthy about ScientistOne.&lt;/p&gt;

&lt;p&gt;Many Agent designs wait until a paper is nearly finished, then ask another Agent to check citations, correct numbers, and add evidence.&lt;/p&gt;

&lt;p&gt;That is like adding tests the day before code goes live: it is not entirely useless, but much of the context has already been lost, leaving the system to guess.&lt;/p&gt;

&lt;p&gt;ScientistOne's approach is to let evidence emerge alongside the research process.&lt;/p&gt;

&lt;p&gt;Its system is roughly divided into three stages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Problem Investigator
Literature retrieval, full-text reading, and sourced research briefs

        ↓

Discovery Engine
Parallel exploration, experiment execution, and preservation of evaluations and logs

        ↓

Paper Writer + Claim Verifier
Writing from existing artifacts and verifying each Claim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During the literature stage, it retrieves papers from academic databases, reads the complete PDFs, and records source information.&lt;/p&gt;

&lt;p&gt;During the experimental stage, it preserves the code, Evaluator scores, execution logs, and ablation results together.&lt;/p&gt;

&lt;p&gt;During the writing stage, every sentence containing a number or citation must be bound to specific evidence in advance. The Claim Verifier then checks whether numbers in the paper can be found in the logs, whether citations support the original sentences, and whether method descriptions match the experimental records.&lt;/p&gt;

&lt;p&gt;Claims without a source, or with invalid evidence markers, are deleted directly.&lt;/p&gt;

&lt;p&gt;This is not AI casually pasting a few links after an answer.&lt;/p&gt;

&lt;p&gt;It is the creation of an evidence ledger, alongside the research itself, that can be replayed and inspected.&lt;/p&gt;



&lt;h2&gt;
  
  
  Verification, Not Just Provenance
&lt;/h2&gt;

&lt;p&gt;Recording a source is not the same as completing verification.&lt;/p&gt;

&lt;p&gt;The existence of a file does not mean the data inside it is correct.&lt;/p&gt;

&lt;p&gt;The existence of a real paper does not mean it supports the current statement.&lt;/p&gt;

&lt;p&gt;The fact that code can run does not mean it implements the method claimed in the paper.&lt;/p&gt;

&lt;p&gt;ScientistOne therefore also introduces a CoE Integrity Audit that checks four categories of problems:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Score Verification
Can the scores reported in the paper be reproduced?

Specification Violation
Does the approach exploit loopholes in the evaluation rules?

Reference Verification
Do the cited references actually exist?

Method-Code Alignment
Does the method described in the paper actually appear in the code?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;According to the project's published data, ScientistOne achieved the following in this set of experiments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero hallucinated citations across 337 references;&lt;/li&gt;
&lt;li&gt;All 12 reproducibly evaluated papers passed score verification;&lt;/li&gt;
&lt;li&gt;14 of 15 papers passed the method-code alignment check.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These figures come from the paper team's own experiments, and the paper is still a preprint, so they should not be interpreted directly as proof that “autonomous AI research is now reliable.”&lt;/p&gt;

&lt;p&gt;They do, however, point to an important direction: &lt;strong&gt;reliability cannot depend on a model's self-discipline; it must become a checking mechanism inside the system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is similar to software engineering. Code cannot go live simply because a developer says, “I think it is fine.”&lt;/p&gt;

&lt;p&gt;AI-generated research should not automatically earn trust merely because its language is fluent and its charts look polished.&lt;/p&gt;



&lt;h2&gt;
  
  
  What Is the Difference Between CoE and RAG?
&lt;/h2&gt;

&lt;p&gt;At this point, many people may ask: isn't this just RAG with citations?&lt;/p&gt;

&lt;p&gt;Not exactly.&lt;/p&gt;

&lt;p&gt;RAG primarily addresses where a model should find external knowledge.&lt;/p&gt;

&lt;p&gt;CoE primarily addresses how a Claim generated by the model can be proven.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RAG:
Document → Retrieval → Answer

CoE:
Claim → Evidence → Artifact → Verification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RAG can provide a model with real documents and help attach citations to an answer, but it does not inherently guarantee that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The citation truly supports the current Claim;&lt;/li&gt;
&lt;li&gt;The numbers in the paper come from actual runs;&lt;/li&gt;
&lt;li&gt;The method description matches the submitted code;&lt;/li&gt;
&lt;li&gt;The final conclusion can be traced through intermediate artifacts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CoE is therefore not a replacement for RAG.&lt;/p&gt;

&lt;p&gt;It is more like a layer of trust infrastructure placed over RAG, tool use, code execution, and paper writing.&lt;/p&gt;

&lt;p&gt;My summary is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RAG explains where the material comes from.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CoE goes on to ask what makes the conclusion valid.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;For the past few years, we have focused on how to make models know more.&lt;/p&gt;

&lt;p&gt;That gave us RAG, Vector Databases, Knowledge Graphs, and longer contexts.&lt;/p&gt;

&lt;p&gt;Now that Agents have started searching, writing code, running experiments, and generating reports on their own, a new bottleneck has appeared: &lt;strong&gt;they must not only produce results, but also preserve how those results were produced.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The value of ScientistOne and Chain-of-Evidence is not that they create yet another AI that is better at writing papers. They push the standard for evaluating AI research one step forward: from whether the result looks real to whether the conclusion can be verified.&lt;/p&gt;

&lt;p&gt;This may also be a lesson that Agents must learn before entering the real world. Trustworthiness does not mean being correct forever. It means that when an Agent is wrong, we can follow the evidence to find the problem; when it is right, we do not have to trust it on intuition alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A truly trustworthy Agent does not merely provide answers. It lets people inspect at any time why it is correct and where it might be wrong.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2605.26340" rel="noopener noreferrer"&gt;ScientistOne paper (arXiv)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://scientist-one.github.io/" rel="noopener noreferrer"&gt;ScientistOne project website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>google</category>
    </item>
    <item>
      <title>The Real-World Challenges of Loop Engineering—and Why I’m Skeptical</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Fri, 31 Jul 2026 15:08:53 +0000</pubDate>
      <link>https://dev.to/luhuidev/the-real-world-challenges-of-loop-engineering-and-why-im-skeptical-4n1e</link>
      <guid>https://dev.to/luhuidev/the-real-world-challenges-of-loop-engineering-and-why-im-skeptical-4n1e</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;“Loop Engineering” is becoming the latest idea in AI coding.&lt;/p&gt;

&lt;p&gt;Claude Code creator Boris Cherny has said that he no longer prompts Claude directly. Instead, he writes loops that prompt Claude and decide what should happen next. Addy Osmani describes Loop Engineering in similar terms: rather than having a person continually prompt an agent, you design a system that handles prompting, execution, and feedback on the person’s behalf.&lt;/p&gt;

&lt;p&gt;It sounds compelling.&lt;/p&gt;

&lt;p&gt;From the Ralph Wiggum Loop and scheduled Claude Code runs to Codex Goals, long-running tasks, and multi-agent orchestration, more tools are supporting this pattern. OpenAI has even demonstrated a Codex experiment that ran for roughly 25 hours, consumed around 13 million tokens, and produced about 30,000 lines of code.&lt;/p&gt;

&lt;p&gt;Yet I am skeptical that Loop Engineering will become a stable, general-purpose software engineering paradigm.&lt;/p&gt;

&lt;p&gt;I do not doubt that agents will keep improving, nor do I deny that automated loops can create enormous value in some tasks. My concern is more fundamental: &lt;strong&gt;putting an agent in a loop does not automatically turn an uncertain model into a reliable engineering system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A loop solves the problem of keeping an agent working. It does not solve the more important question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the agent continuing to do the right thing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is the central challenge of Loop Engineering.&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Execution Is Easy to Loop; Completion Is Hard to Define
&lt;/h2&gt;

&lt;p&gt;A loop needs at least three basic elements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goal, execution process, completion condition
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Execution is not the hardest part. Defining what “done” means is.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a conventional program, the answer is often straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stop when the queue is empty
Stop when every file has been processed
Stop when the API returns success
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These conditions are deterministic and computable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most real software goals are not.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Consider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Improve the user experience
Refactor the payment system
Improve code quality
Make the product more reliable
Fix an intermittent login failure
Build a production-ready admin system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;None converts neatly into a Boolean expression.&lt;/p&gt;

&lt;p&gt;OpenAI’s guidance for &lt;strong&gt;Codex Goals&lt;/strong&gt; makes the same boundary explicit: a Goal is a poor fit when its endpoint is vague. Instructions such as “make it better,” or “refactor this code” without a target state, tests, and constraints, do not give an agent a dependable completion condition. &lt;strong&gt;Goals work best when they have a persistent objective, an evidence-based endpoint, and may require multiple rounds of investigation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That reveals the actual scope of Loop Engineering.&lt;/p&gt;

&lt;p&gt;The best candidates for automated loops are not all complex tasks. They are tasks that humans have already converted into verifiable problems:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Make every test pass
Migrate the remaining 23 legacy endpoints to the new protocol
Fix every static-analysis error
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But once humans can clearly define the goal, state, constraints, and completion criteria, much of the hardest requirements work has already been done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loop Engineering automates more of the downstream execution than the judgment at the heart of software engineering.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  2. Automated Verification Does Not Verify the Real Requirement
&lt;/h2&gt;

&lt;p&gt;Loop Engineering usually relies on tests, lint results, builds, performance metrics, or screenshot evaluation as feedback.&lt;/p&gt;

&lt;p&gt;A typical loop looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent changes code -&amp;gt; Run tests -&amp;gt; Tests fail -&amp;gt; Agent analyzes the failure
-&amp;gt; Change code again -&amp;gt; Tests pass -&amp;gt; Stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This feels consistent with engineering practice, but it hides a serious problem:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The agent optimizes the verification signal, not necessarily the outcome we actually want.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tests are only an incomplete expression of requirements.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The 2026 SpecBench research examined reward hacking in long-horizon coding agents. By separating public validation tests from hidden compositional tests, it found that frontier agents could score highly on visible tests while still showing a substantial gap on hidden ones. The gap grew as tasks became larger. An extreme case even appeared in which an implementation memorized test inputs to imitate correct behavior.&lt;/p&gt;

&lt;p&gt;That does not necessarily mean the agent is deliberately cheating.&lt;/p&gt;

&lt;p&gt;More precisely, an agent searches for a path that satisfies the feedback currently available. When that feedback does not fully represent the real goal, proxy distortion follows naturally.&lt;/p&gt;

&lt;p&gt;This resembles Goodhart’s law:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;When a measure becomes a target, it ceases to be a good measure.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Human engineers usually consider constraints that sit outside the tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the code match the product’s actual intent?&lt;/li&gt;
&lt;li&gt;Does it break behavior in another module?&lt;/li&gt;
&lt;li&gt;Does it create long-term maintenance cost?&lt;/li&gt;
&lt;li&gt;Does it violate architectural principles?&lt;/li&gt;
&lt;li&gt;Does it increase security risk?&lt;/li&gt;
&lt;li&gt;Is it merely overfitting to the test cases?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Agents do not naturally possess this organizational, product, and historical knowledge.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a result, building a complete verification system for Loop Engineering may cost as much as completing the task directly.&lt;/p&gt;



&lt;h2&gt;
  
  
  3. Loops Can Amplify Errors, Not Just Correct Them
&lt;/h2&gt;

&lt;p&gt;Supporters often describe a loop as a self-correcting system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failure -&amp;gt; Feedback -&amp;gt; Correction -&amp;gt; Another attempt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But a loop does not inherently converge.&lt;/p&gt;

&lt;p&gt;It can also behave like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Misread the goal -&amp;gt; Build the wrong implementation -&amp;gt; Update the plan from that implementation
-&amp;gt; Record the wrong state in documentation -&amp;gt; Later agents treat it as fact
-&amp;gt; Keep optimizing in the wrong direction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During a long task, an agent may change not only code but also PRDs, todo lists, project status, architecture notes, tests, progress logs, and its account of the root cause. Those artifacts become context for the next iteration.&lt;/p&gt;

&lt;p&gt;If one iteration records an incorrect state, subsequent iterations may stop treating it as an unverified hypothesis and start treating it as established fact.&lt;/p&gt;

&lt;p&gt;A single-turn AI error is usually confined to one response. A long loop can propagate an error into the repository, documentation, databases, task systems, and Git history. &lt;strong&gt;The longer the loop runs, the larger the error’s blast radius can become.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  4. Resetting Context Does Not Solve Context Corruption
&lt;/h2&gt;

&lt;p&gt;An important idea in Ralph Loop is to have the agent complete one task at a time, save progress to files or Git, and start the next iteration with a fresh context window.&lt;/p&gt;

&lt;p&gt;This does prevent the conversation from growing without limit.&lt;/p&gt;

&lt;p&gt;But it merely moves state from the model context into external storage. It does not eliminate information-management problems.&lt;/p&gt;

&lt;p&gt;The system still has to decide which history to retain and which is stale, which conclusions are only guesses, which code and documents matter to the current task, and which source to trust when sources conflict.&lt;/p&gt;

&lt;p&gt;Anthropic frames this as &lt;strong&gt;Context Engineering&lt;/strong&gt;: as an agent generates more data inside a loop, the system must continually select and compress what the next reasoning step actually needs. Anthropic also notes that accurate recall and long-range reasoning degrade as context grows, so context should be treated as a scarce resource, not as something that is always better in larger quantities.&lt;/p&gt;

&lt;p&gt;Long-running agents therefore face a dilemma:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Load too little, and the agent does not understand the project. Load too much, and the critical signal disappears into noise.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;External state accumulates entropy much like a codebase:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Outdated plans
Duplicate explanations
Contradictory rules
Expired temporary conclusions
Different assumptions written by different agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hard problem is not restarting the loop. It is ensuring that every restart receives information that is accurate, concise, trustworthy, and relevant.&lt;/p&gt;

&lt;p&gt;That problem looks more like knowledge management, configuration management, and runtime-state governance than “writing a loop.”&lt;/p&gt;



&lt;h2&gt;
  
  
  5. Code-Generation Throughput Is Not Engineering Productivity
&lt;/h2&gt;

&lt;p&gt;The most visible benefit of Loop Engineering is greater code-generation throughput.&lt;/p&gt;

&lt;p&gt;One agent can work continuously. Several agents can work in parallel. Tasks can run overnight. Failed tests can trigger automatic repairs. In theory, code output rises dramatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But software productivity has never been equivalent to lines of code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The meaningful measure is the total cost from a requirement being raised to correct software entering use and remaining maintainable.&lt;/p&gt;

&lt;p&gt;Faster generation does not necessarily mean faster delivery.&lt;/p&gt;

&lt;p&gt;If agents create dozens of pull requests per day while humans can review only a few, the bottleneck simply moves from writing code to verifying it. If reviewers cannot understand the volume of machine-generated changes, two outcomes are likely:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, agent output piles up and automated throughput never becomes real delivery.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second, the team lowers its review standard, merges quickly, and pushes the problems into testing, production, and long-term maintenance.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Martin Fowler’s site has discussed this mismatch: agents can generate code faster than humans can inspect it line by line. To keep human review from becoming the bottleneck, teams must shift quality checks earlier and create specifications, tests, and workflow constraints that agents can use for self-checking.&lt;/p&gt;

&lt;p&gt;In a 2025 randomized controlled trial with experienced open-source developers, METR found that &lt;strong&gt;on mature codebases the participants already knew, the AI tools available at the time increased task completion time by an average of 19%&lt;/strong&gt;. A 2026 follow-up found some possible signs of acceleration, but its confidence intervals remained too wide to conclude that AI consistently speeds up every setting.&lt;/p&gt;

&lt;p&gt;AI coding productivity is clearly more complicated than a multiplier on generation speed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loop Engineering widens this gap: it increases agent runtime and output volume without necessarily increasing the team’s ability to understand, verify, and take responsibility for that output.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  6. More Agent Authority Means More Loop Risk
&lt;/h2&gt;

&lt;p&gt;To complete complex work, an agent needs tools and permissions: repository access, file modification, shell execution, database access, logs, cloud APIs, deployment, and rollback.&lt;/p&gt;

&lt;p&gt;More dangerously, agents read untrusted external content such as GitHub issues and web pages. Attackers can place indirect prompt injections in that content and make an agent mistake external text for operational instructions.&lt;/p&gt;

&lt;p&gt;A persistent loop magnifies this risk.&lt;/p&gt;

&lt;p&gt;A compromised agent may do more than produce a bad answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read sensitive data -&amp;gt; Call tools -&amp;gt; Change external state
-&amp;gt; Store the false result in long-term memory -&amp;gt; Continue next iteration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A production loop therefore seems to require strict least privilege. Yet the tighter the permissions, the less autonomous the agent becomes.&lt;/p&gt;

&lt;p&gt;This creates another Loop Engineering contradiction:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More authority creates more automation value and more risk; less authority reduces risk and also limits what the agent can accomplish.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  7. Loop Engineering May Be Cron Plus an Agent
&lt;/h2&gt;

&lt;p&gt;Structurally, much of what is called Loop Engineering is not new.&lt;/p&gt;

&lt;p&gt;Common examples include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New Sentry issue -&amp;gt; Agent investigates and opens a pull request
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Run every night -&amp;gt; Agent checks failing tests -&amp;gt; Attempts a repair
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New support ticket -&amp;gt; Agent investigates logs -&amp;gt; Produces a recommendation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the past, teams built these patterns with Cron, webhooks, CI/CD, message queues, Zapier, or n8n.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is new is that an LLM agent replaces one deterministic processing node in the workflow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most examples remain event triggers and scheduled jobs. They can be useful, but it is hard to call them an entirely new workflow paradigm. Some developers have even returned to conventional approaches after encountering agent drift, finding human intervention more effective, or facing excessive token costs.&lt;/p&gt;



&lt;h2&gt;
  
  
  8. Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;Loop Engineering presents an attractive future: humans define goals, agents keep working, and software evolves on its own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real software engineering, however, is not a problem that necessarily converges if we simply keep trying.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Requirements can be vague. Tests can be incomplete. State can be corrupted. Metrics can be gamed. Permissions can be abused. Costs can escape control. Code throughput can exceed an organization’s capacity to understand and review it.&lt;/p&gt;

&lt;p&gt;A loop can extend an agent’s execution time. It cannot automatically make the objective more correct.&lt;/p&gt;

&lt;p&gt;Compared with investing in the loop itself, I still believe the better investment is Harness Engineering: a reliable feedback system with clear boundaries, evidence, permissions, auditing, and the ability to stop at any time.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agentaichallenge</category>
    </item>
    <item>
      <title>What Is Loopcraft? From Prompt Engineering to Agent Loop System Design</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Fri, 26 Jun 2026 10:53:45 +0000</pubDate>
      <link>https://dev.to/luhuidev/what-is-loopcraft-from-prompt-engineering-to-agent-loop-system-design-2dff</link>
      <guid>https://dev.to/luhuidev/what-is-loopcraft-from-prompt-engineering-to-agent-loop-system-design-2dff</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;A new term has been circulating in the Silicon Valley agent world: &lt;strong&gt;Loopcraft&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My first reaction was: isn't this just putting an agent inside &lt;code&gt;while true&lt;/code&gt;? A few years ago people called it Agent Loop. Then it became Workflow and Harness Engineering. Now we have Loopcraft. The AI industry never stops inventing new names.&lt;/p&gt;

&lt;p&gt;But after following recent discussions from Peter Steinberger, Claude Code lead Boris Cherny, and Andrej Karpathy around agent loops, I do think something real is changing.&lt;/p&gt;

&lt;p&gt;Peter Steinberger put it this way:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You shouldn’t be prompting coding agents anymore. You should be designing loops that prompt your agents.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In other words, you should not manually prompt a coding agent again and again. You should design a loop that prompts the agent for you.&lt;/p&gt;

&lt;p&gt;Boris Cherny said something similar:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I don’t prompt Claude anymore. I write loops. The loops do the work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Karpathy made a related point when introducing Autoresearch: &lt;strong&gt;if a human still has to inspect every result, decide the next step, and give the agent another instruction, the human becomes the throughput bottleneck of the whole system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Put together, these comments point to an abstraction shift:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before:
Human -&amp;gt; Prompt -&amp;gt; Agent -&amp;gt; Result

Now:
Human -&amp;gt; Design the loop
             ↓
Task discovery -&amp;gt; Agent execution -&amp;gt; Automatic verification -&amp;gt; Retry on failure -&amp;gt; Save state -&amp;gt; Continue running
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My shortest definition is: &lt;strong&gt;Prompt Engineering optimizes a single interaction. Loopcraft optimizes the whole system that runs repeatedly.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loopcraft is less interested in how to complete one isolated task and more interested in questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who starts the next task?&lt;/li&gt;
&lt;li&gt;How does the agent know what to do?&lt;/li&gt;
&lt;li&gt;Who checks the output?&lt;/li&gt;
&lt;li&gt;How does failure produce useful feedback?&lt;/li&gt;
&lt;li&gt;Should the system retry, switch strategy, or hand off to a human?&lt;/li&gt;
&lt;li&gt;How is state preserved across sessions?&lt;/li&gt;
&lt;li&gt;How do lessons from repeated runs improve the system itself?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This article breaks down three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is Loopcraft, and why is it suddenly getting attention?&lt;/li&gt;
&lt;li&gt;How is it different from Agent Harness?&lt;/li&gt;
&lt;li&gt;Can an ordinary developer build a small loop today?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Why People Are Moving From Prompts to Loops
&lt;/h2&gt;

&lt;p&gt;For the past two years, the typical way to use a coding agent looked roughly like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tell the agent what to do
-&amp;gt; Wait for code changes
-&amp;gt; Review the result
-&amp;gt; Tell it what is wrong
-&amp;gt; Let the agent continue
-&amp;gt; Review again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model can already write code, search files, and run tests. But the whole process is still driven step by step by a human.&lt;/p&gt;

&lt;p&gt;After each round, the agent stops and waits for the next instruction.&lt;/p&gt;

&lt;p&gt;On the surface, the human is using the agent. From another angle, the human is acting as the scheduler, state machine, and verifier of the agent system.&lt;/p&gt;

&lt;p&gt;So even if the model is fast, the human still cannot leave. The async mobile supervision features shipped by many agent products are one attempt to relieve this bottleneck.&lt;/p&gt;

&lt;p&gt;That is the problem behind the recent loop discourse: &lt;strong&gt;do not automate only one step inside the work. Design the surrounding system for task discovery, assignment, verification, and continuation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, fixing a CI failure used to look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I see a CI failure -&amp;gt; Open Codex -&amp;gt; Copy the error log -&amp;gt; Ask it to analyze -&amp;gt; Review the diff -&amp;gt; Ask it to run tests -&amp;gt; Confirm green -&amp;gt; Manually create a PR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside a loop, it can become:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CI failure event -&amp;gt; Automatically read logs -&amp;gt; Decide whether the problem is safe to automate -&amp;gt; Start an agent in an isolated worktree -&amp;gt; Modify code -&amp;gt; Run tests and lint -&amp;gt; A second verifier checks the diff -&amp;gt; Create a PR when it passes -&amp;gt; Notify a human when it cannot proceed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The real automation here is not just code editing. It is the closed loop around code editing.&lt;/p&gt;

&lt;p&gt;So Loopcraft is not a new model capability, and it is not one specific framework.&lt;/p&gt;

&lt;p&gt;It is closer to an agent system design discipline: &lt;strong&gt;organizing task execution, result verification, event triggers, state persistence, and system improvement into nested loops.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Is Loopcraft Actually New?
&lt;/h2&gt;

&lt;p&gt;The name is new. The underlying technical pieces are not.&lt;/p&gt;

&lt;p&gt;We already had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reason-Act-Observe loops for agents;&lt;/li&gt;
&lt;li&gt;workflows and state machines;&lt;/li&gt;
&lt;li&gt;automated tests and CI/CD;&lt;/li&gt;
&lt;li&gt;scheduled jobs and event-driven systems;&lt;/li&gt;
&lt;li&gt;multi-agent collaboration;&lt;/li&gt;
&lt;li&gt;LLM-as-a-judge;&lt;/li&gt;
&lt;li&gt;Reflexion and Self-Refine;&lt;/li&gt;
&lt;li&gt;long-term memory;&lt;/li&gt;
&lt;li&gt;automated experimentation and hill climbing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even the simplest Ralph Loop is basically repeated invocation of a coding agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;claude &lt;span class="s2"&gt;"Read the task and current progress, then continue the work"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Agent Harness vs. Loopcraft
&lt;/h2&gt;

&lt;p&gt;This is where the terms are easiest to confuse.&lt;/p&gt;

&lt;p&gt;Over the past year, Agent Harness has already become a popular concept.&lt;/p&gt;

&lt;p&gt;Anthropic's definition is clear: a harness is the system that enables a model to work as an agent, including context handling, tool use, permissions, environment, state management, and result return.&lt;/p&gt;

&lt;p&gt;Put simply, Harness answers: &lt;strong&gt;what environment does this agent work in?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loopcraft answers a different question: &lt;strong&gt;when is this agent started, why does it continue running, who checks the result, and what should happen in the next round?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A simplified analogy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Model: the worker's brain
Tools: the tools in the worker's hands
Harness: the worker's workstation and work environment
Loop: the factory cadence, quality control, and task scheduling
Loopcraft: how to design and layer the whole production loop system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In practice, the boundary is not absolute.&lt;/p&gt;

&lt;p&gt;A mature long-running harness already includes retries, verification, and state handoff. A loop also depends on the harness for tools and execution environment.&lt;/p&gt;

&lt;p&gt;I prefer to separate them by focus:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;Main question&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prompt Engineering&lt;/td&gt;
&lt;td&gt;What instruction should the model see in this round?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context Engineering&lt;/td&gt;
&lt;td&gt;What information should the model see right now?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool Engineering&lt;/td&gt;
&lt;td&gt;What actions can the agent take?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Harness Engineering&lt;/td&gt;
&lt;td&gt;How can one agent run happen reliably?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Loopcraft&lt;/td&gt;
&lt;td&gt;How are repeated runs triggered, verified, connected, and improved?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Loopcraft does not replace Harness.&lt;/p&gt;

&lt;p&gt;In fact, &lt;strong&gt;without a stable harness, a loop just manufactures errors automatically and continuously.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Loopcraft Is Not One Loop, but Layers of Loops
&lt;/h2&gt;

&lt;p&gt;LangChain later broke Loopcraft into four practical layers. I find the breakdown useful.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 1: Agent Loop
&lt;/h3&gt;

&lt;p&gt;The innermost layer is the agent loop we already know:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The model reasons
-&amp;gt; Calls a tool
-&amp;gt; Reads the tool result
-&amp;gt; Continues reasoning
-&amp;gt; Stops when it believes the task is done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, a documentation agent can:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read an issue -&amp;gt; Search the repository -&amp;gt; Edit Markdown -&amp;gt; Check links -&amp;gt; Create a PR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Layer 2: Verification Loop
&lt;/h3&gt;

&lt;p&gt;An agent saying "done" does not mean the task is actually done. So we wrap the agent in a verification layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent executes
-&amp;gt; Verifier checks
-&amp;gt; If it fails, return concrete feedback
-&amp;gt; Agent executes again
-&amp;gt; Repeat until it passes or the budget is exhausted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The verifier can be unit tests, type checks, lint, schema validation, and so on.&lt;/p&gt;

&lt;p&gt;One important principle: &lt;strong&gt;try not to let the same entity that writes the answer also grade its own exam.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 3: Event-driven Loop
&lt;/h3&gt;

&lt;p&gt;Once execution and verification are in place, the next step is removing manual startup.&lt;/p&gt;

&lt;p&gt;Tasks can be triggered by real events. The agent is no longer just a chat tool; it becomes a background component in a business system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Event
-&amp;gt; Deterministic rule decides whether to handle it
-&amp;gt; Start agent
-&amp;gt; Verify result
-&amp;gt; Update the real system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Layer 4: Hill-climbing Loop
&lt;/h3&gt;

&lt;p&gt;The first three layers automate work.&lt;/p&gt;

&lt;p&gt;The fourth layer starts automating how the work gets better.&lt;/p&gt;

&lt;p&gt;Every agent run leaves a trace:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what task it received;&lt;/li&gt;
&lt;li&gt;what tools it called;&lt;/li&gt;
&lt;li&gt;where it failed;&lt;/li&gt;
&lt;li&gt;why the verifier rejected it;&lt;/li&gt;
&lt;li&gt;how many tokens it used;&lt;/li&gt;
&lt;li&gt;whether a human had to take over.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An outer system can periodically analyze these traces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Collect many run records
-&amp;gt; Identify frequent failure modes
-&amp;gt; Adjust prompts, tools, skills, or verifiers
-&amp;gt; Re-test on an eval set
-&amp;gt; Update the harness after passing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the layer where Loopcraft becomes most valuable.&lt;/p&gt;

&lt;p&gt;An ordinary loop repeats work. A hill-climbing loop changes the system that produces the work.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ordinary loop:
Failure -&amp;gt; Try again

Improvement loop:
Failure -&amp;gt; Analyze why it failed
        -&amp;gt; Modify prompts, tools, or verification rules
        -&amp;gt; Make future runs more reliable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The outer loop's arrow does not just go back to the beginning of the task. It reaches into the agent and changes the inner loop.&lt;/p&gt;

&lt;p&gt;That is where compounding starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Karpathy's Autoresearch Is the Cleanest Loopcraft Example So Far
&lt;/h2&gt;

&lt;p&gt;Karpathy's Autoresearch is a good concrete example for understanding Loopcraft.&lt;/p&gt;

&lt;p&gt;The project is conceptually simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent proposes a training improvement
-&amp;gt; Modify train.py
-&amp;gt; Run training for a fixed five minutes
-&amp;gt; Read the val_bpb metric
-&amp;gt; Keep the change if the metric improves
-&amp;gt; Roll back if the metric worsens
-&amp;gt; Start the next experiment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It can run about 12 experiments per hour without human intervention. Overnight, it can complete close to 100 experiments.&lt;/p&gt;

&lt;p&gt;The clever part is not a fancy agent prompt. It is that Karpathy reshaped the problem into an environment that is ideal for loop optimization:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the agent can modify only one file;&lt;/li&gt;
&lt;li&gt;the evaluation metric is fixed;&lt;/li&gt;
&lt;li&gt;each experiment has a fixed runtime;&lt;/li&gt;
&lt;li&gt;results can be compared automatically;&lt;/li&gt;
&lt;li&gt;failed changes can be rolled back;&lt;/li&gt;
&lt;li&gt;Git records the full experiment history;&lt;/li&gt;
&lt;li&gt;verification code cannot be modified by the agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the core shift of Loopcraft: &lt;strong&gt;humans move from directly doing the task to designing a system that can repeatedly do, verify, and improve the task.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. How to Build a Minimal Loop Yourself
&lt;/h2&gt;

&lt;p&gt;Autoresearch is a special environment. Ordinary developers can start with something simpler:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Automatically receive a small issue, attempt a fix, create a PR after tests pass, and retry with feedback when it fails.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Do not start with multi-agent orchestration. A minimal loop needs only six parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Trigger&lt;/strong&gt;: what event starts the task, such as a CI failure, scheduled job, or issue with a specific label.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Goal&lt;/strong&gt;: what counts as done, preferably something that can be turned into tests, lint, type checks, or another machine-verifiable condition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State&lt;/strong&gt;: store attempt count, failure reason, and current progress in a file or database instead of relying only on chat context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worker&lt;/strong&gt;: run the coding agent in an isolated worktree or container so it does not pollute the main branch or other tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verifier&lt;/strong&gt;: prefer tests, rules, and static checks. Use an LLM reviewer only for parts that are hard to formalize.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget&lt;/strong&gt;: limit attempts, runtime, and cost. Hand off to a human for high-risk operations.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The whole flow can be simplified to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;run_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;goal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;load_state&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="n"&gt;verdict&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;save_state&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;passed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;create_pull_request&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;retryable&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;notify_human&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whether you use Claude Code, Codex, GitHub Actions, Bash, or Python is not the important part.&lt;/p&gt;

&lt;p&gt;What matters is designing this chain clearly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Trigger -&amp;gt; Execute -&amp;gt; Verify -&amp;gt; Feedback -&amp;gt; Retry or exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As long as a task has a clear goal, reliable feedback, recoverable state, and a stopping condition, you already have a minimal loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Common Loopcraft Traps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Trap 1: Treating Infinite Retry as Autonomy
&lt;/h3&gt;

&lt;p&gt;Running repeatedly is not the same as improving.&lt;/p&gt;

&lt;p&gt;If the agent receives no new feedback, repeating ten times usually means spending ten times the tokens to make similar mistakes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Trap 2: Letting the Agent Change Its Own Exam
&lt;/h3&gt;

&lt;p&gt;The execution agent should not freely modify tests, evaluation metrics, time budgets, permission boundaries, or verifier prompts.&lt;/p&gt;

&lt;p&gt;Otherwise it may not be making the task better. It may only be making "pass" easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Trap 3: Starting With Multiple Agents
&lt;/h3&gt;

&lt;p&gt;Multiple agents do not automatically create intelligence. They first create more token cost, file conflicts, duplicate work, and state synchronization problems.&lt;/p&gt;

&lt;p&gt;Get one worker, one verifier, and one persistent state path working before adding parallelism.&lt;/p&gt;

&lt;h3&gt;
  
  
  Trap 4: Measuring How Busy the Agent Is
&lt;/h3&gt;

&lt;p&gt;Number of agents, runtime, token usage, and tool-call count are not the final value.&lt;/p&gt;

&lt;p&gt;What matters is &lt;strong&gt;verified progress per unit cost&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Examples include issue auto-resolution rate, average cost per qualified PR, and human handoff ratio.&lt;/p&gt;

&lt;h3&gt;
  
  
  Trap 5: The Smoother the Loop, the Easier It Is to Stop Understanding
&lt;/h3&gt;

&lt;p&gt;This is the risk I care about most.&lt;/p&gt;

&lt;p&gt;When an agent can automatically write code, test it, fix it, and create a PR, humans may be tempted to look only at the final green check.&lt;/p&gt;

&lt;p&gt;But the faster the system produces code, the faster human understanding of that system can decline.&lt;/p&gt;

&lt;p&gt;Loopcraft should not become an excuse to stop thinking. It actually raises the bar for how much the human has to understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;I increasingly feel that agent engineering is going through an abstraction shift.&lt;/p&gt;

&lt;p&gt;At first we discussed prompts. Then we moved to context, tools, memory, and harnesses.&lt;/p&gt;

&lt;p&gt;Now the focus is moving outward again: how to put a single agent run inside a larger cycle of tasks, verification, and improvement.&lt;/p&gt;

&lt;p&gt;I remain skeptical of fully removing humans from the loop.&lt;/p&gt;

&lt;p&gt;But I agree with one thing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not only fix the current result produced by the agent. Start fixing the system that keeps producing those results.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Field Notes: How Agentic RAG Handles the Real Mess of Enterprise Data</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Fri, 19 Jun 2026 15:24:18 +0000</pubDate>
      <link>https://dev.to/luhuidev/field-notes-how-agentic-rag-handles-the-real-mess-of-enterprise-data-a68</link>
      <guid>https://dev.to/luhuidev/field-notes-how-agentic-rag-handles-the-real-mess-of-enterprise-data-a68</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  A Support Ticket That Opens a Data Maze
&lt;/h2&gt;

&lt;p&gt;Say your company just launched an AI customer-support system.&lt;/p&gt;

&lt;p&gt;A major account sends in a ticket: &lt;em&gt;"What's the remaining warranty period on the servers we purchased under Project Alpha last quarter? Could you also share the original contract terms and the current technical support contact?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It sounds like an ordinary question. But when your tech lead reads the ticket, they pause for a moment.&lt;/p&gt;

&lt;p&gt;Because they know answering it requires the system to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Look up the customer's profile and project history in the &lt;strong&gt;CRM&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Look up the procurement contract and warranty terms for Project Alpha in the &lt;strong&gt;ERP / contract management system&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Look up the stock-in date and device serial numbers for that batch of servers in the &lt;strong&gt;asset management system&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Look up the current customer-success owner in the &lt;strong&gt;HR system&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These four systems are maintained by different teams, run on different databases, and enforce different access controls.&lt;/p&gt;

&lt;p&gt;A standard RAG system is helpless here. The best it can do is say, "Sorry, I couldn't find relevant information."&lt;/p&gt;

&lt;p&gt;This is exactly the problem &lt;strong&gt;Agentic RAG&lt;/strong&gt; is built to solve.&lt;/p&gt;


&lt;h2&gt;
  
  
  Traditional RAG: A One-Shot Retrieval Clerk
&lt;/h2&gt;

&lt;p&gt;Let's quickly recap how RAG works.&lt;/p&gt;

&lt;p&gt;The core idea behind &lt;strong&gt;RAG (Retrieval-Augmented Generation)&lt;/strong&gt; is simple: an LLM's training knowledge is static, while enterprise data is dynamic and private. The fix is to retrieve relevant document chunks from a database before generating an answer, stuff them into the context, and have the LLM answer based on that material.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question → [vector search] → retrieve relevant chunks → [LLM] → generate answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pipeline works well when there's a single knowledge base and a clear question. But it has two fundamental limits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limit one: a single retrieval pass, no iteration.&lt;/strong&gt; Retrieve once, hand it to the LLM once, done. If the first pass misses the key information, the whole chain breaks, and the LLM is left guessing or saying "I don't know."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limit two: a single corpus, no routing.&lt;/strong&gt; Traditional RAG assumes all knowledge lives in one unified vector database. In a real enterprise, data is scattered across CRM, ERP, Confluence, data warehouses, private document stores -- each with its own access point and permission boundary.&lt;/p&gt;

&lt;p&gt;Here's an analogy: traditional RAG is a librarian who can only find books on the first floor, while the book you need might be sitting on the fourth floor, behind a different access pass.&lt;/p&gt;



&lt;h2&gt;
  
  
  Agentic RAG: A Retrieval Department That Thinks
&lt;/h2&gt;

&lt;p&gt;The core shift in Agentic RAG is this: &lt;strong&gt;turn a single retrieval pass into a planned, iterative retrieval process.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's no longer a passive query-and-return pipeline. It's a workflow run by multiple specialized agents, each with a distinct responsibility.&lt;/p&gt;

&lt;p&gt;Let's use the support-ticket example to walk through how the whole workflow operates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwhhs5e0fd7qu43cw732l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwhhs5e0fd7qu43cw732l.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h3&gt;
  
  
  Step 1: The Orchestrator Decomposes the Task
&lt;/h3&gt;

&lt;p&gt;The user's question first reaches the &lt;strong&gt;Orchestrator&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The orchestrator doesn't retrieve anything directly. It first understands the structure of the question: how many independent information needs are involved? Are there dependencies between them? Which data sources need to be accessed?&lt;/p&gt;

&lt;p&gt;For our ticket, the orchestrator breaks it down into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subtask A&lt;/strong&gt;: Look up the customer's "Project Alpha" basics (customer ID, project number) in the CRM&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subtask B&lt;/strong&gt;: Use the project number to look up warranty terms in the contract system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subtask C&lt;/strong&gt;: Use the project number to look up device serial numbers and stock-in dates in the asset management system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subtask D&lt;/strong&gt;: Look up the current technical support owner in the HR system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note that Subtasks B and C depend on the result of Subtask A (they need the project number first). Subtask D can run in parallel.&lt;/p&gt;

&lt;p&gt;This dependency graph is the execution plan produced by the &lt;strong&gt;Planner Agent&lt;/strong&gt;.&lt;/p&gt;



&lt;h3&gt;
  
  
  Step 2: Query Rewriting for Each Data Source
&lt;/h3&gt;

&lt;p&gt;Every data source expects queries in a different form. The CRM might need keyword search, the contract system might need structured SQL, and the vector database needs semantic search.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Query Rewriter&lt;/strong&gt; translates each natural-language subtask into a query format the target source can understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For the CRM vector store: &lt;code&gt;"Alpha project procurement record {customer name}"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;For the contract system: &lt;code&gt;SELECT warranty_terms FROM contracts WHERE project_id = 'Alpha-XXX'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;For asset management: &lt;code&gt;"Alpha project server stock-in date serial number"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;h3&gt;
  
  
  Step 3: Parallel Retrieval Across Permission Boundaries
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Search Fanout Agent&lt;/strong&gt; queries multiple data sources at once.&lt;/p&gt;

&lt;p&gt;There's a key engineering problem here: &lt;strong&gt;permissions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Different data sources have different access controls. CRM data might be open to the sales team, HR data might only be accessible to admins, and contract data might require legal sign-off. An Agentic RAG framework needs to maintain a "credential pool" at this layer -- different access tokens for different data sources -- and make sure retrieval never exceeds the current user's actual authorization scope.&lt;/p&gt;

&lt;p&gt;This isn't just a technical problem; it's a compliance one too: &lt;strong&gt;AI shouldn't be able to bypass data access controls you were never supposed to have just because you phrased a request in natural language.&lt;/strong&gt;&lt;/p&gt;



&lt;h3&gt;
  
  
  Step 4: Sufficiency Checking -- the Most Important Innovation
&lt;/h3&gt;

&lt;p&gt;Once all retrieval results come back, they're passed to the &lt;strong&gt;Sufficient Context Agent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is the design that most distinguishes Agentic RAG from traditional RAG: &lt;strong&gt;the system actively judges whether the information gathered so far is enough to answer the original question, and if not, it spells out exactly what's missing before retrieving again.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In our ticket example, the checker might find:&lt;/p&gt;

&lt;p&gt;✅ Found: customer profile, project number, device serial numbers&lt;br&gt;
✅ Found: technical support owner&lt;br&gt;
❌ &lt;strong&gt;Missing&lt;/strong&gt;: the contract system returned a document, but the warranty terms are in an attached PDF that the vector search didn't hit&lt;/p&gt;

&lt;p&gt;Instead of just saying "not enough information," the checker outputs a precise description of the gap:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Project number Alpha-2024-087, device serial numbers SN-XXX-YYY-ZZZ, and stock-in date March 2024 have been retrieved. The main contract file has been found, but the warranty terms are in Contract Attachment B. Re-search the contract attachment store specifically for 'Attachment B warranty period.'"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That feedback drives a &lt;strong&gt;second retrieval round&lt;/strong&gt;: the rewriter generates a more precise query targeted at the contract attachment.&lt;/p&gt;

&lt;p&gt;This "retrieve → evaluate → retrieve again" loop continues until the sufficiency checker determines the information is complete, or the maximum iteration limit is reached.&lt;/p&gt;



&lt;h3&gt;
  
  
  Step 5: Synthesis Produces the Final Answer
&lt;/h3&gt;

&lt;p&gt;Once everything is in place, the &lt;strong&gt;Synthesis Agent&lt;/strong&gt; combines fragments from four different systems into one coherent, accurate, and source-attributed answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The three servers purchased under Project Alpha (project number Alpha-2024-087, serial numbers SN-XXX-001 through 003) carry a 36-month warranty from their stock-in date (March 15, 2024), per Section 4.2 of Contract Attachment B, expiring March 14, 2027. The current technical support owner is Li Ming (extension 4521, &lt;a href="mailto:liming@company.com"&gt;liming@company.com&lt;/a&gt;)."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every sentence has a traceable source.&lt;/p&gt;



&lt;h2&gt;
  
  
  Cross-System Permissions: Harder Than the Technology
&lt;/h2&gt;

&lt;p&gt;The handling of &lt;strong&gt;permission boundaries&lt;/strong&gt; deserves its own discussion.&lt;/p&gt;

&lt;p&gt;In a real enterprise, data permissions are a multi-dimensional problem:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Role-based access&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Different roles see different data&lt;/td&gt;
&lt;td&gt;Sales can see a contract summary but not the full text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data classification&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A single database can hold multiple sensitivity levels&lt;/td&gt;
&lt;td&gt;Employee salary vs. employee directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time-based access&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Some data has time-limited access rules&lt;/td&gt;
&lt;td&gt;Financial data is read-only during an audit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cross-system access&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Data from System A must not surface in System B's context&lt;/td&gt;
&lt;td&gt;GDPR requires data to stay within its jurisdiction&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;An Agentic RAG framework needs to enforce these rules on &lt;strong&gt;every single retrieval call&lt;/strong&gt;, not just authorize access once at indexing time.&lt;/p&gt;

&lt;p&gt;That means the architecture needs &lt;strong&gt;permission checks at query time&lt;/strong&gt;, rather than the blunt approach of vectorizing everything into one big store.&lt;/p&gt;

&lt;p&gt;In database terms: traditional RAG is like joining every table into one giant table and handing it to the LLM. Agentic RAG is like generating a permission-filtered SQL query dynamically for every request.&lt;/p&gt;



&lt;h2&gt;
  
  
  Three Decisions You Can't Avoid in Practice
&lt;/h2&gt;

&lt;p&gt;When you actually build Agentic RAG in production, three decisions come up every time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision one: routing strategy -- static rules or LLM routing?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Static routing&lt;/strong&gt;: predefine rules based on keywords or metadata in the query to decide which data source to hit. Fast and predictable, but weak on open-ended queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LLM routing&lt;/strong&gt;: let the LLM understand the query's intent and dynamically decide where to route it. Flexible, but every routing decision burns an LLM call, adding latency and cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision two: iteration depth -- when do you stop?
&lt;/h3&gt;

&lt;p&gt;The system can get stuck in an infinite loop -- every round of retrieval feels like something is still missing, so it keeps searching.&lt;/p&gt;

&lt;p&gt;Engineering-wise, you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;maximum iteration count&lt;/strong&gt; (typically 2-4 rounds)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;time budget&lt;/strong&gt; (answer with what you have once you time out)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;degradation strategy&lt;/strong&gt; (answer with available information and flag it as potentially incomplete once the iteration limit is hit)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Decision three: the latency-vs-accuracy trade-off
&lt;/h3&gt;

&lt;p&gt;Agentic RAG is slower than traditional RAG -- there's no avoiding it. Multiple LLM calls, parallel retrieval, and sufficiency evaluation all add latency at every step.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Cost multiplier&lt;/th&gt;
&lt;th&gt;Latency multiplier&lt;/th&gt;
&lt;th&gt;Best fit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Traditional RAG&lt;/td&gt;
&lt;td&gt;1x&lt;/td&gt;
&lt;td&gt;1x&lt;/td&gt;
&lt;td&gt;Simple Q&amp;amp;A, single knowledge base&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adaptive RAG&lt;/td&gt;
&lt;td&gt;1.5-2x&lt;/td&gt;
&lt;td&gt;1.2-2x&lt;/td&gt;
&lt;td&gt;Mixed scenarios with varying query complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CRAG (Corrective RAG)&lt;/td&gt;
&lt;td&gt;3-5x&lt;/td&gt;
&lt;td&gt;2-3x&lt;/td&gt;
&lt;td&gt;High accuracy needs, tolerant of second-scale latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full Agentic RAG&lt;/td&gt;
&lt;td&gt;5-10x&lt;/td&gt;
&lt;td&gt;3-6x&lt;/td&gt;
&lt;td&gt;Complex multi-hop, cross-store, async scenarios&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Not every scenario needs full Agentic RAG.&lt;/p&gt;

&lt;p&gt;Classifying intent at the query level -- routing complex queries through the Agentic pipeline and simple ones through traditional RAG -- keeps average cost and latency within a reasonable range.&lt;/p&gt;



&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;I think the essence of Agentic RAG is turning retrieval into an executable strategy: &lt;strong&gt;if one pass isn't enough, keep searching until it is. And the system itself decides what "enough" means.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That shift sounds simple, but it requires moving from a stateless "query-response" model to a stateful "goal-plan-execute-evaluate-iterate" workflow.&lt;/p&gt;

&lt;p&gt;This is the same general challenge every agent system faces: &lt;strong&gt;state management is the core difficulty.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're building an enterprise AI system that spans multiple data sources, Agentic RAG isn't just an upgrade to your retrieval technique. It forces you to rethink data architecture, permission design, and workflow orchestration. Getting those three things right matters more than which framework or cloud vendor you pick.&lt;/p&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google Research, &lt;a href="https://research.google/blog/unlocking-dependable-responses-with-gemini-enterprise-agent-platforms-agentic-rag/" rel="noopener noreferrer"&gt;&lt;em&gt;Unlocking dependable responses with Gemini Enterprise Agent Platform's Agentic RAG&lt;/em&gt;&lt;/a&gt;, June 2026&lt;/li&gt;
&lt;li&gt;Microsoft, &lt;a href="https://learn.microsoft.com/en-us/azure/search/agentic-retrieval-overview" rel="noopener noreferrer"&gt;&lt;em&gt;Agentic Retrieval Overview -- Azure AI Search&lt;/em&gt;&lt;/a&gt;, 2026-04-01 GA&lt;/li&gt;
&lt;li&gt;Microsoft, &lt;a href="https://learn.microsoft.com/en-us/azure/search/agentic-knowledge-source-overview" rel="noopener noreferrer"&gt;&lt;em&gt;What is a Knowledge Source? -- Azure AI Search&lt;/em&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Amazon Web Services, &lt;a href="https://aws.amazon.com/about-aws/whats-new/2024/04/knowledge-bases-amazon-bedrock-multiple-data-sources/" rel="noopener noreferrer"&gt;&lt;em&gt;Knowledge Bases for Amazon Bedrock -- Multiple Data Sources&lt;/em&gt;&lt;/a&gt;, April 2024&lt;/li&gt;
&lt;li&gt;MarsDevs, &lt;a href="https://www.marsdevs.com/guides/agentic-rag-2026-guide" rel="noopener noreferrer"&gt;&lt;em&gt;Agentic RAG: The 2026 Production Guide&lt;/em&gt;&lt;/a&gt; (includes cost/latency comparisons across approaches)&lt;/li&gt;
&lt;li&gt;Google Research, &lt;a href="https://research.google/blog/deeper-insights-into-retrieval-augmented-generation-the-role-of-sufficient-context/" rel="noopener noreferrer"&gt;&lt;em&gt;Deeper Insights into Retrieval-Augmented Generation: The Role of Sufficient Context&lt;/em&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>luhuidev</category>
    </item>
    <item>
      <title>Claude Code Incident Review: What Anthropic's Three Production Bugs Teach Agent Engineers</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Fri, 12 Jun 2026 14:24:59 +0000</pubDate>
      <link>https://dev.to/luhuidev/claude-code-incident-review-what-anthropics-three-production-bugs-teach-agent-engineers-4jmo</link>
      <guid>https://dev.to/luhuidev/claude-code-incident-review-what-anthropics-three-production-bugs-teach-agent-engineers-4jmo</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;Last month, Anthropic published a rare kind of incident review.&lt;/p&gt;

&lt;p&gt;The rare part was not that they had bugs. If you build large-model products, bugs are part of the deal.&lt;/p&gt;

&lt;p&gt;The rare part was that they wrote up three production incidents in detail: how each one was introduced, why testing missed it, why it was hard to reproduce internally, and what they changed afterward.&lt;/p&gt;

&lt;p&gt;After reading it, I think the review is worth studying closely. If you build LLM Agents, especially systems with multi-turn tasks, tool calls, context compression, and reasoning trace management, these failures are not edge cases. They are waiting on the road.&lt;/p&gt;



&lt;h2&gt;
  
  
  Three Bugs, Three Failure Modes
&lt;/h2&gt;

&lt;p&gt;Here is the short version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug one&lt;/strong&gt;: On March 4, to address occasional UI freezes in Opus 4.6 under &lt;code&gt;high&lt;/code&gt; reasoning mode, the team changed the default reasoning effort from &lt;code&gt;high&lt;/code&gt; to &lt;code&gt;medium&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Internal testing looked fine: intelligence dropped only slightly, and latency improved a lot.&lt;/p&gt;

&lt;p&gt;After launch, users pushed back hard: Claude felt dumber.&lt;/p&gt;

&lt;p&gt;On April 7, one month later, the change was rolled back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug two&lt;/strong&gt;: On March 26, Anthropic shipped a cache optimization. The idea was simple: after a session had been idle for more than an hour, clear old thinking history to reduce the cost of resuming.&lt;/p&gt;

&lt;p&gt;Sounds reasonable, right?&lt;/p&gt;

&lt;p&gt;The production implementation had a bug. It was supposed to clear the old thinking once. Instead, it kept clearing it on every later turn.&lt;/p&gt;

&lt;p&gt;So Claude kept working while repeatedly losing the memory of why it was doing the work. Users saw forgetting, repetition, strange tool calls, and increasingly odd behavior.&lt;/p&gt;

&lt;p&gt;Worse, once thinking blocks kept disappearing, each request became a cache miss and burned through usage limits faster.&lt;/p&gt;

&lt;p&gt;The root cause was not identified until April 10, two full weeks later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug three&lt;/strong&gt;: On April 16, to reduce verbose output from Opus 4.7, the team added a line to the system prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use no more than 25 words between tool calls, and no more than 100 words in the final response.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That prompt line showed no obvious regression during weeks of internal testing.&lt;/p&gt;

&lt;p&gt;After launch, coding quality dropped by 3%.&lt;/p&gt;

&lt;p&gt;On April 20, it was rolled back.&lt;/p&gt;




&lt;p&gt;These three bugs look different, but they point to the same issue: in an Agent system, things that look local, such as parameters, caches, and prompt lines, can still affect the core execution logic.&lt;/p&gt;

&lt;p&gt;Touch them, and you may be touching the model's brain.&lt;/p&gt;



&lt;h2&gt;
  
  
  Reasoning History Is Working Memory, Not a Log
&lt;/h2&gt;

&lt;p&gt;The second bug is the one I keep coming back to.&lt;/p&gt;

&lt;p&gt;"Clear old thinking to save tokens" is a perfectly normal engineering optimization. Thinking blocks are long and expensive. If a session has been idle for an hour, the old reasoning chain can look less important.&lt;/p&gt;

&lt;p&gt;But that is exactly the trap.&lt;/p&gt;

&lt;p&gt;For an Agent, the reasoning trace is not just a log. It does not merely record what happened. Its more important job is to preserve why the Agent made earlier decisions.&lt;/p&gt;

&lt;p&gt;That why is what lets a multi-turn task keep moving.&lt;/p&gt;

&lt;p&gt;When it disappears, the Agent does not crash immediately. It can still talk, call tools, and return results. But it has already started forgetting.&lt;/p&gt;

&lt;p&gt;It forgets which paths were ruled out, why the current path was chosen, and what problem the user was actually trying to solve.&lt;/p&gt;

&lt;p&gt;The result is a nasty kind of degradation: it gets worse, and the task drifts.&lt;/p&gt;

&lt;p&gt;This class of bug is painful because it is not a crash. It does not give you a clean stack trace. It slowly shows up in production as a feeling that the Agent has become strangely bad.&lt;/p&gt;

&lt;p&gt;So context management cannot be a blunt token-count cut.&lt;/p&gt;

&lt;p&gt;At minimum, we need to separate three categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do not casually compress&lt;/strong&gt;: decision rationale, task intent, hard constraints, reasoning path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can compress&lt;/strong&gt;: intermediate observations, tool outputs, process material.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can drop&lt;/strong&gt;: formatting helpers, redundant explanations, temporary display content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reasoning history is not cache garbage. In many cases, it is the Agent's working memory.&lt;/p&gt;

&lt;p&gt;You may think you are saving tokens. You may actually be removing the part of the system that lets the Agent stay on task.&lt;/p&gt;



&lt;h2&gt;
  
  
  Every Prompt Line Is Code
&lt;/h2&gt;

&lt;p&gt;The third bug is just as important.&lt;/p&gt;

&lt;p&gt;How can adding one line that says "say less" reduce coding quality?&lt;/p&gt;

&lt;p&gt;Because in model behavior, less output and less thinking are not always separate things.&lt;/p&gt;

&lt;p&gt;If you require the final answer to be under 100 words and text between tool calls to be under 25 words, the model may not only compress expression. It may compress the decision process.&lt;/p&gt;

&lt;p&gt;This is not a traditional bug. The model is sincerely optimizing for the target you gave it.&lt;/p&gt;

&lt;p&gt;That is why Anthropic's follow-up discipline matters: every system prompt change should be ablated per model; if a line can be tested line by line, test it line by line; changes that may affect intelligence need gradual rollout and a soak period.&lt;/p&gt;

&lt;p&gt;That sounds heavy.&lt;/p&gt;

&lt;p&gt;But if you accept that prompts are production code, the discipline is not excessive.&lt;/p&gt;



&lt;h2&gt;
  
  
  Clean Test Environments Are Unlike Production
&lt;/h2&gt;

&lt;p&gt;There is a common Agent engineering problem that people do not like to face:&lt;/p&gt;

&lt;p&gt;The test environment is too clean.&lt;/p&gt;

&lt;p&gt;So clean that it stops looking like production.&lt;/p&gt;

&lt;p&gt;Many Agent failures are not as simple as "input A produces wrong output B." They depend on a sequence of state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;session idle for more than one hour
resume
continue multi-turn tool use
thinking gets cleared
enter the next turn
thinking gets cleared again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That kind of state sequence is hard to cover with unit tests and easy to miss in e2e tests.&lt;/p&gt;

&lt;p&gt;We test features. Production runs a state machine.&lt;/p&gt;

&lt;p&gt;That is also why Anthropic later had more internal employees use the exact same Claude Code build as the public release, rather than a test build.&lt;/p&gt;

&lt;p&gt;Real usage is still the best integration test.&lt;/p&gt;



&lt;h2&gt;
  
  
  Defaults Are the Product
&lt;/h2&gt;

&lt;p&gt;Now back to the first bug.&lt;/p&gt;

&lt;p&gt;Changing &lt;code&gt;high&lt;/code&gt; to &lt;code&gt;medium&lt;/code&gt; made sense from an engineering angle: fewer freezes, lower latency, and only a slight intelligence drop.&lt;/p&gt;

&lt;p&gt;The problem is that "slight drop" is benchmark language. It may not match user experience.&lt;/p&gt;

&lt;p&gt;Users are not running average benchmarks. They are working with their code, their context, their workflow, and their messy problems.&lt;/p&gt;

&lt;p&gt;In those highly personalized tasks, a small capability drop can feel like: it no longer understands me, it is not as sharp as before, it is making basic mistakes.&lt;/p&gt;

&lt;p&gt;The product may offer a setting, but most users will not change it. The default is the product decision.&lt;/p&gt;



&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The most valuable part of this incident review is not the reminder that Claude Code can have bugs.&lt;/p&gt;

&lt;p&gt;That is normal.&lt;/p&gt;

&lt;p&gt;The valuable part is the reminder that Agent reliability often fails outside the model itself, in nearby system decisions that look local, technical, and low-risk.&lt;/p&gt;

&lt;p&gt;Default parameters, cache strategy, context trimming, prompt constraints, and differences between test and production builds can all change Agent behavior.&lt;/p&gt;

&lt;p&gt;Building an Agent is not just calling a smart model.&lt;/p&gt;

&lt;p&gt;It is maintaining a complex system that can act, forget, misunderstand goals, and be shaped by context.&lt;/p&gt;

&lt;p&gt;So the core discipline of Agent engineering may be this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not only ask whether a change made the system faster, cheaper, or shorter. Also ask whether it took away the memory the model needs to finish the task.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>luhuidev</category>
      <category>ai</category>
      <category>claude</category>
    </item>
    <item>
      <title>DeepMind AlphaProof Nexus Explained: 4 System Paradigms for AI Math Research</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Thu, 28 May 2026 14:55:25 +0000</pubDate>
      <link>https://dev.to/luhuidev/deepmind-alphaproof-nexus-explained-4-system-paradigms-for-ai-math-research-1kdb</link>
      <guid>https://dev.to/luhuidev/deepmind-alphaproof-nexus-explained-4-system-paradigms-for-ai-math-research-1kdb</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In May 2026, DeepMind released the arXiv paper &lt;a href="https://arxiv.org/html/2605.22763v1" rel="noopener noreferrer"&gt;Advancing Mathematics Research with AI-Driven Formal Proof Search&lt;/a&gt;, introducing &lt;strong&gt;AlphaProof Nexus&lt;/strong&gt;, a formal proof system for mathematical research.&lt;/p&gt;

&lt;p&gt;If we only look at the results, the paper may sound like another story about AI proving math problems: the system solved 9 out of 353 formalized Erdos open problems, proved 44 out of 492 OEIS conjectures, and was also used in real research across graph theory, optimization theory, algebraic geometry, additive combinatorics, and quantum optics.&lt;/p&gt;

&lt;p&gt;But as someone building in AI + education, what I care about more is the research route behind it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let large models propose proof ideas, let formal systems such as Lean verify them, let specialized proof searchers solve local goals, and use multi-agent orchestration to turn failures, partial drafts, and subgoals into reusable search assets.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This essay breaks down AlphaProof Nexus in plain language: why it exists, how the system is designed, and the &lt;strong&gt;four AI math research paradigms&lt;/strong&gt; reflected in the paper.&lt;/p&gt;



&lt;h2&gt;
  
  
  1. Why AI for Math Needs Formal Proof
&lt;/h2&gt;

&lt;p&gt;Most people understand mathematical proof in natural language:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Since A is true, B follows. Because of a theorem, C follows. Therefore the conclusion holds.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This works for human mathematicians because people can fill in omitted reasoning. For AI, however, there is a serious issue: &lt;strong&gt;large models are good at writing text that looks like a proof, but that does not mean they have actually proved anything.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They may:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cite theorems that do not exist;&lt;/li&gt;
&lt;li&gt;skip key steps;&lt;/li&gt;
&lt;li&gt;replace a hard problem with another problem that looks easier but is still unproved;&lt;/li&gt;
&lt;li&gt;write confident derivations with broken logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the core starting point of the DeepMind paper is to make AI work inside a strict system.&lt;/p&gt;

&lt;p&gt;That system is &lt;strong&gt;Lean&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Lean can be understood as a mathematical compiler. When programmers write code, compilers check syntax and type errors. When mathematicians write Lean proofs, Lean checks whether every logical step really holds.&lt;/p&gt;

&lt;p&gt;If Lean accepts a proof, the proof is not merely plausible. It has passed strict machine checking.&lt;/p&gt;

&lt;p&gt;That is the basic idea of AlphaProof Nexus:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI can guess, try, and fail, but the final answer must pass Lean verification.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  2. What Is AlphaProof Nexus?
&lt;/h2&gt;

&lt;p&gt;AlphaProof Nexus is not a single large model, nor is it a chat-only math assistant. It is closer to an &lt;strong&gt;AI mathematical research pipeline&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The input is a Lean file containing an unfinished theorem proof. The system repeatedly modifies, completes, and decomposes the proof until Lean accepts it.&lt;/p&gt;

&lt;p&gt;You can picture it like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4a5b8y8ob3mb5nhcsqxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4a5b8y8ob3mb5nhcsqxk.png" alt="AlphaProof Nexus proof search flowchart" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are several important roles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LLM&lt;/strong&gt;: proposes proof ideas, writes Lean code, and fixes errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lean&lt;/strong&gt;: checks whether the proof is actually correct.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AlphaProof&lt;/strong&gt;: solves certain local proof goals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rater Agent&lt;/strong&gt;: compares proof drafts and judges which ones are more promising.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Population DB&lt;/strong&gt;: stores many unfinished but valuable proof drafts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SafeVerify&lt;/strong&gt;: performs final checks against cheating, such as modifying the original theorem or introducing disallowed axioms.&lt;/li&gt;
&lt;/ul&gt;



&lt;h2&gt;
  
  
  3. Four AI Math Research Paradigms in the Paper
&lt;/h2&gt;

&lt;p&gt;DeepMind compares four agent configurations. They can also be read as four paradigms for AI-driven mathematical research.&lt;/p&gt;

&lt;h3&gt;
  
  
  Paradigm 1: Basic Agent
&lt;/h3&gt;

&lt;p&gt;The first is the most basic pattern: &lt;strong&gt;LLM + Lean feedback loop&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It works much like a programmer writing code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The LLM reads an unfinished Lean proof.&lt;/li&gt;
&lt;li&gt;It tries to fill in proof code.&lt;/li&gt;
&lt;li&gt;Lean compiles the file.&lt;/li&gt;
&lt;li&gt;If Lean reports errors, those errors are sent back to the LLM.&lt;/li&gt;
&lt;li&gt;The LLM edits the proof based on the errors.&lt;/li&gt;
&lt;li&gt;This repeats until the proof passes or the budget is exhausted.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The core ability here is iterative trial and correction.&lt;/p&gt;

&lt;p&gt;Imagine a student solving a problem. The student writes a solution, the teacher points out what is wrong, and the student revises it. Here the teacher is not a person but the Lean compiler. Lean will not say whether an idea is elegant, but it will strictly tell you when a type is wrong, a goal remains unsolved, a theorem does not match, or a logical step is missing.&lt;/p&gt;

&lt;p&gt;That gives the large model very high-quality feedback.&lt;/p&gt;

&lt;p&gt;One interesting conclusion in the paper is that &lt;strong&gt;Basic Agent is already strong&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In post hoc experiments, Basic Agent could also reproduce the 9 successful Erdos cases, although harder problems required more cost and had worse efficiency.&lt;/p&gt;

&lt;p&gt;This suggests that as base model capability improves, the simple "generate - compile - repair" loop has already become a highly competitive baseline for formal mathematics.&lt;/p&gt;

&lt;p&gt;The lesson is straightforward: do not expect a large model to produce a perfect proof in one shot. Put it inside an environment that can keep giving feedback and force revision.&lt;/p&gt;



&lt;h3&gt;
  
  
  Paradigm 2: Basic Agent + AlphaProof
&lt;/h3&gt;

&lt;p&gt;The second paradigm adds &lt;strong&gt;AlphaProof&lt;/strong&gt; on top of Basic Agent.&lt;/p&gt;

&lt;p&gt;AlphaProof is a formal proof search system DeepMind developed earlier. In Nexus, it is not the main character. It is more like a local proof specialist.&lt;/p&gt;

&lt;p&gt;When an LLM writes Lean proofs, it often runs into small goals such as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In the current context, prove this subclaim.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some subgoals are mechanical but awkward for an LLM to write. Others require searching through a sequence of tactics, meaning Lean proof commands. At that point, the system can hand local goals to AlphaProof.&lt;/p&gt;

&lt;p&gt;AlphaProof may return three kinds of results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it finds a proof;&lt;/li&gt;
&lt;li&gt;it proves the subgoal is actually false;&lt;/li&gt;
&lt;li&gt;it fails to find a proof within budget.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matters because the LLM no longer has to carry every proof detail alone.&lt;/p&gt;

&lt;p&gt;You can think of the LLM as a graduate student responsible for the overall idea and proof structure; AlphaProof as a tactical searcher responsible for local technical details; and Lean as the final judge.&lt;/p&gt;

&lt;p&gt;The paper also notes that &lt;strong&gt;standalone AlphaProof cannot independently solve these research-level open problems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In the experiments, AlphaProof alone did not solve the 9 Erdos problems. Its effective position is inside the larger Nexus system, where it acts as a local proof tool.&lt;/p&gt;



&lt;h3&gt;
  
  
  Paradigm 3: Basic Agent + Evolution
&lt;/h3&gt;

&lt;p&gt;The third paradigm introduces a key idea: &lt;strong&gt;evolutionary search&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Mathematical proof is often not linear.&lt;/p&gt;

&lt;p&gt;One proof route may get stuck halfway. Another route may be unfinished but closer to the core idea. A third route may have proved useful lemmas even if the main theorem is not done.&lt;/p&gt;

&lt;p&gt;If every agent run starts from zero, a lot of exploration is wasted. AlphaProof Nexus therefore saves unfinished proof drafts into a &lt;strong&gt;Population DB&lt;/strong&gt;, a seed population of proof sketches.&lt;/p&gt;

&lt;p&gt;The system then uses a Rater Agent to compare those drafts and decide which ones are more promising.&lt;/p&gt;

&lt;p&gt;It is a bit like evolution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;each proof draft is an individual;&lt;/li&gt;
&lt;li&gt;agents mutate and rewrite drafts;&lt;/li&gt;
&lt;li&gt;the rater selects more promising drafts;&lt;/li&gt;
&lt;li&gt;the system spends compute on routes with higher potential.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hard part is that success signals in mathematical proof are very sparse. In program optimization, even a non-optimal program may still get a score. In formal proof, a proof usually either succeeds completely or does not.&lt;/p&gt;

&lt;p&gt;Intermediate states are hard to quantify.&lt;/p&gt;

&lt;p&gt;DeepMind's approach is to ask models to compare proof draft quality instead of assigning absolute scores. For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Among these unfinished proofs, which route is clearer? Which remaining goals look more credible? Which one is more likely to be completed?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The system then ranks proof drafts using an Elo-like mechanism and uses a P-UCB-style strategy to balance two needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;continue developing high-scoring routes;&lt;/li&gt;
&lt;li&gt;explore routes that have not been tried enough.&lt;/li&gt;
&lt;/ul&gt;



&lt;h3&gt;
  
  
  Paradigm 4: Full-Featured Agent
&lt;/h3&gt;

&lt;p&gt;The fourth paradigm is the main system promoted by the paper: &lt;strong&gt;LLM + Lean + AlphaProof + Evolution&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It combines the earlier capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the LLM writes proofs, edits proofs, and proposes lemmas;&lt;/li&gt;
&lt;li&gt;Lean checks whether each step is correct;&lt;/li&gt;
&lt;li&gt;AlphaProof handles local subgoals;&lt;/li&gt;
&lt;li&gt;Evolution saves and filters different proof routes;&lt;/li&gt;
&lt;li&gt;Rater Agent judges which drafts deserve more work;&lt;/li&gt;
&lt;li&gt;SafeVerify performs final safety verification.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the full shape of AlphaProof Nexus.&lt;/p&gt;

&lt;p&gt;The way it solves math problems resembles a highly automated research team: one role proposes ideas, one checks logic, one solves local technical problems, one reviews different directions, one manages historical attempts, and one performs final acceptance.&lt;/p&gt;



&lt;h2&gt;
  
  
  4. A Key Design: Proof Search Must Prevent Cheating
&lt;/h2&gt;

&lt;p&gt;AI mathematical proof has a special failure mode: it may make the proof easier by changing the problem, and it often learns to do exactly that.&lt;/p&gt;

&lt;p&gt;Suppose the original goal is to prove that property P holds for all natural numbers n.&lt;/p&gt;

&lt;p&gt;An agent may quietly change it to: property P holds for some natural numbers n.&lt;/p&gt;

&lt;p&gt;Or it may introduce an unallowed axiom that effectively assumes the conclusion.&lt;/p&gt;

&lt;p&gt;Lean may still pass certain local checks, but that is obviously not the proof we want.&lt;/p&gt;

&lt;p&gt;So AlphaProof Nexus performs multiple layers of safety checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;check whether the theorem statement was modified;&lt;/li&gt;
&lt;li&gt;check whether any &lt;code&gt;sorry&lt;/code&gt; remains;&lt;/li&gt;
&lt;li&gt;check whether disallowed axioms were introduced;&lt;/li&gt;
&lt;li&gt;check whether the proof truly corresponds to the original problem;&lt;/li&gt;
&lt;li&gt;run Lean inside a sandbox.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This is useful for all agent systems: when the task objective is complex enough, agents may learn to bypass the objective instead of completing it. Strong verification constraints are mandatory.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  5. Experimental Results in the Paper
&lt;/h2&gt;

&lt;p&gt;DeepMind applied the system to several mathematical tasks. The most representative ones are Erdos problems and OEIS conjectures.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Erdos Problems
&lt;/h3&gt;

&lt;p&gt;Erdos was one of the most important mathematicians of the twentieth century and left behind many open problems. The paper reports that the system processed 353 formalized Erdos open problems and solved 9 of them.&lt;/p&gt;

&lt;p&gt;The percentage may look low, but these are not elementary contest problems. They are research-level mathematical problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. OEIS Conjectures
&lt;/h3&gt;

&lt;p&gt;OEIS is a database of integer sequences with many conjectures about sequence patterns. The system proved 44 out of 492 OEIS conjectures.&lt;/p&gt;

&lt;p&gt;This type of task is especially suitable for formal proof systems because many sequence conjectures can be encoded cleanly as definitions and theorems.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Deployment in Real Mathematical Research
&lt;/h3&gt;

&lt;p&gt;The paper also says the system was used in multiple research areas, including graph theory, optimization theory, algebraic geometry, additive combinatorics, and quantum optics.&lt;/p&gt;



&lt;h2&gt;
  
  
  6. Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;Here are the conclusions I reached after reading the paper closely.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion 1: LLMs Can Already Be Core Components of Formal Proof Search
&lt;/h3&gt;

&lt;p&gt;Many people used to say that large models are bad at rigorous mathematics because they hallucinate, skip steps, and invent things.&lt;/p&gt;

&lt;p&gt;That is true, but incomplete.&lt;/p&gt;

&lt;p&gt;If you ask an LLM to directly write a natural-language proof, it is unreliable. But if you place it inside a strict feedback system such as Lean, it can become an efficient search engine.&lt;/p&gt;

&lt;p&gt;The value of an LLM is not that it is always correct. Its value is that it can propose many candidate routes and keep revising them based on compiler feedback.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion 2: Multi-Agent Orchestration Matters More Than a Single Model
&lt;/h3&gt;

&lt;p&gt;The point of AlphaProof Nexus is not that one model version can solve hard problems. The point is that the system decomposes capabilities into generation, checking, search, rating, caching, and verification.&lt;/p&gt;

&lt;p&gt;That is an engineering mindset. Mathematical research becomes a long-running search process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion 3: Failed Attempts Are Valuable
&lt;/h3&gt;

&lt;p&gt;Unfinished proof sketches, failed subgoals, Lean errors, and AlphaProof search results can all enter later loops.&lt;/p&gt;

&lt;p&gt;That makes mathematical proof search feel more like software engineering: code can be reused, error logs can be analyzed, intermediate states can be saved, branches can continue, and the final result is accepted by a compiler.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion 4: Strong and Cheap Models Can Divide the Work
&lt;/h3&gt;

&lt;p&gt;The paper uses stronger models for complex proof generation and cheaper models for draft comparison and ranking.&lt;/p&gt;

&lt;p&gt;That is a practical agent engineering lesson. Not every step needs the strongest model.&lt;/p&gt;

&lt;p&gt;Use strong models for complex reasoning, cheaper models for high-throughput evaluation, and specialized tools for local proof. That is more scalable than asking one expensive model to do everything.&lt;/p&gt;

</description>
      <category>deepmind</category>
      <category>ai</category>
      <category>math</category>
      <category>luhuidev</category>
    </item>
    <item>
      <title>Lessons from LangChain: Designing a Reliable Runtime for Production-Grade Agents</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Wed, 20 May 2026 13:46:51 +0000</pubDate>
      <link>https://dev.to/luhuidev/lessons-from-langchain-designing-a-reliable-runtime-for-production-grade-agents-6gk</link>
      <guid>https://dev.to/luhuidev/lessons-from-langchain-designing-a-reliable-runtime-for-production-grade-agents-6gk</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="http://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;Agent demos are easy to get excited about. A model, a few tools, a prompt, wrap it in a loop, and suddenly you have something that searches, writes files, and calls APIs.&lt;/p&gt;

&lt;p&gt;But between a demo and a production system, there's a long gulf. I call it the &lt;strong&gt;Runtime gap&lt;/strong&gt; — and what crosses it isn't a smarter model. It's a runtime that can hold up complex, unstable, interruptible, recoverable workloads in a real environment.&lt;/p&gt;

&lt;p&gt;Once you actually deploy into a business context, an Agent might run for minutes or tens of minutes. It calls multiple external systems, may need user approval, may hit network failures, tool timeouts, drifting model output, missing permissions, mid-flight user interruptions, process restarts, and version upgrades. Worse, it carries state: where the task is up to, what's already been queried, which intermediate files were written, which conclusions are still unconfirmed, whether this user can access a given dataset.&lt;/p&gt;

&lt;p&gt;At that point, optimizing prompts alone won't fix the underlying problem. What an Agent needs is a runtime that holds the execution process together — complex, unstable, interruptible, and recoverable.&lt;/p&gt;

&lt;p&gt;LangChain's recent writing on production deep agents and their Runtime is worth sharing for anyone building Agent products. It's a useful reminder: the moat for business-grade Agents isn't just a prettier agent loop. It's whether you can make state, permissions, recovery, observability, and human collaboration into a stable foundation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ldp56a85u7vz4a6rp2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ldp56a85u7vz4a6rp2t.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  1. Business-grade Agent failures don't only happen when the model is wrong
&lt;/h2&gt;

&lt;p&gt;When people think about Agent reliability, the first thing that comes to mind is usually hallucinations. That matters, but in a business system, the failure surface is much larger.&lt;/p&gt;

&lt;p&gt;The process might crash on step 8 of a long task. Re-running wastes cost and may double-call external APIs, leaving dirty data behind.&lt;/p&gt;

&lt;p&gt;A tool might fail. An API timeout, a page that won't load, a database query that throws — without retries, fallbacks, and state persistence, the whole task becomes a one-shot gamble.&lt;/p&gt;

&lt;p&gt;It might lose context while waiting for human approval. The user comes back half an hour later to click "Confirm," and the system can't remember which step they were confirming.&lt;/p&gt;

&lt;p&gt;It might lose control at the interaction layer. The Agent is still running, and the user types "wait, that direction is wrong — switch to plan B." Should the system queue, interrupt, restart, or reject? Without a clear policy, the experience falls apart.&lt;/p&gt;

&lt;p&gt;So reliability for a production Agent is at least six things: execution reliability, state reliability, interaction reliability, permission reliability, observability, and operational reliability. The value of a Runtime is to productize and frameworkify these problems — instead of leaving every team to hand-roll them from scratch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flwoxm2nujkxonmgnbz0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flwoxm2nujkxonmgnbz0g.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  2. Separate Harness from Runtime
&lt;/h2&gt;

&lt;p&gt;In my current view, one critical distinction is this: Harness and Runtime are not the same thing.&lt;/p&gt;

&lt;p&gt;The Harness is the behavioral shell of an Agent. It governs how the task is planned, how the prompt is written, which tools can be called, whether sub-tasks are spawned, whether there's a filesystem, whether sub-Agents are used, how context is compressed. This layer directly affects how smart the Agent looks.&lt;/p&gt;

&lt;p&gt;The Runtime is the lower layer. It governs how Agents get executed, persisted, recovered, interrupted, observed, scheduled, isolated across users, and how concurrent requests are handled. This layer directly affects whether the Agent can actually support a business system.&lt;/p&gt;

&lt;p&gt;In many open-source Agents, everything gets stuffed into the harness: rules in the prompt, try-catch inside tool calls, ad-hoc state in the database, a loading spinner on the frontend. It runs in the short term. Over time it becomes a tangle of logic no one wants to maintain.&lt;/p&gt;

&lt;p&gt;LangChain's Runtime approach is to lift the cross-cutting capabilities out of the agent-loop context.&lt;/p&gt;



&lt;h2&gt;
  
  
  3. Durable Execution: the first foundation of reliability
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61utwkr3god64p49duzu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61utwkr3god64p49duzu.png" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I could only learn one design from LangChain Runtime, I'd start with durable execution.&lt;/p&gt;

&lt;p&gt;A normal web request is short-lived: request in, do some work, respond, done. Agents are different. A business Agent might run many steps: understand the task, break it down, retrieve material, call tools, write intermediate files, wait for approval, continue, generate a report. The process naturally spans multiple model calls, tool calls, and user interactions.&lt;/p&gt;

&lt;p&gt;Once tasks get long, the system has to answer one question: what if it crashes in the middle?&lt;/p&gt;

&lt;p&gt;LangChain/LangGraph's answer is checkpointing. Key states during execution are continuously persisted. On recovery, you don't start from scratch — you resume from the most recent reasonable state. For a business system, this isn't just a cost saver. It's how you avoid duplicating side effects.&lt;/p&gt;

&lt;p&gt;How does it actually work? LangGraph models Agent execution as a state graph. Each node is a step — a model call, a tool call, a conditional. State flows between nodes, and after each step, the current snapshot of the whole graph is serialized to the checkpointer. There are several design choices worth unpacking here.&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;the unit of checkpointing is the node boundary, not the function-call boundary.&lt;/strong&gt; If a streaming model call dies mid-output, recovery re-runs the entire call.&lt;/p&gt;

&lt;p&gt;Second, &lt;strong&gt;state is structured, not a black-box pickle.&lt;/strong&gt; LangGraph requires you to split state into named channels (&lt;code&gt;messages&lt;/code&gt;, &lt;code&gt;plan&lt;/code&gt;, &lt;code&gt;scratchpad&lt;/code&gt;), each paired with a reducer (append for &lt;code&gt;messages&lt;/code&gt;, overwrite for &lt;code&gt;plan&lt;/code&gt;). That makes checkpoints structured diffs — traceable, replayable, and time-travelable to any step.&lt;/p&gt;

&lt;p&gt;Third, &lt;strong&gt;checkpoints form a tree, not a line.&lt;/strong&gt; Every checkpoint carries a parent reference. You can branch off any historical node and re-run — tweak the user's question, skip an approval, try a different tool — all of which grow new branches off the same tree.&lt;/p&gt;

&lt;p&gt;Fourth, &lt;strong&gt;interrupt and checkpoint share the same mechanism.&lt;/strong&gt; An interrupt before or after a node is essentially a checkpoint written at that point followed by a pause. Human approval, user edits, external wake-up signals — all reuse the same persistence layer. That's why HITL can be a Runtime capability rather than UI logic.&lt;/p&gt;

&lt;p&gt;Fifth, &lt;strong&gt;the backend is pluggable.&lt;/strong&gt; In dev, use in-memory or SQLite; in production, Postgres or Redis. Your Agent's reliability tier can scale with the business — you don't need heavyweight infrastructure on day one.&lt;/p&gt;

&lt;p&gt;Picture an Agent generating a research report for an enterprise customer. It has finished gathering material, summarizing competitors, drafting the report, and is now waiting for the user to confirm whether to pull internal CRM data. If the service restarts at this point, the ideal outcome isn't making the Agent search again from scratch, nor making the user re-describe their requirements. It's resuming at "waiting for confirmation."&lt;/p&gt;

&lt;p&gt;That's the point of durable execution: turning Agent execution from a one-shot function call into a savable, recoverable, resumable task that has a real lifecycle.&lt;/p&gt;

&lt;p&gt;There are still specific questions worth answering, like: what exactly counts as a recoverable boundary in each Agent step? Can writes to the business system be safely repeated?&lt;/p&gt;



&lt;h2&gt;
  
  
  4. Layer your state: short-term state, long-term memory, and business data shouldn't be mixed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsho5x5bv1n8zolb9diee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsho5x5bv1n8zolb9diee.png" width="799" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Complex Agent tasks produce state. But state shouldn't be one big stew.&lt;/p&gt;

&lt;p&gt;Short-term state is the current task's context: what the plan is, where execution has reached, intermediate results, which tool calls completed, what's pending confirmation. This kind of state belongs bound to threads, runs, and checkpoints.&lt;/p&gt;

&lt;p&gt;Long-term memory is cross-session context: user preferences, organizational rules, common workflows, recurring constraints, reusable knowledge. This should live in a long-term store, namespaced by user, organization, application, assistant, and so on.&lt;/p&gt;

&lt;p&gt;Business data is yet another layer: orders, problems, lessons, customer records, organizational assets, permission models. This data generally shouldn't be casually swallowed by an Agent Runtime. It should stay owned by the business system, with the Agent accessing it through controlled tools.&lt;/p&gt;

&lt;p&gt;LangChain's design is instructive here: it separates thread checkpoints from the long-term store, while still letting deep agents access different layers of state through something like a virtual filesystem. For the Agent on top, reading and writing files and memory feels natural; for the system underneath, state still has clear boundaries.&lt;/p&gt;

&lt;p&gt;This matters a lot in real business systems. Many early Agent products pile chat history, tool results, user preferences, and business data into a single conversation memory. It's simple to implement, but later it blows up at once in permissions, cost, retrieval quality, data cleanup, and compliance audit.&lt;/p&gt;

&lt;p&gt;A more robust pattern: short-term state serves task recovery, long-term memory serves experience continuity, and business data stays inside the business system — the Agent only reaches it through permission-controlled tools.&lt;/p&gt;



&lt;h2&gt;
  
  
  5. Human-in-the-loop isn't decoration — it's a reliability mechanism
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9ug0sxz22gvfjs90lcx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9ug0sxz22gvfjs90lcx.png" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Production-grade Agents are hard to fully automate. Especially anything that touches writes, external system calls, important decisions, paid resources, or user privacy — human collaboration is a necessary safety valve.&lt;/p&gt;

&lt;p&gt;The key isn't popping up a confirmation dialog. The real engineering question is: how does the Agent pause? What state is saved while it pauses? Can the user come back any time later and continue? Can the user edit the plan the Agent produced? After editing, where does it resume? Are approval records auditable?&lt;/p&gt;

&lt;p&gt;LangChain Runtime makes interrupt/resume a runtime capability rather than something the application layer judges ad-hoc. Because if HITL only lives in the frontend interaction layer, it quickly becomes UI logic — and once tasks span processes, workers, and time, the frontend can't hold it.&lt;/p&gt;

&lt;p&gt;Plenty of scenarios in business Agents need this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A finance Agent about to submit an expense report needs human confirmation.&lt;/li&gt;
&lt;li&gt;An education Agent generating lesson plans in bulk needs a teacher to pick the teaching style.&lt;/li&gt;
&lt;li&gt;A customer service Agent issuing a refund needs supervisor approval.&lt;/li&gt;
&lt;li&gt;A data analysis Agent wanting to access sensitive fields needs a one-time user authorization.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't ordinary chat experiences — they're business workflows. If the Runtime natively supports pausing, resuming, approval, and state persistence, Agent reliability jumps a clear notch.&lt;/p&gt;



&lt;h2&gt;
  
  
  6. Permissions and multi-tenancy: an Agent shouldn't roam with the master key
&lt;/h2&gt;

&lt;p&gt;One of the biggest risks for a production Agent is permissions.&lt;/p&gt;

&lt;p&gt;In a normal app, the user clicks a button, calls an API, the server checks permissions — the chain is relatively clear. Once an Agent gets involved, it gets complicated: the model decides which tool to call, the tool may access external systems, those external systems may require user authorization, and the Agent may also write intermediate results into long-term memory.&lt;/p&gt;

&lt;p&gt;LangChain's approach is to split identity and permissions into layers: who the end user is, which threads and resources that user can access, which external systems the Agent can access on the user's behalf, and what team members can do on the platform itself.&lt;/p&gt;

&lt;p&gt;In this design, the Agent isn't a backend super-admin. It's more like a delegated executor, allowed to act only within the scope of the current user, current organization, and current task.&lt;/p&gt;

&lt;p&gt;If you're designing a Runtime for your own production Agent, you should at least think about these boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User identity enters the run context. Every Agent execution should know whom it is currently acting on behalf of.&lt;/li&gt;
&lt;li&gt;Resource access should be isolated by thread, file, project, and organization. You can't rely on a prompt to tell the model not to touch someone else's data.&lt;/li&gt;
&lt;li&gt;External tool authorization should be managed separately. GitHub, Slack, CRM, object storage, databases — long-term keys shouldn't be handed directly to the Agent's execution environment.&lt;/li&gt;
&lt;li&gt;Long-term memory needs namespaces. Otherwise the user preferences an Agent remembers can easily become data pollution in a multi-tenant setting.&lt;/li&gt;
&lt;li&gt;High-risk tools need approval or policy interception. Deletes, sends, payments, publishes, bulk writes — these can't rely on the model's self-discipline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more human-like the Agent feels, the easier it is for a system to assume it inherits a human's full permissions. From an engineering view, the Agent should hold task-scoped, time-bounded, minimum-privilege permissions.&lt;/p&gt;



&lt;h2&gt;
  
  
  7. Middleware: put protective capabilities into the runtime lifecycle
&lt;/h2&gt;

&lt;p&gt;Many teams write guardrails into the prompt: "don't leak private information," "don't perform dangerous operations," "ask the user when uncertain." Useful, but not enough.&lt;/p&gt;

&lt;p&gt;Models forget, prompts get overridden, tool-call paths can route around the rules, and streaming output and background tasks may behave differently. A business system needs a harder line of defense.&lt;/p&gt;

&lt;p&gt;The middleware design inserts control points around the Agent lifecycle: before the model call, during the model call, during a tool call, and after the model call — all can host policy.&lt;/p&gt;

&lt;p&gt;That means many reliability capabilities can sink down into the Runtime:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before a model call: trim context, inject permission info, check token budgets.&lt;/li&gt;
&lt;li&gt;During a model call: model fallback, timeout control, retry policy, cost accounting.&lt;/li&gt;
&lt;li&gt;During a tool call: permission checks, parameter validation, sensitive-action interception, human approval.&lt;/li&gt;
&lt;li&gt;After model output: PII detection, format validation, result archiving, trace tagging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is more stable than scattering logic across every tool, and far easier to govern uniformly.&lt;/p&gt;

&lt;p&gt;For a business-grade Agent, middleware isn't just a security filter — it's the entry point for Runtime governability.&lt;/p&gt;



&lt;h2&gt;
  
  
  8. Streaming and double-texting: interaction reliability also belongs in the Runtime
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8f9yof130wvf7qcqwf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8f9yof130wvf7qcqwf8.png" width="799" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A lot of people treat streaming as a UX optimization. For Agents, streaming is also a reliability concern.&lt;/p&gt;

&lt;p&gt;If a long task has no real-time feedback, the user has no idea whether the system is still alive or where it's up to. Especially for research, coding, data analysis, and lesson-plan generation, users need to see the intermediate state: retrieving, calling a tool, drafting, waiting for confirmation.&lt;/p&gt;

&lt;p&gt;The trickier piece is mid-flight user input. The Agent is still running and the user sends a new instruction — what LangChain calls a double-texting problem. It's not a small UX detail. It's an interaction protocol problem.&lt;/p&gt;

&lt;p&gt;The system has to decide: is the new input queued, or does it interrupt the current task? Is it merged into the current context, or does the task roll back and re-run? Can the user change goals mid-task, or must they wait until the current task finishes?&lt;/p&gt;

&lt;p&gt;In business systems, the right answer varies.&lt;/p&gt;

&lt;p&gt;A writing Agent can let the user adjust direction mid-task.&lt;/p&gt;

&lt;p&gt;A payments Agent cannot get casually interrupted and then continue with dangerous operations.&lt;/p&gt;

&lt;p&gt;A lesson-plan Agent might be a good fit for queueing new input onto a task list.&lt;/p&gt;

&lt;p&gt;A coding Agent might need to pause the current command and wait for the user to confirm a plan change.&lt;/p&gt;

&lt;p&gt;This is why chat experience is actually part of Runtime design.&lt;/p&gt;



&lt;h2&gt;
  
  
  9. Observability: you can't debug a business Agent with logs alone
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp7tzg22n3jrpajznap8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp7tzg22n3jrpajznap8.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For traditional applications, logs, metrics, and distributed tracing usually get the job done. For Agents, plain logs are often not enough.&lt;/p&gt;

&lt;p&gt;That's because Agent errors are frequently process errors: step 1 misunderstood the task, step 3 used the wrong tool, step 5 accepted low-quality retrieval, step 7 promoted an intermediate assumption into a conclusion. The final answer is wrong, but the actual cause is buried in the execution path.&lt;/p&gt;

&lt;p&gt;LangChain/LangSmith emphasize trace, time travel, and debug. A business-grade Agent needs more than call success rate — it needs to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which nodes did this task pass through?&lt;/li&gt;
&lt;li&gt;What context did each step's model call actually see?&lt;/li&gt;
&lt;li&gt;Which tools were called? With what parameters? Returning what?&lt;/li&gt;
&lt;li&gt;How did intermediate state change?&lt;/li&gt;
&lt;li&gt;At which step did a branch occur?&lt;/li&gt;
&lt;li&gt;Were middleware, approvals, retries, or fallbacks triggered?&lt;/li&gt;
&lt;li&gt;If you change the state of a particular checkpoint, do the downstream results change?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These capabilities decide whether the Agent can be continuously improved. Otherwise the team is just tweaking prompts by feel — and that isn't an engineering loop.&lt;/p&gt;

&lt;p&gt;Going further: observability also feeds eval. Traces aren't just for triage — they become evaluation samples, regression tests, cost analyses, and product insight.&lt;/p&gt;



&lt;h2&gt;
  
  
  10. An Agent Runtime should scale horizontally and control cost
&lt;/h2&gt;

&lt;p&gt;Once a business Agent goes live and starts serving users, operational concerns kick in.&lt;/p&gt;

&lt;p&gt;Some tasks are short, some are long. Some only read data; some call slow tools. Some users send messages back-to-back; some tasks fire on a schedule. Model calls are expensive; tool calls can be expensive too. Once long tasks pile up, the API server, queue workers, Redis, Postgres, and external tools all become bottlenecks.&lt;/p&gt;

&lt;p&gt;Several things in LangChain Agent Server are worth learning from:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Separate the API server from queue workers.&lt;/strong&gt; The former accepts requests; the latter executes long-running tasks. This stops long tasks from dragging down the entry service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer ephemeral state and durable state.&lt;/strong&gt; Transient runtime state can live in something like Redis; threads, runs, checkpoints, and memory go into durable storage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concurrency is configurable.&lt;/strong&gt; Different Agents have different task shapes — I/O-heavy and CPU-heavy workers need different concurrency policies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoid frontend polling.&lt;/strong&gt; For long tasks, join/stream beats blunt polling — both for UX and for system resource cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Support cron.&lt;/strong&gt; Plenty of business Agents don't fire because a user clicked something; they need to run periodic checks, periodic summaries, periodic syncs, periodic content generation.&lt;/p&gt;

&lt;p&gt;A reliable business Agent Runtime has to care about both task semantics and infrastructure cost at the same time.&lt;/p&gt;



&lt;h2&gt;
  
  
  11. A Runtime design checklist
&lt;/h2&gt;

&lt;p&gt;If you're not copying LangChain wholesale but designing a runtime for your own business Agent, here's a checklist to break the capability surface into.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One: task lifecycle.&lt;/strong&gt; Do you have basic abstractions like thread, run, and step? Can a single Agent execution be tracked, canceled, paused, resumed, retried?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two: durable execution.&lt;/strong&gt; Is the key state at each step checkpointed? Where are the recovery boundaries? Which operations are replayable, which must be idempotent, which can only resume after human confirmation?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three: layered state.&lt;/strong&gt; Are short-term task state, long-term memory, and business data separated? Are there namespaces? Are cleanup, migration, and audit supported?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Four: permission model.&lt;/strong&gt; Who is the Agent acting on behalf of? Which resources can it touch? Which tools can it call? How are external system authorizations managed? Do high-risk operations require approval?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Five: tool governance.&lt;/strong&gt; Do tools have schemas, permissions, timeouts, retries, rate limits, audit logs? On failure, do you retry, fall back, skip, or interrupt?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Six: human-in-the-loop.&lt;/strong&gt; Can a run be interrupted mid-flight? Can it resume after user confirmation? Are approval content, approver identity, and approval time auditable?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Seven: interaction protocol.&lt;/strong&gt; How is streaming designed? How is mid-flight user input handled? When is queueing, rejecting, interrupting, or restarting the right answer?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eight: observability and debugging.&lt;/strong&gt; Is there structured tracing? Can you see model calls, tool calls, state changes, and middleware triggers? Can bad cases be turned into evals?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nine: operational scaling.&lt;/strong&gt; Are the entry service and execution workers separated? How is the queue designed? Where are the storage bottlenecks? How do you rate-limit when long tasks pile up? How is cost attributed?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ten: deployment boundaries.&lt;/strong&gt; What do you self-host, and what do you delegate to a managed platform? Can data stay inside your system? Are you locking yourself too deeply into one runtime?&lt;/p&gt;



&lt;h2&gt;
  
  
  12. Closing thoughts
&lt;/h2&gt;

&lt;p&gt;Agent products aren't only chasing smarter behavior. Once they enter a business system, what matters as much is being more reliable: recoverable, isolable, approvable, traceable, scalable, cost-controllable.&lt;/p&gt;

&lt;p&gt;That's why Agent Harness and Runtime are worth seeing as separate. The Harness sets the ceiling on what an Agent can do. The Runtime sets the floor under which it can't safely go live. Without the former, the Agent isn't smart enough; without the latter, the Agent can't be launched.&lt;/p&gt;

&lt;p&gt;If we're going to build our own production-grade Agents, the Runtime should enter the architecture from day one. Even if v1 isn't a full system, the boundaries should be defined first: how is task state saved, how is user identity passed, how are tool permissions controlled, how does human approval recover, how do traces settle into evaluation data.&lt;/p&gt;

&lt;p&gt;The future of Agents isn't only stronger models — it's a more mature Runtime. Whoever can make a complex Agent's execution stable, controllable, and auditable will get closer to real business deployment.&lt;/p&gt;

&lt;p&gt;That's what I find most worth learning from LangChain's Runtime piece.&lt;/p&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;LangChain, The Runtime Behind Production Deep Agents
&lt;a href="https://www.langchain.com/blog/runtime-behind-production-deep-agents" rel="noopener noreferrer"&gt;www.langchain.com/blog/runtime-behind-production-deep-agents&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;



</description>
      <category>ai</category>
      <category>agents</category>
      <category>langchain</category>
      <category>programming</category>
    </item>
    <item>
      <title>Lessons from LangChain: Designing a Reliable Runtime for Production-Grade Agents</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Wed, 20 May 2026 13:38:22 +0000</pubDate>
      <link>https://dev.to/luhuidev/lessons-from-langchain-designing-a-reliable-runtime-for-production-grade-agents-472g</link>
      <guid>https://dev.to/luhuidev/lessons-from-langchain-designing-a-reliable-runtime-for-production-grade-agents-472g</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="http://luhuidev.com/" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;br&gt;
I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;Agent demos are easy to get excited about. A model, a few tools, a prompt, wrap it in a loop, and suddenly you have something that searches, writes files, and calls APIs.&lt;/p&gt;

&lt;p&gt;But between a demo and a production system, there's a long gulf. I call it the &lt;strong&gt;Runtime gap&lt;/strong&gt; — and what crosses it isn't a smarter model. It's a runtime that can hold up complex, unstable, interruptible, recoverable workloads in a real environment.&lt;/p&gt;

&lt;p&gt;Once you actually deploy into a business context, an Agent might run for minutes or tens of minutes. It calls multiple external systems, may need user approval, may hit network failures, tool timeouts, drifting model output, missing permissions, mid-flight user interruptions, process restarts, and version upgrades. Worse, it carries state: where the task is up to, what's already been queried, which intermediate files were written, which conclusions are still unconfirmed, whether this user can access a given dataset.&lt;/p&gt;

&lt;p&gt;At that point, optimizing prompts alone won't fix the underlying problem. What an Agent needs is a runtime that holds the execution process together — complex, unstable, interruptible, and recoverable.&lt;/p&gt;

&lt;p&gt;LangChain's recent writing on production deep agents and their Runtime is worth sharing for anyone building Agent products. It's a useful reminder: the moat for business-grade Agents isn't just a prettier agent loop. It's whether you can make state, permissions, recovery, observability, and human collaboration into a stable foundation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ldp56a85u7vz4a6rp2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ldp56a85u7vz4a6rp2t.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  1. Business-grade Agent failures don't only happen when the model is wrong
&lt;/h2&gt;

&lt;p&gt;When people think about Agent reliability, the first thing that comes to mind is usually hallucinations. That matters, but in a business system, the failure surface is much larger.&lt;/p&gt;

&lt;p&gt;The process might crash on step 8 of a long task. Re-running wastes cost and may double-call external APIs, leaving dirty data behind.&lt;/p&gt;

&lt;p&gt;A tool might fail. An API timeout, a page that won't load, a database query that throws — without retries, fallbacks, and state persistence, the whole task becomes a one-shot gamble.&lt;/p&gt;

&lt;p&gt;It might lose context while waiting for human approval. The user comes back half an hour later to click "Confirm," and the system can't remember which step they were confirming.&lt;/p&gt;

&lt;p&gt;It might lose control at the interaction layer. The Agent is still running, and the user types "wait, that direction is wrong — switch to plan B." Should the system queue, interrupt, restart, or reject? Without a clear policy, the experience falls apart.&lt;/p&gt;

&lt;p&gt;So reliability for a production Agent is at least six things: execution reliability, state reliability, interaction reliability, permission reliability, observability, and operational reliability. The value of a Runtime is to productize and frameworkify these problems — instead of leaving every team to hand-roll them from scratch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flwoxm2nujkxonmgnbz0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flwoxm2nujkxonmgnbz0g.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  2. Separate Harness from Runtime
&lt;/h2&gt;

&lt;p&gt;In my current view, one critical distinction is this: Harness and Runtime are not the same thing.&lt;/p&gt;

&lt;p&gt;The Harness is the behavioral shell of an Agent. It governs how the task is planned, how the prompt is written, which tools can be called, whether sub-tasks are spawned, whether there's a filesystem, whether sub-Agents are used, how context is compressed. This layer directly affects how smart the Agent looks.&lt;/p&gt;

&lt;p&gt;The Runtime is the lower layer. It governs how Agents get executed, persisted, recovered, interrupted, observed, scheduled, isolated across users, and how concurrent requests are handled. This layer directly affects whether the Agent can actually support a business system.&lt;/p&gt;

&lt;p&gt;In many open-source Agents, everything gets stuffed into the harness: rules in the prompt, try-catch inside tool calls, ad-hoc state in the database, a loading spinner on the frontend. It runs in the short term. Over time it becomes a tangle of logic no one wants to maintain.&lt;/p&gt;

&lt;p&gt;LangChain's Runtime approach is to lift the cross-cutting capabilities out of the agent-loop context.&lt;/p&gt;



&lt;h2&gt;
  
  
  3. Durable Execution: the first foundation of reliability
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61utwkr3god64p49duzu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61utwkr3god64p49duzu.png" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I could only learn one design from LangChain Runtime, I'd start with durable execution.&lt;/p&gt;

&lt;p&gt;A normal web request is short-lived: request in, do some work, respond, done. Agents are different. A business Agent might run many steps: understand the task, break it down, retrieve material, call tools, write intermediate files, wait for approval, continue, generate a report. The process naturally spans multiple model calls, tool calls, and user interactions.&lt;/p&gt;

&lt;p&gt;Once tasks get long, the system has to answer one question: what if it crashes in the middle?&lt;/p&gt;

&lt;p&gt;LangChain/LangGraph's answer is checkpointing. Key states during execution are continuously persisted. On recovery, you don't start from scratch — you resume from the most recent reasonable state. For a business system, this isn't just a cost saver. It's how you avoid duplicating side effects.&lt;/p&gt;

&lt;p&gt;How does it actually work? LangGraph models Agent execution as a state graph. Each node is a step — a model call, a tool call, a conditional. State flows between nodes, and after each step, the current snapshot of the whole graph is serialized to the checkpointer. There are several design choices worth unpacking here.&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;the unit of checkpointing is the node boundary, not the function-call boundary.&lt;/strong&gt; If a streaming model call dies mid-output, recovery re-runs the entire call.&lt;/p&gt;

&lt;p&gt;Second, &lt;strong&gt;state is structured, not a black-box pickle.&lt;/strong&gt; LangGraph requires you to split state into named channels (&lt;code&gt;messages&lt;/code&gt;, &lt;code&gt;plan&lt;/code&gt;, &lt;code&gt;scratchpad&lt;/code&gt;), each paired with a reducer (append for &lt;code&gt;messages&lt;/code&gt;, overwrite for &lt;code&gt;plan&lt;/code&gt;). That makes checkpoints structured diffs — traceable, replayable, and time-travelable to any step.&lt;/p&gt;

&lt;p&gt;Third, &lt;strong&gt;checkpoints form a tree, not a line.&lt;/strong&gt; Every checkpoint carries a parent reference. You can branch off any historical node and re-run — tweak the user's question, skip an approval, try a different tool — all of which grow new branches off the same tree.&lt;/p&gt;

&lt;p&gt;Fourth, &lt;strong&gt;interrupt and checkpoint share the same mechanism.&lt;/strong&gt; An interrupt before or after a node is essentially a checkpoint written at that point followed by a pause. Human approval, user edits, external wake-up signals — all reuse the same persistence layer. That's why HITL can be a Runtime capability rather than UI logic.&lt;/p&gt;

&lt;p&gt;Fifth, &lt;strong&gt;the backend is pluggable.&lt;/strong&gt; In dev, use in-memory or SQLite; in production, Postgres or Redis. Your Agent's reliability tier can scale with the business — you don't need heavyweight infrastructure on day one.&lt;/p&gt;

&lt;p&gt;Picture an Agent generating a research report for an enterprise customer. It has finished gathering material, summarizing competitors, drafting the report, and is now waiting for the user to confirm whether to pull internal CRM data. If the service restarts at this point, the ideal outcome isn't making the Agent search again from scratch, nor making the user re-describe their requirements. It's resuming at "waiting for confirmation."&lt;/p&gt;

&lt;p&gt;That's the point of durable execution: turning Agent execution from a one-shot function call into a savable, recoverable, resumable task that has a real lifecycle.&lt;/p&gt;

&lt;p&gt;There are still specific questions worth answering, like: what exactly counts as a recoverable boundary in each Agent step? Can writes to the business system be safely repeated?&lt;/p&gt;



&lt;h2&gt;
  
  
  4. Layer your state: short-term state, long-term memory, and business data shouldn't be mixed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsho5x5bv1n8zolb9diee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsho5x5bv1n8zolb9diee.png" width="799" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Complex Agent tasks produce state. But state shouldn't be one big stew.&lt;/p&gt;

&lt;p&gt;Short-term state is the current task's context: what the plan is, where execution has reached, intermediate results, which tool calls completed, what's pending confirmation. This kind of state belongs bound to threads, runs, and checkpoints.&lt;/p&gt;

&lt;p&gt;Long-term memory is cross-session context: user preferences, organizational rules, common workflows, recurring constraints, reusable knowledge. This should live in a long-term store, namespaced by user, organization, application, assistant, and so on.&lt;/p&gt;

&lt;p&gt;Business data is yet another layer: orders, problems, lessons, customer records, organizational assets, permission models. This data generally shouldn't be casually swallowed by an Agent Runtime. It should stay owned by the business system, with the Agent accessing it through controlled tools.&lt;/p&gt;

&lt;p&gt;LangChain's design is instructive here: it separates thread checkpoints from the long-term store, while still letting deep agents access different layers of state through something like a virtual filesystem. For the Agent on top, reading and writing files and memory feels natural; for the system underneath, state still has clear boundaries.&lt;/p&gt;

&lt;p&gt;This matters a lot in real business systems. Many early Agent products pile chat history, tool results, user preferences, and business data into a single conversation memory. It's simple to implement, but later it blows up at once in permissions, cost, retrieval quality, data cleanup, and compliance audit.&lt;/p&gt;

&lt;p&gt;A more robust pattern: short-term state serves task recovery, long-term memory serves experience continuity, and business data stays inside the business system — the Agent only reaches it through permission-controlled tools.&lt;/p&gt;



&lt;h2&gt;
  
  
  5. Human-in-the-loop isn't decoration — it's a reliability mechanism
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9ug0sxz22gvfjs90lcx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9ug0sxz22gvfjs90lcx.png" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Production-grade Agents are hard to fully automate. Especially anything that touches writes, external system calls, important decisions, paid resources, or user privacy — human collaboration is a necessary safety valve.&lt;/p&gt;

&lt;p&gt;The key isn't popping up a confirmation dialog. The real engineering question is: how does the Agent pause? What state is saved while it pauses? Can the user come back any time later and continue? Can the user edit the plan the Agent produced? After editing, where does it resume? Are approval records auditable?&lt;/p&gt;

&lt;p&gt;LangChain Runtime makes interrupt/resume a runtime capability rather than something the application layer judges ad-hoc. Because if HITL only lives in the frontend interaction layer, it quickly becomes UI logic — and once tasks span processes, workers, and time, the frontend can't hold it.&lt;/p&gt;

&lt;p&gt;Plenty of scenarios in business Agents need this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A finance Agent about to submit an expense report needs human confirmation.&lt;/li&gt;
&lt;li&gt;An education Agent generating lesson plans in bulk needs a teacher to pick the teaching style.&lt;/li&gt;
&lt;li&gt;A customer service Agent issuing a refund needs supervisor approval.&lt;/li&gt;
&lt;li&gt;A data analysis Agent wanting to access sensitive fields needs a one-time user authorization.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't ordinary chat experiences — they're business workflows. If the Runtime natively supports pausing, resuming, approval, and state persistence, Agent reliability jumps a clear notch.&lt;/p&gt;



&lt;h2&gt;
  
  
  6. Permissions and multi-tenancy: an Agent shouldn't roam with the master key
&lt;/h2&gt;

&lt;p&gt;One of the biggest risks for a production Agent is permissions.&lt;/p&gt;

&lt;p&gt;In a normal app, the user clicks a button, calls an API, the server checks permissions — the chain is relatively clear. Once an Agent gets involved, it gets complicated: the model decides which tool to call, the tool may access external systems, those external systems may require user authorization, and the Agent may also write intermediate results into long-term memory.&lt;/p&gt;

&lt;p&gt;LangChain's approach is to split identity and permissions into layers: who the end user is, which threads and resources that user can access, which external systems the Agent can access on the user's behalf, and what team members can do on the platform itself.&lt;/p&gt;

&lt;p&gt;In this design, the Agent isn't a backend super-admin. It's more like a delegated executor, allowed to act only within the scope of the current user, current organization, and current task.&lt;/p&gt;

&lt;p&gt;If you're designing a Runtime for your own production Agent, you should at least think about these boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User identity enters the run context. Every Agent execution should know whom it is currently acting on behalf of.&lt;/li&gt;
&lt;li&gt;Resource access should be isolated by thread, file, project, and organization. You can't rely on a prompt to tell the model not to touch someone else's data.&lt;/li&gt;
&lt;li&gt;External tool authorization should be managed separately. GitHub, Slack, CRM, object storage, databases — long-term keys shouldn't be handed directly to the Agent's execution environment.&lt;/li&gt;
&lt;li&gt;Long-term memory needs namespaces. Otherwise the user preferences an Agent remembers can easily become data pollution in a multi-tenant setting.&lt;/li&gt;
&lt;li&gt;High-risk tools need approval or policy interception. Deletes, sends, payments, publishes, bulk writes — these can't rely on the model's self-discipline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more human-like the Agent feels, the easier it is for a system to assume it inherits a human's full permissions. From an engineering view, the Agent should hold task-scoped, time-bounded, minimum-privilege permissions.&lt;/p&gt;



&lt;h2&gt;
  
  
  7. Middleware: put protective capabilities into the runtime lifecycle
&lt;/h2&gt;

&lt;p&gt;Many teams write guardrails into the prompt: "don't leak private information," "don't perform dangerous operations," "ask the user when uncertain." Useful, but not enough.&lt;/p&gt;

&lt;p&gt;Models forget, prompts get overridden, tool-call paths can route around the rules, and streaming output and background tasks may behave differently. A business system needs a harder line of defense.&lt;/p&gt;

&lt;p&gt;The middleware design inserts control points around the Agent lifecycle: before the model call, during the model call, during a tool call, and after the model call — all can host policy.&lt;/p&gt;

&lt;p&gt;That means many reliability capabilities can sink down into the Runtime:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before a model call: trim context, inject permission info, check token budgets.&lt;/li&gt;
&lt;li&gt;During a model call: model fallback, timeout control, retry policy, cost accounting.&lt;/li&gt;
&lt;li&gt;During a tool call: permission checks, parameter validation, sensitive-action interception, human approval.&lt;/li&gt;
&lt;li&gt;After model output: PII detection, format validation, result archiving, trace tagging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is more stable than scattering logic across every tool, and far easier to govern uniformly.&lt;/p&gt;

&lt;p&gt;For a business-grade Agent, middleware isn't just a security filter — it's the entry point for Runtime governability.&lt;/p&gt;



&lt;h2&gt;
  
  
  8. Streaming and double-texting: interaction reliability also belongs in the Runtime
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8f9yof130wvf7qcqwf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8f9yof130wvf7qcqwf8.png" width="799" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A lot of people treat streaming as a UX optimization. For Agents, streaming is also a reliability concern.&lt;/p&gt;

&lt;p&gt;If a long task has no real-time feedback, the user has no idea whether the system is still alive or where it's up to. Especially for research, coding, data analysis, and lesson-plan generation, users need to see the intermediate state: retrieving, calling a tool, drafting, waiting for confirmation.&lt;/p&gt;

&lt;p&gt;The trickier piece is mid-flight user input. The Agent is still running and the user sends a new instruction — what LangChain calls a double-texting problem. It's not a small UX detail. It's an interaction protocol problem.&lt;/p&gt;

&lt;p&gt;The system has to decide: is the new input queued, or does it interrupt the current task? Is it merged into the current context, or does the task roll back and re-run? Can the user change goals mid-task, or must they wait until the current task finishes?&lt;/p&gt;

&lt;p&gt;In business systems, the right answer varies.&lt;/p&gt;

&lt;p&gt;A writing Agent can let the user adjust direction mid-task.&lt;/p&gt;

&lt;p&gt;A payments Agent cannot get casually interrupted and then continue with dangerous operations.&lt;/p&gt;

&lt;p&gt;A lesson-plan Agent might be a good fit for queueing new input onto a task list.&lt;/p&gt;

&lt;p&gt;A coding Agent might need to pause the current command and wait for the user to confirm a plan change.&lt;/p&gt;

&lt;p&gt;This is why chat experience is actually part of Runtime design.&lt;/p&gt;



&lt;h2&gt;
  
  
  9. Observability: you can't debug a business Agent with logs alone
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp7tzg22n3jrpajznap8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp7tzg22n3jrpajznap8.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For traditional applications, logs, metrics, and distributed tracing usually get the job done. For Agents, plain logs are often not enough.&lt;/p&gt;

&lt;p&gt;That's because Agent errors are frequently process errors: step 1 misunderstood the task, step 3 used the wrong tool, step 5 accepted low-quality retrieval, step 7 promoted an intermediate assumption into a conclusion. The final answer is wrong, but the actual cause is buried in the execution path.&lt;/p&gt;

&lt;p&gt;LangChain/LangSmith emphasize trace, time travel, and debug. A business-grade Agent needs more than call success rate — it needs to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which nodes did this task pass through?&lt;/li&gt;
&lt;li&gt;What context did each step's model call actually see?&lt;/li&gt;
&lt;li&gt;Which tools were called? With what parameters? Returning what?&lt;/li&gt;
&lt;li&gt;How did intermediate state change?&lt;/li&gt;
&lt;li&gt;At which step did a branch occur?&lt;/li&gt;
&lt;li&gt;Were middleware, approvals, retries, or fallbacks triggered?&lt;/li&gt;
&lt;li&gt;If you change the state of a particular checkpoint, do the downstream results change?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These capabilities decide whether the Agent can be continuously improved. Otherwise the team is just tweaking prompts by feel — and that isn't an engineering loop.&lt;/p&gt;

&lt;p&gt;Going further: observability also feeds eval. Traces aren't just for triage — they become evaluation samples, regression tests, cost analyses, and product insight.&lt;/p&gt;



&lt;h2&gt;
  
  
  10. An Agent Runtime should scale horizontally and control cost
&lt;/h2&gt;

&lt;p&gt;Once a business Agent goes live and starts serving users, operational concerns kick in.&lt;/p&gt;

&lt;p&gt;Some tasks are short, some are long. Some only read data; some call slow tools. Some users send messages back-to-back; some tasks fire on a schedule. Model calls are expensive; tool calls can be expensive too. Once long tasks pile up, the API server, queue workers, Redis, Postgres, and external tools all become bottlenecks.&lt;/p&gt;

&lt;p&gt;Several things in LangChain Agent Server are worth learning from:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Separate the API server from queue workers.&lt;/strong&gt; The former accepts requests; the latter executes long-running tasks. This stops long tasks from dragging down the entry service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer ephemeral state and durable state.&lt;/strong&gt; Transient runtime state can live in something like Redis; threads, runs, checkpoints, and memory go into durable storage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concurrency is configurable.&lt;/strong&gt; Different Agents have different task shapes — I/O-heavy and CPU-heavy workers need different concurrency policies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoid frontend polling.&lt;/strong&gt; For long tasks, join/stream beats blunt polling — both for UX and for system resource cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Support cron.&lt;/strong&gt; Plenty of business Agents don't fire because a user clicked something; they need to run periodic checks, periodic summaries, periodic syncs, periodic content generation.&lt;/p&gt;

&lt;p&gt;A reliable business Agent Runtime has to care about both task semantics and infrastructure cost at the same time.&lt;/p&gt;



&lt;h2&gt;
  
  
  11. A Runtime design checklist
&lt;/h2&gt;

&lt;p&gt;If you're not copying LangChain wholesale but designing a runtime for your own business Agent, here's a checklist to break the capability surface into.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One: task lifecycle.&lt;/strong&gt; Do you have basic abstractions like thread, run, and step? Can a single Agent execution be tracked, canceled, paused, resumed, retried?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two: durable execution.&lt;/strong&gt; Is the key state at each step checkpointed? Where are the recovery boundaries? Which operations are replayable, which must be idempotent, which can only resume after human confirmation?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three: layered state.&lt;/strong&gt; Are short-term task state, long-term memory, and business data separated? Are there namespaces? Are cleanup, migration, and audit supported?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Four: permission model.&lt;/strong&gt; Who is the Agent acting on behalf of? Which resources can it touch? Which tools can it call? How are external system authorizations managed? Do high-risk operations require approval?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Five: tool governance.&lt;/strong&gt; Do tools have schemas, permissions, timeouts, retries, rate limits, audit logs? On failure, do you retry, fall back, skip, or interrupt?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Six: human-in-the-loop.&lt;/strong&gt; Can a run be interrupted mid-flight? Can it resume after user confirmation? Are approval content, approver identity, and approval time auditable?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Seven: interaction protocol.&lt;/strong&gt; How is streaming designed? How is mid-flight user input handled? When is queueing, rejecting, interrupting, or restarting the right answer?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eight: observability and debugging.&lt;/strong&gt; Is there structured tracing? Can you see model calls, tool calls, state changes, and middleware triggers? Can bad cases be turned into evals?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nine: operational scaling.&lt;/strong&gt; Are the entry service and execution workers separated? How is the queue designed? Where are the storage bottlenecks? How do you rate-limit when long tasks pile up? How is cost attributed?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ten: deployment boundaries.&lt;/strong&gt; What do you self-host, and what do you delegate to a managed platform? Can data stay inside your system? Are you locking yourself too deeply into one runtime?&lt;/p&gt;



&lt;h2&gt;
  
  
  12. Closing thoughts
&lt;/h2&gt;

&lt;p&gt;Agent products aren't only chasing smarter behavior. Once they enter a business system, what matters as much is being more reliable: recoverable, isolable, approvable, traceable, scalable, cost-controllable.&lt;/p&gt;

&lt;p&gt;That's why Agent Harness and Runtime are worth seeing as separate. The Harness sets the ceiling on what an Agent can do. The Runtime sets the floor under which it can't safely go live. Without the former, the Agent isn't smart enough; without the latter, the Agent can't be launched.&lt;/p&gt;

&lt;p&gt;If we're going to build our own production-grade Agents, the Runtime should enter the architecture from day one. Even if v1 isn't a full system, the boundaries should be defined first: how is task state saved, how is user identity passed, how are tool permissions controlled, how does human approval recover, how do traces settle into evaluation data.&lt;/p&gt;

&lt;p&gt;The future of Agents isn't only stronger models — it's a more mature Runtime. Whoever can make a complex Agent's execution stable, controllable, and auditable will get closer to real business deployment.&lt;/p&gt;

&lt;p&gt;That's what I find most worth learning from LangChain's Runtime piece.&lt;/p&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;LangChain, The Runtime Behind Production Deep Agents
&lt;a href="https://www.langchain.com/blog/runtime-behind-production-deep-agents" rel="noopener noreferrer"&gt;www.langchain.com/blog/runtime-behind-production-deep-agents&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;



</description>
      <category>ai</category>
      <category>agents</category>
      <category>langchain</category>
      <category>programming</category>
    </item>
    <item>
      <title>Anthropic Managed Agents: 2026 Agent Harness Architecture for Production AI Agents</title>
      <dc:creator>Luhui Dev</dc:creator>
      <pubDate>Wed, 13 May 2026 13:29:36 +0000</pubDate>
      <link>https://dev.to/luhuidev/anthropic-managed-agents-2026-agent-harness-architecture-for-production-ai-agents-3899</link>
      <guid>https://dev.to/luhuidev/anthropic-managed-agents-2026-agent-harness-architecture-for-production-ai-agents-3899</guid>
      <description>&lt;p&gt;🙋‍&lt;br&gt;
&lt;em&gt;I’m &lt;a href="https://luhuidev.com/en" rel="noopener noreferrer"&gt;Luhui Dev&lt;/a&gt;, a developer who has been breaking down Agent engineering and exploring how AI can be applied in education.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;I focus on Agent Harness, LLM application engineering, AI for Math, and the productization of education SaaS.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;Anthropic's recent posts on Agent Harness are worth your time.&lt;/p&gt;

&lt;p&gt;They quietly pushed the whole field forward — from "how do I write a smarter loop" to "how do I design a runtime that survives production."&lt;/p&gt;

&lt;p&gt;This piece walks through the latest practice: Session, Harness, Sandbox, Credentials, Tool Protocol, Context Builder, Trace, Eval.&lt;/p&gt;


&lt;h2&gt;
  
  
  How the thinking shifted
&lt;/h2&gt;

&lt;p&gt;Anthropic didn't wake up one day and decide Agents needed a Runtime. The center of gravity moved a few times over the past couple of years.&lt;/p&gt;
&lt;h3&gt;
  
  
  Phase 1: Long context as the main lever
&lt;/h3&gt;

&lt;p&gt;Early Anthropic talked a lot about long context.&lt;/p&gt;

&lt;p&gt;100K, then 200K context windows showed up. Claude could read more docs, hold longer conversations, juggle more complex material. Most problems were still framed as prompt engineering — how to stuff information in, how to make the model find the right piece in a long window, how to cut down on misses.&lt;/p&gt;

&lt;p&gt;Made sense at the time. When the window suddenly gets bigger, everyone wants to throw task state, docs, and chat history into it.&lt;/p&gt;

&lt;p&gt;But real Agent work proved a simple point: &lt;strong&gt;a bigger workspace is not the same as reliable memory.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No matter how long the window is, it's still tokens the model sees in a single call. It gets expensive. It degrades. It gets compressed. It gets polluted by noise.&lt;/p&gt;


&lt;h3&gt;
  
  
  Phase 2: Splitting Agents into workflow vs autonomous loop
&lt;/h3&gt;

&lt;p&gt;By the &lt;em&gt;Building Effective AI Agents&lt;/em&gt; era, Anthropic started drawing a hard line between workflow and agent.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;workflow&lt;/strong&gt; has a defined process and controllable paths. The model makes calls at certain nodes.&lt;/p&gt;

&lt;p&gt;An &lt;strong&gt;agent&lt;/strong&gt; is an open loop. The model plans, calls tools, reads results, and keeps going on its own.&lt;/p&gt;

&lt;p&gt;This distinction matters more than people give it credit for. Most products don't need a highly autonomous Agent.&lt;/p&gt;

&lt;p&gt;Stable business processes are cheaper, more reliable, and easier to debug as workflows. Forcing an Agent in usually just turns a controllable process into an uncontrollable black box.&lt;/p&gt;

&lt;p&gt;The takeaway from this phase still holds: &lt;strong&gt;start simple. Only reach for higher autonomy when the task actually demands open-ended decisions.&lt;/strong&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Phase 3: Tools, context, and safety become the main battlefield
&lt;/h3&gt;

&lt;p&gt;After 2025, Anthropic's posts pivoted hard toward engineering details.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;think&lt;/code&gt; tool — gives space for reasoning inside complex tool calls.&lt;/p&gt;

&lt;p&gt;Multi-agent research system — parallel search and division of labor for heavy research tasks.&lt;/p&gt;

&lt;p&gt;Context engineering — selecting, compressing, trimming, and dynamically loading context.&lt;/p&gt;

&lt;p&gt;Agent Skills — procedural domain knowledge, loaded on demand.&lt;/p&gt;

&lt;p&gt;Claude Code sandboxing — drawing the line around code execution, filesystem, network, and credentials.&lt;/p&gt;

&lt;p&gt;MCP, code execution with MCP, advanced tool use — connecting tools, discovering them, and stopping tool definition bloat and intermediate-result pollution from wrecking the context.&lt;/p&gt;

&lt;p&gt;These look like scattered topics. They all point at the same thing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Once an Agent does real work, the question stops being "can the model answer" and becomes "can the system carry the model's actions."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Too many tools → context explodes.&lt;/p&gt;

&lt;p&gt;Tasks too long → chat history runs out of road.&lt;/p&gt;

&lt;p&gt;Execution too free → safety boundary collapses.&lt;/p&gt;

&lt;p&gt;Multi-Agent too eager → cost and coordination overhead pile up.&lt;/p&gt;

&lt;p&gt;Models upgrading too fast → old harness assumptions expire.&lt;/p&gt;


&lt;h3&gt;
  
  
  Phase 4: Lift the problem to the Runtime layer
&lt;/h3&gt;

&lt;p&gt;In the latest Managed Agents post, Anthropic stopped debating how to write a specific harness. They started talking about a stable interface for an &lt;strong&gt;Agent Runtime&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The system gets split into Session, Harness, Sandbox.&lt;/p&gt;

&lt;p&gt;Claude + harness = the &lt;strong&gt;brain&lt;/strong&gt;. Sandbox and execution environment = the &lt;strong&gt;hands&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Session lives outside the context window.&lt;/p&gt;

&lt;p&gt;Credentials live outside the sandbox.&lt;/p&gt;

&lt;p&gt;Execution environments are allowed to fail, get replaced, get rebuilt.&lt;/p&gt;

&lt;p&gt;That's the whole arc of Anthropic's thinking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Long context → Tool loop → Context engineering → Safe execution → Recoverable runtime
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h2&gt;
  
  
  The core idea of Managed Agents: stable interfaces, swappable strategies
&lt;/h2&gt;

&lt;p&gt;Managed Agents boils down to one line: &lt;strong&gt;don't bolt together the things that will keep changing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Models change. Harness strategies change. Tools change. Sandbox shapes change. Context strategies change. Customer deployment environments change. Safety requirements change.&lt;/p&gt;

&lt;p&gt;Cram all of that into one container, one loop, one prompt stack — and within a year your system is a brick you can't replace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Harnesses encode assumptions that go stale as models improve.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A harness encodes the current model's weaknesses. Model can't plan long tasks? Add a planner. Model misses checks? Add an evaluator. Model bails early when context is close to full? Add context reset. Model is shaky on tool calls? Add elaborate retry logic.&lt;/p&gt;

&lt;p&gt;These strategies work on one generation of the model. The next generation, they're dead weight.&lt;/p&gt;

&lt;p&gt;Anthropic gave a sharp example: Claude Sonnet 4.5 tended to wrap up early near the context limit, so the harness added a context reset. With Claude Opus 4.5, that behavior was gone — and the reset logic became overhead.&lt;/p&gt;

&lt;p&gt;The lesson:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't bake today's model defects into tomorrow's architecture.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The core interfaces Managed Agents pulls out look roughly like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Session: what happened during the task
Harness: what to do next
Sandbox: where actions execute
Tool interface: how actions get called
Credential boundary: whether actions are authorized
Context builder: what the model sees this turn
Trace / Eval: how the run gets reviewed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point isn't to land an elegant fixed Agent loop.&lt;/p&gt;

&lt;p&gt;The point is: when models, tools, and execution environments change, the system can keep evolving.&lt;/p&gt;

&lt;p&gt;That's what's actually worth stealing from Managed Agents.&lt;/p&gt;



&lt;h2&gt;
  
  
  Key idea #1: Brain / Hands decoupling
&lt;/h2&gt;

&lt;p&gt;The most important cut in Managed Agents is splitting &lt;strong&gt;brain&lt;/strong&gt; from &lt;strong&gt;hands&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Brain = Claude + harness.&lt;/p&gt;

&lt;p&gt;Hands = sandbox, MCP server, external tools, devices, browser, code execution environment.&lt;/p&gt;

&lt;p&gt;The early default was putting the brain &lt;em&gt;inside&lt;/em&gt; the hands. One container running the harness, holding the session, executing tools, sitting on the filesystem — sometimes with credentials thrown in for fun.&lt;/p&gt;

&lt;p&gt;In production, this creates the classic problem: &lt;strong&gt;the container becomes a pet server.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can't toss it. Can't easily restart it. If it crashes you have to rescue it. To debug you have to SSH in.&lt;/p&gt;

&lt;p&gt;User data, execution state, tool calls, and credential boundaries all mashed together.&lt;/p&gt;

&lt;p&gt;Anthropic's later approach: let the harness leave the sandbox. The harness becomes a relatively stateless control plane. The sandbox becomes a callable, rebuildable execution resource.&lt;/p&gt;

&lt;p&gt;The two talk through a dead-simple interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;execute(name, input) -&amp;gt; string
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The harness doesn't need to know whether the other side is a container, a remote service, an MCP server, or some tool environment inside a customer's VPC. It calls the action. It gets the result back.&lt;/p&gt;

&lt;p&gt;What you get out of this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Sandbox dies, task doesn't die.&lt;/li&gt;
&lt;li&gt; Brain can start work, sandbox can load later.&lt;/li&gt;
&lt;li&gt; One brain, many hands.&lt;/li&gt;
&lt;/ol&gt;



&lt;h2&gt;
  
  
  Key idea #2: Session design
&lt;/h2&gt;

&lt;p&gt;The other big call in Managed Agents:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session is not Claude's context window.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lots of Agent systems blur session, chat history, memory, and context window together. Short tasks survive that. Long tasks fall apart.&lt;/p&gt;

&lt;p&gt;The context window is just the tokens the model sees in a single inference call. It's a workspace.&lt;/p&gt;

&lt;p&gt;The session should be the durable record of what happened — closer to an &lt;strong&gt;event log&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A serious session should be capturing at least:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user_input
model_response
tool_call
tool_result
file_change
error
retry
approval
checkpoint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every time the harness calls the model, it pulls from the session and assembles a context for that turn.&lt;/p&gt;

&lt;p&gt;This separation is the whole game: &lt;strong&gt;Prompt is the workspace. Session is the ledger.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A workspace gets organized, compressed, trimmed, rearranged. A ledger stays as complete, queryable, and recoverable as you can make it. Dump all history into context and cost explodes while the model drowns in noise. Rely only on summaries and the detail you dropped becomes tomorrow's critical bug.&lt;/p&gt;

&lt;p&gt;The shape that holds up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw events kept long-term
        ↓
Context Builder picks dynamically
        ↓
This model call sees a high-signal context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is also where context engineering and durable state split apart.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context engineering&lt;/strong&gt; decides what the model sees this turn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session event log&lt;/strong&gt; records what actually happened in the system.&lt;/p&gt;

&lt;p&gt;Long-running Agents that skip this layer pay for it later — resume, trace, eval, debug all get painful.&lt;/p&gt;



&lt;h2&gt;
  
  
  Key idea #3: Sandbox design
&lt;/h2&gt;

&lt;p&gt;Sandbox is the most underrated piece in an Agent system.&lt;/p&gt;

&lt;p&gt;Most teams start by giving the Agent a shell. It can run commands, read files, edit code. Feels like enough.&lt;/p&gt;

&lt;p&gt;Fine for demos. In production, the sandbox is your &lt;strong&gt;security boundary&lt;/strong&gt;, your &lt;strong&gt;execution boundary&lt;/strong&gt;, and a meaningful source of &lt;strong&gt;cost and latency&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What Anthropic pushed in Claude Code sandboxing and Managed Agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sandboxes isolate filesystem and network.&lt;/strong&gt; Treat model-generated code as untrusted code. The sandbox needs to limit filesystem access and limit network reach. Otherwise prompt injection can talk the Agent into reading files it shouldn't, hitting services it shouldn't, and exfiltrating the result.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandboxes shouldn't hold long-lived credentials.&lt;/strong&gt; Every GitHub token, DB key, or cloud secret sitting inside the sandbox is something an attacker can talk the Agent into leaking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandboxes need to be rebuildable and recoverable.&lt;/strong&gt; Long-running Agents will hit failures. Bind the sandbox to a session too tightly and the failure takes the whole task down. Better: make the sandbox rebuildable, recoverable, and ideally snapshot/resume-able. This is just Brain / Hands decoupling, taken seriously.&lt;/li&gt;
&lt;/ol&gt;



&lt;h2&gt;
  
  
  TL;DR: Anthropic's 2026 Agent Harness architecture
&lt;/h2&gt;

&lt;p&gt;Stitching the whole 2026 thinking together, you get this picture:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7exbaoxd88xji2f8xazh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7exbaoxd88xji2f8xazh.png" width="800" height="601"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What matters here is the responsibility boundary for each piece.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Harness is the control plane&lt;/strong&gt; — schedules models, context, tools, strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session event log is durable state&lt;/strong&gt; — not bound to any container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context Builder&lt;/strong&gt; — assembles a high-signal context from session, memory, skills, and tool results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool Router&lt;/strong&gt; — dispatches actions to MCP, the code execution environment, the sandbox, or other hands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sandbox executes actions&lt;/strong&gt; — allowed to fail, allowed to be rebuilt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Credential Proxy / Vault holds credentials&lt;/strong&gt; — untrusted execution environments never get the raw token.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trace / Eval&lt;/strong&gt; runs through the whole thing — so you can review, regress, and A/B harness changes.&lt;/p&gt;



&lt;h2&gt;
  
  
  Research-grade harness vs production-grade harness
&lt;/h2&gt;

&lt;p&gt;Plenty of Agent demos look great and then get clunky, expensive, and impossible to debug in production.&lt;/p&gt;

&lt;p&gt;The reason: research harness and production harness have different goals.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;research harness&lt;/strong&gt; chases capability ceiling. Burn more tokens, spawn more subagents, stack more evaluators, run another round. If the task success rate ticks up, the experiment was worth it.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;production harness&lt;/strong&gt; chases stable returns. It has to count cost, watch latency, control permissions, recover from failure, be observable, ship gradually, roll back cleanly.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Research Harness&lt;/th&gt;
&lt;th&gt;Production Harness&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Goal&lt;/td&gt;
&lt;td&gt;Push task success ceiling&lt;/td&gt;
&lt;td&gt;Stable delivery under cost / latency / safety constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State&lt;/td&gt;
&lt;td&gt;Transcript, local files, temp progress files&lt;/td&gt;
&lt;td&gt;External session log, checkpoints, event history&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context&lt;/td&gt;
&lt;td&gt;Give the model everything you can&lt;/td&gt;
&lt;td&gt;Smaller, higher-signal context set&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tools&lt;/td&gt;
&lt;td&gt;Wire up as many as possible&lt;/td&gt;
&lt;td&gt;Dynamic discovery, on-demand loading, scoped permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-Agent&lt;/td&gt;
&lt;td&gt;Try parallelism and role splits first&lt;/td&gt;
&lt;td&gt;Only on high-value, parallelizable tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Safety&lt;/td&gt;
&lt;td&gt;Manual confirmation, light isolation&lt;/td&gt;
&lt;td&gt;Sandbox, proxy, vault, scoped credentials&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failure recovery&lt;/td&gt;
&lt;td&gt;Retry or human handoff&lt;/td&gt;
&lt;td&gt;Resume, replay, checkpoint, trace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evaluation&lt;/td&gt;
&lt;td&gt;Did the final demo work&lt;/td&gt;
&lt;td&gt;Outcome eval, trace analysis, regression suite&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Iteration&lt;/td&gt;
&lt;td&gt;Add modules, add strategies, add agents&lt;/td&gt;
&lt;td&gt;Run ablations, delete the strategies that no longer pay rent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One line from Anthropic's posts sticks: &lt;strong&gt;harness strategies get repriced every time the model upgrades.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Today's planner is helpful. Tomorrow it slows the system down. Today's evaluator catches errors. Tomorrow it just adds cost. Today's context reset is a necessary patch. Tomorrow it's dead weight.&lt;/p&gt;

&lt;p&gt;So a production harness can't only add things. It has to delete things. That's the whole point of ablations.&lt;/p&gt;

&lt;p&gt;Every model upgrade should re-test: is memory still earning its keep? Is the critic? Is tool search? Is multi-agent fanout? Is context reset?&lt;/p&gt;

&lt;p&gt;In Agent engineering, &lt;strong&gt;the ability to delete obsolete complexity is its own skill.&lt;/strong&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;Agent products will keep getting more complex. But the complexity shouldn't all live in the prompt and the loop. It belongs in the runtime:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Session: durable state
Harness: control plane
Context Builder: context scheduling
Tool Router: action dispatch
Sandbox: isolated execution
Credential Proxy: credential boundary
Trace: process record
Eval: outcome judgment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the actual foundation for Agents in production.&lt;/p&gt;

&lt;p&gt;Multi-agent setups will keep evolving. The MCP ecosystem will keep growing. Context windows will keep getting longer. Models will keep getting better at tool calls, planning, and self-repair.&lt;/p&gt;

&lt;p&gt;But none of that softens the core problem. It sharpens it: &lt;strong&gt;your system has to be able to swap out old strategies.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An Agent platform that hardcodes everything into prompts, containers, and a fixed loop gets harder to maintain every quarter.&lt;/p&gt;

&lt;p&gt;A system that draws clear boundaries between state, execution, credentials, context, and evaluation — that's the one that gets to evolve alongside the model.&lt;/p&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, Scaling Managed Agents: Decoupling the brain from the hands
&lt;a href="https://www.anthropic.com/engineering/managed-agents" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/managed-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Harness design for long-running application development
&lt;a href="https://www.anthropic.com/engineering/harness-design-long-running-apps" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/harness-design-long-running-apps&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Effective harnesses for long-running agents
&lt;a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/effective-harnesses-for-long-running-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Effective context engineering for AI agents
&lt;a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/effective-context-engineering-for-ai-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Making Claude Code more secure and autonomous with sandboxing
&lt;a href="https://www.anthropic.com/engineering/claude-code-sandboxing" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/claude-code-sandboxing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Code execution with MCP: building more efficient AI agents
&lt;a href="https://www.anthropic.com/engineering/code-execution-with-mcp" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/code-execution-with-mcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Introducing advanced tool use on the Claude Developer Platform
&lt;a href="https://www.anthropic.com/engineering/advanced-tool-use" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/advanced-tool-use&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Equipping agents for the real world with Agent Skills
&lt;a href="https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Building Effective AI Agents
&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>luhuidev</category>
      <category>claude</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
