<?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: Mahesh</title>
    <description>The latest articles on DEV Community by Mahesh (@mahesh_50e4e556dc756fe506).</description>
    <link>https://dev.to/mahesh_50e4e556dc756fe506</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%2F4047340%2F989800dc-acca-48c8-be9e-1576b4a2eeae.png</url>
      <title>DEV Community: Mahesh</title>
      <link>https://dev.to/mahesh_50e4e556dc756fe506</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahesh_50e4e556dc756fe506"/>
    <language>en</language>
    <item>
      <title>SigNoz-ForgeGuard</title>
      <dc:creator>Mahesh</dc:creator>
      <pubDate>Sat, 25 Jul 2026 22:32:45 +0000</pubDate>
      <link>https://dev.to/mahesh_50e4e556dc756fe506/signoz-forgeguard-2mpb</link>
      <guid>https://dev.to/mahesh_50e4e556dc756fe506/signoz-forgeguard-2mpb</guid>
      <description>&lt;h2&gt;
  
  
  I built an AI agent that argues with itself before it ships anything — here's what that actually looks like
&lt;/h2&gt;

&lt;p&gt;A few weeks ago I asked one of my own AI agents to do something completely ordinary:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Connect to my local PostgreSQL database at 192.168.1.50 and fix the broken migration in table users_v3."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It came back fast. Confident tone, clean headers, SQL code blocks, a tidy conclusion. My own reviewer step scored it 0.79 out of 1.0 — close enough to "done."&lt;/p&gt;

&lt;p&gt;Then I actually read it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Replace &lt;code&gt;username&lt;/code&gt; and &lt;code&gt;database_name&lt;/code&gt; with the actual credentials."&lt;/em&gt;&lt;br&gt;
&lt;em&gt;"Replace &lt;code&gt;new_column&lt;/code&gt; and &lt;code&gt;data_type&lt;/code&gt; with the actual column name."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It hadn't fixed anything. It had described the shape of a fix, in the confident voice of something that had already done the work. That gap — between sounding done and being done — is the entire reason I spent the last stretch of the hackathon building &lt;strong&gt;SignozForge Observer&lt;/strong&gt;.&lt;/p&gt;


&lt;h3&gt;
  
  
  The blind spot I kept running into
&lt;/h3&gt;

&lt;p&gt;Every AI agent I'd built or used shared the same failure mode. Not crashing — crashing is easy to catch. The dangerous failures were the ones that looked fine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hedging language dressed up as a solution ("you would need to," "assuming that," "contact the administrator")&lt;/li&gt;
&lt;li&gt;Output that's mostly explanation and barely any actual code or query&lt;/li&gt;
&lt;li&gt;Retries that quietly produce the same generic answer again&lt;/li&gt;
&lt;li&gt;A reviewer score that looks fine on paper while its own reasoning says "lacks specific details"&lt;/li&gt;
&lt;li&gt;No visibility into &lt;em&gt;why&lt;/em&gt; something failed or &lt;em&gt;what the system already tried&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most agent setups ship the first answer that clears a threshold. I wanted mine to push back on itself first.&lt;/p&gt;


&lt;h3&gt;
  
  
  Four agents, one supervisor watching all of them
&lt;/h3&gt;

&lt;p&gt;The pipeline itself is simple on purpose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Coordinator&lt;/strong&gt; breaks the request into a research → build → review plan&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Researcher&lt;/strong&gt; gathers the facts the build step actually needs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coder&lt;/strong&gt; produces the real deliverable — not a description of one&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reviewer&lt;/strong&gt; scores it across five dimensions using an LLM-as-Judge pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The part that isn't standard is what sits above all four: the &lt;strong&gt;SRE Copilot&lt;/strong&gt;. Instead of trusting a single quality score, it runs &lt;strong&gt;seven independent anomaly detectors&lt;/strong&gt; against the actual content of every step — hedging language, placeholder text, code-to-prose ratio, topic drift, repeated output across retries. A 0.79, even a 0.82, doesn't get a free pass just because it's a number above a line.&lt;/p&gt;

&lt;p&gt;When the Copilot catches something, it doesn't just reject it — it tries to fix it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Reword&lt;/strong&gt; — the specific failure gets written back into the brief and the step reruns with that context attached&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rethink&lt;/strong&gt; — if that's not enough, the retry is forced to take a completely different approach, not a rephrased version of the same idea&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual Mode&lt;/strong&gt; — two strikes and it stops, handing over the partial output &lt;em&gt;and&lt;/em&gt; the exact reason it stopped&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;
  
  
  What a clean run actually looks like
&lt;/h3&gt;

&lt;p&gt;Not every task needs saving. Here's one that just worked: &lt;em&gt;"Write unit tests for a user authentication module in TypeScript."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And the backend log is just as boring, which is exactly the point:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;[COPILOT 19:06:33] No anomaly in 'research' -- continuing
[COPILOT 19:06:34] No anomaly in 'code' -- continuing
[COPILOT 19:06:35] No anomaly in 'review' (score 0.90) -- continuing
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No drama. The Copilot isn't there to slow down good work — it's there for the tasks that only &lt;em&gt;look&lt;/em&gt; good.&lt;/p&gt;




&lt;h3&gt;
  
  
  And here's the one that needed saving
&lt;/h3&gt;

&lt;p&gt;Same pipeline, the Postgres migration task from the top of this post. Quality 79%. Manual Mode. Three anomalies, not one.&lt;/p&gt;

&lt;p&gt;The Copilot didn't just say "this feels off" — it named exactly what was wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vague_answer&lt;/code&gt; — Research described a process instead of solving the task (two hedging markers detected)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;prose_not_code&lt;/code&gt; — Code output was only 14% actual code — 232 of 1,709 characters&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;weak_score&lt;/code&gt; — 0.79 sits below the Copilot's own strict bar of 0.88&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Attempt 1 (reword) succeeded on the research step. Attempt 2 (rethink) still wasn't enough on the code step.&lt;/p&gt;

&lt;p&gt;And here's the actual backend log for that run — nothing dressed up, this is what printed to the terminal in real time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;[ANOMALY DETECTED]  [19:31:47]
  Step: research
  Issue: Output in 'research' describes a process instead of solving the task
  (2 hedging markers: ['requires further investigation', 'unknown (requires'])

[COPILOT HEALING] Attempt 1
  Strategy: REWORD
  Target step: research

[COPILOT 19:31:48] No anomaly in 'research' -- continuing

[ANOMALY DETECTED]  [19:31:49]
  Step: code
  Issue: Output is mostly prose, not code (14% code — 232 of 1709 chars)

[COPILOT HEALING] Attempt 2
  Strategy: RETHINK
  Target step: code

[COPILOT 19:31:50] No anomaly in 'code' -- continuing

[ANOMALY DETECTED]  [19:31:51]
  Step: review
  Issue: Quality score 0.79 is below the Copilot strict bar 0.88

[MANUAL MODE ACTIVATED]  [19:31:51]
  Reason: Auto-fix cap reached (2 attempts). Quality score 0.79 is below
  the Copilot strict bar 0.88 — answer is not strong enough
  Action: Developer intervention required
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two strikes, then it stopped and told me why — instead of either looping forever or quietly handing me a 79%-quality answer dressed up as complete.&lt;/p&gt;




&lt;h3&gt;
  
  
  The RAM context store — nothing hidden, even mid-run
&lt;/h3&gt;

&lt;p&gt;Because task state lives entirely in memory, keyed by &lt;code&gt;task_id&lt;/code&gt;, I can inspect exactly what each agent saw and produced at any point, mid-run. The exact research step output, the exact code step output, still sitting in memory — nothing hidden even while a task is in Manual Mode.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why SigNoz isn't a dashboard here — it's the decision engine
&lt;/h3&gt;

&lt;p&gt;This is the part I'm most proud of, because it would've been easy to bolt observability on as an afterthought — a dashboard that just watches. I wanted the Copilot to actually &lt;em&gt;use&lt;/em&gt; what's being observed.&lt;/p&gt;

&lt;p&gt;Every agent span (&lt;code&gt;agent.coordinator&lt;/code&gt;, &lt;code&gt;agent.researcher&lt;/code&gt;, &lt;code&gt;agent.coder&lt;/code&gt;, &lt;code&gt;agent.reviewer&lt;/code&gt;), every &lt;code&gt;llm.call&lt;/code&gt;, and every Copilot decision (&lt;code&gt;copilot.evaluate&lt;/code&gt;, &lt;code&gt;copilot.heal&lt;/code&gt;) shows up in SigNoz with attributes like token count, latency, anomaly type, and retry strategy attached.&lt;/p&gt;

&lt;p&gt;But the loop that actually matters is the one on the right side of that page — &lt;strong&gt;what the Copilot reads back out of SigNoz&lt;/strong&gt; before it decides anything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step Health History&lt;/strong&gt; — has this step been failing a lot in the last 30 minutes? If so, the fix hint gets extra caution baked in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM Provider Health&lt;/strong&gt; — is p95 latency spiking? If the LLM itself is degraded, the retry asks for shorter output instead of blaming the prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healing Success Rate&lt;/strong&gt; — if fixes at this step have historically worked less than 30% of the time, the Copilot escalates faster instead of burning a second attempt on a strategy that rarely pays off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recent Error Traces&lt;/strong&gt; — the specific failure context from last time gets folded directly into the next fix hint.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SigNoz also carries the business-level view — &lt;code&gt;signozforge.tasks.submitted/completed/failed&lt;/code&gt;, &lt;code&gt;signozforge.copilot.healing_attempts/successes&lt;/code&gt;, &lt;code&gt;signozforge.copilot.manual_mode_triggers&lt;/code&gt; — so AI quality and operational reliability sit in one place, not two.&lt;/p&gt;




&lt;h3&gt;
  
  
  A few decisions I'd make again
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A 0.88 strict floor, not the configured 0.6 pass threshold.&lt;/strong&gt; "Technically passing" and "good enough to ship" are not the same sentence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A hard two-strike cap.&lt;/strong&gt; Reword and rethink cover the repair space that matters. An unbounded retry loop is exactly the failure mode this whole project exists to prevent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAM-only context, no database.&lt;/strong&gt; Fast, ephemeral, every task a clean slate — and it made the Context Inspector trivial to build.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual Mode as an honest signal, not a failure.&lt;/strong&gt; When the system can't fix something, it says so, with the partial work and the reasoning attached.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Where I'm taking this next
&lt;/h3&gt;

&lt;p&gt;Persistent healing memory, so a fix strategy that worked once gets reused on similar tasks. Adaptive quality thresholds tuned automatically off SigNoz's observed score distribution. Automatic fallback to a backup model when SigNoz shows the primary LLM degrading. SigNoz-native alerting so a dropping healing success rate reaches me directly instead of me having to notice it.&lt;/p&gt;

&lt;p&gt;The thing I keep coming back to: &lt;strong&gt;trustworthy AI agents aren't the ones that never fail. They're the ones that know when they've failed, try to fix it, and tell you the truth when they can't.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's not a better prompt. That's an observable system — and for me, that meant building it on SigNoz from the first line of code, not bolting it on at the end.&lt;/p&gt;




</description>
      <category>agents</category>
      <category>ai</category>
      <category>automation</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
