A faster patch can leave the failure unexplained
Suppose a search box occasionally displays results for an older query. Someone searches for "tea", then "teapot", and the list sometimes ends up showing tea results under the newer query.
A coding agent finds a response handler that updates the list without checking whether its request is still current. It proposes ignoring responses from older requests. That is a reasonable change to consider. It might even fix the bug.
I would still want to know whether an older response actually overwrote a newer one. A cache could have returned the wrong payload for the latest request. The server could have received the wrong query. Those failures can look much the same on the screen, but they need different fixes.
In this hypothetical, finding a weakness in the response handler gives us a possible explanation. We have not yet connected it to the failure someone saw.
What the code permits is not what happened
Source inspection can show that the application allows an older response to update the list. That is useful even before we reproduce anything: we have found behavior worth examining.
A diagnosis makes a narrower claim. It says that, in the failing execution, the older request completed after the newer one and its results replaced the correct list. To support that claim, we need evidence about those requests and the updates they caused.
A proposed fix adds another question. If we prevent that update, does the unwanted behavior disappear under the conditions that produced it, without breaking behavior we still need?
These are separate jobs. A build can pass without exercising overlapping requests. A few manual searches can appear correct because the responses happened to arrive in a convenient order. Neither result establishes the sequence behind the intermittent failure.
Generating a change is also a poor proxy for delivery. Undo commissioned Coleman Parkes to survey 300 senior engineering leaders at organizations with at least $250 million in revenue, delivering mission-critical software on complex codebases. In that sample, 79% said their release cycles were no faster despite being able to produce code much faster. The research was sponsored by a debugging vendor, and the respondents predominantly worked with C/C++.
That is a report of enterprise experience, not a measurement of every team's productivity. It does not establish that AI caused the unchanged release cycles, or that debugging explains the delay in a particular team. It does give us a reason to measure the work between producing a change and being willing to ship it.
Keep the failing sequence before changing it
With an intermittent bug, successive patches can make investigation harder. A refactor changes the handler. Extra instrumentation changes timing. The next attempt behaves differently, and the original sequence becomes harder to reconstruct.
Before making more changes to the search UI, preserve the relevant revision and enough of the failing sequence to investigate it. Here, that means request identifiers, a safe way to distinguish the queries, response arrival order, and the request whose results each state update commits. A screenshot records the visible symptom; it usually cannot tell us which response produced it.
Logs and traces are runtime evidence already. Their limitation is that they contain selected observations. A trace that shows two successful HTTP responses may omit the UI update that chose between them. Adding more log lines helps only if those lines capture the missing relationship.
The handler tells us an old response can commit. The event sequence can tell us whether it did. If the latest response already contains the wrong results, we should investigate its payload and origin rather than assume a response-ordering guard will repair the data.
Preserving evidence does not mean saving everything indiscriminately. Use synthetic queries where possible, remove credentials and private content, and keep only the fields needed to understand the sequence. Sanitization should retain the ordering and associations we are trying to inspect. A diagnostic bundle is not a reason to send customer queries or authorization headers to a model.
In environments that support it, execution recording and replay may offer another way to inspect a failure. The same question applies to any recording: does it capture the part of this system that could explain the symptom? The browser example here does not assume any particular recording product or coverage.
Give the explanation a test it can fail
Before asking the agent to implement the guard, I would ask it to make the hypothesis explicit: an earlier request commits after a later request and replaces its results.
That claim suggests a controlled test. Use distinct synthetic results for the two queries, then arrange this sequence:
- Start the "tea" request and leave it unresolved.
- Start the "teapot" request, resolve it, and check that the list displays its results.
- Resolve the older "tea" request and check that the list still displays the "teapot" results.
On the unmodified code, this test should expose the suspected overwrite if the tested path contains the flaw. If it passes already, the agent needs to explain why its test did not reproduce the proposed mechanism. Perhaps the test bypasses the handler, perhaps an existing guard works, or perhaps the hypothesis is wrong.
After the change, run the same test. A failure before the patch and a pass afterwards support a specific claim: the change prevents that overwrite through the path and ordering the test exercises. They do not, by themselves, prove that the original production failure had that cause.
The preserved sequence is what connects the controlled test to the reported incident. If it shows the older response replacing the newer one, the explanation gains support. If it shows the latest request arriving with stale data, the test may identify a genuine weakness while leaving the reported bug unresolved.
The ordinary completion order and a failed request deserve tests too: the guard should not leave the interface stuck loading or discard the result we intended to keep. Those checks still do not cover every cancellation, cache state or production timing.
An agent can help investigate by proposing competing explanations and designing tests that distinguish them. That is useful work even when a test contradicts its first suggestion.
Measure the investigation, too
For one representative bug, record the time spent reproducing it and establishing a cause separately from the time spent writing the patch. Keep review delays and infrastructure waits separate as well. Otherwise, a faster implementation can disappear inside an unchanged delivery interval, and nobody can tell which part still needs work.
Watch whether the issue returns or gets reopened. A quick patch followed by another investigation is a different outcome from a fix that holds up. Conversely, if the team already diagnoses failures quickly and mostly waits for release approval, better debugging will not remove that wait.
Keep the failing sequence and the reproduction test next to the search fix, with a note about anything still unexplained. The next person should be able to see which claim the patch supports without reconstructing the whole investigation.
I would be comfortable saying that the guard prevents the tested stale-response overwrite. I would call the reported bug diagnosed only when the evidence connects that mechanism to the failure. If the connection is still missing, I would leave that question open rather than let a plausible patch close it.
Source notes
- Overcoming the limitations of coding agents in complex software systems, Undo, 2026. Coleman Parkes survey commissioned by Undo, with July–August fieldwork and a 300-leader enterprise sample. Basis for the reported release-cycle finding and its scope, not a causal productivity experiment. The landing-page text and methodology were available through search; the downloadable report was not retrieved.
- Why AI Agents Struggle with Complex Software Failures: A conversation with Greg Law, ODBMS Industry Watch, Sept. 30, 2026. Technical discussion of source inspection, selective runtime observations and causal hypotheses. Law is associated with Undo, so this is not independent corroboration of its survey or recording-product claims.
- Why coding agents aren't delivering the promised gains for engineering – yet, TechRadar Pro. Current discussion context, not an additional independent study. The search-UI investigation is an original hypothetical; no browser test, recording experiment or performance benchmark was executed for this article.
Comments
Post a Comment