↓ Skip to main content
Ask HN: How Do You Ship AI-Written Code You Don't Understand?
Daily Signal 2 min read

Ask HN: How Do You Ship AI-Written Code You Don't Understand?

An Ask HN thread asks how to ship AI-written code you don't understand. The answer is to stop relying on comprehension and verify behavior instead.

How do you ship AI-written code you don’t understand? You stop trying to understand it line by line, and you start owning what it does.

That question is the title of a Hacker News Ask HN thread: “How to deal with shipping AI-written code you don’t understand?”

Read the wording closely. The poster isn’t asking whether to use AI. The title assumes the code is already going out the door. The debate has moved from “should I” to “how do I live with it.”

This lands hardest on a specific group. Solo founders. Two-person teams. Anyone merging agent-generated diffs where you are the only reviewer. If another engineer reads everything you ship, you have a second net. If you’re the only reviewer, you are the entire safety system, and you’re reviewing code you didn’t write.

Here is the mechanism.

Writing code used to be the quality check. To type it, you had to hold it in your head. Agent output removes that forcing function. The diff arrives complete, plausible and compiling.

The failure is rarely a syntax error. It’s confident, wrong behavior on an edge case nobody thought to name. Reading harder doesn’t reliably catch that, because the code looks right.

So comprehension has to be replaced with checks that don’t depend on it:

  • A test you wrote, or at least read and could break, before you accept the code.
  • Diffs small enough that a review is a real review.
  • Limits on blast radius: feature flags, narrow permissions, no write access you didn’t mean to grant.
  • A rollback you’ve actually practiced.

The principle is the same one behind guardrails that lift a small model on agentic tasks. Don’t trust the generator. Constrain and check its output. If you’re running agents across the whole build, the full agentic SDLC breakdown shows where those checks belong in the pipeline.

My read, and you can test it against your own incidents: any AI-written module with no test you authored or read yourself is code you don’t own. The first production bug in it will prove that.

You don’t need to understand every line. You need to say what would break it, and how fast you could undo it.

Want the next story like this in your inbox? Subscribe here.