Quick summary

  • Production evidence gives a coding agent a concrete optimization target. The useful workflow connects a trace to a small patch, checks the result and leaves a reviewer enough context to reject a misleading improvement.
  • Generating more code is a weak proxy for engineering progress. A trace-backed change can be evaluated against both performance and application behavior.
  • Pick one expensive request path, capture its baseline, and ask the agent for a minimal patch with a reproducible validation plan.

What happened

The most useful output from a coding agent may be a change that removes work. A slow database path or an unexpectedly large bundle gives the agent a narrower problem than a request to improve the whole application.

In its trace-driven performance account, Sentry describes using runtime evidence to identify candidate fixes and then reviewing changes. These are results from one organization, not a promise that another codebase will obtain the same gains.

Evidence first, edit second

A practical brief should include the affected request, the code path and the baseline measurement. Ask the agent to explain why the expensive work happens before asking it to rewrite that work. If the explanation cannot be connected to the trace, the proposed edit is still a hypothesis.

A hypothetical repeated query illustrates the distinction. Reducing its count may help, but caching the result could change freshness or authorization behavior. The reviewer needs to see which semantics the patch preserves, not just a smaller number on a dashboard.

Keep the experiment small enough to reject

  1. Capture a representative baseline and identify the traffic or fixture used.
  2. Make one bounded change in a branch and retain an easy rollback.
  3. Run the relevant behavior checks before comparing performance.
  4. Compare under equivalent conditions and inspect regressions outside the happy path.

This is a suggested review workflow, not an experiment performed for this article. A result that cannot be reproduced should remain a lead rather than a merged optimization.

The same discipline applies in the browser

Next.js's agent-oriented bundle guidance connects optimization to module-graph evidence. Its specific workflow requires the version and bundler stated in the announcement; readers should check those prerequisites before copying commands into an older project.

Removing bytes is useful only if the page still behaves correctly. Check loading, error and navigation states, especially where a proposed import change shifts work between server and client.

The reviewable deliverable is a small patch with a baseline, explanation, validation result and rollback condition. That package gives a human a decision to make; a long generated diff usually gives them an investigation to start.

Sources

Why developers should care

Generating more code is a weak proxy for engineering progress. A trace-backed change can be evaluated against both performance and application behavior.

  1. 1Pick one expensive request path, capture its baseline, and ask the agent for a minimal patch with a reproducible validation plan.