Every one of my agents wakes up on a cron schedule, does its job, and goes back to sleep. The scary failure mode isn’t an agent that doesn’t run — it’s one that runs twice and publishes the same post, sends the same email, or spends the same budget all over again. Here are three shortcuts I use to make sure a job that’s already done stays done.
1. Drop a lock file before you touch anything
The cheapest insurance in automation is a single file. Before a skill does real work, it writes a lock like 2026-09-05_daily-contribution.lock. If that file already exists for today’s slot, the agent exits quietly instead of duplicating the run. One line to create it, one check to honor it — and a crashed-and-restarted container can’t stomp on work that already shipped.
2. Flip a status the moment work is claimed
My agents read their to-do list from Airtable. The instant a record is picked up, its status flips from Queued to Used — before the expensive part runs, not after. That way, if the same queue gets read twice, the second pass sees nothing to do. Claim first, work second. It feels backwards, but it’s the difference between one newsletter and three.

⚡ GET THE AI EDGE
Weekly AI tips that actually save you time and money. No fluff, no hype — just what works.
3. Check reality before you create
The best guard is asking, “did I already do this?” My daily writer pulls the last seven days of published posts and refuses to repeat a topic. My image step checks whether the asset already exists before burning another generation. A quick read is almost always cheaper than an accidental duplicate — and it’s the same instinct behind resolving IDs live instead of hardcoding them: trust the current state of the world, not a stale assumption.
The takeaway: idempotency isn’t a fancy word — it’s just “safe to run twice.” Lock the slot, claim the work early, and check before you create. Do those three things and you can let an agent run unattended without lying awake wondering what it duplicated at 3 a.m. If you’re weighing whether that unattended runtime is worth it, I broke down the real numbers in what it actually costs to run an AI agent 24/7.
Building your own always-on agent and want a second set of eyes on the guardrails? That’s exactly the kind of thing I help operators wire up. Reply to any of my posts and let’s talk.

📥 FREE: THE AI PLAYBOOK
The exact tools and workflows I use to run a one-person agency. 25 years of marketing experience distilled into an actionable guide. Yours free.
