<?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: Hidai Bar-Mor</title>
    <description>The latest articles on DEV Community by Hidai Bar-Mor (@hidai25).</description>
    <link>https://dev.to/hidai25</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3650124%2Ffcaab7e6-c16c-4f56-8d97-967ae1349bfa.jpeg</url>
      <title>DEV Community: Hidai Bar-Mor</title>
      <link>https://dev.to/hidai25</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hidai25"/>
    <language>en</language>
    <item>
      <title>Your AI Agent Did Not Crash. It Just Started Making Things Up.</title>
      <dc:creator>Hidai Bar-Mor</dc:creator>
      <pubDate>Tue, 10 Mar 2026 15:44:47 +0000</pubDate>
      <link>https://dev.to/hidai25/your-ai-agent-did-not-crash-it-just-started-making-things-up-56m7</link>
      <guid>https://dev.to/hidai25/your-ai-agent-did-not-crash-it-just-started-making-things-up-56m7</guid>
      <description>&lt;p&gt;I think the most dangerous agent bugs are the ones that look completely normal.&lt;/p&gt;

&lt;p&gt;No error. No crash. No red screen. No stack trace.&lt;/p&gt;

&lt;p&gt;The agent replies. The format looks right. The answer sounds confident. Everyone moves on.&lt;/p&gt;

&lt;p&gt;Meanwhile it quietly stopped using its tools three days ago and has been hallucinating ever since.&lt;/p&gt;

&lt;p&gt;That is the bug.&lt;/p&gt;

&lt;p&gt;I have seen this again and again while building agents.&lt;/p&gt;

&lt;p&gt;A model update changes behavior behind the API.&lt;/p&gt;

&lt;p&gt;A framework update messes with tool calling.&lt;/p&gt;

&lt;p&gt;A checkpoint resumes with bad state.&lt;/p&gt;

&lt;p&gt;A subagent silently stops running.&lt;/p&gt;

&lt;p&gt;Everything still looks fine from the outside. That is what makes it nasty.&lt;/p&gt;

&lt;p&gt;The response is clean. The tone is smooth. The answer is plausible.&lt;/p&gt;

&lt;p&gt;It is also wrong.&lt;/p&gt;

&lt;p&gt;And the worst part is your users usually cannot tell. Honestly, sometimes you cannot tell either until something blows up later.&lt;/p&gt;

&lt;p&gt;Most agent testing misses this completely.&lt;/p&gt;

&lt;p&gt;If your test only checks the final answer, it can pass.&lt;/p&gt;

&lt;p&gt;If your eval asks an LLM judge whether the response looks good, it can pass.&lt;/p&gt;

&lt;p&gt;Because the problem is often not the final answer.&lt;/p&gt;

&lt;p&gt;The problem is the path.&lt;/p&gt;

&lt;p&gt;The tool calls.&lt;/p&gt;

&lt;p&gt;The order.&lt;/p&gt;

&lt;p&gt;The arguments.&lt;/p&gt;

&lt;p&gt;The missing lookup step that used to happen every time and now just does not.&lt;/p&gt;

&lt;p&gt;That is where the regression starts.&lt;/p&gt;

&lt;p&gt;The output can still look good long after the behavior is already broken.&lt;/p&gt;

&lt;p&gt;This is why agent regressions feel so slippery. A normal app breaks loudly. An agent breaks politely.&lt;/p&gt;

&lt;p&gt;It smiles. It nods. It lies.&lt;/p&gt;

&lt;p&gt;What has worked much better for me is simple.&lt;/p&gt;

&lt;p&gt;Do not only test the answer. Snapshot the behavior.&lt;/p&gt;

&lt;p&gt;Run the agent when it is working.&lt;/p&gt;

&lt;p&gt;Record which tools it called, in what order, and with what inputs.&lt;/p&gt;

&lt;p&gt;Save that as the baseline.&lt;/p&gt;

&lt;p&gt;Then after every prompt change, model change, framework update, or tool refactor, run the same scenario again and compare the trajectory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✓ login_flow         PASSED
⚠ refund_request     TOOLS_CHANGED
    before: lookup_order → check_policy → process_refund
    now:    lookup_order → process_refund

✗ billing_dispute    REGRESSION   score 85 → 55
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the bug is obvious.&lt;/p&gt;

&lt;p&gt;The tool disappeared.&lt;/p&gt;

&lt;p&gt;The sequence changed.&lt;/p&gt;

&lt;p&gt;The quality dropped.&lt;/p&gt;

&lt;p&gt;You catch it in review instead of learning about it from an angry user.&lt;/p&gt;

&lt;p&gt;That is the part I wish more people talked about.&lt;/p&gt;

&lt;p&gt;A lot of agent eval discussion is still obsessed with final outputs. Was the answer good. Did the judge like it. Did the score go up.&lt;/p&gt;

&lt;p&gt;That matters.&lt;/p&gt;

&lt;p&gt;But if you are shipping agents, behavior drift matters just as much.&lt;/p&gt;

&lt;p&gt;Sometimes more.&lt;/p&gt;

&lt;p&gt;Because once an agent stops taking the right path, it can still sound smart for a surprisingly long time.&lt;/p&gt;

&lt;p&gt;That is where false confidence comes from.&lt;/p&gt;

&lt;p&gt;And the nice part is you do not need to spend a fortune to catch this stuff.&lt;/p&gt;

&lt;p&gt;Tool call diffing is deterministic.&lt;/p&gt;

&lt;p&gt;You do not need an LLM judge every time.&lt;/p&gt;

&lt;p&gt;You can reserve model based scoring for the cases where output quality actually needs judgment and keep structural regression checks running all the time.&lt;/p&gt;

&lt;p&gt;That is the workflow I wanted, so I built &lt;a href="https://github.com/hidai25/eval-view" rel="noopener noreferrer"&gt;EvalView&lt;/a&gt; around it.&lt;/p&gt;

&lt;p&gt;Snapshot behavior.&lt;/p&gt;

&lt;p&gt;Compare runs.&lt;/p&gt;

&lt;p&gt;Catch regressions before they hit production.&lt;/p&gt;

&lt;p&gt;But even if you never use EvalView, I think this habit is worth adopting right now.&lt;/p&gt;

&lt;p&gt;Start recording tool calls.&lt;/p&gt;

&lt;p&gt;Start diffing trajectories.&lt;/p&gt;

&lt;p&gt;Start treating agent behavior like something you can baseline, compare, and protect.&lt;/p&gt;

&lt;p&gt;Because your AI agent usually will not crash when it breaks.&lt;/p&gt;

&lt;p&gt;It will just get smoother at being wrong.&lt;/p&gt;

&lt;p&gt;If you have seen this happen in production, I would genuinely love to hear your story.&lt;/p&gt;

&lt;p&gt;If this article helped and you want to follow the project, here’s the repo — stars and feedback are always appreciated.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>testing</category>
      <category>tooling</category>
    </item>
    <item>
      <title>My AI agent cost me $400 overnight, so I built pytest for agents and open-sourced it</title>
      <dc:creator>Hidai Bar-Mor</dc:creator>
      <pubDate>Mon, 08 Dec 2025 09:52:39 +0000</pubDate>
      <link>https://dev.to/hidai25/my-ai-agent-cost-me-400-overnight-so-i-built-pytest-for-agents-and-open-sourced-it-492c</link>
      <guid>https://dev.to/hidai25/my-ai-agent-cost-me-400-overnight-so-i-built-pytest-for-agents-and-open-sourced-it-492c</guid>
      <description>&lt;p&gt;So there I was at 2am staring at my OpenAI dashboard wondering how the hell my bill went from $80 to $400 in a single day.&lt;br&gt;
The answer? One of my agents decided to call the same tool 47 times in a loop. In production. While real users were waiting.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Problem Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;I've been running custom AI agents in production for about six months now. Here's what I learned the hard way: agents that work perfectly on your local machine will absolutely betray you in production.&lt;br&gt;
Sometimes they hallucinate tools that don't exist. Sometimes they answer questions without calling any tools at all, just making stuff up with complete confidence. Sometimes they get stuck in loops burning through tokens like there's no tomorrow.&lt;br&gt;
The worst part? You don't find out until a user complains. Or until you check your billing dashboard and feel your stomach drop.&lt;br&gt;
I tried writing unit tests but how do you even test something that's nondeterministic by design? Mock the LLM? Cool, now you're testing your mocks, not your agent.&lt;/p&gt;
&lt;h2&gt;
  
  
  What I Actually Wanted
&lt;/h2&gt;

&lt;p&gt;I wanted something dead simple. Write down what the agent is supposed to do. Run it. Fail the build if it does something stupid.&lt;br&gt;
That's it. No PhD required.&lt;br&gt;
So I built it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Meet EvalView
&lt;/h2&gt;

&lt;p&gt;The idea is embarrassingly simple. You write a YAML file describing what should happen:&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="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;order lookup&lt;/span&gt;
&lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
  &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What's&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;of&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;order&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;12345?"&lt;/span&gt;
&lt;span class="na"&gt;expected&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;get_order_status&lt;/span&gt;
&lt;span class="na"&gt;thresholds&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;max_cost&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's a real test. If the agent answers without calling get_order_status, the test fails. If it suddenly costs more than 10 cents, the test fails. Red error, CI breaks, deploy blocked.&lt;br&gt;
The tool call check alone catches probably 90% of the dumb stuff. Agent confidently answered a question about an order without actually looking up the order? Caught. Agent called some random tool instead of the right one? Caught. Agent decided to call the same tool fifteen times? You get the idea.&lt;/p&gt;
&lt;h2&gt;
  
  
  Running It
&lt;/h2&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;evalview
evalview quickstart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The quickstart spins up a tiny demo agent and runs some tests against it so you can see how it works. Takes maybe fifteen seconds.&lt;br&gt;
For your own agent you just point it at your test files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;evalview run 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Throws it in CI and now you have actual guardrails.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changed For Me
&lt;/h2&gt;

&lt;p&gt;Before EvalView I was averaging maybe two or three angry user reports per deploy. Something would break in some weird edge case and I'd spend my evening debugging production.&lt;br&gt;
After adding these tests? Ten deploys in a row with zero incidents. I actually deploy on Fridays now. I know, I know, but I do.&lt;br&gt;
The $400 surprise bills stopped too. Turns out catching infinite loops before production is good for your wallet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Boring Technical Stuff
&lt;/h2&gt;

&lt;p&gt;It works with LangGraph, CrewAI, OpenAI, Anthropic, basically anything you can hit with an HTTP request. There's also an LLM as judge feature for checking output quality since exact string matching is useless for AI responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm Working On Next
&lt;/h2&gt;

&lt;p&gt;Also thinking about adding test generation from production logs so you can turn real failures into regression tests automatically. And maybe a comparison mode to test different agent versions or configurations side by side and see which one performs better.&lt;br&gt;
If you've got ideas or want to contribute I'm very open to that. The codebase is not that big and there's plenty of low hanging fruit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go Look At It
&lt;/h2&gt;

&lt;p&gt;Here's the repo: &lt;a href="https://github.com/hidai25/eval-view" rel="noopener noreferrer"&gt;https://github.com/hidai25/eval-view&lt;/a&gt;&lt;br&gt;
If you've ever had an agent embarrass you in production or if you've ever opened a cloud bill and felt physical pain, maybe give it a shot. And if it saves you even one late night debugging session, throw it a star.&lt;br&gt;
I'm genuinely curious what other people are doing for this stuff. Do you have some elaborate eval setup? Let me know in the comments because I'm still figuring this out as I go.&lt;/p&gt;

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