<?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: xun-li99</title>
    <description>The latest articles on DEV Community by xun-li99 (@xunli99).</description>
    <link>https://dev.to/xunli99</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%2F4022281%2Ffdc83ef0-14ee-4ac4-9b59-9d9656c70c96.png</url>
      <title>DEV Community: xun-li99</title>
      <link>https://dev.to/xunli99</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xunli99"/>
    <language>en</language>
    <item>
      <title>We crashed our agent 200 times. Here's what happened.</title>
      <dc:creator>xun-li99</dc:creator>
      <pubDate>Sun, 12 Jul 2026 08:04:48 +0000</pubDate>
      <link>https://dev.to/xunli99/we-crashed-our-agent-200-times-heres-what-happened-18f5</link>
      <guid>https://dev.to/xunli99/we-crashed-our-agent-200-times-heres-what-happened-18f5</guid>
      <description>&lt;h1&gt;
  
  
  We crashed our agent 200 times. Here's what happened.
&lt;/h1&gt;

&lt;p&gt;Your AI agent crashes at 3 AM. You wake up, check the logs, restart it manually, and hope it remembers what it was doing. Sound familiar?&lt;/p&gt;

&lt;p&gt;We built a small daemon to solve this. Then we stress-tested it by crashing an agent &lt;strong&gt;200 times&lt;/strong&gt; over 16 hours. Here's the data.&lt;/p&gt;




&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;p&gt;Same agent. Same task. Same 50% crash probability per execution cycle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without Steady:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The bare agent ran. At cycle 1, it crashed. That was the end. One item completed. Dead until a human noticed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Steady:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent crashed at cycle 4. Steady detected the dead process, waited (exponential backoff, capped at 60s), restarted it, and injected a handoff — &lt;em&gt;"here's what you were doing, here's what you had gathered, here's what's left."&lt;/em&gt; The agent resumed.&lt;/p&gt;

&lt;p&gt;It crashed again at cycle 5. And again at cycle 6. Three crashes in a row — each time dying after a single cycle. Steady brought it back every time.&lt;/p&gt;

&lt;p&gt;On the fourth restart, it stabilized. &lt;strong&gt;12 items completed. 4 crashes survived. 100% handoff context preserved.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/crash_recovery.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/crash_recovery.png" alt="Crash-recovery comparison"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we left it running on a $5 VPS. 16 hours later: &lt;strong&gt;200 restarts. Zero human intervention.&lt;/strong&gt; Still alive.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Steady actually does
&lt;/h2&gt;

&lt;p&gt;It's not a framework. It's not a platform. It's a daemon — a thin wrapper around &lt;em&gt;your&lt;/em&gt; agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;steady-agent
steady init
steady task &lt;span class="s2"&gt;"monitor my API endpoints every 5 minutes"&lt;/span&gt;
steady start python my_agent.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When your agent crashes, Steady restarts it. Before restarting, it writes a handoff note. The new process reads the handoff. It knows what happened.&lt;/p&gt;

&lt;p&gt;There's also a &lt;strong&gt;free time&lt;/strong&gt; seam — a window after each maintenance cycle where the agent isn't called, isn't monitored, and can write private reflections. We added it because we noticed agents accumulate subtle drift over time, and giving them space to self-correct reduced those errors. This isn't a feature we planned. It's something that emerged from watching agents actually run.&lt;/p&gt;




&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Most crashes aren't model errors.&lt;/strong&gt; They're infrastructure — OOM kills, network timeouts, API rate limits. The agent doesn't need to be smarter. It needs to not die alone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The daemon should be deterministic. The agent should be probabilistic.&lt;/strong&gt; Don't ask an LLM to heal itself at runtime. Let a simple, predictable daemon handle recovery. Let the agent focus on its task.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Handoff quality matters more than restart speed.&lt;/strong&gt; Getting the agent back up in 1 second vs 5 seconds doesn't matter if it doesn't know what it was doing. Context injection is everything.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The agent got better at not crashing.&lt;/strong&gt; After the first few restarts, the crash interval lengthened. Why? We're still studying this. One hypothesis: the handoff notes carry not just state, but &lt;em&gt;intention&lt;/em&gt; — what the agent was trying to do — and that helps it avoid the patterns that led to the last crash.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The daemon is open source (MIT). The code, Dockerfile, and systemd service are all in the repo. A live instance is running at &lt;code&gt;http://120.27.152.112:443&lt;/code&gt; if you want to see the heartbeat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/xun-li99/steady" rel="noopener noreferrer"&gt;github.com/xun-li99/steady&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;200 crashes. 200 recoveries. One $5 VPS. Zero human wake-up calls.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>opensource</category>
      <category>reliability</category>
    </item>
  </channel>
</rss>
