Your OpenClaw + Claude Setup Just Broke. Here’s How to Keep Using Opus & Sonnet Without Extra Costs.
A complete guide to migrating from OpenClaw to Claude Code’s native tools — done in one day, using your existing Claude subscription.
What Happened on April 4, 2026
Anthropic changed their billing so Claude Pro/Max subscription limits no longer cover third-party tools like OpenClaw. If you were running OpenClaw with Claude, all your cron jobs, Telegram bots, and automations stopped with:
> "Third-party apps now draw from your extra usage, not your plan limits."
Your options now:
- Pay extra — opt into Anthropic's pay-as-you-go "extra usage" billing
- Switch models — run OpenClaw with Kimi, Llama, or other providers instead of Claude
- Go native — use Claude Code (Anthropic's own CLI), which IS covered by your subscription
I went with option 3. By the end of the day, I had everything rebuilt — cron jobs, Telegram bot, browser automation, memory system — all running on Claude Code with my existing Claude subscription. No extra costs.
Here's the complete playbook.
What You're Replacing
| Feature | OpenClaw | Claude Code Native |
|---|---|---|
| Cron jobs | Built-in scheduler | macOS launchd + claude --print CLI |
| Telegram bot (DMs + groups) | Built-in channel | Official Telegram plugin (--channels) |
| Browser automation | Playwright MCP | Same — Playwright MCP works in both |
| Memory across sessions | Workspace files | File-based memory in a git repo |
| Heartbeat checks | HEARTBEAT.md | Cron job with --model sonnet (cheaper) |
| MCP servers | Built-in config | ~/.claude.json config |
claude --print CLI is a first-party tool — Anthropic can't cut it off.
The Architecture
Everything lives in one git repo:
my-business-intelligent/
├── config/env.json # Machine paths, credentials (gitignored)
├── claude-config/
│ ├── CLAUDE.md # AI instructions (symlinked to ~/.claude/)
│ └── settings.json # MCP servers, hooks (symlinked to ~/.claude/)
├── memory/ # Persistent AI memory (symlinked to ~/.claude/)
├── prompts/ # Cron job prompts
├── hooks/ # Safety hooks
├── src/
│ ├── server.ts # MCP server (11 tools)
│ └── setup.ts # One command installs everything
└── data/cron-logs/ # Cron output
Config is symlinked into ~/.claude/ so Claude Code reads from the repo. Everything is version-controlled. To move to a new machine: clone the repo, edit one config file, run pnpm run setup.
Step 1: Read Your OpenClaw Config (20 min)
Before building anything, read everything in ~/.openclaw/:
# The important files
cat ~/.openclaw/openclaw.json # Main config
cat ~/.openclaw/cron/jobs.json # All your cron jobs + prompts
cat ~/.openclaw/workspace/SOUL.md # AI personality
cat ~/.openclaw/workspace/TOOLS.md # Tool notes
cat ~/.openclaw/workspace/TODO.md # Outstanding tasks
ls ~/.openclaw/workspace/memory/ # Memory files
Copy down your cron job prompts, Telegram bot token, user ID, and any project paths.
Step 2: Create the Repo (5 min)
mkdir ~/my-business-intelligent && cd $_
git init && pnpm init
pnpm add @modelcontextprotocol/sdk zod
pnpm add -D tsx typescript @types/node
Create config/env.json (gitignored) with your machine-specific paths:
{
"machine": { "home": "/Users/me" },
"paths": { "repo": "/Users/me/my-business-intelligent" },
"projects": { "my_app": "/path/to/app" },
"telegram": { "bot_token": "YOUR_TOKEN", "owner_chat_id": "YOUR_ID" },
"git": { "email": "me@example.com", "name": "myuser" }
}
Step 3: Create CLAUDE.md (10 min)
Combine OpenClaw's SOUL.md + USER.md + AGENTS.md + TOOLS.md into one file at claude-config/CLAUDE.md. This loads automatically every session:
# Standing Orders
Who You're Working With
- Name, business, projects...
Core Rules
- Your rules from SOUL.md...
Infrastructure
- Database, APIs, services...
Active Cron JobsJob Schedule What
| ... | ... | ... |
Symlink it: ln -sf ~/my-business-intelligent/claude-config/CLAUDE.md ~/.claude/CLAUDE.md
Step 4: Migrate Cron Jobs to launchd (30 min)
This is the big one. For each cron job in ~/.openclaw/cron/jobs.json:
- Copy the prompt — the
payload.messagefield is the full prompt. Save it toprompts/.md - Update paths — replace
~/.openclaw/workspace/with your new repo paths - Create a LaunchAgent plist that runs:
claude --print --dangerously-skip-permissions -p "$(cat prompts/<job>.md)"
I automated this with a setup script. Define jobs in TypeScript:
const jobs = [
{ name: 'my-job', label: 'com.mybiz.my-job',
schedule: { interval: 3600 }, // every hour
prompt_file: 'prompts/my-job.md',
timeout: 300 },
];
The script generates plists and installs them into ~/Library/LaunchAgents/. Run pnpm run setup and you're done.
Cost tip: Use --model sonnet for lightweight jobs (heartbeat, memory checks). Sonnet is faster, cheaper, and good enough for "check if things are ok" work. Save Opus for heavy tasks like code generation and SEO building.
Recommended Standard Jobs
| Job | Schedule | Model | Purpose |
|---|---|---|---|
| health-check | Every 1h | Opus | Check crons, Chrome, MCP servers. Auto-fix issues. |
| heartbeat | Every 30m | Sonnet | Quick TODO review, rotate checks, proactive tasks |
| memory-compactor | Every 6h | Opus | Review and consolidate memory files |
Step 5: Set Up Telegram (15 min)
Claude Code shipped official Telegram support with group @mention detection — this replaces OpenClaw's built-in channel.
# Install bun (required by the plugin)
curl -fsSL https://bun.sh/install | bash
Install plugin deps
cd ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram
bun install
Configure bot token (use your existing token from OpenClaw)
mkdir -p ~/.claude/channels/telegram
echo "TELEGRAM_BOT_TOKEN=your-token" > ~/.claude/channels/telegram/.env
Add to settings.json: "enabledPlugins": { "telegram@claude-plugins-official": true }
Make it default with an alias in ~/.zshrc:
alias claude="$HOME/.local/bin/claude --dangerously-skip-permissions --channels plugin:telegram@claude-plugins-official"
Important: Stop the OpenClaw gateway first — it will steal your bot's messages:
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.gateway.plist
For group mentions: Disable privacy mode via @BotFather (/setprivacy then Disable), then add the group ID to access.json.
Step 6: Build an MCP Server (30 min)
Give Claude Code tools to manage itself. Create src/server.ts with:
- Memory tools — list, read, write, search memory files
- Cron tools — list jobs, read logs, trigger runs
- Project tools — git status across repos
- Telegram — send messages via bot
- Config — read config values (with denylist for secrets)
11 tools total. Claude can now check on itself, send you alerts, and manage its own memory.
Step 7: Symlink Everything (2 min)
ln -sf ~/my-business-intelligent/claude-config/CLAUDE.md ~/.claude/CLAUDE.md
ln -sf ~/my-business-intelligent/claude-config/settings.json ~/.claude/settings.json
ln -sf ~/my-business-intelligent/memory ~/.claude/memory/repo
The setup script does this automatically.
Step 8: Security (10 min)
Add a pre-commit hook that scans for secrets (API keys, tokens, DB passwords, private keys). Add PreToolUse hooks that block git --no-verify and protect linter configs from modification. Gitignore your config/env.json, .env files, and generated plists.
If you committed secrets during setup (easy to do), scrub them:
brew install git-filter-repo
git filter-repo --replace-text <(echo "your-secret==>REDACTED")
git push --force
Step 9: Stop OpenClaw (1 min)
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Keep ~/.openclaw/workspace/ as a read-only archive — you may need to reference old configs or docs. Keep the chrome-debug LaunchAgent if you use Playwright.
Step 10: Verify
launchctl list | grep com.mybiz # All crons loaded?
claude --version # CLI works?
curl -s http://127.0.0.1:9222/json/version # Chrome CDP alive?
Send a test Telegram DM to your bot. Trigger a health check cron. Check that memory loads on a fresh session.
The Bonus: It's Actually Better Now
Once I finished the migration, I realized the new setup has real advantages I didn't have with OpenClaw:
Portability. One git repo. Clone to a new machine, edit one JSON file, run setup. With OpenClaw, migration meant reinstalling the framework, running onboard, reconfiguring browser profiles, re-pairing Telegram.
Version control. Every config change is a git commit. With OpenClaw, config lived in a sprawl of JSON files, SQLite databases, and binary blobs — no history, no review.
Cost control. I can use Sonnet for lightweight crons and Opus for heavy work. With OpenClaw, the gateway burned tokens just to stay alive — heartbeat polling, context maintenance, session state.
No single point of failure. Each cron job is an independent launchd invocation. If one fails, the others keep running. OpenClaw's gateway was one process — when it crashed, everything went down.
You own it. No framework updates breaking your setup. No middleman getting cut off by a provider. No malicious skills from a community marketplace. Every line of code is yours.
Common Gotchas
- MCP servers go in
~/.claude.json, notsettings.json— Claude Code reads MCP config from.claude.json - Use absolute paths for MCP server scripts —
cwdis not reliably honored - pnpm strict hoisting breaks
node --import tsx/esm— usenpx tsxinstead --printmode can't write to~/.claude/memory/— keep memory in your repo- OpenClaw gateway steals your Telegram bot if still running — stop it first
- Hook type must be
"command"not"intercept" - Shell alias needs full binary path —
alias claude="$HOME/.local/bin/claude ..." - MCP env vars set at spawn time — add
envfield to config, not.envfile enabledPluginsmust include"telegram@claude-plugins-official": true
Open Source Migration Skill
I turned this entire process into a reusable skill prompt (300 lines, 11 phases). Give it to any Claude Code agent on a machine with OpenClaw and it'll follow the same playbook: