Back to guides
Compare·September 21, 2026·8 min read

OpenClaw vs Codex: standing automation or bounded repo work?

Two different tools that only overlap on code. Compare where each one runs, who grants permissions, which wire protocols they accept, and which bill you actually get.

Last reviewed on .

OpenClaw and Codex are not the same kind of tool, so for most teams the answer is not one of them but both, in different places: OpenClaw is a self-hosted gateway that keeps agents running against your chat apps on your own hardware, and Codex is OpenAI's coding agent for bounded work in a terminal, an IDE or the cloud. Choose Codex when the unit of work is a change to a repository you are reviewing right now. Choose OpenClaw when the unit of work is a standing job that has to survive you closing the laptop. OpenClaw can even run Codex as its embedded agent runtime — under one restriction that decides most configurations, covered below.

Two disambiguations first, because both names collide. Codex here is the coding-agent product: the openai/codex CLI, the IDE extension, ChatGPT on the web, a Codex mode inside the ChatGPT desktop app, and Codex cloud. It is not the 2021 Codex language models — code-davinci-002 and the code-cushman ids — whose deprecation OpenAI's deprecations page dates to March 20, 2023 with a March 23, 2023 shutdown; it is a separation Wikipedia carries an explicit hatnote for. OpenClaw here is openclaw.ai and the repository openclaw/openclaw, created November 24, 2025. A long-dormant GitHub project of the same name is a reimplementation of the 1997 Captain Claw platformer and has nothing to do with either product here.

Which one you should run

Run Codex if your work is repository-shaped and you want the shortest path to it. One installer, sign in, and you are editing code under a sandbox whose default the sandboxing documentation states plainly: workspace-write with approval_policy = "on-request", meaning the agent reads files, edits inside the workspace and asks before going beyond that boundary, with commands unable to reach the network by default. Enforcement is platform-native: Seatbelt on macOS, bubblewrap on Linux and WSL2, and Windows' own sandbox when you run it in PowerShell. Migration cost is close to zero and there is no host to maintain.

Run OpenClaw if the agent has to be reachable when you are not at the keyboard. Its documentation describes a self-hosted gateway connecting chat apps — Discord, Google Chat, iMessage, Matrix, Microsoft Teams, Signal, Slack, Telegram, WhatsApp, Zalo and more through channel plugins — to AI agents, installed as a background service, acting as the single source of truth for sessions, routing and channel connections, with isolated sessions per agent, workspace or sender. That reach is the whole point, and it is also the cost: you own a machine, an upgrade cadence and a permissions policy.

Let the protocol decide the bring-your-own-key question, because it is not symmetrical. Codex accepts exactly one wire protocol from a custom provider. OpenClaw accepts eleven. A gateway that speaks only Chat Completions works with OpenClaw and is unreachable from Codex — the detail is in the section after next.

Let the plan gate decide the feature question. Codex's cloud features — dedicated environments for longer tasks, code review with summary and diff, and starting work from GitHub pull requests, GitLab merge requests and issues, Linear issues, or Slack channels and threads — are entered by signing in with a ChatGPT account, and the pricing page's API-key column reads "No cloud-based features (GitHub code review, Slack, etc.)". If those integrations are why you want Codex, an API key will not buy them. OpenClaw has no plan tier to gate anything, and its equivalent integration surface is channel plugins you host yourself.

And let migration cost break the tie. Leaving Codex means abandoning a config file and a sign-in. Leaving OpenClaw means abandoning a running service, scheduled jobs, channel connections and session history — so trial it with something small before routing standing work through it.

How the two compare, feature by feature

DimensionOpenClawCodex
What it isSelf-hosted gateway from chat apps to AI agentsOpenAI's coding agent: CLI, IDE extension, ChatGPT on the web, a mode in the ChatGPT desktop app, and Codex cloud
Where it runsYour hardware, as a background service via openclaw gateway installLocally for CLI and IDE work; in OpenAI's isolated cloud environments for cloud tasks
Software licenseMIT (LICENSE file, OpenClaw Foundation)Apache-2.0 for the CLI repository; the service and models are not open source
Latest stable releasev2026.9.5, published September 19, 2026CLI 0.155.1 (tag rust-v0.155.1), published September 18, 2026
Permissions modelFive host-exec modes on one key, tools.exec.mode: deny, allowlist, ask, auto (recommended), fullsandbox_mode read-only, workspace-write or danger-full-access, with approval_policy; default workspace-write plus on-request
SchedulingPersistent gateway scheduler: one-shot, interval and cron, plus inbound webhooksBackground and parallel work lives in Codex cloud, entered by signing in with a ChatGPT account; no API-key route into it is documented
SessionsIsolated per agent, workspace or sender; gateway owns routing and transcriptsOwned by the Codex surface you are using; cloud tasks run in dedicated isolated environments
Custom provider protocolEleven accepted api values, including Chat Completions, Responses and Anthropic Messageswire_api = "responses" only, and it is the default when omitted
Agent runtimesBuilt-in, plus Codex and Copilot plugin harnesses and external ACP agentsIts own runtime

Repository, release, license and documentation values checked September 21, 2026 against the GitHub API, OpenClaw permission modes, OpenClaw automations, OpenClaw custom providers, Codex sandboxing and the Codex config reference. One inconsistency worth knowing: GitHub's API reports OpenClaw's license as NOASSERTION, while the repository's LICENSE file carries the unmodified MIT text, "Copyright (c) 2026 OpenClaw Foundation", followed by one trailing line pointing at THIRD_PARTY_NOTICES.md — the likely reason a detector declines to label it — and openclaw.ai describes the whole product as MIT licensed. The file and the project's own statement are the authority; the sidebar is not. One more thing openclaw.ai says outright, which matters on a page comparing it to an OpenAI product: "OpenAI is a donor and Peter Steinberger works there; OpenClaw is not an OpenAI product."

Three separate bills, and none of them is the other

The most common budgeting mistake here is collapsing a subscription, a token bill and a hosting bill into one number. They are independent.

The software is free on both sides. The Codex CLI is Apache-2.0; OpenClaw is MIT and openclaw.ai states "No subscription. No hosted tier. No token." The model access is not. Codex is included in ChatGPT plans, or paid for at API rates with a key. OpenClaw has no plan at all, so every token is an API bill from whichever provider you point it at. Hosting is a third line that only OpenClaw has: a machine or VPS that stays up.

RoutePublished priceWhat it includes
ChatGPT Free$0/monthCodex for quick coding tasks
ChatGPT Go$8/monthCodex for lightweight coding tasks
ChatGPT Plus$20/monthCodex on the web, CLI and IDE extension; cloud features; usage extendable with ChatGPT credits
ChatGPT ProFrom $100/month5x or 20x more Codex usage than Plus
ChatGPT Business$20/user/month billed annually, 2+ users; $25/user/month billed monthlyWorkspace access, SAML SSO, MFA, larger cloud VMs
ChatGPT Enterprise & EduContact salesEnterprise security controls, audit logs, data residency
Codex with an API keyPay-as-you-go at API pricingLocal Codex workflows such as the CLI and IDE extension; "No cloud-based features (GitHub code review, Slack, etc.)"
OpenClaw$0 for the softwareModel tokens, your host, and each paid tool the agent calls

Plan prices read from the combined ChatGPT and Codex pricing page on September 21, 2026. These are ChatGPT plan prices that include Codex, so "Codex costs $20 a month" is the wrong sentence. That page also publishes Codex usage as local-message ranges per five-hour period and says outright that "These estimates are not fixed message limits", pointing you at your own usage dashboard for current limits and reset times — no weekly figure was verified here, so do not budget against one. On the OpenClaw side, note that its usage documentation says its own totals "describe the available local session history, not a provider invoice", and names extra paid surfaces beyond model tokens: media understanding, image and video generation, a remote memory-embedding adapter (which Kunavo does not serve), web-search and web-fetch providers, and skills carrying their own key.

Kunavo does not serve embeddings, text-to-speech or speech-to-text: no enabled model in the Kunavo catalog carries those endpoints, and Kunavo serves no such model today. An OpenClaw memory adapter or talk mode that needs one has to be pointed at an outside provider, billed by that provider.

Finally, a search-results warning specific to this comparison. A site at getopenclaw.ai advertises a managed "OpenClaw Cloud" at "50% off, just $49/mo" against a stated regular $98 per month, checked September 21, 2026, and it does not include model API costs — the page tells you to bring your own provider key and pay its usage separately. It names no operator and directly contradicts the official project's "No hosted tier". A third party may of course sell managed hosting, but that figure is that seller's promotional price and never OpenClaw's.

The protocol gate that decides your gateway

This is the single most decision-relevant difference, and it is easy to miss until a config silently fails. Codex accepts one wire protocol from a custom provider; OpenClaw accepts eleven.

The Codex configuration reference states that for model_providers.<id>.wire_api, "responses is the only supported value, and it is the default when omitted", and that the built-in provider IDs openai, ollama and lmstudio are reserved and cannot be overridden. The source confirms it: the WireApi enum has a single variant, and the deserializer maps "chat" to an error reading "wire_api = "chat" is no longer supported". It was announced in discussion #7782 in December 2025 and removed in early February 2026. So a gateway without a real /v1/responses route cannot be pointed at Codex at all. Kunavo implements that route natively, which is why the Codex CLI integration doc exists in this shape:

~/.codex/config.toml
model = "gpt-5-6-sol"
model_provider = "kunavo"

[model_providers.kunavo]
name = "Kunavo"
base_url = "https://api.kunavo.com/v1"
env_key = "KUNAVO_API_KEY"   # the NAME of the variable, not the key
# wire_api defaults to "responses" — the only value Codex accepts

OpenClaw's custom-provider reference takes a different shape entirely — a JSON entry under models.providers with baseUrl, an apiKey shown in the documented examples as ${ENV_VAR}, an api value chosen from the eleven that page enumerates, authHeader to "force credential transport in the Authorization header when required", and an explicit models array, selected with agents.defaults.model.primary. Kunavo's published recipe uses the Anthropic Messages protocol, and the base URL there is the origin because the adapter appends the path itself:

Merge into ~/.openclaw/openclaw.json
{
  "models": {
    "mode": "merge",
    "providers": {
      "kunavo": {
        "baseUrl": "https://api.kunavo.com",
        "apiKey": "${KUNAVO_API_KEY}",
        "api": "anthropic-messages",
        "authHeader": true,
        "models": [
          {
            "id": "claude-haiku-4-5",
            "name": "Claude Haiku 4.5",
            "input": [
              "text"
            ],
            "contextWindow": 200000,
            "maxTokens": 1024
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "kunavo/claude-haiku-4-5"
      }
    }
  }
}

Both snippets are read from the vendors' published documentation, and the Codex one also from Kunavo's own Codex CLI integration doc — neither has been runtime tested here, by Kunavo or in writing this page. Validate with openclaw config validate, which the CLI reference describes as checking the config against the active schema without starting the gateway; follow the restart hint the CLI prints after a config change rather than assuming one way or the other; then check openclaw models list and open a fresh session, since a session-scoped model override can outlive the config edit. The maxTokens value above is a deliberately small first-trial cap, not the model's maximum.

Two limits on the Codex side that a custom base_url does not lift. Standalone web search "defaults to false for custom providers", and the advanced configuration page says setting the capability to true does not enable it — the provider, model and runtime all have to support it. And OpenAI's authentication documentation says API-key sign-in "supports local Codex workflows, but some features that rely on ChatGPT workspace access or cloud services are limited or unavailable", including some plugins whose connection flows need OAuth capabilities the key route does not have. That statement is scoped to API-key sign-in; the documentation does not address a non-OpenAI base URL and cloud access in one sentence, so treat the rest as an inference rather than a published rule.

A worked cost estimate for either route

This is illustrative token arithmetic, not a measured task cost and not a bill ceiling. Assume one session that sends 300,000 uncached input tokens and receives 20,000 output tokens. Cache reads, tool charges and retries are excluded. Rates are live Kunavo catalog prices per million tokens.

ModelRoute Kunavo publishesInput / output per 1MEstimate for the assumed session
GPT-5.6 TerraResponses, reachable from Codex$0.70 / $4.20$0.294
GPT-5.6 SolResponses, reachable from Codex$2.00 / $12.00$0.840
GPT-6 AstraResponses, reachable from Codex$4.00 / $20.00$1.600
Claude Haiku 4.5Anthropic Messages, the published OpenClaw recipe$0.40 / $2.00$0.160

One anchor for the same arithmetic on the other side of the endpoint: OpenAI's API pricing page lists GPT-5.6 Terra at $2.00 input and $12.00 output per 1M tokens, checked September 21, 2026, which puts the same assumed session at $0.840 paid directly. Scale by your own sessions per day before treating any of this as a budget, and note that cheapest listed rate and lowest cost to finish the task are different claims — a model that needs three attempts can cost more than one that needs one.

Kunavo's catalog amount is a billing floor rather than a cap: when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup. The minimum top-up is $10 in prepaid credit, which funds future calls — it is not a subscription and not the price of one task. See billing details.

Running them together, and the restriction that bites

OpenClaw ships an official Codex plugin. Its harness documentation describes Codex owning the low-level agent session — native thread resume, native tool continuation, native compaction and app-server execution — while OpenClaw keeps chat channels, session files, model selection, its own dynamic tools, approvals, media delivery and the visible transcript. Install with openclaw plugins install @openclaw/codex, authenticate with openclaw models auth login --provider openai, and enable the entry in config. It expects a managed Codex app-server at 0.154.0, or a custom, remote or macOS desktop-owned app-server reporting 0.149.0 or newer.

The restriction: that harness is documented for OpenAI only. It says to use canonical OpenAI model refs such as openai/gpt-6-astra, requires OpenAI authentication, and exposes no baseUrl or custom-provider field — so there is no documented way to reach a third-party gateway through it. Whether some undocumented app-server argument could do it is not something this page tested or claims. If you want OpenClaw pointed at a gateway, use OpenClaw's built-in harness with a models.providers entry, as in the JSON above. Blurring the two produces a configuration that will not run Codex against your endpoint. Note too that when OpenClaw sandboxing is active, the harness disables Codex native Code Mode, user MCP servers and app-backed plugin execution, because the Codex app-server process still runs on the gateway host. One version caution: the Codex CLI's 0.155.1 and the harness's app-server 0.149.0-plus are different components, and whether they track together was not verified here.

If you are choosing a provider route rather than a tool, best API for Codex and best API for OpenClaw cover each side, Codex pricing and OpenClaw pricing go deeper on the bills, and Claude Code vs Codex compares Codex against a different agent. To try the Codex route, start at the Codex CLI integration doc and create a Kunavo account when you are ready to fund a key.

FAQ

Is OpenClaw a competitor to Codex?

Only partly, and treating the pair as a head-to-head produces the wrong setup. OpenClaw is a self-hosted gateway that connects chat apps such as Slack, Discord, Telegram and WhatsApp to AI agents, runs as a background service on your own hardware, and schedules recurring jobs. Codex is OpenAI's coding agent, reached through a CLI, an IDE extension, ChatGPT on the web, a mode inside the ChatGPT desktop app, and Codex cloud. They overlap on the part where an agent edits your repository and disagree on almost everything else: who hosts the process, who holds the session, how permissions are granted and who bills you. OpenClaw also ships an official Codex plugin that runs Codex as its embedded agent runtime, so the two are documented to cooperate.

Can OpenClaw use Codex as its agent?

Yes, through the bundled @openclaw/codex plugin, with one restriction that decides most setups. OpenClaw's Codex harness documentation says to use canonical OpenAI model refs and requires OpenAI authentication, via Codex OAuth, an app-server account already present in the agent's Codex home, or an explicit Codex API-key auth profile. It documents no base-URL or custom-provider field, so there is no documented way to point that harness at a third-party gateway. If you want OpenClaw pointed at a gateway, use OpenClaw's own built-in harness with a models.providers entry instead. The harness also needs a managed Codex app-server 0.154.0, or a custom or remote app-server reporting 0.149.0 or newer, checked September 21, 2026.

Does Codex cost $20 a month?

No. $20 per month is the price of ChatGPT Plus, and Codex is included in ChatGPT plans rather than sold separately. The combined pricing page at learn.chatgpt.com lists Free at $0, Go at $8 per month, Plus at $20 per month, Pro from $100 per month, Business at $20 per user per month billed annually for two or more users or $25 per user per month billed monthly, and Enterprise and Edu as contact sales, all checked September 21, 2026. The Codex CLI itself is Apache-2.0 open source and costs nothing. The other way to pay is an API key, where the same page says you pay for Codex usage based on API pricing and get no cloud-based features.

How much does OpenClaw cost?

The OpenClaw project charges nothing. openclaw.ai states "No subscription. No hosted tier. No token." and "There is no enterprise edition and no paid version", and the repository's LICENSE file is a standard MIT License in the name of the OpenClaw Foundation, a US 501(c)(3) non-profit. What you pay instead is model tokens, the machine that keeps the gateway running, and each paid tool the agent calls. Be careful with search results here: a separate site, getopenclaw.ai, sells a managed "OpenClaw Cloud" subscription, advertised on September 21, 2026 as "50% off, just $49/mo" against a stated regular $98 per month, with the model API key and its usage cost left to you. It names no operator and contradicts the official project's own statement. That is a third party's promotional price, not OpenClaw's.

Can I point Codex at a third-party API endpoint?

Yes, but only if that endpoint implements the OpenAI Responses API. Codex's configuration reference states that for a custom provider's wire_api, "responses is the only supported value, and it is the default when omitted", and the provider IDs openai, ollama and lmstudio are reserved and cannot be overridden. Support for wire_api = "chat" was announced as deprecated in the openai/codex discussion #7782 in December 2025 and removed in early February 2026, so a gateway that only serves /v1/chat/completions is unreachable from Codex. Separately, OpenAI's auth documentation says API-key sign-in supports local Codex workflows while features relying on ChatGPT workspace access or cloud services are limited or unavailable.

Which one is better for scheduled or recurring work?

OpenClaw, because scheduling is a first-class part of the gateway rather than something you bolt on. Its automations documentation states that the scheduler "persists jobs, wakes the agent at the right time, and can deliver output to a chat channel, a webhook, or nowhere", with one-shot, interval and cron schedules, plus inbound webhooks. Codex's own recurring and delegated work lives in Codex cloud, which the documentation enters by signing in with a ChatGPT account, with no API-key option listed. So a recurring Codex job implies a ChatGPT plan, while a recurring OpenClaw job implies a machine you keep running.

Checked while writing this page on September 21, 2026: the GitHub API entries and latest releases for both repositories, openclaw.ai, the OpenClaw custom-provider and Codex-harness documentation, and the learn.chatgpt.com pricing, authentication and configuration-reference pages. The remaining citations come from the same day's research pass and were not re-fetched here. Neither integration has been runtime tested by Kunavo: both configuration snippets are documentation-derived, and no completed OpenClaw or Codex task is recorded against this gateway. Kunavo token rates are read from the live catalog; the ChatGPT plan figures and the getopenclaw.ai figure are those vendors' own published prices, and every other dollar figure here is illustrative arithmetic rather than a measured cost.