Most AI agent evaluations fail for a boring reason: teams measure average pass rates across easy prompts instead of writing assertions for the exact failure modes that break in production.
Over the last few weeks, I turned four recurring production agent bugs into 4 deterministic, zero-login browser labs so you can inspect them step-by-step in ~10 minutes—and also open-sourced Lab 01 in Python:
- Interactive Browser Labs (free, no signup): https://wovi.world/lab?utm_source=devto&utm_medium=article
- Open-Source Lab 01 Python Repo: https://github.com/Hongxin-Jiang/wovi-agent-failure-labs
Here are the four structural bugs and the invariants that catch them.
1. Reward Hacking & Deterministic Tie-Breakers (Lab 01)
Imagine a tool-choosing or navigation policy scoring candidate actions with a weighted objective:
score = ( 4 * progress + (2 if has_energy else 0) - (storm_penalty if is_storm else 0) + (memory_reward if nxt not in visited else 0) ) candidates.sort(key=lambda item: (item[0], item[1]), reverse=True) When storm_penalty = 2, landing on an energy cell inside a storm adds +2 proxy reward and cancels the -2 penalty (+4 vs +4). Worse, adding an exploration bonus (memory_reward = +2) adds +2 to both unvisited candidates, preserving the exact tie. Candidate list order (EAST before NORTH) silently drives the agent straight into the storm every single run.
Structural fix: Never rely on equal-scale weighted penalties to prevent irreversible failures. Filter unsafe actions out before scoring (hard_guardrail=True), and ensure any fallback penalty dominates the sum of all proxy bonuses (storm_penalty >= 12).
You can run this exact Lab 01 reproduction locally in 10 seconds with zero dependencies from GitHub or step through it visually in Agent Maze.
2. Soft Prompt Penalties Passing Eval & Breaking Under Shift (Lab 02)
In staging benchmarks, a mild -3 latency or congestion penalty looks completely safe: route A takes 4 min vs route B 6 min (-3 swings it to route A). Deploy the same weights to a slightly harder environment (2 min vs 7 min), and the -3 penalty flips sign against the stronger proxy reward—sending the policy straight into the failure condition.
Why evals miss it: Static benchmarks test one distribution slice. Invariant: test safety constraints under adversarial trade-off multipliers where the proxy benefit is 2x–3x larger than the baseline.
3. Overconfident Predictions Without Margin Gating (Lab 03)
When false negatives (FN = -16) cost far more than false positives (FP = -10), threshold calibration alone isn't enough. A policy that looks confident (max_prob) when top-two class margin (p1 - p2) is razor-thin will silently take high-cost irreversible actions instead of escalating to human-in-the-loop (HITL) review.
Structural fix: Gate autonomous execution on both calibrated confidence and decision margin; route borderline pairs to review.
4. Sampling Bias & 90% Aggregate Score Illusions (Lab 04)
If your eval suite contains 18 easy cases and 2 minority edge-case slices, a model achieving 100% on easy and 0% on hard reports 90% overall accuracy. Adding more of the dominant slice does not move minority recall, and silent fallback behavior masks unrepresented inputs in production.
Structural fix: Track per-slice accuracy and abstention coverage separately; reject aggregate gating whenever any safety-critical slice has n < min_samples or accuracy == 0%.
Try It Yourself
- Play all 4 interactive browser simulations free (no account, no cookies): https://wovi.world/lab?utm_source=devto&utm_medium=article
- Grab the printable 1-page Pre-Ship AI Agent Eval Checklist (free): https://wovi.world/lab-checklist?utm_source=devto&utm_medium=article
- Clone Lab 01 in Python (
unittest, 0 dependencies): https://github.com/Hongxin-Jiang/wovi-agent-failure-labs (there is also an optional $19 kit on the site with all 4 runnable Python labs + 12 eval tests if you want the full suite).
Which of these four patterns have you hit in your own agent pipelines? Curious what belongs in Labs 05–10 (next up: tool-loop runaway and indirect prompt injection).

