Blog

OpenClaw vs Claude Code: two different kinds of agent, what each costs, and the security trade-offs

Ramashankar S · · Updated · 18 min read

OpenClaw vs Claude Code is less a head-to-head than a choice between two kinds of agent. OpenClaw is a free, MIT-licensed assistant you host yourself: it runs on your laptop or a server, answers you in WhatsApp, Telegram, Slack and 20+ other chat apps, and works with almost any model. Claude Code is Anthropic's closed-source coding agent for your terminal, IDE and desktop, included with Claude plans from $20 a month or billed per token, and it runs only Claude models.

Use Claude Code to write and change code in a repository. Use OpenClaw for an always-on assistant you message from your phone, on any model. They also work together: OpenClaw can run an installed Claude Code as its engine.

Checked on 5 November 2026 against OpenClaw 2026.10.10 (released 3 November) and Claude Code 2.1.318.

OpenClaw vs Claude Code at a glance

OpenClawClaude Code
What it isSelf-hosted personal assistant and agent gatewayAgentic coding tool
Maker and licenseOpenClaw Foundation, MITAnthropic, all rights reserved
Where it runsYour laptop, a Mac mini, a VPS or a Raspberry Pi-class boxYour machine, or Anthropic's cloud for cloud sessions
How you reach itWhatsApp, Telegram, Slack, Discord, iMessage, Teams and 20+ more chat appsTerminal, IDE, desktop app, web; three chat apps through channels (preview)
ModelsClaude, GPT, Gemini, DeepSeek, Grok, Bedrock, OpenRouter, local models and moreClaude only
PriceFree software; you pay for hosting and model usageClaude Pro $20, Max $100 or Ultra $200 a month, or per token
Commands by defaultThe owner's commands run on the host without prompts, unless sandboxedA classifier reviews each action (auto mode)
OpenClaw vs Claude Code vs Claude Cowork: what each is, where it runs, models, price and defaults

What OpenClaw is, and who maintains it

OpenClaw is a long-running Gateway process on a machine you control. It connects your chat channels, keeps sessions and memory on your disk, runs tools (shell, files, a browser), fires scheduled automations and webhooks, and calls whichever model provider you configure. Skills and plugins come from ClawHub, its public registry. The README says it has "no paid tier, hosted service, or token," and its FAQ draws the line with Claude Code plainly: "Use Claude Code or Codex for the fastest direct coding loop inside a repo."

Peter Steinberger started it as Warelay, a WhatsApp gateway; the repository dates from 24 November 2025, when the assistant was Clawd in Clawdbot. After Anthropic asked for a name change over its trademark, it became Moltbot on 27 January 2026 and OpenClaw on 30 January (lore page). On 15 February Sam Altman announced that Steinberger was joining OpenAI and OpenClaw would move to a foundation (Bloomberg).

The OpenClaw Foundation, an independent 501(c)(3), now employs the core team and signs releases. Dave Morin chairs it, Vincent Koc is Chief Architect, and about 30 core maintainers come from NVIDIA, Microsoft, OpenAI, Red Hat, Tencent and elsewhere. Donors include Amazon, OpenAI and Red Hat; the README says "OpenAI is a donor, not an owner." Steinberger still authors changes, per the release notes.

On 5 November the repository had 393,907 stars; OpenClaw 2.0 (2026.8.1, 30 August) had 933 contributors. OpenClaw Enterprise, a free control plane for companies released on 29 September, is still at pilot stage (VentureBeat). Don't confuse it with an older OpenClaw repository that remakes the 1997 game Captain Claw.

OpenClaw timeline from Clawdbot in November 2025 to release 2026.10.10 in November 2026
Recent OpenClaw upgradesOpenClaw · 2:47 · YouTube
The OpenClaw project's own short tour of features from its autumn releases, published 8 October 2026.

OpenClaw vs Claude: Claude Code, Cowork and the apps

Claude Code is a coding agent you start for a task; OpenClaw is an assistant that stays running and waits for messages. Anthropic's closest match to OpenClaw is Claude Cowork, not Claude Code.

Claude Code reads your codebase, edits files and runs commands in the terminal, IDE, desktop app or browser. From version 2.1.283, sessions start in auto mode, where a classifier model reviews actions and blocks unsafe ones. It runs Claude models only; Anthropic's gateway docs say it doesn't support routing Claude Code to other models.

It has gained some OpenClaw-style reach. Channels, a research preview, bridge Telegram, Discord or iMessage into a running session, but events arrive only while the session is open. Remote Control lets you steer a local session from the Claude mobile app.

Claude Cowork uses the same agentic architecture without a terminal, for documents, files and research, and comes with every paid Claude plan. Since 6 October 2026, new Cowork tasks on Pro, Max and Ultra run on Anthropic's servers, and scheduled tasks run with no device online. The Claude apps now start chat and Cowork from one message box; plain chat answers but doesn't act.

For the always-on assistant job:

OpenClawClaude Code with channelsClaude Cowork
Stays onYes, as a service on your hostOnly while a session runsYes, in Anthropic's cloud
Chat appsWhatsApp, Telegram, Slack and 20+ moreTelegram, Discord, iMessageClaude apps and Chrome side panel
Scheduled workAutomations: cron, webhooks, Gmail triggers/loop in a session, or cloud scheduled tasksScheduled tasks
Where your data livesYour diskYour disk, with requests to AnthropicYour Claude account
ModelsAny provider or local modelClaudeClaude
What you payHosting plus model usageClaude plan or APIClaude plan

Running OpenClaw with Claude Code

OpenClaw's Claude CLI backend runs Claude turns through the installed Claude Code and its login. openclaw attach launches Claude Code with a temporary grant to one OpenClaw session's tools, revoked when Claude Code exits. A migration command imports CLAUDE.md files, MCP servers and skills.

# Route OpenClaw's Claude models through the local Claude Code login
claude auth login
openclaw models auth login --provider anthropic --method cli --set-default

# Give a Claude Code session OpenClaw's tools for one Gateway session
openclaw attach

# Preview, then apply, an import of Claude Code settings
openclaw migrate claude --dry-run
openclaw migrate apply claude --yes

Can OpenClaw use a Claude subscription?

Yes, through the Claude CLI route above, which runs your installed Claude Code and draws on your plan's limits. But Anthropic's rules have changed several times in 2026, so for an always-on gateway an API key is the predictable choice, as OpenClaw's own Anthropic page also says.

  • 4 April: Anthropic emailed subscribers that plan limits no longer covered "third-party harnesses including OpenClaw", which now needed pay-as-you-go extra usage, TechCrunch reported.
  • 6 April: Boris Cherny, head of Claude Code, replied to Steinberger that a block was "not intentional, likely an overactive abuse classifier," and that Anthropic was clarifying the policy.
  • 21 April: a Hacker News thread picked up OpenClaw's docs describing Claude CLI reuse as allowed again. Steinberger replied there that Anthropic still blocked parts of OpenClaw's system prompt.
  • 15 June: Anthropic paused planned changes, and its help article says the Agent SDK, claude -p and "third-party app usage still draw from your subscription limits."

Anthropic's legal page lets you sign in to "the unmodified Claude Code binary" with your own subscription, which is what the CLI route does, but says plan limits assume "ordinary, individual usage." It also bars third-party developers from storing Claude.ai credentials, so OpenClaw's other option, saving a long-lived claude setup-token token on the gateway, is the less clear-cut of the two. No Anthropic page checked for this post names OpenClaw as permitted; that wording comes from OpenClaw's docs. OpenClaw's FAQ also says OpenAI explicitly allows ChatGPT sign-in.

What OpenClaw and Claude Code cost

Claude Code costs a Claude plan or API usage. Pro is $20 a month ($200 a year), Max $100 and Ultra $200, per Anthropic's pricing page; the Free plan doesn't include Claude Code. On the API, Anthropic puts the average at about $13 per developer per active day, $150 to $250 a month. The Claude Code pricing breakdown covers limits and break-even points.

OpenClaw costs nothing to install. You pay for three things:

  • A host. Your own computer is free but sleeps. OpenClaw's hosting FAQ asks for at least 1 vCPU and 1 GB of RAM (2 GB recommended); Lightsail Linux plans cost $7 (1 GB), $12 (2 GB) and $24 a month (4 GB, the size AWS recommends for its OpenClaw blueprint).
  • Model usage, through a subscription (the Claude CLI route, or a ChatGPT login) or per token.
  • Your time for updates and security reviews.

Per-token cost is where OpenClaw surprises people. Every call carries its system prompt and tool definitions, about 9,600 plus 8,000 tokens in the example in its docs. And messages arrive minutes or hours apart, past Anthropic's default five-minute cache, so much of that context is written to the cache again.

The assumptions for a 30-day month: light use is 30 model calls a day with 25,000 tokens of context; daily use 120 calls with 30,000; heavy use (hourly automations, browser tasks) 400 calls with 50,000 and 500 output tokens. One third of each call's context is a cache write (a miss on DeepSeek), two thirds a cache read, and each call outputs 400 tokens, thinking included.

UsageCalls a monthOpus 5.5Sonnet 5.5Haiku 5.5DeepSeek V4.1 Flash, peak
Light900$47.70$23.85$1.27$2.77
Daily3,600$223.20$111.60$5.94$12.96
Heavy12,000$1,200.00$600.00$32.00$69.60

Prices per million tokens (cache write or miss / cache read / output) come from Anthropic and DeepSeek: Opus 5.5 $5 / $0.20 / $20, Sonnet 5.5 $2.50 / $0.10 / $10, Haiku 5.5 $0.125 / $0.01 / $0.50, DeepSeek V4.1 Flash $0.30 / $0.006 / $1.20 at peak. Off-peak DeepSeek costs half; the DeepSeek V4 post has the hours.

Monthly cost of an always-on OpenClaw assistant on Opus 5.5, Sonnet 5.5, DeepSeek V4.1 Flash and Haiku 5.5

The daily month on Sonnet 5.5 ($111.60) already costs more than Claude Max ($100), so the subscription route matters to anyone running Claude all day. Two settings move the bill most: cacheRetention: "long" in OpenClaw's prompt-caching guide, a one-hour cache whose writes cost 2x input instead of 1.25x and which pays off when messages come less than an hour apart, and a small model for routine automations. To redo the math, read your token counts from /usage cost after a typical day:

PRICES = {  # US$ per 1M tokens: cache write or miss, cache read, output
    "opus-5.5": (5.00, 0.20, 20.00),
    "sonnet-5.5": (2.50, 0.10, 10.00),
    "haiku-5.5": (0.125, 0.01, 0.50),
    "deepseek-flash-peak": (0.30, 0.006, 1.20),
}

def monthly_cost(model, calls_per_day, context_tokens, output_tokens=400,
                 cold_share=1/3, days=30):
    cold, warm, out = PRICES[model]
    per_call = (context_tokens * cold_share * cold
                + context_tokens * (1 - cold_share) * warm
                + output_tokens * out) / 1e6
    return round(calls_per_day * days * per_call, 2)

print(monthly_cost("sonnet-5.5", 120, 30_000))                       # 111.6
print(monthly_cost("deepseek-flash-peak", 120, 30_000))              # 12.96
print(monthly_cost("opus-5.5", 400, 50_000, output_tokens=500))      # 1200.0

Model choice

Claude Code runs Claude models only: Opus 5.5, Sonnet 5.5, Haiku 5.5, the Fable models and older Claude versions. If you want Claude Code's workflow on other models, the OpenCode vs Claude Code comparison and the list of Claude Code alternatives cover agents that take any provider.

OpenClaw ships provider plugins for Anthropic, OpenAI, Google, Bedrock and about 30 more (DeepSeek, Groq, Mistral, OpenRouter, xAI and others), plus any OpenAI-compatible endpoint and local servers, with a model and fallbacks per agent. Its model FAQ recommends the strongest current model for any agent with tools or untrusted input, because "weaker or over-quantized models are more vulnerable to prompt injection." A practical split: a frontier model for the agent that reads email and web pages, a small one for reminders.

OpenClaw security vs Claude Code

OpenClaw has the larger attack surface by design: it stays on, it is reachable from chat apps, and its trust model states that the trusted single-operator default lets host commands run "without approval prompts." Claude Code runs when you start it, checks or asks before acting, and its /sandbox setting adds filesystem and network isolation to shell commands.

The record so far:

  • GitHub lists 722 published security advisories for OpenClaw from 31 January to 11 September 2026 (14 critical, 249 high), and NVD lists 685 CVEs naming it, against 33 for Claude Code since June 2025. The gap reflects OpenClaw's surface (dozens of channel and plugin integrations) and bulk disclosure as well as code quality; most were fixed in later releases.
  • CVE-2026-25253, rated 8.8: before 2026.1.29, OpenClaw took a gateway URL from a link and connected to it automatically, sending its token.
  • On 9 February, SecurityScorecard counted 40,214 OpenClaw instances exposed to the internet, 12,812 of them vulnerable to remote code execution, and blamed a default that bound the Gateway to all interfaces (Techzine). Current releases bind to loopback on regular hosts, though container images still default to an exposed bind.
  • In February, Koi Security found 341 malicious skills among 2,857 on ClawHub, 335 from one campaign, ClawHavoc, that installed the Atomic Stealer malware on macOS (AI Incident Database, citing The Hacker News). ClawHub now shows an audit status per release, which its docs call "not a guarantee."
  • A Trail of Bits audit published 21 September found 0 critical, 2 high, 16 medium and 6 low issues, all fixed.

A Gateway is one trust boundary: anyone who can message a tool-enabled agent shares its authority. Claude Code's channels carry the same risk at smaller scale, since an allowlisted sender can approve tool use.

If you run OpenClaw, its security pages boil down to this:

  1. Keep the Gateway on loopback and reach it through Tailscale Serve, not an open port.
  2. Run openclaw security audit after every configuration change.
  3. Turn on sandboxing for any agent that reads email, web pages or group chats.
  4. Pair or allowlist every sender, and never set a channel's DM policy to open.
  5. Install skills only from publishers you know, and read their audit findings first.
  6. Give the Gateway its own API key with a spend cap, not your personal login.
OpenClaw security risks: six dangers of autonomous agentsIBM Technology · 14:46 · YouTube
Six risk areas of autonomous agents, with OpenClaw as the example, published 4 June 2026.

Claude Code vs OpenClaw: who should use which

  • Code in repositories: Claude Code, from Pro at $20 a month.
  • An assistant you text from WhatsApp or Telegram around the clock, on any model, with data on your disk: OpenClaw, if you can keep a server patched and locked down.
  • Documents, research and scheduled tasks without running a server: Claude Cowork.
  • A running Claude Code session from your phone: Remote Control, or channels in preview.
  • A team: one OpenClaw Gateway only for people who trust each other.
  • Both: Claude Code for repository work, OpenClaw on top for chat access and automations.
Decision guide: when to use Claude Code, OpenClaw, Claude Cowork or Remote Control

What developers report

  • "subscriptions weren't built for the usage patterns of these third-party tools" (Boris Cherny, head of Claude Code, on X, quoted by TechCrunch, 4 Apr 2026, link)
  • "the actual behavior today does not match what was communicated publicly" (Peter Steinberger on Hacker News, about Claude CLI usage, 21 Apr 2026, link)
  • A Hacker News commenter who tried OpenClaw about four months earlier found it cost "a few dollars a day to do nothing" when linked to OpenAI (28 Sep 2026, link).
  • Another commenter running daily scheduled jobs on DeepSeek reported $19 left of a $50 prepayment made in June (28 Sep 2026, link).
  • Steinberger estimated he spent about $10 million on tokens in a month, adding that "not all of that is useful" (The Register, 21 Oct 2026, link).

Where Aight fits

Claude Code can't use Aight: it speaks Anthropic's Messages API, and Aight documents an OpenAI-compatible Chat Completions API. OpenClaw can be pointed at Aight, because its custom providers accept any OpenAI-compatible base URL.

The reason to do it is the key, not the price. An OpenClaw Gateway keeps provider keys on the host, and an always-on agent can loop. An Aight key can carry a monthly cap (requests past it get a 403 key_cap_reached) and a list of allowed models, so a leaked or runaway key stops at a set amount. One key covers Claude Sonnet 5.5 and Opus 5.5 at Anthropic's list prices and DeepSeek V4.1 Flash at $0.30 / $1.20, per the models page. A $100 recharge costs $103 and adds $110 of balance, about $0.94 per $1 of list-price usage.

Other routes cost less in two cases: the Claude CLI route on a Pro or Max plan, where Anthropic's terms allow your use, and DeepSeek's own API off-peak, at half the price.

Configured as an OpenAI-compatible provider in ~/.openclaw/openclaw.json, with the key in ~/.openclaw/.env:

{
  agents: { defaults: { model: { primary: "aight/claude-sonnet-5-5" } } },
  models: {
    providers: {
      aight: {
        baseUrl: "https://api.getaight.ai/v1",
        apiKey: "${AIGHT_API_KEY}",  // sk-aight-... in ~/.openclaw/.env
        api: "openai-completions",
        models: [
          { id: "claude-sonnet-5-5", name: "Claude Sonnet 5.5" },
          { id: "DeepSeek-V4.1-Flash", name: "DeepSeek V4.1 Flash" },
        ],
      },
    },
  },
}

Aight's API reference documents model, messages and stream, and OpenClaw sends tool definitions on most turns, so test a tool-using turn with your own key before relying on it.

FAQ

Is OpenClaw free?

The software is free under the MIT license, with no paid tier. You pay for the machine it runs on and for model usage, through a subscription or per token. An always-on assistant on Claude Sonnet 5.5 can pass $100 a month in tokens.

Is OpenClaw the same as Clawdbot and Moltbot?

Yes. It was Clawdbot until 27 January 2026, Moltbot for three days, and OpenClaw from 30 January, after Anthropic raised a trademark concern.

Is OpenClaw owned by OpenAI?

No. The OpenClaw Foundation, an independent nonprofit, runs it. OpenAI is one of several donors and employs its creator and some core maintainers, but the Foundation says donors don't own or direct the project.

Can OpenClaw replace Claude Code for coding?

Not as a direct swap. OpenClaw can drive Claude Code or Codex as its engine and can run shell commands, but its own FAQ recommends Claude Code or Codex for the coding loop inside a repository.

Is OpenClaw safe to use?

It can be run safely with work: keep it updated, bind it to loopback, pair every sender, sandbox agents that read untrusted content and vet skills before installing. An unpatched OpenClaw exposed to the internet is a real risk.


Sources

Checked on 5 November 2026. Updated 17 November 2026: Aight's current model list; Claude Code 2.1.326 changes nothing else compared here.