Manuscript Offprint

arXiv:2611.06506

Trace2Eval: Contextualized Evaluation of Coding Agents from Real-World Traces

Ji Shi, Lirong Jie, Lexiao Zou, Yaoming Zhu, Yifan Yang, Xuezhi Cao, Xunliang Cai, Miao Zhang

ABSTRACT

Coding agents are increasingly used in real-world workflows across diverse domains, motivating evaluation grounded in real user tasks. Existing benchmarks, however, largely rely on static public tasks with reference patches or hidden tests. Next-generation coding-agent benchmarks should therefore move beyond correctness on fixed tasks toward continually renewed evaluation of overall artifact quality in real user workflows. We propose Trace2Eval, a dynamically updatable pipeline that constructs benchmarks from real-world interaction trajectories. Trace2Eval employs a multi-agent reconstruction system to analyze the filtered trajectory, recover the original user query, restore the workspace files to their pre-interaction state, and rebuild a trajectory-equivalent execution environment. A candidate agent then executes the reconstructed query to produce an initial artifact. To evaluate these artifacts, the pipeline iteratively refines human rubrics through inter-annotator alignment, and calibrates judge agents against human assessments using source-code and runtime evidence. Guided by feedback from the Trace2Eval pipeline, models revise their initial artifacts, yielding a mean score gain of 10.05 percentage points across 19 model-harness configurations and a maximum of 19.28 percentage points for DeepSeek-V4-Pro with Claude Code, which supports rubric feedback as actionable guidance for artifact improvement.¹

1 INTRODUCTION

Powered by increasingly capable frontier models (OpenAI, 2026c; Anthropic, 2026), coding agents such as Codex (OpenAI, 2025) and Claude Code (Anthropic, 2025) can inspect and edit repositories, execute commands, and complete tasks in users' workspaces. Benchmarks evolved from evaluating isolated code to assessing changes within existing software projects. HumanEval and MBPP assessed function-level solutions through tests (Chen et al., 2021; Austin et al., 2021). APPS introduced competition-style problems (Hendrycks et al., 2021), while DS-1000 and BigCodeBench expanded coverage to library-rich tasks (Lai et al., 2022; Zhuo et al., 2024). LiveCodeBench added time-sliced problems to renew evaluation as models evolved (Jain et al., 2024). SWE-bench moved to repository-level issue resolution, where agents worked from repository snapshots and produced patches assessed against test outcomes (Jimenez et al., 2023).

Although this evolution brought evaluation closer to real development through more demanding repository-level tasks, important gaps remain between benchmark settings and real user workflows, raising several challenges for reliable evaluation. Public programming problems and repository issues make tasks and reference solutions increasingly retrievable, leaving static collections vulnerable to contamination and benchmark hacking (OpenAI, 2026a; Wang et al., 2026a; Oren et al., 2023). Time-sliced evaluation renewed task content (Jain et al., 2024), but freshness alone does not establish whether the selected activities match evolving user demand: competition problems and issue-to-patch repair cover only part of the work users delegate to coding agents. Even for similar requests, a benchmark's prescribed repository snapshot may differ from the user's initial files and dependencies, changing the work needed to complete the task. Correctness tests then assess behav-

¹Supporting materials are available at https://anonymous.4open.science/r/TRACE2EVAL-ICLR.

Figure

Figure 1: Overview of the Trace2Eval workflow. (1) Trace selection. Two-stage greedy selection aligns candidates with online request profiles, then combines rubric-based admission with distribution constraints. (2) Context recovery. For each retained request, recovery agents reconstruct its initial workspace and environment, using trajectory replay to assess and refine the recovered context. (3) Agent execution. Candidate coding agents execute the request in this context and produce an artifact. (4) Artifact evaluation. Judge agents assess the artifact using source and runtime evidence and human-grounded rubrics. Repeated scoring yields dimension-level and aggregate quality scores.

ior encoded in their checks, while a delivered application can implement tested operations yet omit the controls needed to use them. Such an artifact may satisfy component-level checks without completing the user's workflow. Connecting scores to real use therefore requires representative requests, their original context, and criteria for the quality of the delivered artifact.

These observations motivate contextualized evaluation, which assesses the requests people delegate to coding agents within their working environments, including the initial files, dependencies, and delivery requirements. A sustainable benchmark for this setting should satisfy four properties at once. (1) Authenticity. Tasks should come from real user traffic, preserving the original goals and context that distinguish practical workflows from curated problems. (2) Contamination resistance. Evaluation should avoid reliance on publicly retrievable solutions, assessing delivered artifacts against user requirements rather than an available reference patch. (3) Dynamism. A refreshable construction procedure should periodically re-sample user traffic and re-score artifacts as users' goals, workflows, and agent capabilities evolve. (4) Measurability. Explicit scoring criteria should translate user-perceived quality into measurable judgments, making scores interpretable even when the original request is underspecified. No existing benchmark meets all four requirements. Meeting these requirements calls for a reusable evaluation protocol that follows evolving user needs while maintaining consistent standards for artifact quality.

We propose Trace2Eval, a reusable evaluation protocol implemented as a dynamic pipeline that constructs coding-agent benchmarks from real-world traces (Figure 1). Given an anonymized interaction trace τ\tau between a user and a coding agent, Trace2Eval reconstructs a benchmark instance x=⟨q,W^0,E^0⟩x = \langle q, \widehat{W}_0, \widehat{E}_0 \rangle, where qq is the user task distilled from the trace, W^0\widehat{W}_0 is the recovered workspace before the recorded interaction, and E^0\widehat{E}_0 is a containerized approximation of the user's initial execution environment. A candidate agent runs from xx to produce an artifact yy, which judge agents assess against human-grounded rubrics. This accommodates open-ended tasks without requiring a unique reference patch. To further assess the rubric's validity, we translate diagnosed weaknesses into revision feedback and reassess the resulting artifacts. Verified repairs and score gains provide complementary evidence that the rubric captures meaningful aspects of user-perceived quality.

Our contributions are as follows:

  • A dynamic, trace-driven evaluation paradigm. We introduce evaluation-as-construction: rather than a static dataset, Trace2Eval is a periodically executable pipeline that re-samples real online traffic and reconstructs ⟨q,W^0,E^0⟩\langle q, \widehat{W}_0, \widehat{E}_0 \rangle instances, so the evaluation tracks both evolution of user intent and model capability.

  • Recovery of initial task contexts from incomplete traces. We develop a reconstruction workflow that combines observed file evidence, contextual completion, and dependency inference to

recover the initial workspace and environment. Bounded replay and refinement assess whether the recovered context supports the recorded tool behavior.

  • Rubric-based quantification of user experience. We use rubrics to translate user-perceived delivery quality into explicit, dimension-specific scoring criteria, together with a standardized procedure for constructing ground truth and aligning judge agents with human evaluations.

  • Evaluation and rubric-guided artifact improvement. To test whether rubric-based assessment provides useful improvement signals, we evaluate initial artifacts, turn diagnosed weaknesses into revision instructions, and reassess the revised artifacts. Total scores rise by 10.05 pp on average, with DeepSeek-V4-Pro gaining 19.28 pp under Claude Code (Table 1), providing complementary evidence for the practical value of our rubric and scoring framework.

References (28)