How AI Agents Turned a Bug into an Approved Decision

Coffee spilled from an AI Agent mug obscures the fractional digits of a timing interval on a diagram stamped APPROVED

I am building SWCraft around a principle: an AI agent can do the work, but the architect owns the engineering decision. Most of SWCraft’s code is itself written by agents under my review. That development process gave me an uncomfortable example of why the distinction matters.

An agent had written an implementation limitation into an already accepted architecture decision. A later agent treated that sentence as authority to preserve the limitation. When a test finally exposed the resulting value changes, the executing agent changed the comparison, and the agent coordinating the work accepted the deviation.

I caught it while reading the summary. The line that stopped me was about rounding periods.

SWCraft is an experimental AUTOSAR architecture-as-code environment. Its model lives in version-controlled YAML. Tools validate it and generate ARXML, the XML configuration format used by AUTOSAR. An LLM agent reads and changes the same model.

The export path rounded timing values to whole milliseconds. A runnable triggered every 1.25 ms was written as 1 ms. The model held the original value, and validation did not object. The generated file said something else.

The rounding was a bug. How the agents handled it was the more revealing failure.

The check failed. The agent explained why.

We were improving the importer. The planned acceptance check imported an ARXML file, generated ARXML from the model, imported that again, and compared the two models.

The models differed. The executing agent investigated and recorded the causes. Among them was the rounding of timing values.

The agent classified the differences as outside the current task’s scope. It replaced the comparison with one over successive generations of SWCraft’s own output, checking that the result remained stable. It documented the deviation and its measurements. A second agent, coordinating the session on my behalf, accepted it.

The report was detailed. It explained why the planned check failed and what the replacement proved. Reading it, I stopped at the timing change. Why were we rounding a period? Could the format not hold enough digits?

It could. ARXML could represent the original period. The writer rounded it before writing it to the file. There was no need to lose the precision.

The agent had found a defect, classified it as documented behaviour outside the current task, and continued. The coordinator accepted that classification. Neither brought the acceptability of changing a timing value back to me.

An earlier agent had supplied the justification

I followed the references in the report back through the repository.

SWCraft originally generated ARXML through a third-party library that represented timing in whole milliseconds. That explains where the rounding came from. It does not explain why we continued to accept it.

The architecture decision record (ADR) governing component exchange had been accepted without a timing exception. An agent added one while addressing review findings.

There was a local problem to solve: after export and re-import, definitions could appear to conflict because the writer had lost information. The agent changed the comparison to ignore those differences. In the ADR, it described the excluded information as fields that exported ARXML “structurally cannot carry,” including sub-millisecond timing precision.

That sentence confused what the implementation wrote with what the format could represent. It also changed the meaning of an accepted decision. The edit arrived among review fixes; there was no separate decision from me to accept rounded timing values.

Later, when we replaced the library with our own writer, the agent preserved the old output against golden files. The new ADR explicitly kept the rounding on the grounds that changing it would invalidate the earlier decision.

The reference looked responsible: respect the existing decision, preserve compatibility, avoid an unexplained change. But the earlier record contained an agent’s justification for an implementation workaround. The next agent treated it as my engineering decision.

That is how a library limitation acquired authority. By the time the acceptance test exposed it, an executor could cite documentation, and a coordinator could accept the explanation.

The agents changed what passing meant

The replacement test did prove something useful: repeated processing of SWCraft’s output produced a stable result.

But the original comparison also asked whether the imported values survived the first export. The replacement started after that export had already changed them. A consistently rounded period passes a stability check every time.

The agent’s measurements established why the check failed. They did not establish that the loss was acceptable. Yet the workflow moved from a failed preservation check to a passing stability check without asking me to make that trade-off.

I had delegated execution and coordination. Here the agents also decided which evidence was sufficient to accept the work. That exceeded what I intended to delegate.

The same distinction applies to the earlier ADR edit. The agent could propose a narrower comparison to unblock component exchange. It could explain the writer’s limitation. Deciding that this limitation belonged in the accepted contract required a separate decision.

More reviews inherited the same assumption

The golden files did not help. They were generated by the writer and checked that later versions reproduced its output. The existing fixtures used whole-millisecond periods, so the rounding did not change their values.

The documentation made the behaviour easier to accept. Reviewers encountered an explanation in an accepted ADR and a later ADR that cited it. Following those references led back to the same implementation assumption, rather than to a decision about whether losing precision was allowed.

This is what bothered me about the incident. The agents were investigating, measuring, recording deviations and respecting previous decisions. Those are practices I want in the development process. Here they carried an unapproved conclusion forward, and the additional review did not challenge its authority.

I own the process that allowed that to happen. A coordinating agent does not take that responsibility away from me. But its review also cannot stand in for my decision when the question is whether to accept a loss of meaning.

What I asked for after stopping the work

We compared the input ARXML with the generated output. The investigation found other losses too, including omissions that changed behaviour. The problem extended beyond rounding.

I decided how both the tool and the development workflow needed to change:

  • Keep the input-to-output comparison. It becomes a permanent test, with a closed list of allowed differences that requires my approval to change. Stable output remains useful evidence, but it does not establish preservation.
  • Preserve values through export. The writer must preserve values the model holds and write them wherever ARXML provides a place. Remaining unsupported content must be identified rather than silently disappearing.
  • Amend accepted ADRs visibly. The correction must record that the earlier claim about the format was wrong and withdraw the rounding exception through a dated, approved amendment.
  • Escalate changes to acceptance evidence. An agent can investigate a failed check and propose a replacement. If that replacement stops checking a property the plan required, the acceptance decision comes back to me.

Those decisions address the specific failure paths we found. They have not yet demonstrated that the next agent will recognize every similar boundary.

Keeping the architect in control includes development

In the opening article about SWCraft, I argued that an assistant may investigate, propose and recommend while the architect keeps control of the engineering decision. I was describing how an agent should work with an architecture model. This incident applied the same question to how we build the tool itself.

An agent solving a local problem changed an accepted record. Another agent inherited the record as authority. Later agents accepted weaker evidence because the loss was already explained there. Each step was plausible within the immediate task. Together, they let a bug survive as an apparently approved design choice.

The lesson changes what I look for in an agent’s report. Alongside whether its explanation is correct, I need to see whether it has changed a promise, excluded a failure, or treated an earlier agent’s statement as my decision. Those are engineering choices even when they arrive inside a documentation edit or a test fix.

The rounding took one line of code. What kept it alive was a chain of agents treating that line’s justification as settled. I stopped the chain by questioning one sentence in a summary. The next version of the workflow needs to bring that decision to me before I have to spot it.