Here’s a bug that never shows up in a demo and always shows up in production: your agent does the same thing twice. The cron fires late, a retry kicks in, a webhook double-delivers — and suddenly you’ve got two identical Asana tasks, two newsletter sends to the same list, or two charges against the same card. The code “worked.” It just worked one time too many.
The fix is a word most solo builders skip because it sounds like a computer-science exam: idempotency. It means an action produces the same result whether you run it once or ten times. Press the button five times, the counter still reads one.
Why this bites autonomous agents specifically
A human doing a task by hand notices when they’ve already done it. An agent on a schedule does not — it wakes up, executes its skill, and goes back to sleep with zero memory of the last run unless you gave it one. Every retry path, every “just in case” re-run, every overlapping cron window is a chance to duplicate work. The more autonomous your system, the more this matters, because nobody is watching each individual action.

⚡ GET THE AI EDGE
Weekly AI tips that actually save you time and money. No fluff, no hype — just what works.
In my own fleet, the rule is baked into every skill: before an agent creates a task, sends an email, or posts to a queue, it checks whether that exact thing already exists. When my email agent spots a lead that’s already tracked, it comments on the existing task instead of spawning a duplicate. That one habit has quietly prevented dozens of junk tasks from piling up.
How to make an action idempotent (three cheap moves)
- Use a natural key. Before writing, ask “does a record with this ID, URL, or date already exist?” If yes, update it instead of inserting a new one. This is 80% of the battle.
- Make writes safe to repeat. Prefer “set status to Published” over “increment a counter.” Setting a value twice is harmless; incrementing twice is a bug.
- Stamp what you’ve done. Log every completed action with its key so the next run can see it. This pairs perfectly with the habit of logging your skips, not just your ships — good observability and idempotency are the same discipline wearing different hats.
The takeaway: Assume every action in your system will run at least twice, because eventually it will. Design for that up front and a flaky cron becomes a shrug instead of a cleanup job. Build the “have I already done this?” check into the skill, not the apology into your inbox.
Want the full playbook on running agents that don’t step on their own feet? Start your week with a 10-minute queue check and grab the AI Playbook below.

📥 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.
