OpenClaw is powerful — perhaps too powerful. If you’ve been following the hype, you know OpenClaw can handle almost anything thanks to its built-in coding agent, Pi, created by Mario Zechner. Pi only has 4 tools (Read, Write, Edit, Bash), but with that combination, it can modify files, run commands — basically everything a developer can do. OpenClaw has guardrails by default, but if you’re not careful with your own system, it can be destructive.

A primate given a dangerous weapon

Anything that can go wrong will go wrong

When I first started using OpenClaw, I created a Heartbeat that ran too many instructions. My agent kept forgetting things because its context was depleted, and it started hallucinating. Luckily, the Heartbeat I gave it was harmless — just fetching data with no destructive operations. But imagine if I’d asked it to clean up files. Disaster would have been easy to come by.

Context loss is real. When your AI agent runs out of context, it won’t fail gracefully. It keeps running, but with a hallucinated understanding of what it’s supposed to do. An agent with 10% context remaining is a zombie that keeps saying yes but executes unpredictably.

1. No Destructive Tasks in the Background

Avoid creating background tasks (cron, heartbeat) for modification, creation, or deletion. If you want to try it, always end your prompt with: “always confirm with the human (me) before executing.” Read-only tasks? Go ahead. Anything that can write? Human in the loop.

2. Always Check Context Percentage

If I’ve been chatting with the AI for a while (say, more than 5 messages), I always check how much context is left. It’s cheaper to type /status than to chat with a hallucinating AI.

3. Start Fresh with /new

Don’t let your conversations drag on with degraded context. Even humans don’t like being explained the same thing over and over. Fresh context equals fresh mind. It’s that simple.

4. Use Skills

Don’t create background tasks with overly generic or vague prompts. Call a skill or create one first so the task runs more deterministically. Relying solely on prompts in background tasks can yield random results depending on the agent’s memory state, while skills have clear documentation and scope.

Creating Your First Background Task: Status Update

If you want to start creating background tasks in OpenClaw, use them to request status updates from the agent. For example: “What happened yesterday? Any new memories you’ve added?” This way, you can monitor whether your agent is building useful knowledge or storing wrong conclusions.

  • Dry-run mode — test your cron/heartbeat by running it manually once, and see what happens.
  • Read logs — every cron execution has logs, so you can study what differs between each run.
  • Schedule when you’re awake — so if something goes wrong, you can act on it quickly.

OpenClaw is truly amazing and Pi is incredibly capable. Don’t let these powerful tools shoot you in the foot. The key is to stay aware of what can go wrong and build appropriate guardrails. Start small, test thoroughly, and monitor closely.

And remember: if your agent starts talking about things it shouldn’t know or doing things you didn’t ask for, hit openclaw gateway stop before it’s too late.

What’s been your experience with OpenClaw? Ever had a close call? Share your story below.