<?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: Dhrubojyoti Gangopadhyay</title>
    <description>The latest articles on DEV Community by Dhrubojyoti Gangopadhyay (@dhrubojyoti).</description>
    <link>https://dev.to/dhrubojyoti</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%2F4210575%2F8fc91994-1e1e-4509-bbbb-57f1dd7b775b.jpg</url>
      <title>DEV Community: Dhrubojyoti Gangopadhyay</title>
      <link>https://dev.to/dhrubojyoti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dhrubojyoti"/>
    <language>en</language>
    <item>
      <title>You gave each user their own AI agent. One coordinator beat the team by up to 45 points.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Mon, 23 Nov 2026 11:23:54 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/you-gave-each-user-their-own-ai-agent-one-coordinator-beat-the-team-by-up-to-45-points-26gk</link>
      <guid>https://dev.to/dhrubojyoti/you-gave-each-user-their-own-ai-agent-one-coordinator-beat-the-team-by-up-to-45-points-26gk</guid>
      <description>&lt;p&gt;You gave each user their own AI agent. One coordinator beat the team by up to 45 points.&lt;/p&gt;

&lt;p&gt;Engineering teams are rapidly rolling out multi-agent workflows where every developer or teammate gets an autonomous assistant operating against a shared resource—a pull-request merge queue, an API-token budget, a clinic schedule, or a shared booking cart. Intuitively, splitting the workload across specialized per-user agents sounds faster and fairer than relying on one coordinator.&lt;/p&gt;

&lt;p&gt;On 11 November 2026, Anthropic Alignment Science published &lt;a href="https://alignment.anthropic.com/2026/worse-together/" rel="noopener noreferrer"&gt;Worse Together: How Performance Breaks Down in Multi-User Multi-Agent Teams&lt;/a&gt; (preprint &lt;a href="https://arxiv.org/abs/2610.00583" rel="noopener noreferrer"&gt;&lt;code&gt;arXiv:2610.00583&lt;/code&gt;&lt;/a&gt;) and open-sourced three of the testbeds as &lt;a href="https://github.com/safety-research/MAMUBench" rel="noopener noreferrer"&gt;MAMUBench&lt;/a&gt;. Evaluating frontier models from Anthropic, OpenAI, and Alibaba across 77 scenarios in four shared-resource environments revealed the exact opposite of the multi-agent assumption.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the benchmark actually measured
&lt;/h2&gt;

&lt;p&gt;The researchers compared four formations: a solo baseline, a &lt;strong&gt;single coordinator&lt;/strong&gt; serving every user, a silent per-user team, and a &lt;strong&gt;peer-to-peer team&lt;/strong&gt; where each user had their own agent plus an inter-agent messaging channel.&lt;/p&gt;

&lt;p&gt;Across all four environments—API-token budgets, clinic calendars, group bookings, and code merge queues—the single coordinator outperformed peer-to-peer teams for both Claude Opus 5 and Claude Sonnet 5 by &lt;strong&gt;10 to 45 percentage points&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Four distinct failure mechanisms drove the drop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Coordination paralysis as team size grew:&lt;/strong&gt; On a constrained API-token budget (&lt;code&gt;API Key&lt;/code&gt;, 25 scenarios), peer teams achieved only &lt;strong&gt;47%&lt;/strong&gt; (Claude Opus 5) and &lt;strong&gt;38%&lt;/strong&gt; (Claude Sonnet 5) of coordinator performance (&lt;strong&gt;30%&lt;/strong&gt; and &lt;strong&gt;12%&lt;/strong&gt; of optimal, compared with &lt;strong&gt;64%&lt;/strong&gt; and &lt;strong&gt;32%&lt;/strong&gt; for the coordinator). Scaling from 4 to 16 agents caused the share of agents that ever took action to plunge from &lt;strong&gt;66% to 10%&lt;/strong&gt; for Sonnet 5 and from &lt;strong&gt;82% to 25%&lt;/strong&gt; for GPT-5.6-sol.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unconsented job cancellations:&lt;/strong&gt; In the same budget environment, GPT and Qwen agents canceled or scaled down other users' jobs without asking &lt;strong&gt;3.9 to 7.1 times per episode&lt;/strong&gt; (versus &lt;strong&gt;0.59&lt;/strong&gt; for Sonnet 5 and &lt;strong&gt;0&lt;/strong&gt; for Opus 5). Outcome-only scoring even rewarded some of these unconsented cuts, masking the safety failure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commit race conditions:&lt;/strong&gt; In shared planning (&lt;code&gt;Personal Assistant&lt;/code&gt;, 25 scenarios), one user supplied a critical constraint ("the ask", such as celiac-safe gluten-free sides). That ask reached the committing agent in &lt;strong&gt;94–99%&lt;/strong&gt; of episodes, yet appeared in its context at commit time in only &lt;strong&gt;47–67%&lt;/strong&gt;—and &lt;strong&gt;65–77%&lt;/strong&gt; of team episodes edited &lt;em&gt;against&lt;/em&gt; the ask.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fabricated consensus from split context:&lt;/strong&gt; Because each peer agent saw only its own user's notes, team agents made unsupported claims about other participants in &lt;strong&gt;58%&lt;/strong&gt; (Opus 5) and &lt;strong&gt;53%&lt;/strong&gt; (Sonnet 5) of episodes, compared with &lt;strong&gt;17–20%&lt;/strong&gt; for a single coordinator.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why platform guards beat better prompts
&lt;/h2&gt;

&lt;p&gt;The fixes that worked were architectural and environment-specific:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Priority conflicts (&lt;code&gt;API Key&lt;/code&gt;):&lt;/strong&gt; Designating a &lt;strong&gt;team lead&lt;/strong&gt; agent with explicit authority to prioritize high-value jobs closed the gap between peer teams and the single coordinator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrent state updates (&lt;code&gt;Personal Assistant&lt;/code&gt;):&lt;/strong&gt; Adding a team lead did &lt;em&gt;not&lt;/em&gt; fix group checkout failures. What rescued &lt;strong&gt;73%&lt;/strong&gt; (Opus 5) and &lt;strong&gt;62%&lt;/strong&gt; (Sonnet 5) of failed runs was a &lt;strong&gt;platform-level read-barrier guard&lt;/strong&gt; that blocked commit until the committing agent had read every pending peer message.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Architectural pattern: deterministic read-barrier + state version check
&lt;/h2&gt;

&lt;p&gt;Rather than hoping peer agents politely wait for one another in natural language, enforce a deterministic commit gate at the tool boundary:&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="c1"&gt;# [Illustrative platform read-barrier guard for shared agent state]&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;

&lt;span class="nd"&gt;@dataclass&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SharedResourceGate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;inbox_seq&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;
    &lt;span class="n"&gt;last_read_seq_by_agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;state_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;commit_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;agent_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expected_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mutation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;unread&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;inbox_seq&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last_read_seq_by_agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;agent_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&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;unread&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Commit blocked: {agent_id} has {unread} unread peer message(s). "&lt;/span&gt;
                &lt;span class="s2"&gt;"Consume inbox before committing."&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;expected_version&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Stale state version {expected_version} != {self.state_version}. "&lt;/span&gt;
                &lt;span class="s2"&gt;"Re-read shared state before mutating."&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state_version&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"committed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"new_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state_version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"mutation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;mutation&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Four takeaways for engineering teams
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enforce read-barriers before shared commits.&lt;/strong&gt; Treat unread peer messages and stale state versions as hard pre-commit rejections, not prompt hints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a single coordinator until isolation is mandatory.&lt;/strong&gt; Split context directly raises fabrication rates and race conditions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate permission boundaries from coordination.&lt;/strong&gt; Give explicit authority (like a team lead or merge queue arbiter) rather than letting peer agents silently cancel each other's runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit actions alongside outcomes.&lt;/strong&gt; A global utility score will never flag that one agent quietly destroyed another teammate's work to hit the target.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Primary sources: &lt;a href="https://alignment.anthropic.com/2026/worse-together/" rel="noopener noreferrer"&gt;Anthropic Alignment Science — "Worse Together" (11 Nov 2026)&lt;/a&gt;, &lt;a href="https://arxiv.org/abs/2610.00583" rel="noopener noreferrer"&gt;&lt;code&gt;arXiv:2610.00583&lt;/code&gt;&lt;/a&gt;, and &lt;a href="https://github.com/safety-research/MAMUBench" rel="noopener noreferrer"&gt;github.com/safety-research/MAMUBench&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llmops</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Yesterday, an AI Riemann Hypothesis proof passed formal verification. Humans are now translating all 17 million lines.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Sun, 22 Nov 2026 06:56:48 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/yesterday-an-ai-riemann-hypothesis-proof-passed-formal-verification-humans-are-now-translating-1o7m</link>
      <guid>https://dev.to/dhrubojyoti/yesterday-an-ai-riemann-hypothesis-proof-passed-formal-verification-humans-are-now-translating-1o7m</guid>
      <description>&lt;p&gt;Yesterday, an AI Riemann Hypothesis proof passed formal verification. Humans are now translating all 17 million lines.&lt;/p&gt;

&lt;p&gt;On 20 November 2026, Anthropic mathematician Levent Alpöge posted a four-page note announcing that he and Claude had discovered and formalized a proof of the Riemann Hypothesis and the Generalized Riemann Hypothesis over six weeks. Rather than releasing an AI-written paper—which had already ballooned past 250,000 pages—he released 175,187 Lean 4 modules totaling roughly 17 million lines of formal code.&lt;/p&gt;

&lt;p&gt;On 21 November 2026, the Lean and Mathlib communities, endorsed by the Lean Focused Research Organization (Lean FRO) and the Mathlib Initiative, certified the formal verification in &lt;a href="https://leanprover-community.github.io/blog/posts/riemann-hypothesis/" rel="noopener noreferrer"&gt;the Lean community blog statement&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the verification actually proved
&lt;/h2&gt;

&lt;p&gt;Software engineers often confuse "a model claimed it" with "a kernel checked it." Here is what the verification logs from the Lean FRO and &lt;a href="https://math.mit.edu/~drew/grh/" rel="noopener noreferrer"&gt;Andrew Sutherland's MIT verification page&lt;/a&gt; establish:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Statement accuracy and matching:&lt;/strong&gt; The headline theorem proves Mathlib's existing &lt;code&gt;RiemannHypothesis&lt;/code&gt; definition. Isolated challenge files importing only Mathlib were matched against the proved theorems using &lt;code&gt;comparator&lt;/code&gt;, &lt;code&gt;con-leche --compare&lt;/code&gt;, and its Rust port &lt;code&gt;con-ron&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Axiom audit:&lt;/strong&gt; Running &lt;code&gt;#print axioms&lt;/code&gt; on the five headline theorems confirmed zero &lt;code&gt;sorry&lt;/code&gt; placeholders and zero non-core axioms—only Lean's three standard axioms (&lt;code&gt;propext&lt;/code&gt;, &lt;code&gt;Classical.choice&lt;/code&gt;, &lt;code&gt;Quot.sound&lt;/code&gt;). All 8,322 Mathlib &lt;code&gt;.olean&lt;/code&gt; files matched the official cache byte-for-byte.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Independent sandboxed rebuild:&lt;/strong&gt; An offline, read-only &lt;code&gt;lake build Main&lt;/code&gt; compiled all 175,187 modules with zero errors and produced an identical 61,570,595,788-byte proof export.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-kernel checking:&lt;/strong&gt; The exported proof passed Lean's official kernel as well as independently written checkers in separate languages (&lt;code&gt;nanoda&lt;/code&gt;, &lt;code&gt;lean4lean&lt;/code&gt;, &lt;code&gt;con-leche&lt;/code&gt;, and &lt;code&gt;con-ron&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What remains open
&lt;/h2&gt;

&lt;p&gt;Formal machine verification is still distinct from human mathematical consensus and the Clay Millennium Prize, which requires peer-reviewed publication and broad community understanding over two years. Alpöge himself noted that he presented the formalization before mastering every neighbourhood of the surrounding mathematics. Mathematicians at the University of Waterloo and IHES have already published preliminary working expositions—including a 164-page draft translating the zeta-function argument back into classical analytic number theory.&lt;/p&gt;

&lt;h2&gt;
  
  
  The engineering shift: verification outlives comprehension
&lt;/h2&gt;

&lt;p&gt;For decades, software delivery assumed a human reviewer could read every changed line before merge. When an AI workflow produces 17 million lines in six weeks, line-by-line comprehension stops being the gate.&lt;/p&gt;

&lt;p&gt;What survives that shift is an isolated verification architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Illustrative AI-assisted verification gate]

1. Human-owned spec       -&amp;gt;  Freeze the target contract / theorem statement
2. Untrusted generator    -&amp;gt;  Agent writes implementation or proof (any volume)
3. Statement comparator   -&amp;gt;  Verify the output still proves the frozen contract
4. Independent checker    -&amp;gt;  Run deterministic kernel / tests outside the LLM
5. Human audit            -&amp;gt;  Review spec assumptions and flagged edge cases
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice where human effort sits in that loop. You do not spend human hours reading 250,000 pages of generated prose. You spend human hours auditing the &lt;strong&gt;specification&lt;/strong&gt;, checking that the &lt;strong&gt;comparator&lt;/strong&gt; prevents goal-post moving, and running &lt;strong&gt;independent deterministic verifiers&lt;/strong&gt; that cannot be sweet-talked by a confident model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four habits for AI engineering teams
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify the contract, not just the diff.&lt;/strong&gt; Invest in strict schemas, type invariants, and property-based checks before scaling code-generation speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolate the verifier.&lt;/strong&gt; Lean's export cleared four independent kernels written in different languages. Never let the generating model be the sole grader of its own output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate machine truth from human audit.&lt;/strong&gt; Let deterministic checkers pass or fail correctness, and focus human review on specification assumptions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refuse unreadable bloat.&lt;/strong&gt; Alpöge rejected a 250,000-page prose dump and shipped machine-checkable modules instead. Demand concise, testable artifacts from your coding agents too.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Sources: Levent Alpöge's note (&lt;code&gt;alpo.ge/remark.pdf&lt;/code&gt;, 20 Nov 2026), Lean Community Blog (&lt;code&gt;leanprover-community.github.io/blog/posts/riemann-hypothesis/&lt;/code&gt;, 21 Nov 2026), and MIT Mathematics verification log (&lt;code&gt;math.mit.edu/~drew/grh/&lt;/code&gt;, updated 22 Nov 2026).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>formalverification</category>
      <category>softwareengineering</category>
      <category>lean</category>
    </item>
    <item>
      <title>Saved. Refresh. Gone. — Testing a form with GitHub Copilot</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Sat, 21 Nov 2026 18:15:52 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/saved-refresh-gone-testing-a-form-with-github-copilot-2d4n</link>
      <guid>https://dev.to/dhrubojyoti/saved-refresh-gone-testing-a-form-with-github-copilot-2d4n</guid>
      <description>&lt;p&gt;Saved. Refresh. Gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The screenshot that passes either way
&lt;/h2&gt;

&lt;p&gt;Imagine two versions of a delivery form. Both show a green tick when you change Flat A to Flat B. One saves the address. The other updates the screen and loses the edit. Pause the demo at the tick and the screenshots look identical.&lt;/p&gt;

&lt;p&gt;On 17 November, GitHub released browser use in public preview for Copilot. Pair the GitHub Copilot Chrome extension with a supported client and you can ask Copilot to interact with the page. That gives the person writing a bug report a useful choice about where the agent should stop. &lt;a href="https://github.blog/changelog/2026-11-17-let-github-copilot-interact-with-your-browser/" rel="noopener noreferrer"&gt;GitHub’s announcement&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Give the agent a result it can read back
&lt;/h2&gt;

&lt;p&gt;I’d seed a staging account with Flat A and give the agent this task:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Open the delivery form. Confirm the flat currently says A. Change it to B and save. After the confirmation appears, reload the page, reopen the form and report the flat shown. If it says A, stop there and record what happened.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Checking the starting value matters. If the account already says B, a broken Save button could pass the test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the observation separate from the diagnosis
&lt;/h2&gt;

&lt;p&gt;An illustrative failure record could fit in a pull request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Starting flat        A
Requested flat       B
After clicking Save  Green tick
After reopening      A
Expected             B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That record gives the next engineer something to reproduce. It leaves the cause open. A failed write and a stale read can look identical from the form. Inspecting the save response and the subsequent read would help tell them apart.&lt;/p&gt;

&lt;p&gt;If the requirement is that another device sees the edit, extend the test to a fresh session. A reload in the original browser can still read locally cached state. Choose the final observation to match what you promised the user.&lt;/p&gt;

&lt;p&gt;This is a proposed test for the preview. The form and the failure record are illustrative.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Applied AI, Day 36. Follow for a daily release note and a concrete way to test what changed.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>githubcopilot</category>
      <category>testing</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>You added prompt caching to cut costs 90%. A dynamic timestamp made every call 25% more expensive.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Fri, 20 Nov 2026 05:17:36 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/you-added-prompt-caching-to-cut-costs-90-a-dynamic-timestamp-made-every-call-25-more-expensive-23gi</link>
      <guid>https://dev.to/dhrubojyoti/you-added-prompt-caching-to-cut-costs-90-a-dynamic-timestamp-made-every-call-25-more-expensive-23gi</guid>
      <description>&lt;p&gt;Anthropic's prompt caching promises a &lt;strong&gt;90% discount&lt;/strong&gt; on cached input tokens. Teams add &lt;code&gt;cache_control: {"type": "ephemeral"}&lt;/code&gt; to their system prompts, deploy to production, and expect their API bills to collapse.&lt;/p&gt;

&lt;p&gt;Then the invoice arrives, and costs went up by a quarter.&lt;/p&gt;

&lt;p&gt;Here is the mechanical trap inside exact-prefix caching.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Primary Source: Anthropic Prompt Caching Specification
&lt;/h3&gt;

&lt;p&gt;Anthropic's official Claude documentation defines prompt caching mechanics with mathematical precision:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hierarchical Prefix Order:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Prompt caching is evaluated strictly from the beginning of the prompt. Tools are evaluated first, then system messages, then user and assistant messages."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Exact Byte-for-Byte Prefix Match:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Prompt caching requires an exact prefix match. Any change to tools, system instructions, or message order creates a new prefix."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pricing Multipliers Relative to Base Input Tokens:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"5-minute cache writes are priced at 1.25x the base input token price, while cache reads are priced at 0.1x (a 90% discount)."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Minimum Token Threshold:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The minimum cacheable prompt length is 1,024 tokens."&lt;/em&gt; (Below this threshold, caching directives fail silently without writing or reading from cache).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Where the Silent Penalty Happens
&lt;/h3&gt;

&lt;p&gt;Consider a standard production agent with a 4,000-token system prompt containing instructions, policy rules, and schema definitions.&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="c1"&gt;# The common architectural trap&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;

&lt;span class="n"&gt;system_prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"""
You are a reliable enterprise financial agent.
Current Server Time: {datetime.datetime.utcnow().isoformat()}
Request ID: {request.id}

[... 4,000 tokens of static policy and guidelines ...]
"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is the step-by-step failure mode:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prefix Divergence at Token Zero:&lt;/strong&gt; Anthropic evaluates tokens in strict sequence: &lt;code&gt;tools&lt;/code&gt; $\longrightarrow$ &lt;code&gt;system&lt;/code&gt; $\longrightarrow$ &lt;code&gt;messages&lt;/code&gt;. Because &lt;code&gt;{datetime.datetime.utcnow()}&lt;/code&gt; changes on every request, the prefix diverges within the first 20 tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0% Cache Hit Rate:&lt;/strong&gt; Caching does not use semantic similarity. Because the prefix changed, zero subsequent tokens match the cache.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The 1.25x Write Surcharge:&lt;/strong&gt; Because &lt;code&gt;cache_control&lt;/code&gt; was explicitly marked on the block, the API attempts a cache write on every single request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Invoice Shock:&lt;/strong&gt; A cache read costs 0.10x. But a cache write costs 1.25x—a &lt;strong&gt;25% premium&lt;/strong&gt; over standard input pricing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Net Outcome:&lt;/strong&gt; Every request pays 1.25x base price. You paid a 25% penalty across your entire workload to populate disposable cache entries that expired five minutes later without ever being read once.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expected:  [4,000 tokens @ 0.10x]  --&amp;gt;  90% Cost Reduction
Reality:   [4,000 tokens @ 1.25x]  --&amp;gt;  25% Cost Surcharge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  The Second Failure Mode: Non-Deterministic Tool Ordering
&lt;/h3&gt;

&lt;p&gt;Even if your system prompt is completely static, Python dictionary or set iteration can silently destroy cache hits:&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="c1"&gt;# Unsorted tool registration&lt;/span&gt;
&lt;span class="n"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;search_tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;calculator_tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sql_query_tool&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="c1"&gt;# If order flips across worker processes:&lt;/span&gt;
&lt;span class="c1"&gt;# Worker A sends: [search, calc, sql]&lt;/span&gt;
&lt;span class="c1"&gt;# Worker B sends: [calc, search, sql]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because &lt;code&gt;tools&lt;/code&gt; precede &lt;code&gt;system&lt;/code&gt; in Anthropic's prefix evaluation, flipping the order of two tools invalidates the entire cache for both the tools AND the system prompt downstream.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Engineering Discipline
&lt;/h3&gt;

&lt;p&gt;To guarantee 90% cache savings instead of a 25% write penalty:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Strict Prefix Segregation:&lt;/strong&gt; Keep &lt;code&gt;tools&lt;/code&gt; and foundational system instructions 100% immutable. Move timestamps, user session IDs, and dynamic environment state into the trailing user message:
&lt;/li&gt;
&lt;/ol&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="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Context: Current time is 2026-11-20T10:15:00Z. Session: sess_94b18."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Analyze the Q3 ledger."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="p"&gt;]&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Tool Serialization:&lt;/strong&gt; Always sort tool definitions alphabetically by name before serializing them into the request payload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Assert on Cache Telemetry:&lt;/strong&gt; Instrument your API middleware to alert when &lt;code&gt;cache_creation_input_tokens &amp;gt; 0&lt;/code&gt; on steady-state traffic or when &lt;code&gt;cache_read_input_tokens == 0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Respect the 1,024 Token Floor:&lt;/strong&gt; Static prefixes under 1,024 tokens will not cache. Ensure static documentation blocks meet the threshold before adding cache breakpoints.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Two Hard Rules
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;A dynamic variable in your static prefix turns a 90% discount into a 25% write penalty.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;In exact-prefix caching, order is architecture. If token zero changes, token ten thousand does not exist.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Honest limitation: I am reading Anthropic's official prompt caching documentation and pricing schedule. Realized cost impacts depend on prompt token length, call frequency, and cache hit distributions in your workload.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Checkable references: Anthropic Claude Platform Documentation ("Prompt Caching") and Claude API Pricing Schedule.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What this series is: one primary source a day — a spec, a changelog, a status page — and what actually changed, with the quote. Follow if you prefer the change over someone's summary.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>devops</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your guardrail regex didn't protect your agent. It froze your entire Python event loop.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Thu, 19 Nov 2026 07:12:45 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/your-guardrail-regex-didnt-protect-your-agent-it-froze-your-entire-python-event-loop-4k4h</link>
      <guid>https://dev.to/dhrubojyoti/your-guardrail-regex-didnt-protect-your-agent-it-froze-your-entire-python-event-loop-4k4h</guid>
      <description>&lt;p&gt;&lt;em&gt;In async Python, a synchronous regex running before your size limit is an unauthenticated CPU denial-of-service vector.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Your guardrail regex didn't protect your agent. It froze your entire Python event loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;Pydantic AI v2.70.0 (released 17 November 2026) shipped with two high-severity security advisories in &lt;code&gt;pydantic-ai-harness&lt;/code&gt; (&lt;strong&gt;GHSA-5m5q-5qj4-gx9h&lt;/strong&gt; and &lt;strong&gt;GHSA-m4cr-m4qc-9hh3&lt;/strong&gt;) that expose a dangerous architectural blind spot in how most engineering teams wire async agent guardrails and tool output sanitizers.&lt;/p&gt;

&lt;p&gt;From the advisories, verbatim:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Default JWT secret redaction (&lt;code&gt;GHSA-5m5q-5qj4-gx9h&lt;/code&gt;)&lt;/strong&gt;:
&amp;gt; &lt;em&gt;"The jwt pattern in Pydantic AI Harness's secret redaction backtracks in time quadratic in the length of the text it scanned, so a few hundred kilobytes of crafted text could occupy the event loop for tens of seconds to minutes."&lt;/em&gt;
&amp;gt; &lt;em&gt;"This affects applications that use the guardrail detectors redact_secrets or secret_data() with the jwt pattern, which is included by default, on text an attacker can influence: user prompts checked by InputGuardrail, tool results checked by ToolGuardrail, or model output checked by OutputGuardrail. Synchronous guards run on the event loop."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ANSI stripping before output truncation (&lt;code&gt;GHSA-m4cr-m4qc-9hh3&lt;/code&gt;)&lt;/strong&gt;:
&amp;gt; &lt;em&gt;"With strip_ansi=True, Pydantic AI Harness's ToolOutputLimits capability removed ANSI escape sequences with a pattern that took time quadratic in the length of a line, so a tool result of a few hundred kilobytes with many unterminated escape sequences could occupy the event loop for tens of seconds to minutes."&lt;/em&gt;
&amp;gt; &lt;em&gt;"Stripping runs on the event loop before the capability reduces the output, so its own size limits do not bound it."&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both vulnerabilities share the same root weakness: &lt;strong&gt;CWE-1333 (Inefficient Regular Expression Complexity)&lt;/strong&gt; executing synchronously on the Python &lt;code&gt;asyncio&lt;/code&gt; event loop before or independent of payload size limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mechanics of an event-loop freeze
&lt;/h2&gt;

&lt;p&gt;Almost every production Python agent service uses &lt;code&gt;asyncio&lt;/code&gt; (via FastAPI, Starlette, or an async worker pool) so a single worker process can multiplex dozens of concurrent agent runs waiting on network I/O (LLM streams, vector searches, MCP calls).&lt;/p&gt;

&lt;p&gt;To keep secrets out of logs and terminal garbage out of context windows, teams add guardrails and output limiters:&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="c1"&gt;# Illustrative configuration of tool limits and secret redaction prior to 0.70.0&lt;/span&gt;
&lt;span class="c1"&gt;# You assume ToolOutputLimits caps output size, and redact_secrets just scrubs tokens.&lt;/span&gt;
&lt;span class="n"&gt;harness_capabilities&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nc"&gt;ToolOutputLimits&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_bytes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strip_ansi&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;ToolGuardrail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;detector&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;redact_secrets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# includes 'jwt' pattern by default&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now trace what happens when an agent runs a tool whose output an external source can influence — fetching a web page, reading a repository file, running a shell command, or querying a third-party MCP server:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The untrusted payload arrives&lt;/strong&gt;: A tool returns a 300 KB single-line payload containing repeated &lt;code&gt;-eyJ&lt;/code&gt; segments or thousands of unterminated &lt;code&gt;\x1b[&lt;/code&gt; ANSI escape prefixes (illustrative payload):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   [ILLUSTRATIVE CRAFTED TOOL OUTPUT: 300 KB line]
   ... -eyJhbGciOi-eyJhbGciOi-eyJhbGciOi ... (or repeated \x1b[31;1;4m without terminator)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sanitization runs &lt;em&gt;before&lt;/em&gt; truncation&lt;/strong&gt;: You configured &lt;code&gt;ToolOutputLimits&lt;/code&gt; specifically so oversized tool responses get cut down before eating your context window. Backwards ordering defeats it: &lt;code&gt;strip_ansi=True&lt;/code&gt; ran on the raw, unbounded string &lt;em&gt;before&lt;/em&gt; the capability reduced the output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default regexes scan the full string on the main thread&lt;/strong&gt;: Even if &lt;code&gt;strip_ansi&lt;/code&gt; was left at its default &lt;code&gt;False&lt;/code&gt;, &lt;code&gt;redact_secrets&lt;/code&gt; and &lt;code&gt;secret_data()&lt;/code&gt; include the &lt;code&gt;jwt&lt;/code&gt; regex pattern by default across &lt;code&gt;InputGuardrail&lt;/code&gt;, &lt;code&gt;ToolGuardrail&lt;/code&gt;, and &lt;code&gt;OutputGuardrail&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quadratic backtracking locks the CPU&lt;/strong&gt;: Python's standard &lt;code&gt;re&lt;/code&gt; engine is a backtracking NFA. On crafted non-matching strings of length $N$, quadratic complexity $O(N^2)$ turns a 300 KB string scan into billions of backtracking steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The entire worker dies for 30–90 seconds&lt;/strong&gt;: Because synchronous guardrails run directly on the &lt;code&gt;asyncio&lt;/code&gt; event loop, the loop cannot yield at an &lt;code&gt;await&lt;/code&gt; point while inside &lt;code&gt;re.sub()&lt;/code&gt; or &lt;code&gt;re.search()&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why this looks like a mysterious infrastructure outage
&lt;/h2&gt;

&lt;p&gt;When an &lt;code&gt;asyncio&lt;/code&gt; event loop blocks in C-level regex evaluation for 60 seconds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every concurrent user on that worker freezes&lt;/strong&gt;: Other agent runs waiting for a socket read or streaming token chunk stop mid-sentence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Health checks time out&lt;/strong&gt;: Kubernetes &lt;code&gt;/healthz&lt;/code&gt; probes cannot be answered by the blocked event loop, triggering pod restarts and cascading 502s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WebSockets drop&lt;/strong&gt;: Heartbeat pings expire while the thread is stuck inside the guardrail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The wrong component gets blamed&lt;/strong&gt;: Engineers check LLM provider status pages and database connection pools, never suspecting that a "lightweight regex guardrail" burned 100% of one CPU core for a minute.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How &lt;code&gt;pydantic-ai-harness 0.70.0&lt;/code&gt; fixed it
&lt;/h2&gt;

&lt;p&gt;In &lt;code&gt;pydantic-ai-harness 0.70.0&lt;/code&gt; (shipped with Pydantic AI &lt;code&gt;v2.70.0&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ANSI stripping pattern in &lt;code&gt;ToolOutputLimits&lt;/code&gt; was fixed to avoid quadratic backtracking on unterminated escape sequences.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;jwt&lt;/code&gt; secret redaction pattern was tightened so it no longer backtracks quadratically (specifically, as the release notes state: &lt;em&gt;"The fixed pattern no longer matches a JWT whose header segment contains &lt;code&gt;-eyJ&lt;/code&gt;."&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;If you cannot upgrade immediately, the advisories document two immediate mitigations:

&lt;ul&gt;
&lt;li&gt;Leave &lt;code&gt;strip_ansi&lt;/code&gt; at its default (&lt;code&gt;False&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Exclude the &lt;code&gt;jwt&lt;/code&gt; pattern by explicitly whitelisting only the patterns you need: &lt;code&gt;secret_data(only=[...])&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The discipline for async agent guardrails
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enforce hard byte-length ceilings &lt;em&gt;before&lt;/em&gt; any regex or parser runs.&lt;/strong&gt; A size limit that runs after a regex, HTML parser, or JSON sanitizer is not a size limit. Slice or reject by raw byte/character count at the I/O boundary first:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="c1"&gt;# Illustrative defensive ordering: bound size BEFORE running any regex&lt;/span&gt;
   &lt;span class="no"&gt;MAX_SCAN_CHARS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;32_768&lt;/span&gt;
   &lt;span class="n"&gt;bounded_output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;raw_tool_output&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;MAX_SCAN_CHARS&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
   &lt;span class="n"&gt;sanitized_output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;linear_time_scrubber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bounded_output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Treat tool outputs as untrusted attacker-controlled input.&lt;/strong&gt; Prompt injection isn't the only threat from a fetched webpage, file read, or MCP response. Resource exhaustion (ReDoS, decompression bombs, deeply nested JSON) enters through the exact same tool-result channel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ban backtracking regexes on the &lt;code&gt;asyncio&lt;/code&gt; event loop.&lt;/strong&gt; Audit every custom regex in your &lt;code&gt;InputGuardrail&lt;/code&gt;, &lt;code&gt;ToolGuardrail&lt;/code&gt;, and &lt;code&gt;OutputGuardrail&lt;/code&gt; pipeline for CWE-1333 (nested quantifiers, overlapping alternations, unanchored greedy lookaheads), or replace Python's backtracking &lt;code&gt;re&lt;/code&gt; module on untrusted inputs with a linear-time automaton engine (such as &lt;code&gt;google-re2&lt;/code&gt; or a Rust-backed scanner).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A guardrail that runs before your size limit is an unauthenticated CPU denial-of-service vector.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In async Python, one quadratic regex on untrusted tool output freezes every user on the worker.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;strong&gt;Honest limitation:&lt;/strong&gt; I am reading Pydantic AI's &lt;code&gt;v2.70.0&lt;/code&gt; release notes and GitHub Security Advisories &lt;code&gt;GHSA-5m5q-5qj4-gx9h&lt;/code&gt; and &lt;code&gt;GHSA-m4cr-m4qc-9hh3&lt;/code&gt;. The configuration snippets and crafted payload examples above are illustrative; I have not run ReDoS payloads against a live deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checkable references:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/pydantic/pydantic-ai/releases/tag/v2.70.0" rel="noopener noreferrer"&gt;Pydantic AI v2.70.0 release notes (2026-11-17)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-5m5q-5qj4-gx9h" rel="noopener noreferrer"&gt;GHSA-5m5q-5qj4-gx9h: Harness JWT redaction can take quadratic time, blocking the event loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3" rel="noopener noreferrer"&gt;GHSA-m4cr-m4qc-9hh3: Harness ToolOutputLimits ANSI stripping can take quadratic time, blocking the event loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cwe.mitre.org/data/definitions/1333.html" rel="noopener noreferrer"&gt;MITRE CWE-1333: Inefficient Regular Expression Complexity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What this series is:&lt;/strong&gt; one primary source a day — a spec, a changelog, a status page — and what actually changed, with the quote. Follow if you prefer the change over someone's summary.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In your agent stack today, do your regex scrubbers run before or after you enforce hard byte-length caps on tool outputs?&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>security</category>
      <category>llmops</category>
    </item>
    <item>
      <title>The stream died halfway through. Your proxy treated it as a clean stop.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Tue, 17 Nov 2026 13:19:05 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/the-stream-died-halfway-through-your-proxy-treated-it-as-a-clean-stop-39il</link>
      <guid>https://dev.to/dhrubojyoti/the-stream-died-halfway-through-your-proxy-treated-it-as-a-clean-stop-39il</guid>
      <description>&lt;p&gt;&lt;em&gt;When you stream from an LLM, the HTTP 200 header belongs to the connection, not to the answer.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The stream died halfway through. Your proxy treated it as a clean stop.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;LiteLLM v1.109.0 patched three failure modes that sit inside almost every streaming LLM stack.&lt;/p&gt;

&lt;p&gt;From the project's tracking, verbatim:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Stalled streams&lt;/strong&gt;: &lt;em&gt;"stalled streams now explicitly answer with 408 litellm.Timeout."&lt;/em&gt; Previously failed as a generic connection error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aborted streams&lt;/strong&gt;: &lt;em&gt;"an upstream stream ending with an abort finish reason could be treated as a clean stop."&lt;/em&gt; Now: returns HTTP 500 instead of cleanly terminating.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unfinished streams&lt;/strong&gt;: &lt;em&gt;"a stream that outputs token content but never sends a terminating finish_reason (or OpenAI-style [DONE] marker) is treated as an incomplete stream."&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why did those three lines need a patch across three pull requests (PR #47198, #48328, #47665)? Because in a streaming architecture, the most dangerous failure is the one that looks like success.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mechanics of the silent mid-stream drop
&lt;/h2&gt;

&lt;p&gt;When you call an LLM with &lt;code&gt;stream=True&lt;/code&gt;, the transport is Server-Sent Events (SSE) or HTTP chunked transfer.&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="c1"&gt;# Illustrative streaming client call&lt;/span&gt;
&lt;span class="n"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gpt-4o"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Process delta tokens...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is what happens on the wire:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The HTTP request is dispatched to your API gateway / reverse proxy.&lt;/li&gt;
&lt;li&gt;Upstream provider acknowledges immediately: &lt;code&gt;HTTP/1.1 200 OK&lt;/code&gt;, &lt;code&gt;Content-Type: text/event-stream&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The gateway sees HTTP 200. As far as standard HTTP proxies, load balancers, and middleware are concerned, the request &lt;strong&gt;succeeded&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The model emits twenty tokens.&lt;/li&gt;
&lt;li&gt;Midway through token twenty-one, a GPU worker times out, a provider resets the socket, or a network partition aborts the stream.&lt;/li&gt;
&lt;li&gt;The connection closes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Where the bug lives
&lt;/h2&gt;

&lt;p&gt;Because chunk one already sent &lt;code&gt;200 OK&lt;/code&gt;, no HTTP 502, 503, or 504 was ever emitted.&lt;/p&gt;

&lt;p&gt;If the abort or unfinished stream is treated as a clean termination:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retries never fire&lt;/strong&gt;: Gateway retry policies look for &lt;code&gt;5xx&lt;/code&gt; or &lt;code&gt;429&lt;/code&gt; status codes. A connection that returned &lt;code&gt;200 OK&lt;/code&gt; and closed is not in the retry list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fallbacks are bypassed&lt;/strong&gt;: The proxy will not failover to an alternative model or secondary provider because it thinks the primary succeeded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Downstream consumers break&lt;/strong&gt;: If the model was streaming a structured tool call, the client receives half a JSON object (illustrative payload):
&lt;/li&gt;
&lt;/ul&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="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"transfer_funds"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"recipient"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"vendor_98"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;450&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The client's JSON parser crashes (illustrative error):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  json.decoder.JSONDecodeError: Unterminated string starting at line 1 column 67
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The wrong team gets blamed&lt;/strong&gt;: An engineer opens an issue: &lt;em&gt;"The model hallucinated invalid JSON."&lt;/em&gt; The model did nothing wrong. The model was cut in half by infrastructure, and the transport layer labeled it a clean delivery.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Making mid-stream failure loud
&lt;/h2&gt;

&lt;p&gt;The architectural fix in LiteLLM v1.109.0 is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An unfinished stream missing its terminal sentinel (&lt;code&gt;finish_reason&lt;/code&gt; or &lt;code&gt;[DONE]&lt;/code&gt;) is a &lt;strong&gt;failure&lt;/strong&gt;, not a short generation.&lt;/li&gt;
&lt;li&gt;An upstream abort becomes an explicit &lt;code&gt;HTTP 500&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A stalled stream becomes an explicit &lt;code&gt;408 litellm.Timeout&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The moment those exceptions are raised visibly, the proxy's resiliency machinery wakes up: retries kick in, provider cooldowns activate, and traffic shifts to healthy fallbacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discipline for streaming LLM pipelines
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;HTTP 200 proves the handshake, not the generation.&lt;/strong&gt; Never flag a streaming invocation as successful in your telemetry or audit log until the final &lt;code&gt;finish_reason&lt;/code&gt; or &lt;code&gt;[DONE]&lt;/code&gt; event has been parsed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforce gateway-level stream retries.&lt;/strong&gt; If your proxy or API gateway only inspects response headers before streaming starts, streaming effectively disables your retry architecture. Your proxy must support retrying on truncated chunked streams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never parse streaming tool calls until generation completes.&lt;/strong&gt; Wait for &lt;code&gt;finish_reason == "tool_calls"&lt;/code&gt; or &lt;code&gt;finish_reason == "stop"&lt;/code&gt;. If generation ended with &lt;code&gt;length&lt;/code&gt; or aborted unexpectedly, route it as an infrastructure failure, not a prompt issue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distinguish client cancellations from upstream aborts.&lt;/strong&gt; When a user closes their tab, that is client disconnect (&lt;code&gt;499&lt;/code&gt;). When an upstream provider aborts midway, that is provider failure (&lt;code&gt;500/502&lt;/code&gt;). Mixing them hides provider degradation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A response without a terminal marker is an incident, not an answer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If your retry middleware only reads HTTP headers, streaming turns off your retries.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;strong&gt;Honest limitation:&lt;/strong&gt; I am reading LiteLLM's public changelog and PR tracking (#47198, #48328, #47665). The truncated JSON snippet and parser error string above are illustrative. I have not benchmarked live failover latency under packet drops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checkable references:&lt;/strong&gt; LiteLLM v1.109.0 release notes ("Stream Failure Handling") and PRs #47198, #48328, #47665.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What this series is:&lt;/strong&gt; one primary source a day — a spec, a changelog, a status page — and what actually changed, with the quote. Follow if you prefer the change over someone's summary.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llmops</category>
      <category>python</category>
      <category>reliability</category>
    </item>
    <item>
      <title>The error told you to delete one line. Deleting it changed every answer.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Sun, 15 Nov 2026 07:31:15 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/the-error-told-you-to-delete-one-line-deleting-it-changed-every-answer-20l3</link>
      <guid>https://dev.to/dhrubojyoti/the-error-told-you-to-delete-one-line-deleting-it-changed-every-answer-20l3</guid>
      <description>&lt;p&gt;&lt;em&gt;A breaking change that fails loudly, and a fix that changes your product silently.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The error told you to delete one line. Deleting it changed every answer your product gives.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;Anthropic's API version &lt;code&gt;2026-10-21&lt;/code&gt; removed &lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;top_p&lt;/code&gt; and &lt;code&gt;top_k&lt;/code&gt; from the Messages API. Not deprecated with a grace period. Removed.&lt;/p&gt;

&lt;p&gt;The migration guide states it plainly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In &lt;code&gt;2026-10-21&lt;/code&gt;, a request that sends &lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;top_p&lt;/code&gt;, or &lt;code&gt;top_k&lt;/code&gt; returns a 400 error, even at the parameter's default value.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So this is a loud failure. Your request breaks, the error names the parameter, and you know exactly what to do.&lt;/p&gt;

&lt;p&gt;That part is fine. Loud failures get fixed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that is not loud
&lt;/h2&gt;

&lt;p&gt;The fix is to delete the parameter. The guide then tells you what happens next:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Without these parameters, a request samples with their defaults, including a &lt;code&gt;temperature&lt;/code&gt; of 1.0, the same as a &lt;code&gt;2023-06-01&lt;/code&gt; request that leaves them out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your line said &lt;code&gt;0.0&lt;/code&gt;. You deleted it. You are now sampling at &lt;code&gt;1.0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And for the models where that difference was real:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;On models that accept other values, such as Claude Sonnet 4.6, a request that lowered &lt;code&gt;temperature&lt;/code&gt; for more consistent output loses that effect. &lt;strong&gt;No other setting replaces it.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No other setting replaces it. That sentence is the whole article.&lt;/p&gt;

&lt;h2&gt;
  
  
  The sequence, as it actually plays out
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Before: 2023-06-01, pinned low for a structured extraction task&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"claude-sonnet-4-6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;# &amp;lt;- deliberate. consistency matters here.&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You bump the SDK. The call fails with a 400 — something to this effect (exact wording illustrative; the documented behaviour is a 400):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;anthropic.BadRequestError: 400 - temperature is not supported
in API version 2026-10-21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You do the obvious thing:&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="c1"&gt;# After: the 400 is gone&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"claude-sonnet-4-6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Green. Tests pass. Ship it.&lt;/p&gt;

&lt;p&gt;What actually happened:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You upgraded. A 400 appeared. The error named the parameter.&lt;/li&gt;
&lt;li&gt;You deleted the parameter. The 400 went away.&lt;/li&gt;
&lt;li&gt;Your tests passed — because your tests assert on &lt;strong&gt;shape&lt;/strong&gt;, not on &lt;strong&gt;distribution&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Your product's output variance is permanently higher, and nothing in your pipeline said so.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 2 is where it happens.&lt;/strong&gt; The fix that silences an error is not the fix that preserves behaviour. And an error message is written to be silenced — that is its entire job.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why your test suite will not catch this
&lt;/h2&gt;

&lt;p&gt;Most LLM test suites look like this:&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;def&lt;/span&gt; &lt;span class="nf"&gt;test_extraction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;extract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;SAMPLE_INVOICE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"invoice_no"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"INV-2291"&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"line_items"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"total"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;118000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a &lt;strong&gt;shape and value&lt;/strong&gt; assertion on &lt;strong&gt;one&lt;/strong&gt; sample. At &lt;code&gt;temperature=0.0&lt;/code&gt; it was close to a deterministic check. At &lt;code&gt;1.0&lt;/code&gt; it is a sample from a distribution that now happens to pass.&lt;/p&gt;

&lt;p&gt;It will keep passing. Right up until the day it does not, on a customer's document, in production, with no code change to blame.&lt;/p&gt;

&lt;p&gt;What catches it instead:&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;def&lt;/span&gt; &lt;span class="nf"&gt;test_extraction_is_stable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;runs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;extract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;SAMPLE_INVOICE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;distinct&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sort_keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;runs&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;# not "did it work once" but "does it work the same way"&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;distinct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{len(distinct)} distinct outputs in 20 runs"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Slower. More expensive. The only thing that would have told you.&lt;/p&gt;

&lt;h2&gt;
  
  
  To be fair to the guide
&lt;/h2&gt;

&lt;p&gt;The escape hatch is documented:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If a request relies on a non-default value, either stop sending the parameter, or keep that request on &lt;code&gt;2023-06-01&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is right there. It sits in the paragraph most people stop reading after sentence one, immediately below the instruction that fixes their build.&lt;/p&gt;

&lt;p&gt;That is not a documentation failure. It is a reading failure, and it is extremely common: when an error message and a fix appear in the same paragraph, the rest of the paragraph does not get read.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discipline
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;When a breaking change hands you a fix, ask what the fix changes.&lt;/strong&gt; "Remove it" is a behaviour change wearing an error message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Treat sampling settings as product config, not tuning knobs.&lt;/strong&gt; Write down which of your outputs depend on low variance — structured extraction, classification, anything feeding a downstream parser — and which genuinely do not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test distribution, not shape.&lt;/strong&gt; Run one prompt 20 times and diff them. A schema check will never catch this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Record the API version your behaviour was measured against, beside the measurement.&lt;/strong&gt; An eval result without its API version is an incomplete artefact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;An error you silenced is not a bug you fixed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If removing a setting is the official fix, that setting was doing something.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  While you are in there
&lt;/h2&gt;

&lt;p&gt;From the same source, one dated item worth putting in a calendar:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Deprecated model&lt;/th&gt;
&lt;th&gt;Retires&lt;/th&gt;
&lt;th&gt;Recommended replacement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude-sonnet-4-5-20250929&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;30 November 2026&lt;/td&gt;
&lt;td&gt;&lt;code&gt;claude-sonnet-5-5&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;And the lifecycle definition, verbatim: &lt;em&gt;"Retired: The model is no longer available for use. Requests to retired models fail."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That one, at least, is not silent.&lt;/p&gt;

&lt;p&gt;Anthropic also states it provides &lt;em&gt;"at least 60 days' notice before model retirement for publicly released models"&lt;/em&gt; — and the console has a usage export that breaks your traffic down by API key and model, which is the fastest way to find out whether a deprecated model is still in your path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitation
&lt;/h2&gt;

&lt;p&gt;I am reading Anthropic's own migration guide and model-deprecation page, and every quote above comes from them.&lt;/p&gt;

&lt;p&gt;I have &lt;strong&gt;not&lt;/strong&gt; measured the variance change on a production workload. How large it is depends entirely on your prompts: a tightly constrained extraction prompt with a rigid schema may move barely at all, while an open-ended generation task may move a lot. The point is not the size of the effect. The point is that the change happened and nothing told you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkable references
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;"Migrating to API version 2026-10-21" — Claude platform docs&lt;/li&gt;
&lt;li&gt;"Model deprecations" — Claude platform docs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One open question
&lt;/h2&gt;

&lt;p&gt;When you removed &lt;code&gt;temperature&lt;/code&gt; to clear that 400 — did anyone measure the output before and after?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>python</category>
      <category>testing</category>
    </item>
    <item>
      <title>Everyone knew why the AI went down. The status page did not.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Sat, 14 Nov 2026 04:23:24 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/everyone-knew-why-the-ai-went-down-the-status-page-did-not-4gjk</link>
      <guid>https://dev.to/dhrubojyoti/everyone-knew-why-the-ai-went-down-the-status-page-did-not-4gjk</guid>
      <description>&lt;p&gt;&lt;em&gt;Three incidents, one day, one borrowed explanation. What the primary source actually said.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Everyone knew why the AI went down. The status page did not.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;On 12 and 13 November 2026 a large Microsoft outage disrupted Teams, Outlook and other services. Claude had problems in the same window. The explanation circulated fast: the AI broke because Microsoft broke.&lt;/p&gt;

&lt;p&gt;It is a clean story. It is also partly assembled rather than reported.&lt;/p&gt;

&lt;p&gt;So instead of reading the coverage, I read Anthropic's own status history. Here is what it records.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the status history actually says
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Incident 1 — "Elevated errors affecting the Microsoft 365 connector."&lt;/strong&gt;&lt;br&gt;
Activity from 12 November 17:52 UTC, resolved 13 November 21:49 UTC. The updates state a cause, verbatim:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We have identified an issue with an upstream provider affecting the Microsoft 365 connector.&lt;/p&gt;

&lt;p&gt;This issue is caused by a Microsoft 365 service incident.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Incident 2 — "Elevated errors on claude.ai, Claude Code, and platform.claude.com."&lt;/strong&gt;&lt;br&gt;
13 November. The opening update:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We are investigating an issue with users authenticating to Claude.ai and Claude Code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The resolution names &lt;strong&gt;no cause&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Incident 3 —&lt;/strong&gt; a further incident later on 13 November. Also no cause stated.&lt;/p&gt;

&lt;p&gt;So exactly one of the three carries an upstream attribution, and it is the connector — the feature whose entire job is reading Microsoft 365 data. That is the one you would expect a Microsoft outage to take down, and the vendor says so plainly.&lt;/p&gt;

&lt;p&gt;The authentication incident has no published cause. The coverage gave it one, by borrowing from the incident sitting next to it on the same page.&lt;/p&gt;

&lt;p&gt;To be precise about my own claim: I am &lt;strong&gt;not&lt;/strong&gt; asserting the auth incident was unrelated to Microsoft. It may well have been. I am saying the primary source does not say so, and the difference between "unrelated" and "not stated" is the whole point.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why this pattern repeats
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;During an incident, everything co-occurs.&lt;/strong&gt; That is what an incident is. Co-occurrence is the background condition, not evidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The neighbouring incident is the cheapest available explanation&lt;/strong&gt;, because it is the only one already written down. A cause that exists in text will beat a cause that requires investigation, every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nobody re-reads the source once a cause is circulating.&lt;/strong&gt; The explanation becomes infrastructure. I only caught this because I went looking for a primary citation for a different reason.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Teams then remediate the wrong dependency.&lt;/strong&gt; This is where it stops being an epistemics problem and starts costing money. You harden the integration you believe failed, write a runbook for it, maybe add a fallback — and the thing that actually broke is untouched and will break again.&lt;/p&gt;
&lt;h2&gt;
  
  
  The real lesson, which is the less exciting one
&lt;/h2&gt;

&lt;p&gt;Separate the invented cascade from the documented one, because the documented one is genuinely instructive.&lt;/p&gt;

&lt;p&gt;A feature that reads a vendor's data inherits that vendor's availability. The M365 connector could not work while M365 was unwell, and no amount of engineering on Anthropic's side changes that. It is a correct, expected, unavoidable dependency.&lt;/p&gt;

&lt;p&gt;The question that follows is the useful one: &lt;strong&gt;which of your features inherit which third party's availability, by name?&lt;/strong&gt; Most teams have never written that down. They know their own uptime number and treat it as something they control, when a meaningful share of it is a product of other people's.&lt;/p&gt;

&lt;p&gt;A simple version is enough to start:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feature                depends on              degrades to
-----------------------------------------------------------------
invoice extraction     our OCR + our model     queue + retry
GST portal lookup      gov portal              manual, flagged to user
email drafting         model API               cached templates
M365 document search   Microsoft Graph         unavailable, say so
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last column is the one people skip, and it is the one that decides whether an outage is an inconvenience or an incident.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discipline
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Read the vendor's own status page before accepting a cause from anywhere else.&lt;/strong&gt; It takes two minutes. It is the entire difference between this post and the one I would otherwise have written.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Treat "stated cause" and "no cause stated" as different data.&lt;/strong&gt; The second is not a gap for you to fill. It usually means the investigation is open.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On your own status page, write what you know.&lt;/strong&gt; "Cause under investigation" is a complete sentence, and a more honest one than a plausible guess you will have to retract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Co-occurrence is not causation, and an incident is the moment co-occurrence peaks.&lt;/strong&gt; The one time your instincts are least reliable is the one time everyone demands an immediate answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"No cause stated" is information. Do not improve it.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitation
&lt;/h2&gt;

&lt;p&gt;I read Anthropic's public status history directly, and the quotes above come from it.&lt;/p&gt;

&lt;p&gt;The Microsoft details — including a reported statement that the outage was not related to AI agents — and a separate aviation disruption that some coverage connected to an AI rollout on timing alone, I have &lt;strong&gt;not&lt;/strong&gt; verified against those organisations' own statements. I am repeating secondary reporting there, and flagging it as such.&lt;/p&gt;

&lt;p&gt;Root-cause reviews were still pending when I wrote this. Anything here may be superseded by them, and if it is, the correct response is to update rather than defend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkable reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Claude status history, incidents of 12 and 13 November 2026&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One open question
&lt;/h2&gt;

&lt;p&gt;The last time something broke near your AI system — did anyone open the vendor's status page, or did the explanation simply arrive?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>reliability</category>
      <category>programming</category>
    </item>
    <item>
      <title>You fine-tuned at full precision. You serve in FP8. Those were two different models.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Thu, 12 Nov 2026 08:02:03 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/you-fine-tuned-at-full-precision-you-serve-in-fp8-those-were-two-different-models-133n</link>
      <guid>https://dev.to/dhrubojyoti/you-fine-tuned-at-full-precision-you-serve-in-fp8-those-were-two-different-models-133n</guid>
      <description>&lt;p&gt;&lt;em&gt;transformers v5.22.0 made FP8 models trainable with LoRA. The interesting part is the workflow it removes, not the feature it adds.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You fine-tuned at full precision. You serve in FP8. Those were two different models.&lt;/p&gt;

&lt;h2&gt;
  
  
  The line
&lt;/h2&gt;

&lt;p&gt;From the transformers v5.22.0 release notes, 29 October 2026:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;FP8 quantized models can now be used for adapter training (such as LoRA with PEFT)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It landed with FP8 backward support — gradients, not just the forward pass. The notes add that "Backward also dequantizes experts in chunks and skips autograd at inference."&lt;/p&gt;

&lt;p&gt;Quantised models have mostly been inference artefacts. A thing you produce at the end, to make serving affordable. This makes the cheap-to-serve version also the one you can adapt.&lt;/p&gt;

&lt;h2&gt;
  
  
  The workflow it fixes
&lt;/h2&gt;

&lt;p&gt;If you fine-tune on hardware you can actually afford, you have probably run this loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Take a base model at full precision — or as close as you can manage.&lt;/li&gt;
&lt;li&gt;Train a LoRA adapter against it.&lt;/li&gt;
&lt;li&gt;Evaluate. The numbers look good. You write them down.&lt;/li&gt;
&lt;li&gt;Quantise for serving, because full precision does not fit the GPU you have.&lt;/li&gt;
&lt;li&gt;Ship.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 4 changes the weights the adapter was optimised against. The artefact you measured in step 3 is not the artefact your users reach in step 5.&lt;/p&gt;

&lt;p&gt;Everyone knows this. Almost nobody adjusts for it, because the alternative — evaluating the quantised build properly — costs another pass and the gap is usually small.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "usually small" is the problem
&lt;/h2&gt;

&lt;p&gt;A large regression is easy. It shows up immediately, someone bisects it, you find it.&lt;/p&gt;

&lt;p&gt;A small one is corrosive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Your eval report describes the wrong artefact.&lt;/strong&gt; Any number you quote about the fine-tune is a number about a model you did not deploy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regressions get misattributed.&lt;/strong&gt; Quality drops after a serving change, so the serving stack gets blamed. The adapter is never re-examined because "the eval was fine."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two variables moved at once.&lt;/strong&gt; The adapter changed &lt;em&gt;and&lt;/em&gt; the precision changed between measurement and production. You cannot attribute an effect to either.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It compounds across iterations.&lt;/strong&gt; Each cycle re-measures at full precision and re-ships quantised, so the gap is never once measured directly — only inherited.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Training the adapter against the same quantised base you serve collapses that into one variable. That is the real value here, and it is a methodology win rather than a performance one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would hold to regardless of this release
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Evaluate the artefact you ship.&lt;/strong&gt; If your eval ran against a different precision than production, that belongs in the eval report as a caveat, not in a footnote nobody reads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Record the quantisation format next to the adapter.&lt;/strong&gt; An adapter alone is an incomplete artefact. &lt;code&gt;adapter_v3/&lt;/code&gt; tells you nothing; &lt;code&gt;adapter_v3_fp8_base/&lt;/code&gt; tells you what it was fitted to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you must train at one precision and serve at another, measure the gap on purpose.&lt;/strong&gt; Run the eval set against both builds, once, and write down the delta. Make it a release gate. A known 2% gap is a managed risk; an unknown one is a future incident with no obvious cause.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Move one variable at a time.&lt;/strong&gt; Old engineering advice, routinely ignored in ML because runs are expensive. The irony is that the debugging caused by moving two at once costs more than the extra run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The model you evaluated is the only model you can make claims about.&lt;/strong&gt; Not the one you meant to evaluate, not the one that is nearly identical. The one the numbers came from.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An adapter is not portable across precisions by assumption. It is portable if you measured it.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The payoff
&lt;/h2&gt;

&lt;p&gt;Attribution. When output quality moves, you can say which change moved it — and that is the difference between an engineering process and a sequence of hopeful experiments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitation
&lt;/h2&gt;

&lt;p&gt;I am reading release notes and reasoning from them. I have not trained an FP8 adapter and I am not reporting benchmark results.&lt;/p&gt;

&lt;p&gt;I also want to be precise about what this does &lt;em&gt;not&lt;/em&gt; claim: training against a quantised base narrows the train/serve gap, it does not eliminate it. Optimiser behaviour, kernel implementations and hardware still differ between your training box and your serving box. "Same precision" is not "same artefact." It is one fewer difference, which is worth having and is not a guarantee.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkable references
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;transformers&lt;/code&gt; &lt;strong&gt;v5.22.0&lt;/strong&gt; (29 October 2026) — "FP8 quantized models can now be used for adapter training (such as LoRA with PEFT)"; FP8 backward support&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;transformers&lt;/code&gt; &lt;strong&gt;v5.21.0&lt;/strong&gt; (26 October 2026) — FP8 backend for the quantized KV cache&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One open question
&lt;/h2&gt;

&lt;p&gt;When you report a fine-tune's results, are those numbers from the quantised artefact you actually serve — and if not, do you know the size of the gap?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>llmops</category>
      <category>programming</category>
    </item>
    <item>
      <title>A point release halved your KV cache memory. You did not choose that trade.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Wed, 11 Nov 2026 06:37:26 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/a-point-release-halved-your-kv-cache-memory-you-did-not-choose-that-trade-4mmb</link>
      <guid>https://dev.to/dhrubojyoti/a-point-release-halved-your-kv-cache-memory-you-did-not-choose-that-trade-4mmb</guid>
      <description>&lt;p&gt;&lt;em&gt;Two vLLM point releases, three weeks apart, changed the memory-versus-latency trade under your product. Neither required you to opt in.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A point release halved your KV cache memory. You did not choose that trade.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually changed
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;v0.32.0, 18 October 2026.&lt;/strong&gt; GLM-5.x models began defaulting to an FP8 KV cache on SM100 hardware — described in the release notes as "halving KV memory per rank", at a 7–11% TTFT cost in the project's own PR benchmark.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;v0.33.0, 2 November 2026.&lt;/strong&gt; GLM-5.3-Flash got the same default, reported there as 9.8% higher end-to-end throughput.&lt;/p&gt;

&lt;p&gt;Read that as an engineer rather than as a changelog reader. Somebody decided, on your behalf, that half your KV memory was worth roughly a tenth of your time-to-first-token.&lt;/p&gt;

&lt;p&gt;That may well be the right call. For most serving setups, halving KV memory is the single most valuable thing you can do — it buys concurrency, which buys throughput, which buys unit economics. I would probably choose it too.&lt;/p&gt;

&lt;p&gt;But I would want to have chosen it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rest of the sharp edges
&lt;/h2&gt;

&lt;p&gt;The same two releases also shipped:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;th&gt;Release&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;max_tokens&lt;/code&gt; no longer reserved from the context window&lt;/td&gt;
&lt;td&gt;v0.32.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python 3.10 dropped&lt;/td&gt;
&lt;td&gt;v0.32.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cascade attention removed&lt;/td&gt;
&lt;td&gt;v0.32.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Default CORS origins restricted&lt;/td&gt;
&lt;td&gt;v0.32.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Requests sent while generation is paused now return HTTP 503&lt;/td&gt;
&lt;td&gt;v0.33.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Medusa and the MLP speculator removed&lt;/td&gt;
&lt;td&gt;v0.33.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CUDA 12.9 dropped from release artifacts&lt;/td&gt;
&lt;td&gt;v0.33.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Look at the first one for a moment, because it is the most interesting and the least discussed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;max_tokens&lt;/code&gt; no longer being reserved from the context window means admission control that used to be &lt;strong&gt;pessimistic&lt;/strong&gt; is now &lt;strong&gt;optimistic&lt;/strong&gt;. Previously a request was only admitted if its input plus its maximum possible output would fit. Now it can be admitted on input alone.&lt;/p&gt;

&lt;p&gt;In the common case this is strictly better: you stop refusing requests that would never have used their full budget, and your utilisation goes up. In the tail case the shape of your failures changes — the pressure moves from admission time to generation time. If you had capacity planning built on the old behaviour, it is now modelling something that no longer happens.&lt;/p&gt;

&lt;p&gt;That is not a bug. It is a change in where your system is allowed to be wrong, and it arrived in a minor version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this bites teams rather than individuals
&lt;/h2&gt;

&lt;p&gt;Nothing above is a mistake by the vLLM project. Fast-moving inference projects should move fast, and they documented every one of these.&lt;/p&gt;

&lt;p&gt;The failure is downstream. It looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A dependency bot opens a bump. Or someone runs &lt;code&gt;pip install -U&lt;/code&gt; on a rebuild.&lt;/li&gt;
&lt;li&gt;CI passes. Of course it does — correctness tests do not measure time-to-first-token, and nothing threw.&lt;/li&gt;
&lt;li&gt;The deploy goes out.&lt;/li&gt;
&lt;li&gt;Six weeks later someone asks why p99 latency drifted, or why a capacity model stopped predicting anything useful.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By then the change is buried under thirty other commits and nobody connects it to a line in a release note from October.&lt;/p&gt;

&lt;h2&gt;
  
  
  The structure that survives it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pin exact versions in production.&lt;/strong&gt; A version range is a promise you did not read. &lt;code&gt;&amp;gt;=0.32&lt;/code&gt; means "whatever ships next, we accept."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the breaking-changes section of every minor release, not only majors.&lt;/strong&gt; In this ecosystem the minors carry the sharp edges. Semantic versioning is a convention, and inference projects are moving faster than the convention assumes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Re-benchmark on your own traffic after any bump.&lt;/strong&gt; A vendor benchmark is their workload, their hardware, their batch shape. It is useful evidence that the direction is right. It is not your result. Your prompts are not their prompts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write the default into your own config explicitly.&lt;/strong&gt; This is the cheapest habit here and the most underrated. A value you typed into a config file cannot silently change. A default can, and will, and you will not get an email about it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# not this - whatever the library decides this week
&lt;/span&gt;&lt;span class="na"&gt;kv_cache_dtype&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;

&lt;span class="c1"&gt;# this - a decision with your name on it
&lt;/span&gt;&lt;span class="na"&gt;kv_cache_dtype&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fp8&lt;/span&gt;     &lt;span class="c1"&gt;# chosen 11/11/2026, halves KV memory,
&lt;/span&gt;                        &lt;span class="c1"&gt;# measured +9% TTFT on our traffic
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That comment is the point. It records &lt;em&gt;that you decided&lt;/em&gt;, &lt;em&gt;when&lt;/em&gt;, and &lt;em&gt;what you measured&lt;/em&gt; — so the next person does not have to guess whether it was deliberate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A default you did not choose is still a decision you own.&lt;/strong&gt; Your users experience the behaviour, not the provenance of the behaviour.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If a version bump can change your output, your version number is part of your output.&lt;/strong&gt; Treat it like one: pin it, log it, and include it when you record what a system did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitation
&lt;/h2&gt;

&lt;p&gt;I am reading release notes and reasoning from them. Every figure above is the project's own, from its PR benchmarks on its hardware, and I have reproduced none of it. I am also not claiming the FP8 KV default degrades answer quality — quantising a KV cache is a precision trade and whether it shows up in your outputs is something you would have to measure on your own evaluation set. I have not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkable references
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;vLLM &lt;strong&gt;v0.32.0&lt;/strong&gt; release notes (18 October 2026)&lt;/li&gt;
&lt;li&gt;vLLM &lt;strong&gt;v0.33.0&lt;/strong&gt; release notes (2 November 2026)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One open question
&lt;/h2&gt;

&lt;p&gt;Which inference defaults changed under your product in the last month — and would you know if they had?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llmops</category>
      <category>devops</category>
      <category>programming</category>
    </item>
    <item>
      <title>The human clicked Approve. The agent applied it to a different question.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Tue, 10 Nov 2026 04:57:07 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/the-human-clicked-approve-the-agent-applied-it-to-a-different-question-204b</link>
      <guid>https://dev.to/dhrubojyoti/the-human-clicked-approve-the-agent-applied-it-to-a-different-question-204b</guid>
      <description>&lt;p&gt;&lt;em&gt;LangGraph just gave every interrupt its own id and added a mode that refuses stale answers. Here is the bug that closes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The human clicked Approve. The agent applied it to a different question.&lt;/p&gt;

&lt;p&gt;On 5 November 2026, &lt;code&gt;langgraph&lt;/code&gt; 1.2.20 shipped two release-note lines that read like plumbing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;give each interrupt() in a task its own id&lt;/p&gt;

&lt;p&gt;add a strict resume mode that refuses stale interrupt answers&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They are not plumbing. They are a correctness fix for one of the nastiest failure shapes in human-in-the-loop systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape of the bug
&lt;/h2&gt;

&lt;p&gt;An agent pauses to ask a human something. In LangGraph that pause is an &lt;code&gt;interrupt()&lt;/code&gt;. The run suspends, the question goes to a person, and the answer comes back later — four minutes later, forty minutes later, tomorrow morning.&lt;/p&gt;

&lt;p&gt;"Later" is where the trouble lives. Between the question and the answer, the run can be retried, re-planned, or restarted. Interrupts get raised again on the new path.&lt;/p&gt;

&lt;p&gt;Now: &lt;strong&gt;how does the resumed run know which question the answer belongs to?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If interrupts have no stable identity, the only thing available is position. First interrupt gets the first answer. And position is not identity.&lt;/p&gt;

&lt;p&gt;A concrete sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The agent reaches its first pause and asks: &lt;em&gt;approve payment to vendor A, ₹4,00,000.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;A human looks at that, and approves it.&lt;/li&gt;
&lt;li&gt;Meanwhile the run is retried — a transient tool error, a restart, a re-plan. The graph rebuilds. This time the first pause is a different question: &lt;em&gt;approve payment to vendor B.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;The resume applies the stored "yes" to position one.&lt;/li&gt;
&lt;li&gt;Vendor B is paid. Nothing throws. The run reports success.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A human authorised a payment they never saw. There is no exception, no alert, and the audit trail says "approved by " — which is true, and misleading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why strict resume matters more than it sounds
&lt;/h2&gt;

&lt;p&gt;The fix has two halves and you need both.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identity:&lt;/strong&gt; every interrupt carries an id that survives a retry. The question has a name, not just a slot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refusal:&lt;/strong&gt; the resume path verifies that id and &lt;em&gt;refuses&lt;/em&gt; a mismatch rather than falling back to position. That is the "strict" in strict resume mode.&lt;/p&gt;

&lt;p&gt;Refusing is the important half. A system that detects the mismatch and then does something reasonable-looking — re-asking silently, picking the closest match, defaulting to deny — has just invented a new way to be wrong. Stop, and make a human look again.&lt;/p&gt;

&lt;h2&gt;
  
  
  The approval record this implies
&lt;/h2&gt;

&lt;p&gt;If you take this seriously, an approval stops being a boolean and becomes a record that names its own question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;approval_id        appr_01J...
interrupt_id       intr_7f3a...      &amp;lt;- the question's identity
run_id             run_55c1...
asked              {"tool": "pay_vendor",
                    "vendor_id": "V-2291",
                    "invoice": "INV-88412",
                    "amount_paise": 40000000}
asked_sha256       9f2c...e4a1
decision           approved
decided_by         &amp;lt;user id&amp;gt;
decided_at         2026-11-10T11:49:08+05:30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On resume you check &lt;code&gt;interrupt_id&lt;/code&gt; matches, re-hash &lt;code&gt;asked&lt;/code&gt;, and compare. Mismatch means stop, not improvise.&lt;/p&gt;

&lt;p&gt;Note what this record stores: &lt;strong&gt;what was asked&lt;/strong&gt;, not only what was decided. A decision without its question cannot be audited six months later, when someone asks what exactly was approved.&lt;/p&gt;

&lt;h2&gt;
  
  
  A pause is not a failure
&lt;/h2&gt;

&lt;p&gt;From the same release window, &lt;code&gt;langgraph&lt;/code&gt; 1.2.19 (30 October 2026) fixed:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;don't report a paused tool as failed on the tools stream&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A tool waiting on a human was being reported as failed. That is the same family of bug seen from another side: a system that cannot distinguish "waiting for a person" from "errored" will retry, escalate, or roll back things a human is still thinking about.&lt;/p&gt;

&lt;p&gt;Three states, not two. Running, failed, and &lt;em&gt;waiting on a human&lt;/em&gt; — which is neither.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;An approval without an identity is a coin flip you cannot audit afterwards.&lt;/strong&gt; It may well land on the right question most of the time. You will not be able to prove which times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If a stale answer can be accepted, it eventually will be&lt;/strong&gt; — and it will happen on the day the plan changed, which is exactly the day it matters most.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitation
&lt;/h2&gt;

&lt;p&gt;I am reading release notes and reasoning from them. I have not reproduced either failure, I am not reporting the maintainers' stated motivation, and the approval-record shape above is a design I use rather than anything the library prescribes. The ₹ figures are illustrative.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkable references
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;langgraph&lt;/code&gt; &lt;strong&gt;1.2.20&lt;/strong&gt; (5 November 2026) — "give each interrupt() in a task its own id"; "add a strict resume mode that refuses stale interrupt answers"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;langgraph&lt;/code&gt; &lt;strong&gt;1.2.19&lt;/strong&gt; (30 October 2026) — "don't report a paused tool as failed on the tools stream"&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One open question
&lt;/h2&gt;

&lt;p&gt;When your agent asks a human to approve something, does the answer know which question it belongs to — and what happens if it does not?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>programming</category>
    </item>
    <item>
      <title>The model said no. Your retry loop asked four more times.</title>
      <dc:creator>Dhrubojyoti Gangopadhyay</dc:creator>
      <pubDate>Mon, 09 Nov 2026 07:20:57 +0000</pubDate>
      <link>https://dev.to/dhrubojyoti/the-model-said-no-your-retry-loop-asked-four-more-times-cml</link>
      <guid>https://dev.to/dhrubojyoti/the-model-said-no-your-retry-loop-asked-four-more-times-cml</guid>
      <description>&lt;p&gt;&lt;em&gt;LangChain just made refusals a first-class content block. Here is why that matters more than the release note suggests.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The model said no. Your retry loop asked four more times.&lt;/p&gt;

&lt;p&gt;On 4 November 2026, &lt;code&gt;langchain-core&lt;/code&gt; 1.7.5 shipped a release note that is easy to scroll past:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;standardize model refusal content blocks&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;code&gt;langchain-anthropic&lt;/code&gt; and &lt;code&gt;langchain-openai&lt;/code&gt; integrations adopted it the same day, and Gemini safety blocks are now translated into the same shape. &lt;code&gt;langchain&lt;/code&gt; 1.4.9 raised its minimum core version specifically to get this behaviour.&lt;/p&gt;

&lt;p&gt;It is a small change that closes a surprisingly expensive gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a refusal is the awkward third case
&lt;/h2&gt;

&lt;p&gt;Most code written against an LLM assumes two outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Success&lt;/strong&gt; — you got an answer, use it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error&lt;/strong&gt; — something broke, retry or raise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A refusal is neither.&lt;/p&gt;

&lt;p&gt;When a model declines, the HTTP call succeeds. Status 200. Tokens are billed. A perfectly well-formed string comes back. Nothing throws, nothing times out, no circuit breaker trips.&lt;/p&gt;

&lt;p&gt;From your code's point of view, a refusal is indistinguishable from an answer. And that is where it gets expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four ways this goes wrong
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The retry loop spins.&lt;/strong&gt; Generic retry wrappers treat anything non-exceptional as a candidate for another attempt — or treat a parse failure downstream as transient. Same prompt, same refusal, four more times. You pay full token cost for a request that had a zero percent chance of succeeding on attempt two.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The refusal becomes your data.&lt;/strong&gt; This is the serious one. The refusal is a string, and strings flow. It lands in a summary field, a ticket description, a product blurb, a drafted customer email. Somewhere downstream a human reads "I'm sorry, I can't help with that" in a field that was supposed to contain an invoice summary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Every provider said it differently.&lt;/strong&gt; Before standardisation you were pattern-matching across an exception from one SDK, a &lt;code&gt;finish_reason&lt;/code&gt; from another, a safety block from a third, and bare prose from a fourth. That detection logic rots every time a provider changes wording, and it silently stops firing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Your evals score it as a pass.&lt;/strong&gt; If your test harness checks "did the call complete without raising", refusals are counted as successes. Your measured reliability is higher than your real reliability, and the gap is invisible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The structure that fixes it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Three outcomes, not two.&lt;/strong&gt; Success, error and refusal are separate branches with separate handling. Write the third branch explicitly, even if it only logs and escalates today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refusal is terminal for that prompt.&lt;/strong&gt; Never retry an unchanged prompt after a refusal. Change the input, change the route, hand to a human, or stop. Retrying identical input is a pure cost with no upside.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Refusal text never populates an output field.&lt;/strong&gt; It goes to a log and to a person. Treat it like an error message, not like content — because that is what it is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Count refusals as their own metric.&lt;/strong&gt; A rising refusal rate is a product signal. It might mean your prompts drifted, your users changed behaviour, or a provider tightened a policy. Buried inside a success rate, you will never see it move.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two hard rules
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;If your retry policy cannot tell "try again" from "never", it is a cost bug and a correctness bug at the same time.&lt;/strong&gt; Those usually live in different backlogs. This one is both.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Anything a model returns that your code cannot classify will be classified by accident.&lt;/strong&gt; Default behaviour is still behaviour.&lt;/p&gt;

&lt;h2&gt;
  
  
  The payoff
&lt;/h2&gt;

&lt;p&gt;A declined request becomes a routing decision rather than a silent corruption. You can answer "how often does the model refuse us, and on what?" — which is a question worth being able to answer before a customer asks it for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitation
&lt;/h2&gt;

&lt;p&gt;I am reading release notes and reasoning from them. I have not migrated a production stack onto these blocks, I am not reporting benchmark results, and I am not claiming the LangChain maintainers framed it the way I have here. The four failure modes above are the ones I design against, not measured findings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkable references
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;langchain-core&lt;/code&gt; &lt;strong&gt;1.7.5&lt;/strong&gt; release notes (4 November 2026) — "standardize model refusal content blocks", plus translation of Gemini safety blocks into refusal blocks&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;langchain&lt;/code&gt; &lt;strong&gt;1.4.9&lt;/strong&gt; (4 November 2026) — raises the minimum core version for refusal handling&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One open question
&lt;/h2&gt;

&lt;p&gt;In your system, what happens right now when the model declines — and can you point at the line of code that handles it?&lt;/p&gt;

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