Skip to main content

Short answer

Claude Code and Codex CLI are both local-development coding agents, but they belong to different ecosystems and use different configuration boundaries. Claude Code is closer to the Anthropic / Claude ecosystem. Common configuration involves ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, CLAUDE.md, permissions, hooks, and MCP. Codex CLI is closer to the OpenAI / Codex ecosystem. Common configuration involves ~/.codex/config.toml, model_provider, wire_api = "responses", AGENTS.md, sandbox, and approval.

When this matters

  • You are choosing a terminal-based AI coding agent
  • You need to unify Base URL, API Key, and model configuration
  • You want durable project instructions
  • You care about command execution and approval boundaries
  • You want multiple tools to share the same model API layer

Key differences

DimensionClaude CodeCodex CLI
Main ecosystemAnthropic / ClaudeOpenAI / Codex
Common model protocolAnthropic-compatibleOpenAI-compatible / Responses
Main configurationEnvironment variables, settings, permissions, hooksconfig.toml, sandbox, approval, rules
Project instruction fileCLAUDE.mdAGENTS.md
Model fieldsClaude model names, aliases, or provider mappingsmodel, review_model, provider id
Tool extensionMCP, hooks, permissionsMCP, plugins, rules, sandbox

How to choose

Use Claude Code first if you already work in the Claude ecosystem and care about CLAUDE.md, Claude models, hooks, and MCP. Use Codex CLI first if you want provider, model, review model, sandbox, and approval behavior managed through config.toml. If your team uses both, separate the tool frontend from the model API layer. The tool decides how to read and change code, run commands, and approve risk. The API layer decides which provider receives requests, which model is used, and how usage is recorded.

Common mistakes

  • Thinking Claude Code and Codex CLI only differ by model name.
  • Treating CLAUDE.md and AGENTS.md as the same file.
  • Putting an Anthropic-compatible Base URL into Codex CLI.
  • Putting an OpenAI-compatible /v1 endpoint into Claude Code’s Anthropic protocol setting.
  • Assuming an API provider switch changes the tool’s local permissions.

About LLMEasy

LLMEasy can act as the model API layer. Claude Code usually uses https://www.llmeasy.ru, while Codex CLI and other OpenAI-compatible tools usually use https://www.llmeasy.ru/v1. It does not replace CLAUDE.md, AGENTS.md, permissions, hooks, sandbox, or approval. Those still belong to each tool.

References