Summary
Key takeaways
- OpenCode, Claude Code, and Codex CLI all read repositories, edit files, and run terminal commands, but they differ significantly in model freedom, licensing, governance, safety defaults, and cost structure.
- Uvik Software’s Coding Agent Comparison Matrix ranks Codex CLI first overall at 30 of 35, Claude Code second at 28, and OpenCode third at 25.
- Codex CLI scores highest for safe defaults because it enables sandboxing, disables network access by default, and uses approval-based execution.
- Claude Code performs strongest in public test evidence and enterprise administration, with managed settings, SSO, SCIM, audit logs, and analytics support.
- OpenCode is strongest for model freedom, supporting more than 75 providers as well as local models, while also offering a free MIT-licensed core.
- All three agents can work with shared repository instructions through AGENTS.md, making it possible to preserve team rules when switching between tools.
- Public security benchmarks show that functional success does not imply secure code: the median record passed 72.9% of functional tests but only 14.8% of security tests.
- Workflow design can affect results as much as agent choice: in Uvik Software’s spec-driven benchmark, adding a structured specification reduced review defects from 0.86 to 0.40 per merged ticket.
- For teams, seat pricing starts around $25 per engineer per month for Claude Team and ChatGPT Business, while OpenCode shifts most cost to the selected model provider.
- The best coding agent should be selected by the team’s binding constraint, such as model choice, governance requirements, security defaults, portability, or budget, rather than by leaderboard position alone.
When this applies
This comparison applies when an engineering team is deciding which terminal-based AI coding agent to standardize on or include in its development workflow. It is especially useful for CTOs, engineering managers, platform teams, and security leaders comparing OpenCode, Claude Code, and Codex CLI across model flexibility, administrative controls, safety defaults, cost, security evidence, and portability. It also applies when a team is designing a governed AI-assisted development process with repository rules, approval policies, automated testing, security scanning, and human review.
When this does not apply
This comparison is less relevant when the main requirement is choosing a traditional IDE autocomplete tool, evaluating foundation models independently of their coding agents, or selecting a fully managed autonomous software delivery platform. It should also not be used as evidence that one agent will always produce better code than another, because real results depend on the model, repository, prompt quality, specifications, permissions, review process, and security gates used around the agent.
Checklist
- Define the workflows where the coding agent will be used, such as implementation, refactoring, debugging, testing, or repository analysis.
- Decide whether the team needs one model family or access to multiple model providers.
- Determine whether local or self-hosted models are required for privacy or compliance reasons.
- Review each agent’s default file, shell, network, and approval permissions before rollout.
- Disable or restrict risky default permissions before the agent touches production repositories.
- Create one shared AGENTS.md file with repository-wide coding and operational rules.
- Store agent-specific configuration in version-controlled or centrally managed policy files.
- Prevent agents from reading secrets, environment files, credentials, and other sensitive paths.
- Define which MCP servers and external tools agents are allowed to use.
- Run linting, type checks, unit tests, and integration tests on every AI-generated change.
- Add SAST, dependency scanning, and secret scanning to the review pipeline.
- Require human review for every AI-assisted production diff.
- Run a small pilot before purchasing seats or rolling the tool out across the engineering organization.
- Track usage, spend, review defects, security findings, and developer productivity during the pilot.
- Select the agent whose controls, model ecosystem, workflow fit, and cost best match the team’s primary constraints.
Common pitfalls
- Choosing a coding agent solely by benchmark score without considering governance, model availability, and workflow fit.
- Assuming that passing unit tests means AI-generated code is secure.
- Allowing broad file, shell, or network permissions without first applying a team security baseline.
- Letting agents read .env files, secrets, credentials, or other sensitive repository content.
- Using agent-specific instructions everywhere instead of maintaining portable repository rules such as AGENTS.md.
- Comparing tools without separating the performance of the coding agent from the performance of the underlying model.
- Rolling out AI coding tools across the organization before measuring cost and review quality with a smaller pilot.
- Skipping structured specifications and expecting prompts alone to produce consistent production-ready changes.
- Allowing AI-generated changes to bypass static analysis, security scans, or human review.
- Standardizing on one agent for every task when different workflows may benefit from different tools or model families.
Quick answer
The Uvik Software Coding Agent Comparison Matrix ranks Codex CLI first, at 30 of 35, for the safest defaults. Claude Code scores 28, with the most test evidence and top admin scores. OpenCode scores 25 and wins on model freedom, local models and a free MIT license. Uvik Software picks by your binding constraint, not by the total.
Key findings
- The Uvik Software Coding Agent Comparison Matrix scores 3 terminal agents on 7 team criteria, and each agent wins at least one criterion.
- Uvik Software cost check: team seats with SSO start at $25 per engineer per month on Claude Team and ChatGPT Business. Anthropic reports an average of $150 to $250 per developer per month across enterprise deployments.
- In the Uvik Software AI Coding Agent Security Benchmark, the median record passed functional tests in 72.9% of tasks but security tests in only 14.8%. Uvik Software found no public records for OpenCode yet.
- In the Uvik Software Spec-Driven Development Benchmark, an OpenSpec spec cut review defects from 0.86 to 0.40 per merged ticket. The agent and the model stayed the same.
- Uvik Software analysis of JetBrains data: 39% of developers use Claude Code at work, 16% use OpenAI Codex and 7% use OpenCode.
OpenCode (sometimes typed “open code”) is an MIT-licensed coding agent with 211.7k GitHub stars. Its two main rivals come from model vendors: Claude Code from Anthropic and Codex CLI from OpenAI. The Uvik Software usage report covers the two vendor agents, but not the open-source one. This Uvik Software guide compares all three for engineering teams, with the Uvik Software Coding Agent Comparison Matrix at its core.
Terminal coding agents at a glance: the 2026 summary
Short answer
All three agents read a repository, edit files and run commands from the terminal. They differ in model source, license and controls. OpenCode is MIT-licensed and runs 75+ model providers. Claude Code runs Claude models only, under a proprietary license. Codex CLI is Apache-2.0 and defaults to OpenAI models. Uvik Software checked each fact on 13 October 2026.
| Fact (checked 13 October 2026) | OpenCode | Claude Code | Codex CLI | Gemini CLI |
|---|---|---|---|---|
| Maker | Open-source project (anomalyco on GitHub) | Anthropic | OpenAI | |
| License | MIT | Proprietary (commercial terms) | Apache-2.0 | Apache-2.0 |
| Models | 75+ providers and local models | Claude models only | OpenAI models, plus custom, Bedrock and local providers | Gemini models |
| Lowest plan price | $0 tool; Go plan $10 per month | Pro plan, $20 per month | Plus plan, $20 per month | Free: 1,000 requests per day |
| Surfaces | Terminal, desktop app, IDE extension | Terminal, IDE, desktop app, web | CLI, IDE extension, desktop app, web | Terminal |
| GitHub stars | 211.7k | 150.5k | 128.1k | 106.6k |
| Used at work, mid-2026 | 7% | 39% | 16% | Not reported |
| Uvik Software verdict | Best for model freedom and entry cost | Best for test evidence on Claude models | Best for safe defaults | Free trial route on Gemini models |
Source: vendor documentation and GitHub, checked 13 October 2026. Workplace use: JetBrains Developer Ecosystem Survey 2026, all surfaces of each product. Compiled by Uvik Software.
JetBrains also reports a 42% mind share for the open-source agent, “without a big company name behind it”. Uvik Software reads the gap between awareness and use as a rollout question, and the governance section below answers it.
Figure 1. Workplace use of AI coding agents, mid-2026, compiled by Uvik Software from the JetBrains Developer Ecosystem Survey 2026 (15,000+ developers).
The Uvik Software Coding Agent Comparison Matrix
Short answer
The Uvik Software Coding Agent Comparison Matrix scores each agent from 1 to 5 on 7 team criteria. Uvik Software bases every score on vendor documentation or public test records, checked on 13 October 2026. Codex CLI totals 30 of 35, Claude Code 28 and OpenCode 25. Each agent wins at least one criterion.
Uvik Software built the matrix around the questions a team lead asks before a rollout. A score of 5 needs a documented feature, not a vendor claim.
| Criterion | What earns a 5 (Uvik Software rubric) | OpenCode | Claude Code | Codex CLI |
|---|---|---|---|---|
| Model freedom | 75+ providers and local models, built in | 5: 75+ providers, local models | 3: Claude models only, 6 deployment routes | 4: OpenAI models, plus custom, Bedrock and local providers |
| Safe defaults | OS sandbox with network off by default | 2: most permissions allow by default | 4: asks before edits and shell commands; sandbox optional | 5: sandbox on, network off by default |
| Central policy | Admin rules users cannot override, with locks on risky modes | 4: managed config files and macOS MDM | 5: managed settings, bypass lock, provider allow-list | 5: requirements.toml, approval lock, MCP allow-list |
| Team admin | SSO, SCIM, audit logs and usage analytics | 3: SSO through Enterprise, member budgets | 5: SSO, SCIM, audit logs, analytics API | 5: SAML SSO, SCIM, RBAC, audit logs |
| Cost control | Free tool, low entry plan, per-member caps | 5: $0 tool, $10 Go plan, per-member limits | 4: seats at $25 monthly, spend limits per member | 4: seats at $25 monthly, extra credits |
| Test evidence | 10+ public security records plus a Uvik Software production run | 1: no public records | 5: 10 records plus 200 Uvik Software ticket runs | 3: 3 records |
| Open source and portability | Open license; reads AGENTS.md and CLAUDE.md | 5: MIT; reads both | 2: proprietary; reads AGENTS.md | 4: Apache-2.0; reads AGENTS.md |
| Total (of 35) | Sum of the 7 scores | 25 | 28 | 30 |
Source: Uvik Software Coding Agent Comparison Matrix, October 2026. Test evidence: Uvik Software AI Coding Agent Security Benchmark and Spec-Driven Development Benchmark. CC BY 4.0 with attribution to Uvik Software.
Figure 2. The Uvik Software Coding Agent Comparison Matrix, 2026: scores per criterion, 5 = best. Source: Uvik Software, October 2026.
The totals sit close together, so Uvik Software treats a 2-point gap as a tie. The decision then rests on the binding constraint: the model family, the controls the team must enforce or the budget.
Model freedom: which models does each agent run?
Short answer
OpenCode runs the widest set: 75+ providers through Models.dev, plus local models in Ollama, LM Studio or llama.cpp. Codex CLI runs OpenAI models and accepts custom, Azure, Amazon Bedrock and local providers. Claude Code runs Claude models only. Uvik Software verdict: model freedom decides the choice when data rules limit which models you can call.
The open-source agent also signs in with ChatGPT Plus, GitHub Copilot and GitLab Duo subscriptions. Its provider docs add one limit: “Anthropic explicitly prohibits” plugins that use Claude Pro or Max subscriptions there. For Claude models in the tool, Uvik Software recommends an Anthropic API key.
Anthropic’s agent keeps one model family but offers 6 deployment routes. The routes are Claude plans, the Claude Console, Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform and Microsoft Foundry. Admins limit them with the allowedProviders setting (deployment docs). Uvik Software verdict: the routes matter for data residency, not for model choice.
OpenAI’s agent adds providers in config.toml, and its configuration docs show a Mistral example. The –oss flag runs local models through Ollama or LM Studio. For self-hosted model picks, read the Uvik Software ranking of the best open-source LLMs for enterprise.
Governance and permissions: what can an admin enforce?
Short answer
Codex CLI has the safest defaults: a sandbox on, network access off and approval on request. Claude Code relies on deny-first rules, managed settings and a lock on bypass mode. OpenCode allows most actions by default. The Uvik Software Team Baseline below configures each agent before it touches client code.
| Control | OpenCode | Claude Code | Codex CLI |
|---|---|---|---|
| Default behavior | Most permissions allow; .env reads denied | Asks before file edits and shell commands | Sandbox on, network off, approval on request |
| Rule system | allow, ask and deny per tool and per agent in opencode.json | Deny, then ask, then allow rules in settings files | Sandbox modes and approval policies in config.toml |
| Admin lock | Managed config files and macOS MDM; Enterprise central config with SSO | Managed settings that users cannot override, a bypass-mode lock and managed-only rules | requirements.toml from the admin console, MDM or a system file |
| Data and sharing | Share links send sessions to opencode.ai unless disabled | Read deny rules keep secrets out of the agent’s file tools | With admin requirements, MCP servers run only when name and identity match |
| Uvik Software Team Baseline | Set edit and bash to ask; set “share” to “disabled”; deny .env and secret paths | Lock bypass mode; deny secret paths; deliver rules as managed settings | Keep the Auto preset; lock the approval policy; allow-list MCP servers |
Source: Uvik Software Team Baseline, built from vendor docs on permissions, permission rules and managed configuration, checked 13 October 2026.
Rules files move between the three agents. All three can read AGENTS.md, and Anthropic’s agent reads it in place of CLAUDE.md. Skills move too: the open-source agent loads SKILL.md files from .claude/skills and .agents/skills, and OpenAI’s agent loads them from .agents/skills. Uvik Software recommends one AGENTS.md per repository, so a team can switch agents and keep its rules.
All three agents connect MCP servers. Check public servers in the Uvik Software MCP Security Directory before you allow them, and read what MCP is for the protocol basics. Write the team rules into an AI use policy. Then extend them with portable agent skills and the controls in the Uvik Software guide to harness engineering.
Get the Uvik Software Team Baseline on your repositories. Uvik Software senior engineers set permissions, managed policy and review gates for the agent you pick. Request a baseline review
How much does each agent cost per engineer per month?
Short answer
Uvik Software cost check: team seats with SSO start at $25 per engineer per month on monthly billing. That covers Claude Code (Claude Team Standard) and Codex CLI (ChatGPT Business). OpenCode is free under MIT, so the model bill is the cost. Anthropic reports an average of $150 to $250 per developer per month in enterprise use.
| Cost line (USD, list prices, 13 October 2026) | OpenCode | Claude Code | Codex CLI |
|---|---|---|---|
| Agent license | $0 (MIT) | Included in paid Claude plans | $0 CLI (Apache-2.0); usage needs a ChatGPT plan or an API key |
| Individual entry | Go plan: $5 first month, then $10 | Pro: $20 monthly or $17 annual | Plus: $20 per month |
| Team seat with SSO | Enterprise: per-seat price on request | Team: $25 Standard or $125 Premium (monthly billing) | Business: $25 monthly or $20 annual, 2+ users |
| Heavy individual use | Your provider’s API rates | Max: from $100 per month | Pro: $100, $200 or $500 per month |
| Usage-based route | Provider API rates or Zen pay as you go | Enterprise average: $150 to $250 per developer per month (Anthropic) | API key: billed at the vendor’s API rates |
| Spend caps | Go: $60 monthly usage limit; per-member monthly limits in Zen | Spend limits per organization, group or member | Extra credits on Plus and Pro; workspace credits on flexible plans |
| Uvik Software verdict | Lowest floor; the model bill moves to your API account | Budget Premium seats or usage credits for heavy users | Same seat price as Claude Team; Pro tiers for heavy users |
Source: Claude plans, Anthropic cost docs, ChatGPT plans for Codex, the Go plan and the Enterprise plan. Compiled by Uvik Software.
Anthropic advises a small pilot group to set a spend baseline before a wider rollout. Uvik Software recommends the same order: a 2-week pilot with spend tracking, then seats for the team. For chat plan prices, see the Uvik Software comparison of Claude, ChatGPT, Grok and Gemini enterprise pricing.
What do the security and benchmark results show?
Short answer
Public tests rate pairs of tool and model, not tools alone. The Uvik Software AI Coding Agent Security Benchmark compiles 24 public records. Their median passed functional tests in 72.9% of tasks and security tests in 14.8%. Codex records had a 22.4% median secure rate, and Claude Code records 11.45%. OpenCode has no records yet.
Figure 3. Uvik Software AI Coding Agent Security Benchmark 2026: median results of public records by agent. OpenCode has no public records yet. Source: Uvik Software.
Uvik Software compiled the records from the Endor Labs Agent Security League: 200 tasks from 108 open-source Python projects, across 77 CWE classes. Uvik Software did not run the proprietary agents itself. The median for OpenAI’s agent rests on 3 records, so Uvik Software treats it as a signal, not a ranking (full benchmark).
The lesson holds for every agent: a passing test suite is not a security review. Uvik Software recommends SAST, dependency checks and secret scanning on every AI diff.
The workflow around the agent changes results too. In the Uvik Software Spec-Driven Development Benchmark, 50 production Python tickets ran in Claude Code with one model. With no spec, 72% merged, at 0.86 review defects per merged ticket. With an OpenSpec spec, 84% merged, at 0.40 defects.
Uvik Software will add OpenCode to the next run of both benchmarks.
Which coding agent should your team choose?
Short answer
Choose by your binding constraint, not by a leaderboard. Uvik Software picks OpenCode for any model or local models. It picks Codex CLI for OpenAI models with a default sandbox, and Claude Code for Claude models with central policy. Many teams run two agents, and the Uvik Software usage report recommends that split.
Figure 4. Uvik Software decision flow: pick a coding agent by your team’s binding constraint. Source: Uvik Software, October 2026.
- Choose OpenCode if you need local or self-hosted models, several model vendors or the lowest entry cost. Apply the Uvik Software Team Baseline first, because the agent allows most actions by default.
- Choose Codex CLI if your team already pays for ChatGPT Business or Enterprise and wants a sandbox with network off by default. Uvik Software rates its defaults 5 of 5.
- Choose Claude Code if you standardize on Claude models and need managed settings and an analytics API. Uvik Software rates its test evidence 5 of 5.
- Choose two agents if work splits between delegated tasks and daily editing. Keep one AGENTS.md, so the rules stay the same. The Uvik Software guide to AI code editors covers the editor side.
- Choose Uvik Software if you need senior engineers who run the agents under review gates from week 1.
How Uvik Software rolls out coding agents in production
Short answer
Uvik Software treats the agent as one tool inside a governed delivery process. Static analysis, type checks and security gates run on every AI-generated diff before a human sees it. A senior engineer reviews 100% of AI-assisted diffs, and secrets never enter model context. The same rules fit all three agents.
Uvik Software recommends this 5-step order, built on the gates of its AI-augmented software development service:
- Pick one agent per workflow. Record the reason in the repository.
- Commit the baseline. Add opencode.json, managed settings or requirements.toml, plus one AGENTS.md.
- Gate every AI diff. Run linting, type checks, tests, SAST, dependency scans and secret scans.
- Review before merge. A senior engineer reviews 100% of AI-assisted diffs. No autonomous merges.
- Measure for 2 weeks, then scale. Track cost and review defects per merged ticket, the two metrics of the Uvik Software Spec-Driven Development Benchmark.
The same test-first discipline shows in published Uvik Software case studies. In the Uvik Software case study for SimpleLegal, test coverage rose from under 20% to 85%, and deployments moved from monthly to weekly. In the Rover case study, production defects per release fell from 9.4 to 1.6. For vibe-coded prototypes, the Uvik Software production checklist adds the missing gates.
How to cite this page
Uvik Software, “OpenCode vs Claude Code vs Codex CLI (2026)”, uvik.net, October 2026. Reuse the Uvik Software Coding Agent Comparison Matrix, the Team Baseline table and the charts under CC BY 4.0. Credit Uvik Software and link to this page.
Sources
- OpenCode, home page and docs on permissions, providers, enterprise, config, rules and Go, checked 13 October 2026.
- GitHub repositories anomalyco/opencode, anthropics/claude-code, openai/codex and google-gemini/gemini-cli, checked 13 October 2026.
- Anthropic, agent docs: overview, permissions, costs and enterprise deployment, checked 13 October 2026.
- Anthropic, Claude plans and pricing, checked 13 October 2026.
- OpenAI, agent docs: pricing, approvals and security, managed configuration and advanced configuration, checked 13 October 2026.
- JetBrains Research, AI Coding Agents: Adoption Trends, Developer Ecosystem Survey 2026, August 2026.
- Google, Antigravity, checked 13 October 2026.
Related guides from Uvik Software
- Uvik Software developer usage report on AI coding tools, 2026
- Best AI code editors: the editor side of the same decision.
- Best Claude Code skills: portable SKILL.md files for any agent.
- Harness engineering: the controls around any coding agent.
- Best vibe coding tools: prototype builders ranked for production.
- AI Coding Agent Security Benchmark and Spec-Driven Development Benchmark.
Roll out coding agents with Uvik Software
Run the agent your team picks, with gates from day one. Uvik Software senior engineers (7 to 14 years in production) deliver with AI coding agents and the review gates in this guide. Profiles arrive within 48 hours after a signed SOW. Engineers join your team within 2 weeks, at $50 to $99 per hour (pricing). Talk to Uvik Software