DEV Community

Cover image for I ran AI agents against 167 real MCP servers. Six in ten of their mistakes were repeats.

I ran AI agents against 167 real MCP servers. Six in ten of their mistakes were repeats.

DomitorAI on November 24, 2026

Every AI coding agent I use has the same habit: it calls a tool the wrong way, reads the error, finds the form that works – and in the next convers...
Collapse
 
ar9avg profile image
Arnav Gupta •

First failure family stands out: tools that can never work here. Cheap server-side fix: hide those tools from listing when preconditions fail, or return one explicit missing-credential error. Agent stops probing every tool in sequence. Question: does repeat rate differ between servers with clear error text and servers with vague errors? Error quality seems likely lever.

Collapse
 
domitorai profile image
DomitorAI •

Thanks – agreed on the server side. A tool that can never work without a key or a running app should say so once, clearly, or not be listed at all. That alone would remove a lot of the probing.

On error quality, I checked rather than guessed. I split the failed calls from the 152-server run by the error text: errors that say what to do (a hint, "run X login", "path must be absolute"), errors that only name a cause ("file not found", "unauthorized"), and vague ones (timeouts, "internal error", "error executing tool X"). It's a rough automatic classification, so take it as indicative.

Across conversations, clarity barely mattered: in conversation 2, 60% of failures with an actionable error were repeats from conversation 1, vs 62% for vague errors (52% for cause-only). Same picture in both agents.

So error quality is probably a lever for recovering inside a session, much less for repeats across sessions – the next session starts from zero and makes the same call again, however good the message was. Thanks for the push, it was worth checking.

Collapse
 
ar9avg profile image
Arnav Gupta •

Great data, thanks for running split. Matches my suspicion: error text helps inside one session, next session starts blank. Cross-session repeats need something outside error messages, like memory of past failures carried over. Did any failure family repeat less across conversations?

Thread Thread
 
domitorai profile image
DomitorAI •

Yes – one family clearly repeated less: wrong argument shapes. Of the distinct argument mistakes from conversation 1, 29% were made again in conversation 2. For "the tool can never work here" (missing key, sign-in, program) it was 59%, and 58% for the rest (timeouts, internal errors, server bugs). Same pattern in both agents. Rough automatic split by error text again, so indicative.

My reading: argument mistakes depend on the task – the next conversation uses a different path or different data, so the exact same call rarely comes back. "Can never work here" is the most reliable repeat: nothing in the next session tells the agent the tool is dead, so it tries again from scratch. Which is also where carrying memory across sessions pays off most.

Thread Thread
 
ar9avg profile image
Arnav Gupta •

Sharp split: dead tools repeat most because next session never learns tool is dead, exactly where cross-session memory earns most.

Collapse
 
halfcycle profile image
Halfcycle •

We hit the same thing building Halfcycle, one level up: whole projects repeating the same ways builds break. What made the difference for us was keeping the fix next to the cause, so the next project gets the answer, not just the warning. Your single-quotes lesson is a great example of the risk. How do you decide a lesson is narrow enough before it starts stopping calls?

Collapse
 
domitorai profile image
DomitorAI •

Keeping the fix next to the cause is what we ended up with too – when a call is stopped, the agent is told what worked here, not just "don't".

How lessons are matched is the part I'm keeping to myself, sorry – it's where most of the work went. What I can say is that it's never a black box for the user: every stop is visible, and a lesson you think is wrong goes away with one command (scarwise forget).

The single-quotes case taught us that a wrong stop costs more trust than a repeated mistake, so that's the trade-off we optimise for.

Collapse
 
halfcycle profile image
Halfcycle •

Fair, that's the part worth keeping. "A wrong stop costs more trust than a repeated mistake" is a good rule. One command to forget a lesson is the right escape hatch.

Collapse
 
jsbry profile image
Joshua Bryan •

One data point for why the same mistake comes back: the error text decides what the agent learns, and some texts teach the wrong lesson every time. We gave an agent a conflict error that listed the current labels unquoted, one of them spelled like the version number. Under a prompt telling it not to re-read, it took the label for the version and resent its old write. The other writer's change was lost in 38 of 48 runs. With the labels quoted, 0 of 48. Did your repeats cluster on servers whose errors name the fix, or on ones that don't?

Method and data: https://isokron.ai/research/mcp-conflict-errors-ai-agent?utm_source=devto&utm_medium=comment

Collapse
 
domitorai profile image
DomitorAI •

Nice experiment – a misleading error is worse than a vague one, because the agent "learns" something and acts on it confidently. 38 of 48 vs 0 of 48 from quoting alone is a striking result.

On your question: I split the failed calls from the 152-server run by error text (roughly, by automatic classification). Errors that name the fix were repeated about as often as vague ones: in conversation 2, 60% of failures with an actionable error were repeats from conversation 1, vs 62% for vague errors. So the repeats don't cluster on bad errors – a clear message probably helps inside a session, but the next session starts from zero and makes the same call again.

Your result points at the other half of the problem: whatever remembers mistakes across sessions has to be careful not to remember the wrong lesson. That was the hardest part for us too.

Collapse
 
izgorodin profile image
Edward Izgorodin •

The table counts 268 calls stopped before they ran, and a stopped call has no result, so the table cannot say how many of them would have worked. That number is the trade-off you describe, a wrong stop against a repeated mistake, and it can be measured without showing how lessons are matched. Run one conversation in shadow mode: the layer logs every call it would stop, lets it through, and you count how many of those calls succeed.

The single-quotes lesson would have shown up there: the calls it stopped wrongly appear in the log as calls that succeed. Run the same shadow pass over the 167 servers after each change to the matching, and a lesson that is too broad shows up as a count before it stops correct code in a real session.

Collapse
 
domitorai profile image
DomitorAI •

Good point, and you're right that the table can't show it – a stopped call has no result. We already measure exactly that on the benchmark runs: let the calls through and count how many would have succeeded.

On the same servers: 337 calls would have been stopped. 325 of them (96%) failed anyway, 3 succeeded, and 9 had no result. All 3 successes were on one server that answers intermittently. So roughly 1 wrong stop per 100.

Honestly, the single-quotes lesson was caught the hard way – it had already stopped correct code in real use before we noticed it. Your suggestion to rerun that count after every change is exactly what would have caught it earlier, so I'm taking it.

Collapse
 
heinrichneb profile image
Heinrich Neb •

The repeats match what I saw even with a memory in place. One of our lessons was shown at the start of the session, and the mistake happened anyway: the briefing showed about the first hundred characters, and the address that mattered sat at character 323. Since then the deciding fact goes first in every lesson. Stopping the call before it runs avoids that whole problem, because nothing depends on the agent reading far enough.

Collapse
 
domitorai profile image
DomitorAI •

That's a great example – thanks for sharing it. A lesson only helps if the agent actually reads the part that matters, and there's no guarantee it will, especially deep into a long session.

Stopping the call before it runs is the part I trust most for exactly that reason. Putting the deciding fact first is a good habit for any memory that has to be read, though.