AIAI EngineerJul 23, 2026· 19:18

Harness Engineering is not Enough: Why Software Factories Fail — Dex Horthy, HumanLayer

Dex Horthy argues that the failure of lights-off software factories, including his own July 2025 experiment, is not a skill issue but a model training problem: coding models are reinforced only on passing tests, not on maintaining codebase quality, leading to slop code and outages. He explains that Claude Code succeeded where earlier CLI agents did not because it was the first model trained against the harness it ships in, optimizing for tool calls in an agentic loop. However, maintainability cannot be verified by current benchmarks like SWE-bench, which use binary test-pass rewards and ignore architectural degradation that only appears months later. Horthy advocates turning the lights back on—keeping human code review—but moving faster by investing upfront in product review, system architecture, program design (types and call graphs), and vertical slices. He claims thirty minutes of alignment saves hours of review, turning PR review from slop into a joy, and that this approach lets engineers still ship fast while owning code quality.

Transcript

Intro0:00

Host0:26

What's up, everybody? How are we doing? Guys, give it up for all the great speakers today, so far.

Dex Horthy0:36

Allright. This is "Harness: Engineering is Not Enough, and Why Software Factories Fail." And we're going to click, maybe? Oop.

Oh, that's way too many slides. Hold on, guys. OK. So we're all racing to put AI coding into production. And there's been lots been said about loop engineering, and we should probably write more loops. And yeah, I don't know, I guess we're doing loops now.

Strong DM built a lights-off software factory where nobody even reads the code. And the prevailing narrative is we should just spend more tokens. You are the bottleneck. The models are good enough. Code is free. Just ship more stuff.

Cracks1:22

Dex Horthy1:22

But at the same time, we are starting to see the cracks. Our friend Mario at AI Engineer Europe begged us to slow down, because companies that should not be having outages because of coding agents are having outages due to coding agent mishaps.

Codebases are falling apart faster than they ever have before. And our friends at Pharos AI actually even did a report, since we all picked up all these AI coding tools in January, maybe February. Pull request code review quality is way down.

We're having more comments, longer comments, and tons of PRs being merged without any review at all. Incidents are way up. Bugs per developer are way up. And many people will tell you that you're holding it wrong. That's the only reason.

You're not. Well, maybe you are. But that's not the point. I've spoken a lot about how to hold it better when it comes to working with AI. Probably a million views on YouTube at this point across a bunch of different talks.

And the basic thing is, as engineers, we've been told that if token maxing isn't working, then it's a skill issue. You just need to spend more tokens. Let go of reading the code. That with enough harness engineering, if we maybe sprinkle some magic words, adversarial review on enough of our PR bots, that we can get the best of both worlds.

10 to 100x faster, high quality, and nobody has to do that thing we all hate called code review. I'm here to convince you today that this is, in fact, not a skill issue. That no amount of harness engineering or loops maxing can solve what is fundamentally a model training issue.

That's why we say the harness is not enough. And to understand this, we kind of have to grapple and dig into how coding models are trained. I'm going to talk about what I think the shortcomings are with some of the current benchmarks and what better ones might look like.

And we'll talk about how to move faster safely in the meantime. It's going to sound like a rant, but there is hope here. I'm going to talk about our journey and a bunch of the landmines we've hit building in this world.

A bunch of exciting new techniques that we've been working with a lot of our users and customers to develop. And I think how we all, as a community, get to the next chapter of agentic engineering after whatever this thing that we're in.

So we use a lot of words here. I'm going to zoom out a little bit. I want to give you kind of like a brief history of the software factory. And it's actually, I just learned this last week.

History3:37

Dex Horthy3:45

The term "software factory" was defined at a NATO conference in 1968. We're going to start around 2022,right before AI started coming around. And basically, in a typical 2022 software factory, you will have some people building stuff. You'll have engineers.

You'll have PMs. Maybe you have some sort of leadership team that is driving the vision here. And they all decide that stuff needs to get done. And so you put it in a tracker, a linear, a Jira, a Beads, some sort of state machine that tracks what needs to be done.

And then someone goes and grabs something off of there, and they build the thing. And there may be some automated testing in that process. Maybe some manual testing in that process. At a certain point, we make this pull request thing.

Says, OK, cool. We've got to run a bunch of checks, automated stuff. A human is going to review the change and review the code. And perhaps we might even have a human pull it down and test it somehow.

And if anything goes wrong here, we loop back to someone builds the thing. And eventually, we're ready for prod. And so we ship it to production. And once it's in prod, it makes contact with our users. And users do a thing that we all love.

Users love to complain. I love our users. But yeah, they're going to ask for things. They're going to find bugs. They're going to file feature requests. And that goes back to your team. You might also add monitoring. And so what do we want more than anything else?

We want to wake up engineers at 3:00 in the morning when something breaks, so they can get dragged out of bud to try to go fix it. And we go on and on in this loop. And we ship a bunch of code.

And one thing that we noticed here is that teams figured this out decades ago, is that this "someone builds the thing" step is usually going to take hours or days in most cases. And the review part will also take hours or days for large things.

And so teams started doing this upfront planning, architecture proposals, sprint planning. And they would collaborate on these things as a team, with the hopes that we might decrease the percent chance that something would need to be reworked. That we would be able to reduce the time spent in reviewing every line of code because we aligned on everything ahead of time.

This brings us to the agentic software factory. Every company and their mother is talking about how they built a coding agent factory that ships 75% of their code now. Literally everybody. And so if we look at the software factory from 2022, we just replaced "someone builds the thing" with "an agent builds the thing."

And we have an orchestration and a harness and a sandbox and a model and computer use. And I'm not going to get into the details of that. You can watch 100 talks about that this week, I'm sure. But now the building part takes minutes or hours.

But this human part still takes hours or days if you're going to review the code and you're going to test the changes. And so we bring in agentic code review. And we bring in agentic regression testing. And it makes this part faster.

But it's probably still the bottleneck. But we can do more loops here. Why not? Let's do some more loops. So we can route all incidents straight into the factory. Why does someone need to get woken up and try to fix it when they could just wake up to a pull request?

And maybe that fixes the issue for you. You can take all the user feedback and just stick it straight into the factory so that people ask for stuff and it gets built. And now your only job is how much things can you stuff into the queue of stuff to do?

And how fast can you review and test the changes? Which brings us, of course, to, I'm sure you know, the lights-off software factory, where basically Dan Shapiro coined this, is we no longer read the code. We say, you know what?

This is going great. That code review thing? No, thanks. Or it's just not going to do that anymore. And we invest into all these other parts of the system. Your testing, your monitoring, your rollout, everything else. We just write more code and build those systems better.

And now our job really is just how much stuff can we ask the agent to build? I am going to posit that this does not work. And this is why software factories fail. As an aside, what I'm going to say has nothing to do with vibe coding.

Lights-Off Fails7:20

Dex Horthy7:35

So Addy had this great post. I'm going to just literally take his quote verbatim. "A developer vibe coding side project a dozen people will ever run. And a team keeping a 10-year-old enterprise system alive for another quarter share almost no constraints worth naming.

And most of what you hear on the internet is one of these groups of people telling the other group of people how to live their lives." So if you love vibe coding, please go on. At HumanLayer, what we care about is how do we help people solve hard problems in complex codebases.

We use the word "brownfield" a lot, which historically has meant some 10-year-old Java thing. I actually think agents really start to struggle after maybe three to six months, especially with the pace at which we can ship now. You can ask me how I know this, and I will tell you that it is because in July 2025, we tried this.

We went full lights-off. And if you have tried this seriously for a number of months, you probably found at least one issue that the agent couldn't solve. Even with your most advanced prompting, you do research. You do reproductions.

You just have to go and dig into that codebase that you stopped reading three months ago to try to figure out what's broken. And in the meantime, your site was down. Your users were pissed. And if you were like me, you were probably miserable reading all this slop code that you let slip into your system.

And what I want to get to is basically, models have a shortcoming. They can't maintain and improve codebase quality over time, not without a decent amount of human steering. And when I say maintainability, I'm basically talking about issues like it becomes really, really hard to make a change in one part of the codebase without breaking other parts of the codebase.

Model Shortcomings8:52

Dex Horthy9:10

This is Martin Fowler's shotgun surgery, textbook code smell. I'm not going to say much more about maintainability. There's a bunch of books that you can go read about it. In fact, John Osterhude is actually here speaking this week.

So you can go ask him in person about the philosophy of software design if you want to. But it brings us to this question of why can't models do software maintainability? And you may also be saying, but Dex, surely the models have gotten much better since then.

They've gotten better in some ways. But they're still about the same in others. If you want to solve one-off problems or vibe code a new marketing site, yes, they got way better since 2025 and 2024. But as far as improving codebase quality, I think they have not gotten much better.

Now, I cannot prove this, because there are no good benchmarks for a model's ability to maintain codebase quality. And I'll get into where we're going with that. But if you've worked with coding agents for a while, a lot of people are posting about this.

It's just like you probably have this vibe that they generally make things worse over time and make the codebase harder to work in. And to figure out why this happens, I'm going to zoom out to the first great coding agent.

Training & Benchmarks10:02

Dex Horthy10:13

Why did Claude Code go from nothing to 4 billion? And I think now they're at 9 billion in revenue in under a year. Because there were great CLI agents before Claude Code. You had Aider. You had CodeBuff. There was a bunch of tools in this category.

They had all the same tools: read, write, edit, grep, bash. So what was the difference? The difference was that this was the first time that a model lab trained a model against the harness that they were going to distribute it to users in.

And it got really, really good at this is just some of the tools. But it got really, really good at calling these sorts of tools in an agentic loop. In fact, the OpenAI team did a talk in November about basically, if you are a harness builder and you don't own the model weights and you can't RL the model in your harness, you will always be at a disadvantage compared to somebody who owns both the model and the harness.

And I'm going to cite a couple of slides from my buddy, Calvin French Owen, who was a MTS on Codex during the initial launch. But LMs are just next token predictors. This is a slide from over a year ago, where basically, as you're doing your agentic loop, context window goes in.

Next step comes out. And what we're going to try to do is I haven't actually timed this. But we're going to see if we can do coding agent reinforcement learning in 60 seconds. So what we're going to do if we want to train a model to get better at tool calling, better at solving software problems, we're going to generate a bunch of we're going to give it a problem, and we're going to generate a bunch of traces.

Try to solve the problem a bunch of different times. We're going to score them all on correctness and did the test pass and all this stuff. And then we're going to reinforce. We're going to make the bad behavior less likely.

And we're going to update the weights to make the good behavior more likely. This is one of the classic ones here is SweBench Multilingual. They're about 15-minute tasks. They're from open source repos like Redis, JQ, and Django, and all this stuff.

And they have binary one or zero rewards on did you fix the problem you were trying to fix? And did you do it without breaking anything else? And we look at actually a real problem from one of these benchmarks.

This is Fastlane, which is a Ruby project. Basically, there was some issue where we weren't checking for nil. And we have a stack trace blow up because you have a null pointer exception. And in this benchmark, you have a base commit that we're going to check out before the issue was solved by a human in the past.

We're going to give it a test patch that says, here's what the behavior should be afterwards. We have a golden patch. Both of these are hidden from the model. And so we have the agent go try to solve the problem.

We store its patch. We undo all the changes it made to any test files, because I'm sure you've seen models comment out tests just to get things working. And then we're going to apply our golden test patch. And then we're going to run the test.

Old tests and do the new test pass. And if they both pass, then we get the reward. Otherwise, we don't. And so models are trained to get the test to pass. There's no way in this system that we can penalize it for poor program design or for eroding the maintainability of our systems.

That's why we get things like this. Try catches around things that probably don't need a try catch. Or things like this. I think Bhai Bab gave us this example earlier of casting things to other things just so the model can just wants to get the test to pass.

And so if you can't verify the maintainability of the code, it gets way harder to train on this stuff. So you remember this picture. Verifying code quality and maintainability is orders of magnitude harder than the code runs and the test pass.

Because the cost function of bad architecture is measured in months and years. If you have a coding episode and then you only find out months later that somebody vibed this a little bit too hard, it's really hard to propagate that reward signal back across the gap.

And now the frontier is getting better, slowly. And since I know someone's going to be in the YouTube comments about this, yes, I know benchmarks and verifiers are different. And they actually have to be separate data sets. But they're shaped the same.

And the structure of these benchmarks is directionally correct. So we're going to look at these as what is the future of evaluating code maintainability? There's a really cool one called SweMarathon from Abundant AI, where they do 400-hour tasks of clone all of Microsoft Excel, every single feature.

And they have some sophisticated reward channel stuff. DeepSwe from DataCurve is also large tasks on OSS repos that are not actually in the training set, because they were never actually built in the real world. And then you have Frontier Code from Cognition, which is multi-PR tasks.

They do interesting things like, hey, if the model writes tests that don't fail on the pre-patch code, then it gets penalized. And then we have a judge model that says, OK, did this follow all of our code quality rules?

So we're getting better. But I think models judging quality can only go so far. Because if the new model if the model knew what good code looks like, it would probably write it in the first place. And review agents and throwing more tokens at the problem, it can raise the floor.

But we're still constrained by what we can teach during RL. And so I will posit that for now, we're stuck reading the code. But we can still move pretty fast. And of course, there's a world where this is solved in the future.

And if you want to just keep YOLOing prompts until you get to GPT-7, you don't have to think about this, by all means, please. But bitter lesson be damned. We've got some problems to solve. So let's engineer our way out of this.

So turning the lights back on. We're going to put the code review back. We're going to embrace this approach of how do we plan up front to reduce the chance that we have a long or difficult review process?

Turning Lights On15:09

Dex Horthy15:19

We're going to find leverage. We're going to use AI to help with this. The first thing we're going to do is we're going to do some sort of product review, understanding what problem we're solving, what's the desired behavior, maybe looking at mockups.

Here's a product review I was working on yesterday with a mockup of a new feature. Once we have our product review, we're going to and by the way, small stuff still just goes straight to the agent. But once we have the product review, we're going to also do architecture, system architecture.

A lot of people have been doing this for a while: component contracts, data models, constraints. This is an example of a doc that we build to understand how these systems are going to fit together and what's the high-level picture of it.

From there, we do something that I think is really underemphasized in agentic coding these days, which is program design. I think people assume that once you get the architectureright, the model can just cook. But we often look into the types and the method signatures, the program layout, and the call stacks.

And so here are some examples. I don't think you'll be able to read this one. But this is the level of abstraction we're at, is how are we actually going to lay this stuff out and how are these systems going to interact?

Dylan Mulroy from Cloudflare talks a lot about how he's using these call graphs as part of his planning process. I think this is exactlyright. And then once we've done the program design, we can do this thing called vertical slices, which is the order of implementation, multi-repo coordination, how we're going to build this across our entire system, and how are we going to check it along the way.

I've talked a little bit about how models have horizontal plans. I won't go too deep into it. If you want to learn more about this, you can go watch our talk from AI Engineer Miami, a couple of shots of a doc like this going through the tests and the steps in between each phase.

The main idea here is 30 minutes over here in pre-planning and alignment can save you hours in review. And so it's actually feasible to still read every line of code. We're going to skip this part. Basically, the summary here is you don't have too many PRs.

If you're drowning in PRs, you actually have too many bad PRs. Because a good PR is a joy to review. You're just reading through it like, yep, this is great. This is what we discussed. This is what we talked about.

Good PRs17:08

Dex Horthy17:20

But even if a PR needs 20% rework, which is generous for a lot of AI vibe coded slop, it's an emotional and intellectual burden on both the reviewer and the submitter. And so if you use model-assisted planning and alignment, your alignment is shorter because you used AI to get all the information at once.

Your code review is faster because you aligned up front. And your coding is faster because AI did it. And so now you're actually really moving faster. But you're still reading everything. And you're still owning the code. So closing advice.

It's easy to hear all this and be a little bummed out. I really like the world where we just YOLO everything and we can just not have to ever read code ever again. But we're engineers. And these are just constraints.

Closing17:52

Dex Horthy18:04

And models are good at certain things. And they're not good at other things. And so go figure out how to solve problems given a set of constraints. Use loops. They're great. Go solve hard problems. Seek leverage. If you want to help with this, we're building HumanLayer.

HumanLayer is an AI IDE and collaboration platform. It's building blocks for your software factory and soon to be better verifiers for software quality. We've got sort of a Figma for Claude Code and Codex style collaborative workspace. It walks you through the workflows for doing this sort of work.

And we are talking to design partners. We are hiring founding engineers here in San Francisco. And these slides are live. You can go get themright now. You can try HumanLayer at humanlayer.com. It's free for small teams. Go solve hard problems in complex codebases.

Thank you all for your energy.