Scale Signal

Functionally correct agent patches often fail to improve the system bottleneck

October 21, 2026 · Zhang et al.
SelectionContextExecutionLearningObservabilityVerification
Evidence boundary: The study reports 1,755 baseline runs over 65 controlled instances, seven microservice systems, nine anti-patterns, three scaffolds, and three models. This provides repeated execution-grounded evidence, but the tasks use deliberately injected anti-patterns and fixed workloads. The profiling augmentation is exploratory and has only one run per instance rather than the three baseline repetitions.
Evidence record

Source → Observed → Interpretation → Model implication

SOURCE

Benchmarking Coding Agents for System-Level Performance Optimization

View source →
OBSERVED

The authors construct 65 optimization instances across seven open-source microservice systems and nine performance anti-patterns. Each instance has a containerized execution environment, functional tests, and a mixed-workload performance evaluation.

Rather than relying on naturally occurring fixes, the benchmark injects empirically grounded anti-patterns into working systems, verifies that functionality remains intact, and measures the resulting end-to-end degradation against the strongest original version.

The evaluated anti-patterns include cross-service problems such as chatty communication, nano-service decomposition, hub topologies, shared-database serialization, and cache misuse.

The evaluation crosses three coding-agent scaffolds—OpenCode, OpenHands, and Claude Code—with three base models—GLM-5.2, Qwen3.7-Max, and DeepSeek-V4-Pro—for nine configurations.

Each baseline configuration is run three times on every instance, producing 1,755 runs. Agents receive the same optimization objective, permitted-change scope, functional correctness gates, and fairness constraints.

Scores measure how much of the injected end-to-end performance degradation a patch recovers while retaining functionality and respecting constraints. Adding hardware, disabling tracing, or weakening transaction safety does not count as a valid optimization.

Average recovery ranges from 23.4% for Claude Code with DeepSeek-V4-Pro to 42.0% for OpenHands with GLM-5.2. The mean across configurations is 34.8%, and 16.7% of runs fully recover the injected degradation.

The model choice has a statistically significant effect in the authors' analysis: GLM-5.2 exceeds DeepSeek-V4-Pro by 12.7 score points with a reported p-value of 0.001. Differences among the three scaffolds are not statistically significant at the reported thresholds.

Among 982 zero-score trials, 48.7% produce no performance gain despite satisfying functional and fairness constraints, 20.5% fail functional correctness, 15.3% violate fairness constraints, and 11.3% fail to build.

Failure modes vary by system. Robot Shop and Pitstop zero-score trials are dominated by no-gain outcomes, while PetClinic and Social Network produce more functional-correctness failures.

The authors identify system-level bottleneck localization as the central challenge: a locally plausible code change can compile and preserve behavior without changing the service interaction that determines end-to-end latency.

In an exploratory augmentation, a profiling tool gives agents workload execution, performance profiles, and distributed traces. Claude Code with Qwen3.7-Max scores 47.7 in one run across the 65 instances, compared with a three-run baseline mean of 39.4 and the best baseline configuration's 42.0.

The authors release the benchmark environments, instances, workload scripts, agent integrations, and evaluation data.

INTERPRETATION

MicroPerf-Bench refines Selection by separating several outcomes that a function-level or repository-level benchmark can collapse into one notion of success. A patch may build, pass functional checks, respect operational constraints, and still have zero fitness for the stated optimization goal because it changes the wrong component or misses an interaction-level bottleneck. End-to-end workload measurement is therefore part of Verification, while profiles and distributed traces are Context that can guide agents toward the causally relevant part of the system. Model, scaffold, target system, and observability configuration are selectable variants, but useful optimization must be judged by verified system effects rather than plausible edits.

MODEL IMPLICATION

REFINES. Refines C02 by showing that functional correctness and constraint compliance are necessary but insufficient fitness criteria for performance engineering. The most common zero-score result is a valid change with no end-to-end gain. Selection must therefore include the intended system-level outcome and the information needed to localize its bottleneck. The exploratory profiling result suggests observability may improve this fitness, but its single-run design is not strong enough to establish the size or reliability of the effect.

Epistemic boundaries

What this does not establish

OPEN QUESTION

Which runtime signals and system representations let coding agents reliably localize cross-service bottlenecks and verify improvements across workloads without exploiting the measurement setup or weakening operational guarantees?