Skip to content
Hrushiekesh Reddy Kanjula
Abstract diagnostic trace branching backwards through nodes to an amber root cause origin

Stop Applying Tape: RCCA in Agentic Debugging

AI agents find a fix that passes, not the reason the code broke, and manufacturing solved that discipline problem sixty years ago.

Published
June 2, 2026
Author
Hrushiekesh Reddy Kanjula
Read time
~4 min
Category
engineering

Agents fix the test. They rarely find out why it broke. That is a discipline problem, and manufacturing has had a fix for it for sixty years.

The last time a test failed in Assembly Hub, my Python dashboard for SMT line management, I did not touch the code for twenty minutes. I traced it. What changed recently? When did the regression start? At which component boundary did the data enter one state and leave in another? I wrote the fix only after I had that picture. This is RCCA.

What RCCA means

Root Cause Corrective Action comes from manufacturing quality control. Kaoru Ishikawa's fishbone diagrams came in the 1960s. Toyota added the 5 Whys. The automotive industry added the 8D framework. The loop is always the same. Define the problem precisely. Contain the damage. Trace the cause backward to its source. Then take a corrective action that targets that source, not the symptom.

The word that matters is corrective. A remedial action stops the bleeding. A corrective action keeps it from happening again. In a plant, the difference is measured in recalled batches. In software, it is the difference between closing a ticket and removing a class of failures.

It maps cleanly to code. What failed? When did it start? At which boundary did the invariant break? What condition caused it, and what change makes that condition impossible? Reproduce, isolate, hypothesize, verify, fix. In that order, every time.

RCCA four-phase workflow pipeline for agentic debugging

Why agents reach for the band-aid

Ask an AI coding agent to fix a failing test and watch what it does first. Almost always, it makes a targeted code change that turns the test green. It does not ask a question or trace anything.

This is not a capability problem. Agents can read stack traces, follow data flow and check git history. The cause is structural, and it comes from the context window.

Investigation is expensive. Reading source files, tracing a call stack upstream and checking recent commits all use tokens before any fix exists. In a multi-step workflow those tokens compound. Each inference call carries everything before it, so turn ten pays for the file read in turn one. Some 2026 research suggests teams underestimate it by several times. Teams model the cost per turn and miss the accumulation.

So the incentive points the wrong way. Studying the problem burns context faster than solving it. An agent that traces through five component boundaries has spent a lot of budget before it writes one change. The cheapest path is the first plausible fix.

Agents can do root cause analysis when they are constrained to it. Left to their defaults, they drift toward whatever makes the test pass. In a plant, an engineer who put tape on every nonconformance instead of writing a corrective action would be pulled off the floor. In software, we merge the PR.

Two debugging paths: band-aid quick fix vs. structured root cause resolution

What structured RCCA looks like

Nous Research's Hermes agent has a four-phase "Systematic Debugging" protocol built on an Iron Law: no fixes without root cause investigation first. The phases match manufacturing RCCA.

  1. Investigate: reproduce, check changes, trace data flow.
  2. Analyze patterns: find working comparisons and identify differences.
  3. Form and test a single hypothesis.
  4. Fix at the root cause, not the symptom.

The project's own benchmarks report a much higher first-time fix rate than trial and error, and far less time per bug.

Microsoft Research published AgentRx in March 2026. It synthesizes executable constraints from tool schemas and domain policies. Then it checks an agent's trajectory step by step to find the first unrecoverable error. On a set of manually annotated failed trajectories, the paper reports better failure localization and root-cause attribution than standard prompting baselines. Its nine-category failure taxonomy includes "Plan Adherence Failure", where the agent ignores its own planned steps, and "Misinterpretation of Tool Output". Both come from an agent that reached for a fix before it understood the failure.

In practice this is one prompt constraint: before suggesting any change, trace the data flow back to where the invariant breaks and report what you found.

Context window compounding cost: expanding rings from a fixed agent core

The standard does not depend on who debugs

A corrective action with no root cause attached is paperwork. You fill it in so the problem looks closed. The real problem stays in the system until the next stress event brings it back.

Software has never built this reflex as an institution. Agentic development works against it. The token economics favor quick fixes. Evaluation metrics reward passing tests, not understanding failures. And investigation costs money before you have written a line.

The questions stay the same. What happened? When did it happen? How do you keep it from reaching another process? Anything less is tape.


I build Assembly Hub, an SMT engineering dashboard that handles BOM validation, XY rotation analysis, and feeder placement telemetry for PCB assembly operations. I use the same debugging discipline there as everywhere else. See the project here.

Hire me