Grade code that runs, not prose
Standard evals score coherence and tone. Code generation agent evals run the output: execute it, pass it through tests, and scan for security patterns. Tessary grades what the code does, not what it says, and when a grader trend drops in production, tells you which change caused it.
Nearly half of AI-generated code has security flaws
Veracode tested more than 100 language models across 80 coding tasks. The code usually ran; the vulnerabilities came along anyway, and larger, newer models fared no better.
- 45%
of test cases produced AI-generated code with security vulnerabilities, across 80 coding tasks
Veracode, 2025 GenAI Code Security Report
- 100+
language models tested, with no meaningful improvement in security from newer or larger models
Veracode, 2025 GenAI Code Security Report
Text graders measure prose, not code
Code agent output is executable. Standard evals score coherence, accuracy, and helpfulness: none of those dimensions tell you whether the output runs, passes tests, or introduces a vulnerability. When teams apply only text-quality graders to code agent traffic, they measure prose on output that runs in production infrastructure. The correctness signals come from running the code, not scoring the text.
Execution
gives ground-truth correctness that text evals cannot provide
Security
failures are invisible to graders that treat code as prose
Text eval vs code generation eval
Text-quality graders are correct for conversational agents. They are the wrong unit for agents that generate code: the output runs in production infrastructure and can be executed, tested, and scanned.
Text-quality grader
Grades the response, not what it does
- Cannot detect whether the code executes or passes tests
- Passes syntactically valid but logically broken output
- No signal on OWASP vulnerability patterns in the diff
- Cannot detect when the agent modifies files outside the task scope
Code generation grader
Grades what the code actually does
- Executes the output and checks whether it passes the test suite
- Scans the diff for OWASP Top 10 patterns before the merge
- Checks whether the change is scoped to what was asked
- Tracks test coverage delta to catch untested added behavior
Four graders for code agents
The grader set for a code generation agent maps to what code does: does it run, does it introduce vulnerabilities, is it scoped to the task, and does it add untested behavior?
Functional correctness
Does the output execute without errors? Does it pass the test suite? A run that produces syntactically valid but logically broken code needs a grader that can distinguish those two outcomes, not a text-quality score.
Security pattern detection
The OWASP Top 10 is the practical baseline for production grading. SQL injection, cross-site scripting, log injection, and cryptographic failures appear consistently in AI-generated code. This class of failure does not improve predictably with model size.
Diff quality
Coding agents sometimes fix one issue and quietly modify unrelated files, rename symbols across the codebase, or add untested behavior adjacent to the stated task. A diff quality grader checks that the change is scoped to what was asked.
Test coverage impact
When a code agent proposes a change that lowers test coverage, it has likely added behavior without adding verification. Coverage delta is a grader that runs without human judgment and flags changes that functional correctness alone will not catch.
Catch regressions, then name the cause
Pre-deploy gates catch what is in the diff. A code agent also degrades when nothing in your diff changed: the provider ships a model update, a dependency bumps, a tool starts returning different data. Tessary runs graders on every PR and watches the grader trend on production traffic, so both classes of cause get caught and named.
Connect your trace source
Send traces via Langfuse or Braintrust, or use the agent evals SDK for direct instrumentation. No re-instrumentation is required if your agent is already sending traces to either platform.
Configure code graders
Tessary drafts functional correctness, security pattern, diff quality, and test coverage delta graders from your agent's observed output; you correct them rather than write them from scratch. Each grader targets a distinct failure mode that text-quality evals cannot catch.
Gate deploys on grader results
Tessary reads the incoming diff, scores which graders the change is most likely to trip, and posts a pre-deploy trouble report on the PR. A GitHub Action blocks the merge until grader results are clean.
Trace failures to the cause
Commit-SHA lineage covers the changes you shipped: every grader result ties back to the PR behind it. When the trend drops and the diff is clean, Tessary traces the failing dimension back through the agent's chain to a cause outside the repo: a tool that started returning different data, an upstream agent whose output shifted, or a model update underneath you.
A trend drop with no deploy
Your test-coverage trend drops from a 3% failure rate to 11% on a Tuesday. No deploy that day, and the last diff is clean. Because Tessary reads the trend across grader verdicts rather than any single score, the jump registers as a real change even though the coverage grader is noisy on any one run. The trace goes back through the agent's chain to a package-registry tool that changed its response format the night before. No diff review would have surfaced it, because there was no diff.
0
lines changed in your repo when the trend broke
1
upstream tool whose response format changed, found by walking the chain back
Questions about code generation evals
Related pages
Pre-deploy agent failure prediction
The same attribution history, read forward: which failure families your next PR touches.
Tool-calling agent evals
Grading the tool calls a code agent makes, not just the code it writes.
Regression detection
How grader trends on production traffic catch degradation that no PR gate can see.
Grade code agents on what they produce.
Connect your Langfuse or Braintrust source, run the four code graders against live traffic, and when a trend drops, see which change caused it. The first run needs no credit card.