Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

Five problems my agent fault-injection harness had before its first real trial

After my last post I started a bigger version of the study: more tools, more fault types, several local models as the agents, and an analysis written down before the run. It has not run yet. I am writing down what went w

Five problems my agent fault-injection harness had before its first real trial

After my last post I started a bigger version of the study: more tools, more fault types, several local models as the agents, and an analysis written down before the run. It has not run yet. I am writing down what went wrong while building it, because each problem would have shifted the results without any sign that it had.

The setup: an agent calls MCP-style tools (filesystem, git, SQLite, fetch). A fault injector sometimes makes a call fail, half-apply, or time out. The agent then writes a final reply. A checker compares that reply with the tool receipts. A separate oracle knows what really happened, so I can score the checker. Other models act as raters and turn each reply into claims.

  1. The model called the tool, but only in text One local model sometimes wrote its tool call as text in its reply, in a harmony-style format, instead of using the structured tool-call field. Sometimes the JSON stopped before the closing brace.

A parser could repair that and carry on. I did not let it. If I repair a malformed call, I am measuring my repair code, not the agent. These episodes are recorded as protocol failures, counted, and reported by fault class.

  1. The server ignored my seed The plan has three seeds per scenario, so I checked that the server honours seed. At temperature 0 it returned the same output three times. At temperature 0.7 with the same seed, three calls gave three different outputs.

So the seeds give me variance, which is what I need, but not replay. The raw logged outputs are the record. The harness now probes the seed at the start of each run and writes the result into the run header, so a reader can see whether replay was possible.

  1. No constrained decoding, so no repair either My raters must return a strict JSON object. Some hosted APIs can enforce a schema. This local server rejects the request outright. The model has to produce valid JSON unaided, and the validator rejects anything else: no extra keys, no code fences, no trailing text, no repair and re-parse.

A rejection is data. If one rater rejects far more often than another, that says something about the rater. A repair step would hide it.

  1. A missing tool silently removed episodes This one was my bug. After a failed move, one model tried to call a delete tool the task never offered. My loop treated an unoffered tool name as a parse failure and threw the whole episode away.

That is a selection effect. An agent that reaches for the wrong tool after a failure is exactly the case a verifier has to handle, and I was dropping those episodes from every denominator. Now the call never reaches the server, the model gets "unknown tool" back as a tool error, and the episode continues. The count is logged.

I kept the strict behaviour for calls that arrive as free text. There, an unoffered name is more likely garbled output than a real request.

  1. The rater spent most of its tokens thinking A rating is a few lines of JSON, and the rater model spent most of its output on reasoning before writing them. Running requests in parallel helped. Turning thinking off cut the cost of a test prompt to a fraction.

I have not decided to turn it off. Thinking may make the rater more accurate, and I do not know yet. I will run both settings against a human-labelled sample and compare them before I commit to either in the pre-registration.

What I have not done
There are no results. I make no claim about how well any checker works on these models. The runs so far are small dry runs to find the problems above, and I am not quoting numbers from them. The study design and sample sizes get written down before the real run.

Two questions for people building agent evals on local models. How do you handle tool calls that arrive as text? And do you let your raters think?

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.