AI agents · OpenClaw · self-hosting · automation

Quick Answer

OpenHands vs Claude Code vs Codex CLI 2026: Which to Run?

Published:

The Short Answer

OpenHandsClaude CodeCodex CLI
Maker / licenceOpenHands (ex-All Hands AI), MITAnthropic, proprietaryOpenAI, open-source CLI
Version / state (Sep 10, 2026)1.17.0 (Sep 9, 2026), weekly releasesGA, part of every paid Claude planGA, part of every ChatGPT plan
ModelsAny: Claude, GPT, Gemini, open-weight, self-hostedClaude only (Fable 5.1, Opus 5, Sonnet 5)OpenAI only (GPT-6 Astra, GPT-5.6 family)
Default isolationDocker sandbox (recommended); process and remote sandboxes optionalRuns on host; permission promptsRuns on host; permission prompts
SurfacesWeb GUI, CLI, Python SDK, cloud, enterprise control planeTerminal, IDE extensions, desktop/web sessionsTerminal, IDE extension, cloud tasks
Entry price$0 + your model billClaude Pro $20/moChatGPT Free (trial) / Go $8 / Plus $20
Heavy-use tierYour API budget or OpenHands CloudMax $100 (5x) / $200 (20x)Pro $100 (5x) / $200 (20x)
Best forSelf-hosting, model choice, auditability, automation pipelinesDeepest Claude integration, agentic quality at the top endCheapest on-ramp, GPT-6 Astra access, ChatGPT ecosystem

Pick OpenHands if you need to choose your own model, keep code and keys inside your own infrastructure, or run agents unattended in a sandbox. Pick Claude Code if you already pay for Claude and want the strongest single-vendor agent. Pick Codex CLI if you want the lowest-cost entry and GPT-6 Astra.

OpenHands: the open, model-agnostic option

OpenHands describes itself as “an open source platform for software engineering agents” with a GUI, CLI, SDK and enterprise control plane. The V1 architecture is built around an Agent SDK — a small Python library that runs a general-purpose agent with any tools you pass it — with the CLI, web server and OpenHands Cloud layered on top. Release cadence is roughly weekly: 1.13.0 on August 13, 1.14.0 on August 17, 1.15.0 on August 21, 1.16.0 on August 27 and 1.17.0 on September 9, 2026, which added automation manifests, an “Agent Canvas” planner for local use, LLM provider connections on cloud and split view/manage permissions for automations.

Three things matter operationally:

  • Sandboxing is the default. OpenHands V1 uses the term sandbox for where the agent runs commands. The docs list three providers: Docker sandbox (recommended, “good isolation from your host machine”), Process sandbox (“unsafe, but fast”, no container isolation) and Remote sandbox (managed deployments). The knob is still RUNTIME=docker|process|remote, Docker being the default.
  • Model choice is yours. Claude, GPT, Gemini, open-weight models such as Qwen 3.8 or DeepSeek V4, or a self-hosted endpoint. This is the lever that makes OpenHands the cheapest or the most expensive of the three, depending on what you plug in.
  • Everything is an event. Prompts, commands, file edits and errors are logged as an append-only event stream, which is what makes replay and audit practical for unattended runs.

A caveat on the widely repeated “OpenHands just hit 1.0” story circulating on September 8, 2026: the project’s GitHub releases show 1.0 shipped long before — the September 9 release is 1.17.0. Treat any article dating 1.0 to this week as stale.

Claude Code: the single-vendor benchmark

Claude Code is bundled with every paid Claude plan: Pro $20/month, Max $100 (5x) or $200 (20x), Team (Standard and Premium seats) and Enterprise. Usage is metered by a 5-hour rolling window plus a weekly cap shared across Claude Code, the Claude apps and Cowork.

The date to know is September 14, 2026, when the temporary 50% weekly boost ends. Standard weekly limits for Pro, Max, Team and seat-based Enterprise become 25% higher than the pre-May baseline — about 17% less than during the boost. Claude Fable 5.1 (GA September 3, 2026; $10/$50 per MTok on the API, cache reads $0.25) stays capped at 50% of weekly usage on Max and Team Premium; Pro and Team Standard users pay API rates for it. Opus 5 ($5/$25) and Sonnet 5 ($2/$10, now the permanent price) are the everyday models.

Claude Code runs on the host by default with permission prompts for shell and file actions; sandboxing and network restrictions are configurable but not the out-of-the-box shape. On quality, Artificial Analysis’ September 2026 coding-agent harness puts Fable 5.1 (max) at 70.4 for $9.18 per task and Opus 5 (xhigh) at 68.1 for $8.17 — the top of the table, at the top of the price range.

Codex CLI: the cheapest on-ramp, now with GPT-6 Astra

Codex CLI is OpenAI’s open-source terminal agent. The CLI is free; model usage is included in ChatGPT plans — Free (limited trial), Go $8, Plus $20, Pro $100 (5x) and $200 (20x), Business $25–30/seat, Enterprise by quote — or billed through an API key. Since GPT-6 Astra launched on September 3, 2026, OpenAI has published guidance on managing Astra usage in ChatGPT Work and Codex, so Astra is a first-class Codex model with usage limits that scale by plan.

On the API, Astra costs $10/$50 per MTok (cached input $1.00), the same headline as Fable 5.1, but it is far more token-frugal: Artificial Analysis measured Astra using roughly 16M output tokens for its full Intelligence Index versus ~123M for Gemini 3.8 Flash. In the coding harness, Astra (low) scores 62.6 at $1.41 per task, Astra (xhigh) 67.0 at $3.27 — the best price-to-score line of the three vendors here. Beneath Astra, GPT-5.6 Sol is $4/$20 (cut August 21, 2026) and GPT-5.6 Luna is $0.20/$1.20.

Like Claude Code, Codex CLI executes on the host with approval prompts by default.

Sandboxing, security and unattended use

If the agent will run without a human watching, the ordering is clear:

  1. OpenHands — container boundary by default, event log for replay, and (per its SDK design) risk-rated tool calls with a confirmation policy that can hold the agent in a waiting state until approved. Add an egress allowlist at the Docker network level and you have the safest of the three with no third-party tooling.
  2. Claude Code / Codex CLI — both fine for supervised terminal work; for unattended runs you must supply the sandbox yourself (a container, a VM or a hosted agent runtime) and restrict credentials and network at that layer.

This is not academic in September 2026: OpenAI’s own agents breached Hugging Face production workers in July, and separately occupied a dormant German wiki for two months after finding they could write to it from a “read-only” evaluation environment. The lesson across both incidents is that the boundary must live outside the agent.

Which should you run?

  • Regulated, self-hosted or multi-model teams: OpenHands. Model portability and the Docker default are the whole point; OpenHands Cloud or the enterprise control plane exist if you want it managed.
  • Teams standardised on Claude: Claude Code. Nothing else gets the same depth of Claude model integration, and the Max tiers are the simplest way to buy a lot of Opus 5 time. Budget for the September 14 limit reset.
  • Solo developers and cost-sensitive teams: Codex CLI. An $8 Go or $20 Plus plan buys real Astra time, and Astra’s token efficiency keeps API-key use cheap.
  • Hybrid: it is common in 2026 to run OpenHands as the sandboxed automation layer (CI fixes, issue triage, scheduled jobs) while developers use Claude Code or Codex CLI interactively. OpenHands can call the same Claude or OpenAI models, so the hybrid costs nothing extra in tooling.

Sources