Copy-on-Write Scoring: Application-Specific Agent Evaluations

Joanna Roy, Sven HoelzelAIWILD @ ICML 2026 · OpenReview

TL;DR

Evaluating LLM agents in real-world software is a choice between two evils: generic benchmarks that don't reflect your specific app, or expensive, "drifting" replica environments. CoW (Copy-on-Write) Scoring offers a third way by using database-level isolation to let agents operate directly on production-like environments without actually touching the underlying data. This allows for granular, operation-by-operation scoring that identifies exactly where an agent’s logic or tool-use fails.

What Problem Does This Paper Address?

The authors tackle the "construct validity" gap in agent evaluation. Most current benchmarks (like WebArena or $\tau$-bench) are static and generic. However, a developer building an agent for a specific enterprise tool (like Salesforce or a custom project management platform) needs to know how that agent performs on their specific schema and workflows.

The traditional solution is to create a "sandbox" or replica of the application. But replicas are resource-heavy to maintain and quickly "drift" away from the current state of the live app. Furthermore, it is difficult to measure why an agent failed—did it fail the whole task, or just one specific database write? CoW Scoring aims to make evaluation cheap, safe, and highly localized.

Methods

The framework relies on a clever application of the Copy-on-Write (CoW) pattern at the database level (specifically PostgreSQL):

  1. Database Isolation: Instead of a single table, the system uses a Base Table (read-only production data), a Changes Table (where agent writes are stored), and a View that merges them. Using INSTEAD OF triggers, any agent write is intercepted and redirected to the Changes Table.
  2. Ground-Truth (GT) Comparison: A human (or a high-performing model) records the "perfect" sequence of actions for a workflow.
  3. Two-Dimensional Scoring:
    • Structural Score ($s^{struct}$): Did the agent change the right tables, rows, and columns?
  4. Content Score ($s^{content}$): Were the values written (strings, dates, IDs) correct?
  5. Granularity: The system provides Session-level scores (did they finish the job?) and Operation-level scores (how much did this specific tool call contribute to the goal?).

Datasets

The authors demonstrated the framework on Plane, an open-source project management platform.

  • Initial State: They seeded a Plane workspace with 3 projects, 7 members, and 63 work items.
  • Workflows: They created 20 ground-truth workflows (e.g., "Sprint Kickoff," "Security Incident Response") using Claude Opus 4.6 under human supervision.
  • Models Evaluated: GPT-5, GPT-4.1, Gemini 3.1 Pro, Gemini 3.1 Flash-Lite, and Gemini 2.5 Pro.

Key Insights and Ideas

  • The Vocabulary Mismatch: A major "aha" moment occurred when the authors realized why models like Gemini 2.5 Pro were failing. The prompts used the word "issue," but the application's tool surface used "work item." Even though the database still used issues internally, the agent couldn't bridge the terminology gap, leading it to give up or loop endlessly.
  • State vs. Sequence: CoW Scoring evaluates the final database state rather than the specific sequence of actions. This is crucial because there are often multiple valid "paths" to the same result in software.
  • Benign Hallucinations: The scoring revealed that some models "hallucinate" extra writes (e.g., updating labels or assignees not mentioned in the prompt). In a standard benchmark, this might look like a "pass" if the primary goal was met, but CoW Scoring flags these as "extra" rows, surfacing potential safety risks.
  • Operation-Level Utility: By calculating the "utility" of each step, developers can see exactly where an agent loses its way—for example, if an agent makes 15 "discovery" calls before finally finding the right tool, the framework quantifies that inefficiency.

Key Results

  • Model Rankings: Performance generally tracked with public benchmarks (Gemini 3.1 Pro and GPT-5 led the pack with scores >0.95).
  • The "Fix-it" Loop: After identifying the vocabulary mismatch (issue vs. work item), the authors updated the tool surface. This led to massive performance jumps: Gemini 2.5 Pro improved by 54% and GPT-4.1 by 47%.
  • Efficiency: Integrating CoW into Plane required only ~250 lines of core code, proving that this "live" evaluation method is lightweight compared to maintaining full environment replicas.

Limitations and Future Work

  • Manual Ground Truth: Currently, a human still needs to record the "perfect" session. The authors suggest future work could involve automated GT generation using MCTS (Monte Carlo Tree Search).
  • Write-Only Focus: The current scoring framework only evaluates write operations. It doesn't penalize an agent for making 100 unnecessary read calls, though the authors note that these patterns are often diagnostic of a struggling model.
  • Underspecified Prompts: If a user's prompt is vague, there might be multiple "correct" database states. The current scoring system might unfairly penalize an agent for choosing a valid path that differs from the single ground-truth recording.
  • Optimization Signal: The authors propose using these granular scores as a reward signal for RLHF (Reinforcement Learning from Human Feedback) or fine-tuning (e.g., via GRPO) to create more reliable agents.

Summary updated

Abstract

Trustworthy deployment of LLM-based agents in software systems requires evaluating how they perform on application-specific workflows, with enough granularity to localize where they succeed and fail. Yet existing agent evaluation mechanisms are limited: benchmarks have low construct validity for application-specific workflows and environments, and replica evaluation environments are expensive and prone to drift. We propose **Copy-on-Write (CoW) Scoring**, a framework that evaluates agent operations directly within application environments using a PostgreSQL-level Copy-on-Write mechanism to isolate agent writes. CoW Scoring produces session- and operation-level scores that highlight where agents' database write operations succeed and fail in a given application environment, enabling inexpensive evaluation and iteration on agent harnesses and tool surfaces. We demonstrate the framework on Plane, an open-source project-management platform, where analysis surfaced specific issues in the tool surface, and corresponding fixes produced measurable improvements on affected models. Python library: https://github.com/trail-ml/agent-cow-python
BibTeX
@inproceedings{roy2026copy,
  author = {Joanna Roy and Sven Hoelzel},
  title = {{Copy-on-Write Scoring: Application-Specific Agent Evaluations}},
  booktitle = {AIWILD @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=Ql8Vt7ovjD},
}
Figure