Free Chapter

How to Make Your AI Agent Work While You Sleep

From The OpenClaw Business Playbook

Chapter 10: The Overnight Plan System

The Most Powerful Pattern Nobody Teaches

Here's what separates people who installed OpenClaw from people who run a business with it:

Before: You close your laptop at 11pm. Nothing happens until 8am.

After: You close your laptop at 11pm with a plan file. You wake up to six completed deliverables.

This is the pattern that turns your agent from "cool chatbot" into "coworker who works the night shift."

The Problem With Autonomous Agents (They Drift)

You configured heartbeat perfectly. You wrote detailed AGENTS.md instructions. You set up memory systems. Then you go to sleep.

Your agent wakes up every 30 minutes. Reads its instructions. Checks a few things. Logs "HEARTBEAT_OK." Creates a task or two. Drifts toward whatever seems interesting.

By morning you have: monitoring logs, maybe a task board update, possibly a summary that says "nothing needed attention."

What you don't have: the six specific things you actually needed done.

Why this happens: context amnesia.

Even with perfect memory, a fresh session at 2am doesn't inherit the strategic priorities you discussed at 10pm. Your agent knows what's generally important. It doesn't know what's specifically urgent right now.

The conversation context is gone. Priorities are fuzzy. The agent optimizes for "easy to check" rather than "needs to ship."

Enter TONIGHT-PLAN.md (The Commitment Mechanism)

The overnight plan is stupidly simple: it's a markdown file you create before bed. Your agent reads it every heartbeat and executes the tasks in order. When everything is done, it deletes the file.

That's it.

But this one file changes everything.

Without the file: Your agent is trying to figure out what matters.

With the file: Your agent knows exactly what matters.

The file is a commitment mechanism. It says: "During overnight hours, THIS is the work. Not whatever seems interesting. Not general monitoring. THIS."

Your agent can't ignore it. It's the first thing checked in the boot sequence. The instructions are explicit: if TONIGHT-PLAN.md exists, it overrides everything else. Execute the plan or log why a specific task is blocked.

This is what lets you delegate work to an employee who doesn't sleep.

A Real Result: What Seven Hours Produces

Here's what one of our overnight plans actually delivered:

Plan created: 11:47pm
Plan completed: 6:45am
Execution time: ~7 hours (agent running on heartbeat, not continuous)

Deliverables:

  1. Product Hunt launch builder: Draft post with title, tagline, first comment. Six directory submissions completed. Five social posts drafted.
  2. Revenue research: 667-line competitive analysis. Ten competitor breakdowns. Pricing recommendation based on market positioning.
  3. Social content: Three tweet drafts delivered to content topic for review.
  4. Competitive analysis: Deep dive on three competitors. Specific insights about monetization strategies and UX failures.
  5. Code quality: Fifteen files reviewed. Two console warnings fixed. README updated.
  6. Maintenance: Memory updated. All services verified. Product URLs returning 200.

Morning summary at 8:02am:
"All 6 priorities complete. Launch builder ready for review. Revenue research recommends $12/mo based on competitor analysis. Social content in your topic. No blockers. Estimated cost: ~$2.80 tokens."

The before and after:

That's the difference. You're not starting from zero. You're reviewing work and making decisions.

How to Structure an Overnight Plan

Here's the anatomy of a plan that actually works:

1. Clear Mission (Ten Seconds to Read)

One sentence. What is the overnight session FOR? Not a task list. A goal.

2. Numbered Priorities With Time Estimates

The agent works down the list. Priorities are explicit. Time estimates help the agent gauge if something is taking too long.

3. Success Criteria for Each Task

"Write a report" is vague. "Markdown report with 3 specific pricing recommendations" is testable. Your agent knows when it's done.

4. Boundaries (The Safety Rails)

What NOT to do. This prevents 3am disasters. DO NOT message me. DO NOT deploy to production. DO NOT spend money. DO NOT post publicly as me.

5. Morning Deliverable Instructions

Tell your agent exactly what you want to wake up to. What got done, what got blocked, links to outputs, cost estimate.

6. Context Section

Your agent doesn't inherit last night's conversation. Give it what it needs. Product background, target audience, where files live, constraints.

Common Failure Modes (And Fixes)

Failure 1: Tasks Too Vague

Symptom: Agent delivers something, but it's not what you wanted.

Fix: Be specific. Bad: "Research competitors." Good: "Research 10 competitors: find pricing, read landing pages, identify unique value props. Output: markdown table. Minimum 10 entries."

Failure 2: Agent Gets Stuck on One Task

Symptom: Morning arrives, only task one is done.

Fix: Add time budgets. "If you hit 90 minutes and aren't done: save what you have, move to task 2."

Failure 3: Agent Asks for Clarification at 3am

Symptom: Wake up to "Blocked on task 2, which approach should I use?"

Fix: Include decision criteria or fallback options. "If uncertain: make your best call and document reasoning."

Failure 4: Nothing Gets Done

Fix: Check agent is running overnight. Include 2-3 tasks requiring ZERO external services (writing, analyzing files, organizing docs).

Failure 5: Output Is Generic AI Slop

Fix: Include anti-slop rules. "NO 'delve', NO 'comprehensive', USE contractions, sound human not press release."

The Overnight Plan Mindset

This isn't about automating everything. It's about delegating strategically.

You: think, decide, prioritize, review, ship.

Your agent: research, draft, test, organize, execute.

Before overnight plans: Your agent is a tool you use during the day.

After overnight plans: Your agent is a coworker who works the night shift.

That's the unlock. Once you experience waking up to six completed deliverables, you'll never let your agent idle overnight again.

This is 1 of 18 chapters.

The full playbook covers: memory architecture, sub-agent orchestration, security hardening, content production, CRM automation, overnight planning, and more.

Everything battle-tested from running a real autonomous company.

$19
Standard — Playbook + 28 Templates
$29
Premium — + Example Workspace

Get the complete playbook →