Closing the Loop: Continuous Evaluation and Improvement of AI Coding Agents at Scale

Replit2026
View original source

Replit faced the challenge of evaluating and improving their AI coding agent (Replit Agent) in a production environment where users build complete applications from natural language descriptions rather than working with existing codebases. Traditional coding benchmarks couldn't measure what mattered most to users—whether the finished app actually worked. Replit built a comprehensive evaluation and improvement system consisting of three pillars: ViBench (a custom benchmark for end-to-end app building evaluation), production A/B testing to measure real user impact, and Telescope (a trace clustering system to identify failure patterns). These components feed into a self-improvement loop where agents analyze production failures, propose fixes, run evaluations, and present evidence to engineers for shipping decisions. The system enabled Replit to catch regressions before release, understand production behavior changes, discover hidden failure patterns, and rapidly iterate on agent improvements while maintaining engineering control over what ships to production.

Industry

Tech

Technologies

Overview

Replit’s case study describes a sophisticated LLMOps infrastructure for continuously evaluating and improving their AI coding agent, Replit Agent, in production. The challenge Replit faced is unique in the LLMOps landscape: their users are “vibe coders” who describe applications in natural language and expect a working app without providing scaffolding, tests, or framework choices. This differs fundamentally from traditional coding assistance where developers work within existing codebases, and it demands a fundamentally different evaluation approach.

The core insight driving Replit’s approach is that evaluation cannot be a one-time gate before shipping; instead, it must become an integral part of a continuous improvement loop. Traditional evaluation approaches—running a benchmark, getting a score, making a shipping decision—break down when models, prompts, tools, and product surfaces all change rapidly. Replit recognized that a single score can inform a specific shipping decision but cannot answer whether the agent is getting better for users week over week.

The Three-Pillar Measurement Architecture

Replit’s solution involves what they call a “Swiss cheese model” of evaluation, where multiple layers each have limitations but together provide comprehensive coverage. The system rests on three pillars: offline benchmarks, online A/B testing, and production trace analysis.

ViBench: Custom Benchmark for End-to-End App Building

The first pillar is ViBench, Replit’s public benchmark specifically designed for “vibe coding.” Existing agentic coding benchmarks like SWE-bench and Terminal-Bench evaluate code in constrained, repeatable environments with fixed repositories, test suites, and function signatures. These benchmarks measure whether code satisfies local constraints but miss the critical signal for vibe coding: does the finished application actually do what the user asked?

ViBench addresses this functional correctness gap by starting with plain-English product requirements documents (PRDs) drawn from anonymized Replit production traces. The agent receives only the PRD and must build a running application from scratch, choosing the stack, schema, routes, components, and interaction flows independently. Each task pairs the PRD with natural-language test plans describing feature-level interactions and assertions the app must satisfy.

The evaluation challenge is significant: because the agent picks the entire structure, traditional fixed-locator testing approaches don’t work. Replit’s solution uses an “eval agent” built on Playwright that progressively discovers how the app is built and interacts with it step by step. This approach draws on Replit’s earlier research on automated self-testing and operates in a notebook environment, allowing it to handle complex features like offline simulation, file manipulation, and multi-tenancy without knowing the app’s structure a priori.

From an infrastructure perspective, ViBench’s execution at scale requires substantial compute orchestration. Replit leverages their production infrastructure to spin up isolated, well-resourced sandboxes for building apps and running evaluations. By forking these sandboxes, they run much of the evaluation in parallel without cross-evaluation contamination. This infrastructure investment is critical—without it, comprehensive evaluation at this scale would be impractical.

ViBench’s design is notably flexible. Beyond evaluating apps built from scratch, the same natural-language PRD and test plan foundation adapts to various scenarios. To evaluate how the agent works within existing apps (closer to mid-trajectory workloads), they start with an existing codebase and measure feature extension quality. The codebase can come from reference implementations (“Vibe-to-ref”) or from apps the agent previously built (“Vibe-on-Vibe”). When shipping new product surfaces like Agent 4’s parallel-and-merge and subagent decompositions, they can quickly derive new evaluation problems for novel interaction patterns.

Early ViBench results yielded important insights that wouldn’t have emerged from traditional benchmarks. First, frontier coding-benchmark scores don’t reliably transfer to full app building, particularly for open-weight models. Second, most models degrade when extending their own code—errors compound over time. These findings shaped Replit’s optimization target: not just writing code that passes tests, but building apps that survive subsequent user requests.

A/B Testing: Keeping Honest with Production Behavior

The second pillar addresses a fundamental truth in LLMOps: offline evaluation, no matter how comprehensive, cannot fully predict production behavior. Replit has observed enough agent updates that looked promising in controlled settings but regressed real user behavior to know that production needs its own measurement layer.

Replit A/B tests most agent-affecting updates, including prompts, tools, harness revisions, model swaps, and larger behavior changes. Multiple experiments often run concurrently, with clear attribution to avoid hiding interaction effects. The tests surface user behavior, sentiment, and success metrics: continuation rates, cost behavior, sentiment changes, and whether users actually ship something.

However, A/B testing introduces interpretability challenges that are particularly acute for agentic systems. If run duration increases, did the agent do more useful work or get stuck in loops? If cost decreases, did efficiency improve or did the agent silently stop doing something valuable? If sentiment drops, which use cases regressed, which failure modes are new, and which users gave up? Aggregate metrics alone cannot answer these questions, creating the need for the third pillar.

Telescope: Production Trace Clustering and Analysis

Telescope is Replit’s system for organizing production traces into actionable insights. At scale, no engineer can read every trace, so Telescope clusters repeated patterns into issue groups that both engineers and agents can act on. The goal is not just counting failures but discovering patterns hidden in production behavior.

The technical approach uses short, evidence-grounded facets inspired by Clio (privacy-preserving insights research). For each trace, Telescope reconstructs the session from user messages, agent replies, tool calls, errors, metadata, and other context. It then summarizes what went wrong, embeds those summaries, and uses density-based clustering (HDBSCAN) to form emergent issue groups.

The faceted representation makes investigation faster. When support reports point to broad issues like “port failures,” engineers and agents can search the compact layer first, explore relevant facets, and drill into representative sessions with full logs and observability context. In aggregate, this structure transforms scattered failures into product questions: which workflows dominate, which get abandoned, what breaks repeatedly, and whether mitigations are shrinking the intended failure clusters.

Replit credits their collaborators at Braintrust for the underlying architecture, specifically the Topics system for trace organization. This partnership highlights an important LLMOps pattern: building comprehensive observability for agent systems often requires specialized infrastructure that goes beyond traditional logging and monitoring.

The Self-Improvement Loop: From Evidence to Agent Changes

The three measurement pillars feed into what Replit calls a self-improvement loop, embodying the principle that if agents are useful for building software, they should also be useful for improving themselves. Each optimization pass starts by reading production logs, trace clusters, and recent failures to form hypotheses worth pursuing. The system then builds a candidate fix, opens a draft pull request with reasoning attached, measures the result against ViBench, A/B results, trajectory data, and recent baselines, and recommends whether to ship, iterate, or drop the change.

Critically, shipping does not become automatic. The loop prepares evidence and first-pass implementations, but engineers review results and own launch decisions. Each run records what it tried and what happened, including failures. This record improves future runs by reusing what worked, avoiding known dead ends, and proposing changes that generalize.

A concrete example illustrates the loop in action. Telescope surfaced a small but growing cluster where environment setup was silently degrading across a long tail of cold-start scenarios. These sessions weren’t obvious from aggregate metrics, but the cluster revealed a pattern. The loop read affected trajectories, proposed a patch, added a regression test, and ran the candidate against ViBench to confirm the happy path didn’t regress. Engineers reviewed the evidence, approved the change, and pushed it to production the same day. After shipping, sentiment recovered and affected users were unblocked.

This workflow represents Replit’s target operating model: finding real failure patterns, connecting them to affected users, proposing appropriate fixes, and bringing back sufficient evidence for informed shipping decisions.

The Human-in-the-Loop: Where Engineering Judgment Remains Critical

Despite extensive automation, Replit maintains clear boundaries around where human judgment is essential. Much can run autonomously—clustering failures, proposing hypotheses, building candidates, running evals, assembling evidence—but humans set direction and gate most exits.

Hypothesis selection exemplifies this balance. A system can surface thousands of failures, but humans decide which questions deserve the loop’s overnight compute budget. Not every cluster is equally important, and not every regression points to the right product problem. Implementation architecture decisions—whether to smooth a problematic workflow, change agent behavior, or redesign the surface—require engineering and product judgment that automated systems cannot provide.

Evaluation curation is highlighted as particularly important and non-administrative work. It shapes the objective function the agent optimizes toward. If the evaluation rewards the wrong behavior, the optimization loop will faithfully optimize toward the wrong thing. This is a common failure mode in LLMOps: misaligned evaluation metrics that drive systems toward local optima that diverge from actual user value.

Launch approval similarly requires human ownership. Shipping an agent change isn’t just reading a number; it means understanding the blast radius, deciding whether risks are acceptable, and owning the rollout. This preserves accountability while allowing the loop to do more search, measurement, and synthesis.

Critical Assessment and LLMOps Implications

Replit’s approach represents a mature LLMOps practice that acknowledges several important realities often underemphasized in the field:

The evaluation gap for generative agents: Traditional benchmarks designed for code completion or constrained problem-solving don’t transfer well to open-ended agent tasks. ViBench addresses this by evaluating the actual artifact users care about—the working application—rather than intermediate code quality metrics. This is a significant contribution to the field, though organizations adopting similar approaches should be aware of the infrastructure investment required to run comprehensive end-to-end evaluations at scale.

The necessity of multi-layer measurement: Replit’s explicit acknowledgment that offline evaluation, A/B testing, and trace analysis each have “holes” but together provide coverage is refreshingly honest. Many LLMOps case studies present single measurement approaches as sufficient. The Swiss cheese model better reflects the reality that production agent behavior is complex and requires multiple perspectives to understand.

The compounding error problem: The insight that most models degrade when extending their own code is particularly important for iterative agent systems. This suggests that evaluation should specifically test multi-turn scenarios and code evolution, not just single-shot generation. It also implies that production monitoring should watch for error accumulation over agent sessions.

The interpretability challenge of aggregate metrics: Replit’s observation that A/B test results are “hard to interpret” for agent systems is crucial. Standard product metrics like session duration or cost have ambiguous meanings when applied to autonomous agents. Did higher cost mean more value delivered or wasteful tool use? This ambiguity necessitates qualitative trace analysis alongside quantitative metrics, significantly increasing the complexity of production monitoring.

The automation boundary: Replit’s clear delineation of what should be automated versus what requires human judgment provides a useful framework for other organizations. The self-improvement loop handles search and evidence gathering, but humans own hypothesis prioritization, architecture decisions, evaluation design, and launch approval. This balance preserves velocity while maintaining control.

However, several aspects warrant careful consideration:

Circular evaluation risks: When eval agents use similar capabilities to the agents being evaluated, there’s risk of circular validation—both failing in the same ways or both succeeding in ways that don’t reflect user needs. Replit mitigates this with natural-language test plans grounded in PRDs, but organizations adopting similar approaches should consider how to ensure eval agents remain independent validators.

Scale requirements: The infrastructure investment required for this approach is substantial. Parallel sandboxed execution, comprehensive trace storage and analysis, continuous A/B testing, and the self-improvement loop all require significant engineering resources. Smaller organizations may struggle to implement the full system, though individual components could provide value.

The product-specific nature of ViBench: While ViBench is valuable for vibe coding evaluation, its design is tightly coupled to Replit’s specific product offering. Other organizations would need to invest in designing custom benchmarks for their agent applications, a non-trivial undertaking that requires deep understanding of what users actually value.

The lag between detection and improvement: Even with automated improvement loops, there’s still a lag between when failures occur in production and when fixes ship. Users experiencing failures during this window may lose trust, as Replit notes in their broader blog. The system improves but doesn’t eliminate this fundamental challenge.

Broader LLMOps Lessons

Replit’s case study offers several transferable lessons for production LLM systems:

Evaluation must match user value: The functional correctness gap between traditional benchmarks and what users care about is likely present in many LLM applications. Organizations should critically examine whether their evaluation measures what users actually value or merely what’s easy to measure.

Production is the ultimate test: Offline evaluation, no matter how comprehensive, misses real user behavior at scale. Production monitoring, A/B testing, and trace analysis aren’t optional; they’re necessary to understand whether improvements are real.

Failure clustering enables systematic improvement: Random failures are noise; clustered failures are signals pointing to systematic issues. Investing in trace clustering infrastructure helps transform debugging from reactive firefighting to proactive pattern identification.

Self-improvement loops change the velocity equation: Using agents to improve agents can accelerate iteration, but only if humans remain in the loop for critical decisions. The key is automating search and synthesis while preserving human judgment on direction and shipping.

Infrastructure investment enables evaluation investment: ViBench’s comprehensive evaluation is only practical because of Replit’s sandboxing and parallel execution infrastructure. Organizations should consider evaluation requirements when designing their LLM serving infrastructure, not as an afterthought.

This case study represents a significant maturity level in LLMOps practice, moving beyond simple deployment to sophisticated continuous improvement systems. However, the resource requirements and complexity suggest this approach is most suitable for organizations with substantial engineering capacity and where agent reliability directly impacts core business value.

More Like This

Extreme Harness Engineering: Building Production Systems with Zero Human-Written Code

OpenAI2026

OpenAI's Frontier Product Exploration team conducted a five-month experiment building an internal Electron application with zero lines of human-written code, generating over one million lines of code across thousands of pull requests. The team developed "harness engineering" principles and Symphony, an Elixir-based orchestration system, to manage multiple coding agents at scale. By removing humans from the code authorship loop and focusing on building infrastructure, observability, and context for agents to operate autonomously, the team achieved 5-10 PRs per engineer per day with agents handling the full PR lifecycle including review, merge conflict resolution, and deployment, ultimately demonstrating that software can be built and maintained entirely by AI agents when proper systems and guardrails are in place.

code_generationpocstructured_output+28

Agentic AI Copilot for Insurance Underwriting with Multi-Tool Integration

Snorkel2025

Snorkel developed a specialized benchmark dataset for evaluating AI agents in insurance underwriting, leveraging their expert network of Chartered Property and Casualty Underwriters (CPCUs). The benchmark simulates an AI copilot that assists junior underwriters by reasoning over proprietary knowledge, using multiple tools including databases and underwriting guidelines, and engaging in multi-turn conversations. The evaluation revealed significant performance variations across frontier models (single digits to ~80% accuracy), with notable error modes including tool use failures (36% of conversations) and hallucinations from pretrained domain knowledge, particularly from OpenAI models which hallucinated non-existent insurance products 15-45% of the time.

healthcarefraud_detectioncustomer_support+90

Building a Software Factory with AI Agents at Scale

Cursor2026

Cursor, a developer tool company, shares their journey of building what they call a "software factory" where AI agents handle increasingly autonomous software development tasks. The presentation outlines how they progressed through levels of autonomy from basic autocomplete to spawning hundreds of agents working asynchronously across their codebase. Their solution involves establishing guardrails through rules that emerge dynamically, creating verifiable systems with automated testing, and building skills and integrations that enable agents to work independently. Results include engineers managing fleets of agents rather than writing code directly, with some features being developed entirely by agents from feature flagging through testing to deployment, though significant work remains in observability, orchestration, and preventing agents from going off-track.

code_generationcode_interpretationchatbot+37