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

OpenHands vs Claude Code: workflow, sandboxing and total cost

The two products are no longer the same shape — and Agent Canvas can run Claude Code.

Last reviewed on .

Pick Claude Code when you want a supported terminal coding agent that installs in one command and bills to an account; pick OpenHands when owning the execution environment is itself the requirement. That framing is unusually load-bearing in September 2026, because the two products are no longer the same shape. Claude Code is a proprietary terminal agent. OpenHands, since its monorepo folded Agent Canvas in, is primarily a self-hosted browser control center — and its own terminal CLI, the only directly comparable surface, is in declared maintenance.

The two also meet in the middle, which is why a clean either/or would mislead. Agent Canvas can run Claude Code as a subprocess over the Agent Client Protocol, so "both" is a real configuration with a billing consequence worth reading before you commit to one.

What you are actually comparing

Both projects moved recently enough that a 2025 review will send you to the wrong repository. The repository formerly at All-Hands-AI/OpenHands is now OpenHands/OpenHands and the old path redirects to it, docs.all-hands.dev redirects to docs.openhands.dev, and the standalone OpenHands/agent-canvas repository is archived because Canvas folded into the monorepo. Claude Code's documentation moved too: docs.claude.com/en/docs/claude-code/… now 301s to code.claude.com/docs/en/….

OpenHandsClaude Code
LicenceMIT (monorepo), not archivedProprietary — "© Anthropic PBC. All rights reserved"
What actively shipsAgent Canvas, a self-hosted browser control center, plus the Software Agent SDK and Agent ServerA terminal and IDE agent, installed as a native binary
Latest releasev1.20.0, September 17, 2026; more than 88,000 GitHub starsShips several npm releases a week; at the last check the latest tag was 2.1.278 (September 19, 2026) and the stable tag 2.1.267
Terminal CLI status"feature-complete and primarily maintained for stability"The product itself
Installuv tool install openhands --python 3.12 for the CLI; npm, npx or Docker for Canvascurl -fsSL https://claude.ai/install.sh | bash (documented as the recommended native install), Homebrew, winget or signed apt/dnf/apk repos; a global npm install is documented too, under advanced options
Account neededNone for the local open-source path"a Pro, Max, Team, Enterprise, or Console account"; the free claude.ai plan is excluded

Sources, all re-checked September 21, 2026: the OpenHands repository API, its README, the component map (which carries both the CLI's status line and the Local GUI note below), the CLI page that publishes the uv tool install command, the Claude Code npm registry entry, its LICENSE.md and the setup documentation.

One number decides the CLI question on its own. The OpenHands documentation's own install command pulls the PyPI openhands package, which sits at 1.16.0, uploaded May 8, 2026 — 34 releases, and nothing since spring. Over the same window the library underneath it shipped constantly: openhands-sdk 1.49.2 was uploaded September 17, 2026. If you came here expecting to compare two terminal agents, that gap is the answer: OpenHands' terminal surface is not where its development is.

Who should pick which

Pick Claude Code if your workflow is one developer steering changes in a repository they already have checked out, and you would rather buy the agent than operate it. Execution is local to your workstation under your own user, permissions are Claude Code's own prompts, and setup is a single install command plus a login. The cost path is an Anthropic plan, an API account, or a gateway you point it at. Nothing has to be torn out to try something else alongside it: its memory documentation puts project instructions in a CLAUDE.md (or AGENTS.md) file inside the repository itself.

Pick OpenHands if the thing you actually need is a control plane: several conversations and scheduled automations running against backends you choose, with the sandbox boundary as an explicit decision rather than an assumption. The sandbox documentation offers a Docker sandbox (recommended), a Process sandbox described as "unsafe, but fast" with "No container isolation", and a Remote sandbox, selected by a RUNTIME environment variable. That is a real difference in shape rather than a capability gap: Claude Code documents its own sandboxed Bash tool, built in and enforced by the operating system on macOS, Linux and WSL2, but it sandboxes commands on the machine you are already sitting at, where OpenHands lets you pick the backend the whole agent server runs on. The choice is genuine, and it is also work you now own.

Know the ceiling before you pick OpenHands for a team. Its own FAQ says: "OpenHands is meant to be run by a single user on their local workstation. It is not appropriate for multi-tenant deployments where multiple users share the same instance. There is no built-in authentication, isolation, or scalability." Multi-user is the Enterprise plan, which publishes no price. And Canvas does not sandbox anything by itself — the install page states that agents and ACP processes should be treated as untrusted, that "Agent Canvas is the client and does not provide isolation", and that a backend running directly on your machine lets the agent act with your user account's permissions.

Pick both if you want Canvas's operating surface but Claude Code's agent behaviour. That is a documented configuration, and it is covered two sections down.

Plans and what each one caps

PlanPublished priceWhat it includes or caps
OpenHands Local Open SourceFree"Runs locally", 1 user, unlimited daily conversations; you supply the model account
OpenHands SaaS IndividualFree1 user, 10 max daily conversations; "BYOK or use OpenHands models at-cost"
OpenHands EnterpriseCustom pricingSaaS or self-hosted in your VPC, unlimited users; no figure published
Claude Free$0Claude Code: no
Claude Pro$17/month on annual ($200 billed up front), or $20 monthlyLowest tier that includes Claude Code
Claude MaxFrom $100/month"Choose 5x or 20x more usage than Pro"
Either client on a metered API keyPer-tokenNo subscription; usage is the bill

Read from openhands.dev/pricing and anthropic.com/pricing on September 21, 2026. A note on a figure you will see elsewhere: Max 20x is widely quoted at $200 per month, but Anthropic's page renders only "From $100", and the single $200 in its markup is the Pro annual up-front charge. Confirm the 20x price on the upgrade screen rather than trusting a third-party table, this one included.

Two vendor sources disagree about OpenHands' local browser interface, and it is worth knowing which you are installing. The pricing page's feature table lists "Web-based GUI" under the free Local plan, while the documentation's component map calls the Local GUI "the deprecated Docker-based browser application from the former OpenHands monorepo" and says to "Use Agent Canvas for active browser-client development". Follow the component map.

On models, OpenHands Cloud's Individual tier offers its own routed provider "at cost, with no markup". Its published rate card states that its "Prices listed reflect provider rates with no markup", but should not be read as a current Claude catalogue: the newest Sonnet it lists is Sonnet 4.5 at $3/$15 per million, while Anthropic's own pricing page puts Sonnet 5 at $2/$10. The mechanism — at cost, no markup — is the claim to take from it. This page has not signed in to OpenHands Cloud, so it cannot say which models that account actually offers today.

Canvas can run Claude Code, and the login outranks your key

The monorepo README states that Agent Canvas can "Run OpenHands, Claude Code, Codex, Gemini, or any ACP-compatible agent across local, remote, and cloud backends". The ACP agents page gives Claude Code's default command as npx -y @agentclientprotocol/claude-agent-acp, and describes the mechanism plainly: the vendor's own CLI runs as a subprocess, and the Agent Server "owns the subprocess and the credentials; Agent Canvas only records which agent to run and surfaces a form for the secrets it needs".

The billing detail is in the authentication section, and it surprises people. A subscription login is auto-detected from Claude Code's own credential store — the macOS Keychain, or ~/.claude/.credentials.json on Linux — and the documentation states that "The login takes priority over an API key: while you're signed in, a key set in the environment isn't used." So on a machine where you have ever run claude and logged in with Pro or Max, work you believed was metering against a key is drawing on the subscription instead. The same page notes the inverse: "On a clean cloud sandbox there's no stored login, so an API key is needed instead" — which means the same Canvas setup can bill two different ways depending on which backend it runs on. The model configuration page closes the loop: "ACP agents such as Claude Code, Codex, and Gemini CLI manage their own model access", so an OpenHands LLM profile will not redirect that subprocess.

Same gateway, two different URL strings

If you route either client through one API key of your own, the most common failure is the URL shape, because the two conventions are opposites. Claude Code speaks the Anthropic Messages format and wants an origin; OpenHands routes through LiteLLM and wants a base URL that includes /v1 plus a provider-prefixed model id.

Claude Code — .zshrc / .bashrc
# ANTHROPIC_BASE_URL takes the ORIGIN. Claude Code appends /v1/messages
# itself, so a trailing /v1 produces /v1/v1/messages, which your gateway
# will not be serving.
export ANTHROPIC_BASE_URL=https://api.kunavo.com
export ANTHROPIC_AUTH_TOKEN=sk-your-kunavo-key
export ANTHROPIC_MODEL=claude-sonnet-5

# On this path background tasks run on the main model unless this variable
# pins one, so it is worth setting.
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5
OpenHands — .env
# OpenHands routes through LiteLLM, so the id carries a provider prefix
# and the base URL INCLUDES /v1 — the opposite convention to the one above.
LLM_MODEL=openai/claude-sonnet-5
LLM_API_KEY=sk-your-kunavo-key
LLM_BASE_URL=https://api.kunavo.com/v1

# In Agent Canvas the same three values are Settings > LLM > Advanced:
#   Custom Model / Base URL / API Key

The Claude Code variables are documented on its environment variables pageANTHROPIC_BASE_URL "Override the API endpoint to route requests through a proxy or gateway", and ANTHROPIC_AUTH_TOKEN is a "Custom value for the Authorization header (the value you set here will be prefixed with Bearer)". The gateway protocol page lists the endpoints as /v1/messages and an optional /v1/messages/count_tokens, which is why the variable takes the origin only. The OpenHands fields come from its LLM settings page — Custom Model, "Set your custom model with the provider as the prefix"; Base URL; API Key — and the model-configuration page prescribes openai/<served-model-id>, taking the exact id "usually from its GET /v1/models endpoint".

Four practical gotchas, each from the vendors' own pages rather than from testing:

  • Silent cost inflation on Claude Code. If the gateway does not forward cache_control unchanged, the gateway page says there is "No error: the conversation bills as uncached input on every turn". That is a price difference with no error message attached.
  • Features that switch off behind a custom host. Setting ANTHROPIC_BASE_URL to a non-first-party host disables MCP tool search by default (re-enable with ENABLE_TOOL_SEARCH=true if the proxy forwards tool_reference blocks), and as of v2.1.196 Remote Control is disabled. Gateway model discovery is off by default too.
  • Streams must not be buffered. Claude Code counts relayed bytes including SSE pings and "aborts a stream that goes silent for 300 seconds by default".
  • OpenHands validates on save, and reachability is the backend's. Saving a local profile validates against the backend first and blocks the save on failure, and the base URL must be reachable from the backend — if Canvas runs in Docker and your endpoint is on the host, 127.0.0.1 is the container. You can keep up to 10 LLM profiles per account.

Kunavo publishes setup references for the Anthropic-format route — ANTHROPIC_BASE_URL and the Claude Code integration — and the OpenAI-format route in quickstart. Those are published configuration references, not compatibility tests: neither client was installed or run against the endpoint for this page. There is no OpenHands-specific setup page here, and the documented Anthropic-prefixed route for OpenHands is unverified either way, so treat the openai/ form above as the documented path and confirm it in your own environment.

What a session costs on one metered key

These are illustrative token arithmetic, not measured task costs and not a bill ceiling. Assume a small task of 150k uncached input and 8k output tokens, and a long agent run of 800k uncached input and 40k output — agent sessions are input-heavy because files and tool results are re-sent. Rates are live Kunavo catalog prices per million tokens, and the same rates apply whichever client sends the request.

ModelInput / output per 1MSmall task estimateLong agent run estimate
Claude Haiku 4.5$0.40 / $2.00$0.076$0.400
GPT-5.6 Terra$0.70 / $4.20$0.139$0.728
Claude Sonnet 5$2.00 / $10.00$0.380$2.000
Claude Opus 5$2.00 / $10.00$0.380$2.000

For a sense of scale against a first-party figure: Anthropic's own cost documentation reports that "Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users". Under the assumptions above, $13 is roughly 7 long runs or 34 small tasks on Claude Sonnet 5 at $2.000 and $0.380 respectively. Anthropic's figure is scoped to its own enterprise deployments and is not a quote for a gateway; the arithmetic is a sanity check on the order of magnitude, not a forecast. Caching changes it materially in either direction — see prompt caching.

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. Cache charges and external tools sit outside this example. The minimum top-up is $10 in prepaid credit, a funding minimum rather than a task fee or a subscription — see billing details.

Three cost lines, not one

The comparison people get wrong is "free client versus paid client". Split the budget instead:

  1. Model tokens. Identical question for both, and the table above answers it. This is the only line an OpenHands Individual plan appears to meter, though its pricing page says nothing explicit about compute or sandbox billing either way.
  2. The machine running the sandbox. No extra machine for Claude Code on its documented default path, because the agent and its built-in Bash sandbox run on the workstation you already have. Non-zero and unpublished for self-hosted OpenHands: the documentation describes Docker, VM and remote backends but publishes no cost model, so budget VM hours, storage and sandbox container time from your own provider's rates. This page will not invent a figure for it.
  3. The account being billed. A Claude plan, an API balance, or — on the Canvas-runs-Claude-Code path — whichever of the two the machine happens to have a login for.

Migration between them is cheap in the direction people usually go. Claude Code keeps its project instructions in repository files, so trying OpenHands does not require deleting anything; and because Canvas can drive Claude Code over ACP, an evaluation does not have to be a switch at all. The expensive direction is standardising a team on self-hosted OpenHands, because that is where the single-user limits and the unowned infrastructure line show up.

Start with one bounded task

Whichever you choose, run the same small, verifiable change on both — a bug with a failing test — from the same commit, in separate workspaces, and record the diff, the review effort and the charge your account actually registered. That is the only comparison on this page that is yours rather than a vendor's.

If the metered route is the one you want, the Claude Code integration guide has the Anthropic-format configuration and creating a Kunavo account funds the key; the OpenAI-format value in quickstart is what the OpenHands Advanced tab wants. Still deciding between clients rather than providers? OpenHands vs OpenCode compares the two open-source surfaces, Claude Code pricing covers the plan side in full, and Claude Code without a subscription covers the gateway route on its own.

FAQ

What is the difference between OpenHands and Claude Code?

Claude Code is Anthropic's proprietary terminal and IDE agent: its LICENSE.md reads "© Anthropic PBC. All rights reserved", it requires a Pro, Max, Team, Enterprise or Console account, and the free claude.ai plan does not include it. OpenHands is MIT-licensed open source, and as of September 2026 the thing that actively ships from its monorepo is Agent Canvas — a self-hosted browser control center for agent conversations and automations, not a terminal agent. OpenHands also has a terminal CLI, but its own documentation describes that CLI as feature-complete and primarily maintained for stability. So the honest comparison is a supported single-player terminal agent versus a self-operated control plane you run yourself.

Is OpenHands free, and does that make it cheaper than Claude Code?

The software is free: the OpenHands monorepo is MIT-licensed, and the pricing page lists Local Open Source at Free and SaaS Individual at Free with a cap of 10 daily conversations. That is not the same as a free total. A self-hosted OpenHands backend still runs model tokens through some provider account, and it still runs a machine — a Docker sandbox, a VM, or a remote sandbox — whose cost OpenHands publishes no model for. Claude Code bundles the machine question away because the agent runs on your own workstation and the bill is the account it is signed into. Compare three lines, not one: model tokens, the compute running the sandbox, and the account being billed.

Can OpenHands run Claude Code?

Yes, and this is the detail most comparisons miss. The OpenHands monorepo README states that Agent Canvas can run OpenHands, Claude Code, Codex, Gemini or any ACP-compatible agent, and the Agent Canvas ACP documentation gives Claude Code's default command as npx -y @agentclientprotocol/claude-agent-acp. The vendor's own CLI runs as a subprocess, and the documentation says the Agent Server owns that subprocess and its credentials while Agent Canvas only records which agent to run. One consequence is worth knowing before you budget: the documentation states that a subscription login takes priority over an API key, so if a Claude Code Pro or Max login is stored on the machine running the Agent Server, an ANTHROPIC_API_KEY set in the environment is not used at all.

Can I point OpenHands and Claude Code at the same API gateway?

Both clients document a custom endpoint, but through different protocols and different URL shapes. Claude Code's ANTHROPIC_BASE_URL is an origin in the Anthropic Messages format — Claude Code appends /v1/messages itself, so including /v1 in the value produces /v1/v1/messages, a path your gateway will not be serving — paired with ANTHROPIC_AUTH_TOKEN. OpenHands routes model calls through LiteLLM, so its documented path for a compatible gateway is a model id written as openai/<served-model-id> plus a base URL that does include /v1. An ACP agent running inside Canvas is carved out entirely: the OpenHands documentation says ACP agents manage their own model access, so an OpenHands LLM profile does not control a Claude Code subprocess's endpoint.

Is the OpenHands CLI still maintained?

It is published and not archived, but it is explicitly not where the work is going. The OpenHands documentation lists the CLI as feature-complete and primarily maintained for stability, and the release dates match that language: the documented install command is uv tool install openhands --python 3.12, and PyPI serves openhands 1.16.0, uploaded May 8, 2026, out of 34 releases. Over the same period the library it depends on is moving fast — openhands-sdk 1.49.2 was uploaded September 17, 2026 — and the monorepo that now ships Agent Canvas tagged v1.20.0 on September 17, 2026. If you want the actively developed OpenHands surface, that is Agent Canvas and the SDK, not the CLI.

Which one should a team pick?

Neither product is a multi-user answer on its own. The OpenHands FAQ states plainly that OpenHands is meant to be run by a single user on their local workstation, that it is not appropriate for multi-tenant deployments, and that there is no built-in authentication, isolation or scalability; multi-user work is the Enterprise plan, which publishes no price. Claude Code is licensed per account and sold through Pro, Max, Team, Enterprise or Console, so a team is a seat count or an API budget rather than a deployment project. Pick Claude Code when you want per-developer setup with no infrastructure to own, and pick OpenHands when owning the execution environment and the automation surface is the actual requirement.

Repository, package registry, pricing and documentation sources re-checked September 21, 2026; the underlying research was gathered September 18, 2026. Neither client was installed, configured or run against Kunavo's endpoint for this page — every configuration claim is documentation-derived, and no compatibility or performance test was performed. No task-success or speed comparison is offered because no neutral benchmark of the two agents was found. Kunavo token rates come from the live catalog, and every dollar example here is illustrative token arithmetic.