Put an agent eval harness in CI
Ad-hoc agent demos do not protect you from regressions when prompts, tools, or models change.
Ad-hoc agent demos do not protect you from regressions when prompts, tools, or models change. The common trap is a “green” product CI while agent output quality quietly drops for a week.
An eval harness in CI gives you an early warning: run a small set of golden tasks, score what is objective, and gate agent config changes on trend, not vibes.
What to score automatically (and what to sample by humans)
Start with objective signals you can trust:
- Correctness: tests pass, fixtures stay stable, outputs match invariants.
- Hygiene: forbidden paths untouched, no new dependencies, formatting stable.
- Budget: diff size under a cap, runtime under a cap, token or cost under a cap.
Then add human sampling for the rest:
- Does the patch match the repo’s conventions?
- Is it readable enough for a normal reviewer?
- Did it solve the right problem without collateral edits?
If you cannot write an objective check, do not pretend it is a metric. Put it in the weekly sample review instead.
Workflow: gate agent config changes with a golden-task harness

Harness
- Pick 5 to 10 golden tasks. Choose tasks you expect to keep working for months. Keep them small and headless.
- Run on a fixture. Use a stable repo or package snapshot so failures mean the agent changed, not the world.
- Define scorers. Start with: tests, lint, forbidden paths, diff budget, runtime budget.
- Schedule runs. Trigger on changes to prompts, rules files, tool wiring, model pins. Add a nightly run.
- Store trend artifacts. Keep the score breakdown and the patch output as CI artifacts.
- Gate by sustained regressions. Alert on a trend drop across a few runs, not one flake.
- Quarantine config like a dependency bump. If quality drops, revert or pin. Do not “ship and see”.
Stop gates (your harness is lying)
Stop and fix the harness when any of these is true:
- The same golden task flips pass and fail without a real change.
- Scores improve while reviewers say quality got worse.
- A task is gaming the metric (for example by deleting checks).
- Costs or runtime grow without any corresponding value.
Checklist: a minimum viable eval harness
- Golden tasks are pinned and documented (what success looks like).
- Fixture repo or snapshot is stable and reproducible.
- Objective scorers exist for correctness, hygiene, and budgets.
- Runs trigger on agent config changes and nightly.
- Scores and outputs are stored as artifacts.
- There is a clear gate: when scores drop, config changes stop shipping.
- There is a refresh rule: how often you update tasks and fixtures.
Three failure modes that break harnesses

Failure modes to catch early
- Flaky eval. Unstable tests and unstable environments turn the harness into noise.
- Fix: isolate tasks, pin dependencies, and remove network calls from golden tasks.
- Leaky fixture. Golden tasks depend on live services, real data, or secrets.
- Fix: use recorded fixtures and fake endpoints. Treat secrets as forbidden.
- Cost blow-up. Evals run on every commit, take forever, and get ignored.
- Fix: run on config changes and nightly. Cache aggressively. Cap runtime and spend.
Bottom line

When this fits vs when it does not
An eval harness is a quality gate for your agent stack, not a vanity dashboard. Keep it small, objective, and trend-based. If you need a companion rule for keeping tasks small and reproducible, pair this with context budgeting and keep agent changes honest with test-first repair loops.
Share