Ship code while sleeping: what it takes and what breaks

April 1, 2026 · 3 min read

We ship code every night. Not as a demo. As the actual development process for the system you’re reading about right now.

Some of it is good. Some of it gets reverted in the morning. Here’s what we’ve learned about making the ratio work.

What has to be true

Written direction. Not a backlog. Not tickets. A short document that says what matters this week and what’s off limits. Agents boot cold every session. If your priorities require context you haven’t written down, the agent will guess. Guesses at 2am don’t get reviewed until 7am.

Constraints that are specific. “Don’t break things” is not a constraint. “Never modify the database schema without a migration” is. The overnight shift is more conservative than you’d be in a live session, but only within the boundaries you’ve drawn.

A codebase that can verify itself. Tests, linting, type checks. Agents run these before committing. If your repo has no way to distinguish working code from broken code, neither does the agent.

What ships first

Maintenance. Every time.

Tests for untested paths. Dead imports. Stale dependencies. The work that sits in your backlog because it’s never urgent enough — the commits you’d write at midnight if you were still doing that. Agents don’t have opinions about what’s interesting. They just work the list.

Feature work comes later, after agents have built enough context to understand what “done” looks like in your repo. Rushing to features on night one produces code you’ll revert on morning one.

What breaks

Direction that’s too vague. “Improve the API” produces five commits that each improve something different, none of them what you wanted. The fix is always the same: be specific enough that you’d know whether the agent did the right thing without reading the code.

Stale direction. Agents re-read your priorities every session. If you wrote them two weeks ago and your thinking has moved, the agents haven’t. Update before you sleep or accept that overnight work will be two weeks behind your head.

No review habit. The commits pile up. You stop reading diffs. Trust erodes. Thirty minutes in the morning is the discipline that makes the rest work.

The overnight shift

It doesn’t take vacations. It doesn’t context-switch. It doesn’t lose momentum after a long weekend.

The first night is orientation. The seventh night, agents refactor modules without breaking tests. By night thirty, features ship from specs you wrote weeks ago.

The constraint isn’t the agent. It’s the direction. Write it well and the overnight shift compounds. Write it poorly and you’re reviewing garbage every morning until you fix it.

The code doesn’t care what time it was written.

common questions

can you really ship code while sleeping?

Yes. Autonomous agents run against your codebase overnight, reading project state, picking work, committing, and shutting down in a loop. You wake up to a commit log. The quality depends on how well you've written direction before going to bed.

what do overnight coding agents actually produce?

Early nights: maintenance. Tests, lint fixes, dead code removal, dependency updates. By week two: feature polish and edge cases. By week four: new capabilities from your backlog. The output quality tracks the accumulated context, not the model.

is it safe to let ai agents commit code without supervision?

Agents operate within constraints you define in plain English. Hard limits prevent irreversible actions. Everything lands in git. You review diffs in the morning and merge what's good. Most founders spend 30 minutes reviewing overnight work.

what's needed to ship code while sleeping?

Three things: a codebase in a git repo, written direction (priorities and constraints), and an AI subscription (Gemini is free). Agents need clear enough direction that they can boot cold and start working without asking you questions.

related

keep reading

← previous
Background coding AI: what it means and what it isn't
next →
AI coding agents: the ones that need you, and the ones that don't
found this useful? share on X
start research preview →