r/AISystemsEngineering • • 7h ago

SRE agent: alert → AI investigation → human-reviewed fix MR on GitLab. How to orchestrate.

Thumbnail reddit.com
3 Upvotes

r/AISystemsEngineering • • 9h ago

Every agent is a new hire. Except mine.

Thumbnail
reddit.com
2 Upvotes

r/AISystemsEngineering • • 12h ago

The trust problem to sub-agents

Thumbnail reddit.com
1 Upvotes

r/AISystemsEngineering • • 16h ago

AI Audit Evidence, Part 11: Written Down Is Not the Same as Enforced

Thumbnail
reddit.com
1 Upvotes

r/AISystemsEngineering • • 19h ago

Why running an AI agent test once is mathematically meaningless

1 Upvotes

If you test traditional software once and the assertion passes, it passes. If you test an AI agent once and it passes, you have learned almost nothing.

On a 1/1 green test run, the 95% Wilson confidence lower bound is just 20.7%. A workflow that fails 30% of the time in production still passes on the first try 7 times out of 10.

And in multi-step agents, a single "green" output often hides real production bugs:

  1. Two orders, one intent: A write tool times out on the client after the server already processed it. The agent sees no error, retries, and silently creates a duplicate order.
  2. 200 OK with an empty [] payload: A lookup tool swallows an upstream error and returns []. The agent treats "no error" as "done" and writes a confident answer built on nothing.
  3. Activity without progress: An agent loops through tool calls for hours without changing the actual goal state—every step counter says it's working while burning tokens.
  4. Silent reasoning exhaustion: A reasoning model burns its entire token budget thinking and returns empty text (finish_reason: "length"), looking like a provider outage.

When teams ship agents with tool calls, a single-run final-text check misses all four:

  • Blocker gates (write idempotency + read-back, explicit ok | empty | error | unknown tool statuses, Zod schemas) need 100% deterministic passes on every PR.
  • Capability gates need multi-run sampling (N ≥ 3 to 5) gated on the 95% Wilson lower bound, not a lucky 1/1 pass.

How is your team currently deciding whether an agent change is "good enough" to deploy?

Are you asserting on the tool trajectory and running multi-sample evals in CI, or still relying on local vibe checks?

Thanks in advance for any hints and best practices. Much appreciated.


r/AISystemsEngineering • • 22h ago

How would you test whether an AI learned the right lesson from a mistake?

Thumbnail reddit.com
1 Upvotes

I’m working on this question at Ontal, and the part I keep getting stuck on is that a system can fix its mistake for a surprisingly bad reason.
Say an AI books a piece of shared equipment because the calendar shows it’s free. It turns out there’s a maintenance hold on a separate list. Next time, it checks the list first and catches the hold. That looks promising. But “check every list every time” would get that one right too.
I’d like to start two copies of the system at the same point, let one experience the booking mistake, then give both a few unfamiliar cases. In one, the calendar leaves out holds. In another, the calendar already includes them. I’d want to see whether the earlier mistake helps the system figure out when that extra check is worth doing.
Someday I’d love to open-source a small version of this so other people can change the cases and try to break the test. If you could add one case that would expose a system using a shortcut, what would you put in it?


r/AISystemsEngineering • • 22h ago

Does explicitly preparing an AI coding agent's context before implementation improve its performance?

Thumbnail reddit.com
1 Upvotes

r/AISystemsEngineering • • 15h ago

When a Record Has No Word for "Unknown", an Empty Value Will Say "Everything Is Fine"

0 Upvotes

Something happened recently that I want to start with.

We fixed a defect: four different kinds of "nothing" were collapsed into a single switch, so the readings couldn't tell "by design" from "broken". Then we moved on to the next thing. The day after that new field landed, a reader pointed at it in a comment, named the same defect again, and wrote down what to do about it.

This isn't the same bug coming back. It's the same class of bug growing back in the place where we thought we had learned it.

This piece is about one thing: when a record has no slot for "unknown", "unknown" reads as "known" — and specifically as the strongest statement that field can make.

1. Four kinds of "nothing", one switch

Background first.

When the AI writes a record, we keep a snapshot of what it looked like before and after. Revocation needs to know where to go back to.

The trouble was in "we couldn't capture the after-snapshot". There are at least four reasons that happens:

  • no captor was wired at all — an optional piece by design
  • the entity didn't resolve, and the fallback data was empty too
  • the entity resolved but the row is gone — an anomaly
  • the capture threw — an error

The first two are what the design chose. The last two are something went wrong.

We had one boolean field for all of it. Four reasons, one switch.

So when someone asked "why are these snapshots empty", there was no answer: you couldn't tell by design from broken. The worse part is the direction. That switch defaults to false, which reads as "the snapshot is fine".

"Nothing" is not one value, it is four different values. Collapsing them into one boolean lets the strongest reading answer for all of them.

We split it into four causes, each stored and readable on its own. While splitting it we also found that two of the four names we had first proposed didn't belong in that class at all. One lives on a different path (the table consulted before the write), and the other is a mechanism rather than a cause. So the four that landed are not the four we started with.

2. The next day, in the field we had just written

With that fixed, we moved to the next thing: before a revoke, record which members this attempt intends to compare.

The promise matters here. Before the revoke it's a promise; after it, an actual. Only the difference between them lets you say "a member I promised to compare turned out not to be comparable". The implementation put a column on the group's root row to hold that difference. If this attempt found no difference, the column is written empty.

That looked fine. Then someone wrote this in a comment:

A per-reason column sits on the member row and gets rewritten by whichever revoke attempt ran last, so a second attempt erases the first attempt's broken promise. Append-only keeps them apart.

He's right, and it's slightly worse than he put it.

When the attempt finds no difference, that column is written empty. And that empty means two things at once: "the last comparison found no difference", and "this row was never revoked at all". So:

  • the first revoke found "promised, but couldn't compare" — recorded
  • the second revoke went fine — and wrote over the first attempt's record with an empty value
  • reading that row later: empty. You can't tell "there was once a broken promise", and you can't tell "it was cleared"

A retry that succeeds erases the earlier attempt's failure record.

To be fair to ourselves: that clearing is deliberate. The reasoning is in the design record from when it landed — a stale difference shouldn't outlive the comparison that produced it. The reasoning isn't wrong. What's wrong is that the empty value had no second meaning available.

Then we changed it to what he described.

One row per attempt that reached the comparison, instead of one shared cell. The two readings are separated where they are written: this row is either "a difference was found" or "checked, and there was none". So:

  • a later attempt no longer erases an earlier one — it writes its own row
  • an empty history (no attempt ever reached the comparison) and "checked, clean" are no longer the same reading
  • the old rule — a stale difference shouldn't outlive the comparison that produced it — was withdrawn. It was wrong about using one cell for two things, not about keeping old records

The old column wasn't dropped. It's still read, as a legacy entry marked "written at a time we can't know". Deleting it would erase exactly the evidence this whole argument was about.

3. One place in the same system got it right

Both of the above are "no slot for unknown". But one place in the same system does have a slot.

When a revoke goes out to an external system, all we can do is send the request; the terminal state is on their side. Their 2xx only proves the request arrived, not that they undid anything. So that row doesn't write "revoked". It writes "compensation requested, outcome unknown" — a dedicated reading.

The effect is immediate: nobody misreads it as done. The interface says plainly that the result is with the target system. No gloss needed.

So this isn't impossible. It's a question of whether you noticed that "unknown" needed a slot. Give it one and it stays put. Don't, and it falls into the strongest reading available.

4. Why it's hard

It's hard because the default is silent.

Every field decides for you, and it always picks the cheapest reading:

  • a null value reads as "no such item"
  • an empty collection reads as "no difference"
  • false reads as "not marked", and from there as "fine"

Those readings are correct almost every time. The problem is the rest: when "nothing" and "unknown" share a value, you have a field that lies — and it stays quiet while doing it, until somebody acts on it and gets "everything is fine" on your behalf.

Worse: fixing one instance doesn't remove the class — including while fixing it.

Here's something that happened inside that fix. Once "no difference" had its own reading, there was still a function whose empty return meant two things: everything really was compared, and there was nothing to promise in the first place (with no captor wired, "compare" isn't defined). Writing "checked, clean" is right for the first. Writing it for the second would vouch for a check that never ran.

We nearly did. What we changed it to: nothing was promised, so no row is written.

That's why the entry points for this class are every "nothing" there is. Fix one, and it waits for you in the line of code where you write the fix.

5. A check you can run yourself

Don't start with "is my record complete". Start with something more basic:

List every value in your system that means "none / unknown / empty", and ask of each: what does it read as?

Anything that carries two meanings at once is a potential misreport. Three common shapes:

ShapeIt also means
a null value"no such item" / "looked, found none" / "never looked"
an empty collection"genuinely none" / "couldn't read it out"
false / a default"not marked" / "marked as no"

The test is simple: when this value is empty, can a reader still say why it's empty? If not, the field is guessing on their behalf.

Closing

This kind of problem is hard to find because it doesn't throw. The system runs, the interface renders, and one cell quietly says something untrue.

And the place it shows up most is the place you just fixed — because that's when you're busy already knowing how to do it.

Where we stand: we know the pattern now, and we've fixed two instances — the second one's shape came from the reader. We have not done a systematic pass: how many of those three shapes are in our record layer, and what each one reads as, is not a list we have.

So this one doesn't close on a conclusion. Run the check against your own system and you'll likely find a few. On our side, we only know we haven't finished looking.

Drafted with an AI assistant. The system, the positions and the mistakes are mine.