Why I let an AI write code but never merge it
I let an AI agent write a large share of the code I ship. It's fast, it's seldom as tired as I am, and most days it's genuinely better than me at the boring end of a task. It also has never once merged its own work, and as far as I'm concerned it never will. That isn't a grudge against the tool, it's the only way I can safely ship code.
The split I draw is simple. The agent can write, refactor, test, and propose. It can draft every FRD and tech spec. I review and approve each of those, assumption by assumption, before a line of code exists, and I gate every merge on CI passing (having first made sure CI isn't failing silently, which is its own story). Those last parts are mine, and I've come to think of them as a different kind of job entirely, not "the same work but slower," which is the trap everyone falls into with AI. When a machine can produce a plausible pull request in seconds, the obvious next thought is to let it produce the next one off the back of the first, and the one after that, until you're three changes deep in code nobody, you included, has actually read. Even though the code compiles, and the tests are green, you end up debugging something at midnight that you don't recognise, because you never controlled how it was added to your codebase. But hey, the agent will offer to fix that too.
The cause is pretty simple - an agent is very good at being locally correct and quietly globally wrong. It will write a function that does exactly what you asked, with a clean signature and a tidy test, that happens to undo an assumption three files away that neither of you was thinking about (assuming you knew the assumption was there at all, since most of us aren't reading the code that closely). It isn't lying and it isn't sloppy, it just doesn't carry the same model of the whole system in its head that I do, and it never says "I'm not sure about this part" whilst it's writing unless I've built something that forces it to. Confidence is a model's default setting, and that plays straight into our oldest bias: we believe things that are said confidently.