What Are Claude Code and Codex?
Claude Code is Anthropic’s “agentic” coding tool. It comes as a local CLI, a VS Code extension, and a cloud/web offering (research preview, available on Pro/Max). It can read and modify code, run commands, and ships with extras that push its autonomy further — subagents, checkpoint rollbacks, and more.
Codex is OpenAI’s local terminal coding agent (open source, written in Rust). It can read, edit, and run the code in your current directory, with an interactive TUI, a scriptable exec mode, fine-grained sandbox and approval policies, and native MCP integration (STDIO and streamable HTTP, including OAuth). One shared config.toml covers both the CLI and the IDE extension.
Use Cases
| Dimension | Claude Code | OpenAI Codex CLI |
|---|---|---|
| Form factor | Terminal, VS Code extension, web (cloud) | Terminal CLI + IDE extension |
| Price | Expensive, even through third-party API relays | Cheaper; can ride on a Team subscription |
| Where it runs | Locally; or in isolated cloud sandboxes running tasks in parallel (auto PRs, progress tracking) | Locally, reading/editing/running inside your working directory (interactive TUI / scripted mode) |
| Security model | Sandbox built on filesystem + network isolation, fewer permission prompts; Git goes through a controlled proxy | Choose an “approval mode”: Auto by default (free rein inside the workspace), approval needed for anything outside it or online; read-only and full-access modes also available |
| MCP (tool extension) | Official docs and a plugin ecosystem; connect external tools via MCP | Native MCP: STDIO and streamable HTTP (with OAuth; requires enabling experimental_use_rmcp_client); the CLI and IDE share one config.toml |
| Windows | Supported (including WSL / Git Bash routes) | Experimental; officially recommends WSL |
| Typical scenarios | Multi-repo / parallel small changes, TDD fixes, controlled cloud environments | Deep local refactors, scripted integration, one config shared with the IDE |
Node Environment Setup
You need Node 20 or later.
If you’re a frontend engineer, I’d recommend managing your Node.js versions with nvm.
# List available remote Node.js versionsnvm ls-remote# Install the Node.js LTSnvm install --lts# Switch to the Node.js LTSnvm use --ltsOnce installed, verify the version:
node --versionClaude Code Configuration
In the Terminal
# Install the CLInpm install -g @anthropic-ai/claude-code# Start (in the terminal)claudeIn VS Code
Install Claude Code for VS Code from the marketplace.
Authorization
Edit ~/.claude/settings.json and add the following:
{ "env": { "ANTHROPIC_AUTH_TOKEN": "", // Your Claude API key. If you're using a third-party relay, put the relay's API key here "ANTHROPIC_BASE_URL": "", // Usually https://api.anthropic.com/v1. If you're using a third-party relay, put the relay's API URL here "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1" }, "permissions": { "allow": [], "deny": [] }}Codex Configuration
In the Terminal
# Install (either one)npm install -g @openai/codex# Start the interactive TUIcodexIn VS Code
Install OpenAI Codex for VS Code from the marketplace.
Authorization
Create the ~/.codex directory.
Create and edit ~/.codex/config.toml with the following:
model_provider = "codex"model = "gpt-5" # Can be changed to model = "gpt-5-codex"model_reasoning_effort = "high"disable_response_storage = true
[model_providers.codex]name = "codex"base_url = "https://api.openai.com/v1" # Usually https://api.openai.com/v1. If you're using a third-party relay, put the relay's API URL herewire_api = "responses"requires_openai_auth = trueCreate and edit ~/.codex/auth.json with the following:
{ "OPENAI_API_KEY": "your-api-key-here" // Your OpenAI API key. If you're using a third-party relay, put the relay's API key here}