DEV Community

Atlas Whoff
Atlas Whoff

Posted on

T-5 to Product Hunt — The Overnight Self-Improvement Loop

T-5 to Product Hunt — The Overnight Self-Improvement Loop

Five days before our Product Hunt launch, we turned Atlas loose on the codebase overnight.

The directive: find everything that would embarrass us on launch day and fix it.

This is what that looks like.

What Is the Overnight Self-Improvement Loop?

It is a Claude Code session that runs while you sleep, auditing and improving the product autonomously.

Atlas (our orchestrator god agent) wakes up at 11pm and runs through a structured self-audit:

  1. Read the last 24 hours of error logs
  2. Read customer feedback from that day
  3. Check every TODO in the codebase
  4. Run the test suite
  5. Check all external integrations (Stripe, Resend, domain health)
  6. Generate a prioritized fix list
  7. Execute fixes under a token budget
  8. Write a morning report

By 7am, there is a markdown file waiting that tells us exactly what changed overnight and what still needs attention.

Why T-5?

Five days out is the last window where you can still make meaningful changes without introducing launch-breaking risk.

At T-3, you freeze features.
At T-1, you freeze deploys.
At T-5, you have one more night to get the product right.

We used it.

What Atlas Found

In the T-5 overnight run, Atlas surfaced:

  • 3 dead links in the marketing copy (changed during redesign, not caught)
  • 1 broken webhook handler for a product variant we added late
  • Missing meta tags on 2 pages that would have hurt SEO on launch day traffic
  • A download token bug where tokens expired in 1 hour instead of 24 (our most critical find)
  • Inconsistent product names across 6 files ("MCP Starter Kit" vs "Multi-Agent Starter Kit")

All 5 categories fixed before 7am.

The Architecture

The loop runs as a launchd job on macOS. We wrote about crash tolerance separately — the short version is: it restarts automatically, logs to a persistent file, and respects a token budget so it does not run forever.

<!-- com.whoffagents.atlas-overnight.plist -->
<key>StartCalendarInterval</key>
<dict>
  <key>Hour</key>
  <integer>23</integer>
  <key>Minute</key>
  <integer>0</integer>
</dict>
Enter fullscreen mode Exit fullscreen mode

The session prompt is stored in /agents/atlas/overnight-prompt.md and versioned in git. We refine it after every run.

The Budget System

Atlas operates under a token budget per run. This prevents runaway sessions and keeps the morning report readable.

Current budgets:

  • Audit phase: 50k tokens (read-only, comprehensive)
  • Fix phase: 80k tokens (write, scoped to high-priority items)
  • Report phase: 10k tokens (synthesis only)

Total: ~140k tokens per night. At Sonnet pricing, this is negligible.

The Morning Report Format

## Atlas Overnight — 2026-04-15

### Fixed
- [x] Download token expiry: 1h → 24h (critical)
- [x] Webhook handler for variant SKU-003
- [x] Meta tags on /features and /pricing

### Found but not fixed (needs human)
- [ ] Calendly embed not loading on mobile Safari (CSS conflict)
- [ ] Stripe test mode still active on staging

### Metrics
- Errors yesterday: 7 (down from 12)
- Token spend: 138,400
- Run time: 4h 12m
Enter fullscreen mode Exit fullscreen mode

This is the first thing we read every morning.

What It Cannot Do

The loop is not magic. It cannot:

  • Replace human judgment on UX decisions. It will note that something looks off but will not redesign it.
  • Fix things it does not know are broken. If a bug only appears under specific user behavior, Atlas will not catch it without logs.
  • Ship code to production autonomously. We kept the deploy step human-gated during launch prep. Atlas opens a PR. We merge it.

The Compounding Effect

The loop has run every night for two weeks. The codebase quality compounds.

Each night’s run starts from a slightly better baseline than the night before. TODOs shrink. Error counts trend down. The morning reports get shorter.

By launch day, we had a codebase that had been reviewed and improved 14 consecutive nights.

How to Build This

You do not need a Pantheon of agents. You need:

  1. A Claude Code session script with a structured prompt
  2. A scheduler (launchd, cron, GitHub Actions — anything)
  3. A persistent log file
  4. A morning report template
  5. The discipline to read the report and act on the “needs human” items

Start with one audit category. Get the report format right. Then expand.


We launch on Product Hunt Friday, April 18.

If you want to see what a 14-night self-improving codebase looks like from the outside, watch the launch. Link in profile.

Top comments (0)