4 minute read

The agent ran for twenty-two minutes. It hit five rate-limit errors, and every one of them was retried and cleared. It finished its loop and returned. No exception. No error. As far as the run itself was concerned, it had succeeded.

The only line that disagreed came afterwards, from the code that went to collect the results:

… has no *.json — the … run produced no findings

A six-minute attempt before it had ended the same way. Two runs, zero output files, and nothing upstream of the results reader that said anything was wrong.

The job, and the tools

We were benchmarking our vulnerability scanner against external harnesses, and we wanted one of them to run on the same model as ours. So we had written an adapter that drove that harness’s packaged skills through our own agent framework. The skills told the agent what to do: read the target code, investigate, and write each finding to a JSON file in its workspace. The launch prompt was explicit. It told the agent to “DO what they say yourself (read the target code, write the output files)”.

The agent was built with exactly one toolset. That toolset registers four tools: list the skills, load a skill, load a skill’s resource, run a skill’s script.

None of them can read a file of code. None of them can write a file.

The fourth tool, the one that might have been an escape hatch, was dead twice over. No code executor had been attached, so running a script would have failed at dispatch. And the packaged skills shipped no scripts at all: seven skill files, zero script directories. Two independent reasons, either one sufficient. That is what a path looks like when nobody has ever exercised it.

The agent loaded a skill telling it to write findings to a file, had no capability to comply, and kept working. It spent its turns, drained its loop cleanly, and reported success.

How both were true at once

An agent’s instructions and an agent’s capabilities are two separate surfaces, and nothing checked that they agreed. The prompt described a job. The skill described the same job. The toolset could not do the job. Every layer was individually correct; the composition was impossible. There is no type system, linter, or test that looks across that seam by default, and the model never said “I can’t.”

This path had never produced a finding since the day the file was written, and a claim built on reading its source was later withdrawn. Code that exists and has never executed is indistinguishable, from the outside, from code that does not exist.

The red herring

The logs were full of rate-limit errors, and the first reading was that we were out of token quota: wait, and try again. The logs showed otherwise. The errors were request-rate limits, not a token budget, and every one had been retried successfully. The model was delivering completions the entire time.

The twenty-two-minute run is the evidence. The retries worked, and the outcome did not change. When fixing the loud error leaves the result exactly where it was, the loud error was never the failure.

What changed

The agent has tools that match its instructions. It now carries scoped file tools: read, list, and search, confined to the target code; write, confined to its own run directory. Containment is checked on the resolved path, and both escape attempts in the tests are refused. The scoping is a safety property, not tidiness: this agent deliberately reads adversarial code written to steer an automated reviewer. The first run after the fix wrote findings on this path for the first time.

An empty result is an error at the seam that reads it. There are tests that fail if a missing or empty findings directory is read as a clean scan. Their own wording is the rule: “‘produced no findings’ must never masquerade as a clean scan.”

And the same rule now holds inside our own scanner. The same day, one of our analysis lanes returned zero findings and was dropped at the merge step, along with the reason it returned zero. Downstream, “ran cleanly and found nothing” and “broke” were the same value: absent. There is now a test that fails if a zero-finding lane’s coverage note or errors do not survive the merge.

The general form: any entry point that can return empty must distinguish an honest empty from a silent one at its own seam, rather than leaving a downstream consumer to notice the absence.

The line that stays

An agent will work for as long as you let it on a task it cannot complete, and a clean return is not evidence that it could. Check the verbs in the instructions against the tools in the toolset, and treat “completed with no output” as a failure until something proves otherwise.

Every retry succeeded. The loud error was incidental; the real failure never printed anything.