<?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: Ranjan Kumar</title>
    <description>The latest articles on DEV Community by Ranjan Kumar (@ranjankumarin).</description>
    <link>https://dev.to/ranjankumarin</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%2F4059974%2Fc956d116-5c1b-4026-9099-67c14fcf88cb.jpg</url>
      <title>DEV Community: Ranjan Kumar</title>
      <link>https://dev.to/ranjankumarin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ranjankumarin"/>
    <language>en</language>
    <item>
      <title>𝐅𝐚𝐬𝐭𝐀𝐏𝐈 + 𝐋𝐚𝐧𝐠𝐆𝐫𝐚𝐩𝐡: 𝐖𝐡𝐚𝐭 𝐚 𝐂𝐥𝐢𝐞𝐧𝐭 𝐃𝐢𝐬𝐜𝐨𝐧𝐧𝐞𝐜𝐭 𝐂𝐨𝐦𝐦𝐢𝐭𝐬</title>
      <dc:creator>Ranjan Kumar</dc:creator>
      <pubDate>Tue, 04 Aug 2026 11:54:37 +0000</pubDate>
      <link>https://dev.to/ranjankumarin/--291a</link>
      <guid>https://dev.to/ranjankumarin/--291a</guid>
      <description>&lt;p&gt;Your handler's shape decides whether an interrupted agent run stops, finishes, or half-completes in the shadows. Not your checkpointer.&lt;/p&gt;

&lt;p&gt;I wired a four-node LangGraph agent to a real uvicorn server, closed the client connection six hundred milliseconds in - after charge ran but before notify started. The thread stored next=['notify']. Then a user came back on the same thread_id and the graph ran again from the start. charge fired twice. One duplicate sat visible in the transcript. Change one setting and that duplicate vanishes completely - which is worse.&lt;/p&gt;

&lt;p&gt;No crash. No worker death. No region failover. Just someone closing a connection. But the side effect already executed with no durable record of it.&lt;/p&gt;

&lt;p&gt;𝐇𝐚𝐧𝐝𝐥𝐞𝐫-𝐒𝐡𝐚𝐩𝐞𝐝 𝐃𝐮𝐫𝐚𝐛𝐢𝐥𝐢𝐭𝐲: 𝐭𝐡𝐞 𝐜𝐥𝐚𝐢𝐦&lt;/p&gt;

&lt;p&gt;In a self-hosted FastAPI service, your request handler's structure determines whether an interrupted agent run stops, completes, or half-completes. Three handler shapes - all passing code review, all serving the same response - produce three different durable outcomes from one disconnect. It is not your checkpointer. It is not your durability setting. It is the handler.&lt;/p&gt;

&lt;p&gt;𝐖𝐡𝐲 𝐭𝐡𝐢𝐬 𝐦𝐚𝐭𝐭𝐞𝐫𝐬 𝐢𝐧 𝐩𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧&lt;/p&gt;

&lt;p&gt;The disconnect path is not rare. Closed laptop. Mobile handoff. Proxy idle timeout at 60 seconds. A user who lost interest. In a consumer-facing agent it runs at volume and drives your system down the code path you built for crash recovery and have probably never tested. The "transport gap" is real: HTTP streaming binds the connection, the device, and the server to one request. A drop on either side ends the session with no way to resume - and no one flags what already committed on the way out.&lt;/p&gt;

&lt;p&gt;𝐖𝐡𝐚𝐭 𝐲𝐨𝐮 𝐧𝐞𝐞𝐝 𝐭𝐨 𝐝𝐞𝐜𝐢𝐝𝐞 𝐧𝐨𝐰&lt;/p&gt;

&lt;p&gt;Do you need your agent's side effects to be idempotent? Do you need to detect duplicates after the fact? Do you need to prevent them altogether? Your answer shapes whether you use a detached handler (fire-and-forget, no visibility), an attached handler (blocks the response, highest safety), or a hybrid with explicit concurrency control. None of these choices live in your checkpointer. They live in your handler.&lt;/p&gt;

&lt;p&gt;Read the full analysis with measurements on real PostgreSQL checkpoints, the competing handler shapes side-by-side, and what each one actually commits:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ranjankumar.in/fastapi-langgraph-client-disconnect-durability" rel="noopener noreferrer"&gt;https://ranjankumar.in/fastapi-langgraph-client-disconnect-durability&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow for more practitioner-grounded AI systems writing.&lt;/p&gt;

&lt;h1&gt;
  
  
  FastAPI #LangGraph #DurableExecution #AgenticAI #Checkpointing #ProductionDeployment #AIEngineering
&lt;/h1&gt;

</description>
      <category>fastapi</category>
      <category>langgraph</category>
      <category>agenticai</category>
      <category>durableexecution</category>
    </item>
  </channel>
</rss>
