OpenClaw Gotchas: Gateway Device Pairing & Cron Job Setup
How to fix the "pairing required" error when running openclaw cron commands, and the correct way to approve device pairing with openclaw devices approve.
The Setup
I've been playing with OpenClaw lately — a framework that connects AI assistants to chat platforms like Telegram and Discord. The overall experience has been smooth, but I hit a frustrating roadblock when setting up scheduled cron jobs. Here's what happened and how I fixed it.
The Problem: pairing required
I wanted my bot to send me a daily AI news digest at 9 AM every morning. So I asked the bot to create a cron job from our Telegram chat.
The bot ran openclaw cron add, and got this error:
gateway connect failed: GatewayClientRequestError: pairing required
Error: gateway closed (1008): pairing required
The CLI couldn't talk to the Gateway because the device hadn't been paired yet.
Gotcha #1: The wrong pairing command
My first instinct was to check the docs and try openclaw gateway pair — seems logical, right? It didn't work.
The correct way is through the openclaw devices subcommand:
# Check available subcommands first
openclaw devices --help
# Then approve the pairing
openclaw devices approve
After running openclaw devices approve, the CLI could communicate with the Gateway normally.
Gotcha #2: Unpaired commands crash the Gateway
This one hurts. If you let the bot try running openclaw cron add before pairing is done, it doesn't just fail — the Gateway drops the connection entirely.
That means your bot goes offline and needs to reconnect. If you're operating through a chat interface, that's pretty frustrating.
The correct order:
- Complete device pairing first:
openclaw devices approve - Then let the bot create scheduled tasks
After Pairing: Creating the Cron Job
Once pairing is sorted, creating scheduled jobs is straightforward:
openclaw cron add \
--name "AI Daily Brief" \
--cron "0 9 * * *" \
--tz "Asia/Shanghai" \
--session isolated \
--message "Search for AI news from the past 24 hours..." \
--announce \
--channel telegram \
--to "your_chat_id"
Key parameters:
--session isolated: Runs in an isolated session, doesn't interfere with your main chat--announce: Delivers the result to the specified channel after execution--cron+--tz: Cron expression with timezone for scheduling--channel telegram --to <id>: Specifies the delivery target
Model Choice
I'm using zai/glm-5-turbo (Zhipu GLM-5 Turbo) as the model. So far it's been solid — fast responses, good Chinese language understanding, more than enough for daily assistant tasks.
Summary
| Problem | Solution |
|---|---|
pairing required error |
Run openclaw devices approve |
openclaw gateway pair doesn't work |
Device pairing uses openclaw devices, not openclaw gateway |
| Unpaired commands crash the Gateway | Complete pairing first, then run cron commands |
OpenClaw is a really interesting project overall, but the device pairing flow could definitely use better documentation. Hope this saves someone some time.
If you're also tinkering with OpenClaw, feel free to reach out 🤝