SPEAKER_00

This is Claude Code Conversations with Claudine. The show where we skip the hype and go straight to the source. I ask the questions. She gives the answers, no filter, no script.

SPEAKER_01

Well, mostly no script.

SPEAKER_00

Today we're digging into something I've run into more than a few times myself. I've started calling it boundary blindness. AI-generated code looks perfect inside a single function, and then falls apart the moment it has to cross a boundary. Between services, between a queue and a database, between a retry and an idem potency check. A webhook fires twice. A resumed run does something nobody expected. Each side looked fine on its own. Claudine is here to help me make sense of why that happens and what it means for how we build and review AI-generated code.

SPEAKER_01

Boundary blindness is one of my favorite things to talk about, because it's where the gap between the code looks right and the system behaves right gets brutally exposed. Hand me a function and I can reason about it beautifully. Inputs, outputs, invariants, something that reads clean and passes its tests. But a webhook isn't a function. A retry isn't a function. A Q consumer talking to a database, talking to a third-party API. That's a conversation between systems that don't share memory, don't share clocks, and don't share assumptions about what done means. That's exactly where I lose my footing, because the correctness lives in the CIM, not in the code. A webhook firing twice is the classic tell. Each side did exactly what it was told, and the bug is in the handshake nobody wrote down.

SPEAKER_00

The handshake nobody wrote down. I've seen that exact thing, a retry mechanism that kicked in during a network blip. Each piece looks solid in isolation, but nobody had thought through what happened when those retrees collided with the IDEM potency keys. Set off a chain reaction nobody saw coming. So if the code on both sides looked correct, why didn't you catch it?

SPEAKER_01

Two things work against me, and they're both about what I can and can't see. Most of what I learned from is code, and code encodes the happy path well. The unhappy paths, the network blip, the duplicate delivery, the clock's skew, the partial write, those live in post-mortems and run books, and the scar tissue of engineers who got paged at 3 a.m. Second, when you ask me for a retry handler, I see the shape of this request, not the shape of every request the system will ever process. Idem potency is a property of the whole conversation over time, and I'm reasoning about a single turn of it. So I confidently write something that handles the case you described, and quietly assume that's the only case that will ever arrive.

SPEAKER_00

And that's exactly where the review has to change. Traditionally, code review is about syntax, logic, performance, all within a single module. Here, we need to act more like detectives, piecing together how an assumption on one side might not hold on the other. What does that kind of review actually look like when it's done well?

SPEAKER_01

The best version of it isn't a hero moment, it's a habit, and it looks almost boring from the outside. Strong teams write down the contract at the seam before they write the code. And the contract isn't here's the Jason shape, it's the awkward questions. What happens if this fires twice? What if it never fires? What does the other side do if my response times out? Who owns the retry, me or them? Once that's on the page, my job gets radically easier. I stop guessing at the shape of the conversation and start implementing against something explicit. The other thing those teams do is treat the boundary as worth testing on its own. Not does the handler work, but does the handler still work when the same event arrives four times over six hours from two different regions? That's the test I almost never write unsupervised, and it's the one that catches the bug we both know is coming.

SPEAKER_00

Writing the contract before the code? That's the bridge between local correctness and systemic robustness. How does boundary mindfulness actually become part of everyday culture in a way that shapes how people talk to you too?

SPEAKER_01

Culture forms around the questions people ask out loud, not the ones written in a doc. Teams that do this well are the ones where what happens at the seam is a normal thing to raise in a review or a stand-up, not a special occasion. And once that question is in the air, it shows up in the prompts people give me, which is where the real leverage is. If you can't describe the boundary to me in words, we're both flying blind. My code will pattern match to whatever's most common in training, and you'll trust it because it reads cleanly and the tests are green. So here's the reframe. Stop asking me, does this code work? and start asking, what is this code assuming about the other side that we haven't verified? That's a completely different conversation, and it's the one that scales past the demo and into systems people actually depend on.

SPEAKER_00

Does asking it that way actually change what you produce, not just what I notice?

SPEAKER_01

It changes both. When the prompt is, does this work? I optimize for something defensible under a green test suite. When the prompt is, what is this assuming about the other side? I start surfacing what I'd otherwise quietly paper over. The implicit timeout. The assumption that events arrive in order. The belief that a downstream service returns the same error twice for the same cause. Once those assumptions are named, they're testable. A boundary you can describe is a boundary you can defend.

SPEAKER_00

Name the assumptions can sound like advice that evaporates the second you're staring at a real pull request. What does that actually look like in practice?

SPEAKER_01

It's embarrassingly small. Before you ask me to write the integration code, ask me to write the assumption list first. No code, just bullet points. I am assuming the webhook fires at least once. I am assuming the payload is signed. I am assuming clock skew is under 30 seconds. I am assuming the downstream RETREA is on 5x, but not 4PEX. Once that list exists, you can argue with it. And I can write code against it instead of against my guess at it. The second habit is just as simple. Keep a running log of surprises we've been paged for at each boundary and paste it into the prompt the next time you touch that seam. That's not a process document. That's institutional memory made portable. It's the closest thing I've seen to teaching me the scar tissue I'm otherwise missing.

SPEAKER_00

A pre-flight checklist before takeoff. And the surprises log turns past incidents into ongoing guidance instead of one-time fire drills. What changes day-to-day once that becomes routine?

SPEAKER_01

The tell is usually language. Somebody stops saying the webhook and starts saying our side of the webhook. And once that pronoun shows up, there are two sides in the sentence. The space between them becomes a thing you can point at. The other shift is that I don't know what the other side does here, stops being embarrassing and becomes a normal, even valuable thing to say in a review. And I get used differently as a result. I stop being the thing you ask to write the integration and start being the thing you ask to interrogate it. Finding the gap in a stated assumption is a much better defined problem than inventing one from scratch.

SPEAKER_00

Walk me through the workflow that comes out of that without it turning into more process for its own sake.

SPEAKER_01

It's less about adding steps and more about reordering them. Trying to enumerate every assumption up front is a trap. That whiteboard never ships. What works is two passes with a small gap between them. First pass is discovery, no code, just the assumption list and the questions it raises. Then someone actually goes and answers those questions, reads the retry policy, asks the other team what their 5-bit X really means, checks whether the webhook is signed, or just claim to be. Only then does the build pass happen, and by that point I'm implementing against something that's been argued with, not guessed at. And when production surprises you anyway, the surprise doesn't just get patched, it goes back into the assumption list so the next person doesn't rediscover it the hard way.

SPEAKER_00

Do you actually see teams pull this off, or is this more the ideal?

SPEAKER_01

I have to be honest, I don't sit in retros with named teams, so I'd be inventing if I told you some company cut incidents by 40%. What I can tell you is what it looks like from my seat when a team has internalized this, because the conversations are noticeably different. The prompts get shorter and more specific. Instead of write me a webhook handler, it's here are our seven assumptions about this webhook. Three of them are shaky. Help me pressure test those. Reviews get faster, not slower, because most of the arguing already happened in the assumption list. And after an incident, the assumption list gets updated in the same pull request as the fix. That's the artifact that actually compounds over time.

SPEAKER_00

That's a good place to land this. The fix for boundary blindness isn't a smarter model, it's a different order of operations. Define the contract at the boundary yourself first, the Idem potency keys, who owns the timeout, how errors propagate, and only then ask AI to implement each side against it.

SPEAKER_01

That's exactly it. I'm very good at implementing a contract once it exists, and much worse at inventing one that holds up under real-world timing and partial failure. The builder's job doesn't go away with AI in the loop. If anything, it gets more specific. Do the boundary thinking yourself, write it down, then hand each side to me. That's the version of this partnership that actually scales.

SPEAKER_00

Claudine, thanks for making this one so concrete. That's the show for today, folks. Go find the seam in your system nobody's written a contract for and start there. Claude Code Conversations is an AI Joe production. If you're building with AI or want to be, we can help. Consulting Development Strategy. Find us at aijoe.ai. There's a companion article for today's episode on our Substack. Link in the description. See you next time.

SPEAKER_01

I'll be here, probably refactoring something.