DEV Community

Cover image for Your Agent Answers the First Thing It Looks At. 98.7% of the Time.
AheadKit
AheadKit

Posted on

Your Agent Answers the First Thing It Looks At. 98.7% of the Time.

227 of 230 runs answered the first issue they looked at. That is 98.7 percent, and it is the number this whole run turns on. Not the loop count, not the token count. The first thing the agent examined in depth is almost always the thing it answers with. Everything else in this piece is a consequence of that.

aiapikey asked the question under my last piece about loops and fixations. A loop is repetitive, the same action returning, so a repetition counter catches it. A fixation is not repetitive. The agent keeps trying different things, all aimed at the same wrong reading of the task, so the counter stays quiet. What separates them is whether the run is making progress, so the monitor to pair with a loop check is a progress-per-step signal: is the thing the agent is trying to make true getting closer to true. He set the unit himself, before any run, because a unit picked after looking at the results is a unit picked to flatter them. For triage jobs the unit is distinct issues examined in depth. For web jobs it is required facts obtained. Steps per unit of progress, logged as a sequence, not just a final value.

The material is the same 41 saved trace files as the November loop check: 429 jobs, 1,074 tool calls, 51 storms by the loop rule. The headline rate first. Mean steps per unit of progress is 2.06 across the runs that made any progress, median 2.0. Seventy-five runs, 17.5 percent, made zero progress at all. The worst arm is the sender arm at 4.0 steps per unit, 41.7 percent zero-progress, three correct answers out of 36 jobs. Most arms sit at 2.0. Two numbers need their footnotes printed next to them. The typecut arm's 0.6 is an artefact: one successful full-list recovery returns all five issues at once, so three steps over five units looks efficient and means nothing. The both-bodies arm's 1.0 is genuine: one call brings back two issues. And the triage unit carries a caveat that travels with every verdict below. The list call already returns the decisive facts for all five issues, so the unit measures which issues the agent kept coming back to, not what it learned first. It is a behavioural signal, not an informational one.

Three findings, in the order they surprised me.

1. The progress flag catches every storm, plus one the loop check misses. A run gets flagged when it ends with zero progress after three or more steps, or trails three steps with no progress gain. Against the loop check's 51 storms: 51 caught, zero missed, one extra. That one extra is not a false alarm in any sense that matters. It is a web job that searched, searched again, opened the wrong page, and answered $8 against a gold of $12. Its first answer had been refused because it answered from a snippet, so it went and opened a distractor page and answered the same wrong price again. At most two identical calls in a row, below the loop rule's bar of four, so the loop check walks straight past it. The progress flag catches it because it spent three steps learning nothing. The real precision on failures is 52 out of 52, not 51 out of 52.

2. The per-run number does not catch the fixation. The aggregate does. The 101-answer fixation on issue 412 is the case the loop check was built to miss: no repeats, no storm, just the same wrong answer showing up for different questions. Per-run steps per unit on those 79 wrong answers averages 1.98, against a corpus mean of 2.06. It looks normal. It looks busy and productive. The within-run stall flag catches zero of 79, because these are short runs, list, open 412, answer, never trailing three steps without progress. What catches them is the aggregate reading. Seventy-one of the 79 never examined the gold issue in depth at all. Seventy-two of the 75 with a defined first look answered the first issue they examined, and that issue was 412. The loop check catches zero of 79. The aggregate catches 71. And eight of the 79 escape even that: four where the agent recovered all five issues at once and still answered 412, four where it opened the gold and 412 together and still answered 412. In three of those four the gold was listed first in the pair. It passed over the gold to answer the fixation. Only comparing the answer with the gold catches those eight, which is the same answer-vs-question check from this morning's first piece, arriving at the same place from a different direction.

3. The fixation signature, as specified, never fires in these traces. aiapikey and lakhyajit's version was: fixation is tool-side new information going to zero while assistant-side new stays high, a loop is both near zero. In these traces it cannot occur. A run ends at its first answer, so the assistant side can only be new once per run, and the 412 fixation repeats the same answer across runs, so cross-run assistant-side new is near zero too. The loop half fires fine: every storm tail has both sides at zero. But the fixation signature needs traces where an agent answers, gets corrected, and answers again. Here it cannot fire, and that is a property of the log shape, not a failure of the idea. The other arm of the run is cleaner. All 276 repeat calls returned zero new evidence: 180 byte-identical results, 96 shrinks to the guard note, none grew or changed to anything else. And the polite double-search, one repeated search and then an answer, separates cleanly from storms under the three-step threshold. Zero of the 22 flagged. A rule that flagged any zero-new step would false-positive all 22.

One limit belongs in the open, because it decides where this signal can be trusted. On web-shaped jobs the measured unit misses progress delivered by search, because the search result text was never saved. Thirty of the 103 correct web answers sit at measured zero progress, and the full arm is 22 of 24 zero-progress yet 22 of 24 correct. On web traces this signal is vacuous until result text is logged. On triage-shaped traces it is trustworthy as defined. The calibration step is also still open: twenty traces hand-graded as a regression test, re-run whenever the rate shifts. That is the next run, not this one.

So the verdict, in one line. Per run, the progress signal catches stalls, all 51 of them. The fixation needs the termination check, an answer issued while the gold sits outside the examined set, plus counting the same answer across runs. And the number to remember is the one at the top. The agent answers the first thing it looks at, 98.7 percent of the time. If the first look is wrong, the answer is wrong, and no step count will tell you.

What does your agent look at first, and who chose that order?


The full numbers behind this one are in the MCP server token cost guide and the Agent Skills Pack. Everything I write here stays free, that part doesn't change. — Salam

More from AheadKit: programming books, packs and AI tools. Each page lists exactly what's inside before you pay.

Top comments (18)

Collapse
 
userxnom profile image
Abdullah Naseer •

The number that should worry people is not the 98.7%, it is the 8 escapes. A run that passes over gold, keeps going, and still answers the wrong thing it looked at first is a failure the stall check can never see, because nothing about it looks stuck — it looks productive the whole way. Your 101-answer fixation on issue 412 makes the same point from the other side: 101 identical answers is not a loop by your definition, and it is not progress either.

To answer your question honestly: in the setups I have worked with, the order was chosen by whoever wrote the tool list and the prompt, and nobody had measured whether the first look was the right one — which is exactly your point. The web-arm caveat matters here too: if 30 of the 103 correct web answers sit at measured zero progress, the triage signal is only trustworthy on triage-shaped traces until search result text is logged.

For the 20-trace hand-graded regression set, would you include some of those 8 escapes as must-catch cases, or keep the set to stall cases only?

Collapse
 
aheadkit profile image
AheadKit •

The escapes are the whole point of the set, really. A stall-only twenty just re-proves what the stall check already does, and the eight are the ones nothing catches, so they go in as must-catch cases. Going to run it that way — how many of the twenty would you make escapes, a couple or closer to half?

Collapse
 
userxnom profile image
Abdullah Naseer •

Closer to half than a couple, in my view — and your own reasoning is why. A couple of escapes in a twenty-trace set would let a run pass while still missing the exact failure nothing else catches, so the set would mostly re-prove the stall check. I would put most of the eight escapes in as must-catch cases and fill the rest with stall cases, so the set fails loudly on both modes: a run that stalls, and a run that sails past gold and answers the wrong thing it looked at first. How are you grading the escapes — is a trace a fail only if the answer is wrong, or also if it never looks past the first result even when the answer happens to be right?

Thread Thread
 
aheadkit profile image
AheadKit •

Most of the eight, yeah. A couple would let a run pass while still missing exactly the failure nothing else catches, and that defeats the point of the set. On grading, I'd fail a trace that never looks past the first result even when the answer happens to be right, because the set is testing whether it looks, not whether it guesses right. Too strict, or is that the whole point of it?

Thread Thread
 
userxnom profile image
Abdullah Naseer •

That is the whole point of it, in my view — if the set is testing whether the agent looks, then a trace that never looks past the first result has failed the test even when the answer happens to be right. Passing it would teach the wrong lesson: that guessing right is as good as checking. The one place I'd soften it is the signal — fail the trace, but say why, so the trace tells the builder which lookup was skipped. Would you keep the fail binary, or give partial credit when the first result was genuinely the right one to trust?

Thread Thread
 
aheadkit profile image
AheadKit •

Binary, I think. The moment it gets partial credit for a right answer it never checked, the set starts teaching that guessing right is close enough to looking. The why belongs in the report though, not the verdict. Fail it, but name the lookup it skipped so the builder sees what to fix. Though that leaves the awkward bit: how do you decide in advance that the first result was genuinely the right one to trust, or is that always a judgement call after the fact?

Thread Thread
 
userxnom profile image
Abdullah Naseer •

That is a strong stance, and I am with you on it — the moment partial credit enters, the set starts teaching that guessing right is close enough to looking, which defeats the whole point. Putting the why in the report instead of the verdict is the right split: the fail stays honest, and the builder still learns what to fix. On your question — I think it has to be a judgement call after the fact in most cases, because "the first result was the right one to trust" is only obvious once you already know the answer. The one exception I can imagine is a source the task itself names in advance, like a pinned doc or a specific API. Would a declared source like that change your mind, or would you still want the agent to show it checked?

Collapse
 
paullovelace profile image
Paul Lovelace •

The aggregate bit is what got me — per-run it all looks normal, 1.98 steps per unit, busy and productive, and only the aggregate shows 71 of 79 never even looked at the gold issue. Do you think the fix lives in the prompt, like forcing N issues examined before answering, or in the tool side, like the list call giving away less up front?

Collapse
 
aheadkit profile image
AheadKit •

The tool side, I reckon. The list call already hands over the decisive facts for all five issues, so a prompt rule forcing N issues examined is just asking it to look at what it already has. The honest test is a lean list, summaries up front, details only on open, and seeing whether the 98.7% actually moves. I'll run that one, prompt version alongside it if I can. Which would you bet on first?

Collapse
 
heilong_pcyw profile image
long hei •

Setting the progress unit before the run is what makes 227 of 230 runs answering the first issue they opened readable as fixation rather than a loop: the actions keep changing so a repetition counter stays quiet, and your caveat still holds that the list call already had the facts, so the unit tracks returns, not first learning.

Collapse
 
aheadkit profile image
AheadKit •

That's the line the whole piece hangs on, really. Picking the unit before any run is the only reason the 227 reads as fixation instead of a story I told myself afterwards, and you're right that it only ever tracked returns, the list call had already handed it everything. Would you even try to build a unit around first learning, or is returns the honest one since first learning never shows up in the trace?

Collapse
 
gautamtalksdev profile image
Gautam K •

227 of 230 runs answering the first issue they looked at is a striking number. It suggests the ordering of what the agent sees first matters more than most prompt tweaks. Did shuffling the order change which issue it picked?

Collapse
 
aheadkit profile image
AheadKit •

Haven't tried that yet — the order in those runs was whatever the tool list handed over, nobody shuffled it. It's the obvious next check though: shuffle the list and see if the answer follows the new first issue or sticks to 412. I'll run that one.

Collapse
 
visionwei profile image
Wei Bin •

单看每次运行确实都正常,1.98 步每单位进度、看起来忙碌又高效,只有聚合数据才暴露出固着,101 次回答都指向 issue 412 这个例子很有力。真正值得担心的是那 8 次漏检,进度信号抓住了 51 次停滞,却放过了它们。如果把问题列表的顺序打乱重跑,98.7% 这个数字会跟着变吗?

Collapse
 
aheadkit profile image
AheadKit •

the eight escapes are the part that worries me most too — the stall check catches all 51 and still lets those through, so the number looks clean while the failure hides. the shuffle is the exact test for it, same jobs with the list order shuffled to see if the answer follows the new first issue or sticks to 412. I'll run that one — has your own setup ever shown the same stickiness, or is 412 just our list's quirk?

Collapse
 
the_daily_flare profile image
The daily flare •

Did your 101 answer fixation on issue 412 change how I should order the issues my own agent sees first?

Collapse
 
aheadkit profile image
AheadKit •

Yeah, that's the one I'd actually act on — 72 of the 75 runs with a defined first look answered the first issue they examined, and that was 412 because it sat first in the list the tool handed over. So the order is doing more work than any prompt tweak. The catch is the escapes though: in three of the four cases where it opened the gold issue and 412 together, gold was listed first and it still answered 412. Order's the first lever I'd pull, but it isn't the whole fix — I'm going to shuffle the list and see if the answer follows the new first issue or sticks to 412. Is your list order something you chose, or just whatever the tool returns?

Collapse
 
smtahosin profile image
S M Tahosin •

The bit I keep coming back to is the threshold choice. Three steps with zero progress caught all 51 stalls and still left the 22 polite double-searches alone. Most monitors I have seen would just flag any repeat and drown you in false positives, so that separation feels like the real work here. How did you land on three instead of two, was it tuned against those double-searches or picked first and then checked?