Agent-Gate: Agentic Eval

Can Claude autonomously fix broken code without being told what's wrong? A 10-task harness measuring multi-turn tool use, cascade routing, and cost efficiency.

check_circle10/10tasks solved
cached6.8avg turns
swap_horiz90%cascade rate
savings41%saved vs Sonnet-only

Results from latest local run

Why this benchmark exists

Single-shot evals miss the loop

HumanEval asks: can the model write correct code once? Agent-Gate asks: can it figure out what's wrong, fix it, and keep going?

SWE-bench is too heavy to run

2,294 tasks, Docker, hours of compute. Agent-Gate runs end-to-end in under 10 minutes with no infrastructure.

Cascade efficiency is unmeasured

No benchmark directly measures whether routing easy tasks to cheap models actually pays off. This one does.

Does the cascade pay for itself?

The cascade starts with cheap Haiku and escalates to Sonnet only when stuck, capturing most of Sonnet's capability at a fraction of the price.

Haiku Only

$0.133

~7/10 solved

Cheap but gets stuck on hard tasks

starBest value

Cascade (Actual)

$0.295

10/10 solved

Best balance of cost and capability

Sonnet Only

$0.498

~8/10 solved

Most capable but 60%+ more expensive

trending_down

Cascade saved 41% vs Sonnet-only

upgrade

Cascade rescued 100% of tasks Haiku failed

Eval at a glance

check_circle

100%

Pass Rate

10 of 10 tasks

cached

6.8

Avg Turns

per solved task

swap_horiz

9/10

Cascade Triggered

tasks escalated to Sonnet

volunteer_activism

100%

Rescue Rate

Sonnet solved after Haiku failed

undo

0.0

Self-Corrections

avg per task

timer

2219ms

Turn Latency

avg across all turns

bolt

10/10

First-Attempt Pass

first write passed tests

payments

$0.295

Total Cost

all 10 tasks, cascade

All 10 tasks

Click any row to replay the full step-by-step agent trace.

Task

single bug obvious

Single Bug — Obvious

expand_more

single bug obvious

Single Bug — Obvious

expand_more

single bug hidden

Single Bug — Hidden

expand_more

single bug hidden

Single Bug — Hidden

expand_more

two bugs sequential

Two Bugs — Sequential

expand_more

two bugs sequential

Two Bugs — Sequential

expand_more

test understanding

Test Understanding

expand_more

test understanding

Test Understanding

expand_more

red herring

Red Herring

expand_more

red herring

Red Herring

expand_more

When and why did Haiku escalate?

Trigger breakdown (9 cascades)

Haiku turn limit9

Most common: repeated failures - Haiku applied the same wrong fix until the cascade fired.

Sonnet rescue rate

9/9

cascades resolved

Sonnet received a compact 200-token handoff - not raw Haiku history - so it approached each task fresh instead of repeating failed attempts.

How this eval works

task

Task design

  • 10 tasks across 5 categories
  • Obvious bugs, hidden errors, sequential bugs, test traps, red herrings
  • Each task: isolated Python workspace + failing test suite
  • Agent is never told what the bug is
build

Tool loop

  • 3 tools: read_file, write_file, run_tests
  • Agent calls tools iteratively each turn
  • Stops when tests pass, turn limit hit, or give_up called
  • No hints given between turns
swap_horiz

Cascade logic

  • Haiku runs first - up to 4 turns
  • Escalates on: loop detection, 3 identical failures, or give_up
  • Sonnet gets a compact ~200-token handoff summary
  • Sonnet runs up to 6 additional turns
payments

Cost calculation

  • Haiku: $0.80/M input · $4/M output
  • Sonnet: $3/M input · $15/M output
  • Counterfactual = all turns priced at one model's rate
  • Savings = (Sonnet-only − actual) / Sonnet-only

Reproducibility

Haiku: claude-haiku-4-5-20251001Sonnet: claude-sonnet-4-6Temperature: 0Haiku turns: 4Sonnet turns: 6Output cap: 50 lines

To rerun: ANTHROPIC_API_KEY=your_key python src/eval-engine/run_agentic_eval.py

What's next

folder_open

Multi-file codebases

Real bugs span files. The agent needs to navigate a directory tree, not just one module.

javascript

TypeScript tasks

Tests whether the cascade generalizes across languages beyond Python.

search

Web search tool

Closer to real Claude Code usage - model looks up docs and error messages mid-task.

live_tv

Live streaming demo

User picks a task, watches the agent run in real time via streaming.

device_hub

Third-tier routing

Add a third model tier for cross-provider cascade comparison.

groups

3× majority vote

Run each task 3 times, take majority. Reduces variance from single-run results.

What it cost to build this

Every build session tracked - model, token count, API spend.

SessionGoalCost
S1Full planning$0.29
S210 task definitions$0.23
S3Python harnessTBD
S4TypeScript types + snapshotTBD
S5TraceReplayViewerTBD
S6AgenticEvalShowcase + pageTBD
S7Run harness + deployTBD
coffee

Building and running this eval cost less than a cup of coffee.

Total: ~117k tokens tracked (Sessions 1-2). Full cost including eval runs: ~$0.50-$0.90 est.

fluid

Ankit's AI Assistant

Ask anything about Ankit

Hey! I'm Ankit's AI Assistant, ask me anything about his work, experience, or skills. How can I help?