Skip to content
Fluf
Beta

We are actively shipping every day for Fluf.

New things land daily and the product keeps getting better. Tell us what to fix or build next: we read every message.

Claude Code vs Codex: which coding agent to run in 2026

Claude Code vs Codex, compared on what matters for agents: subagents, headless runs, permissions, scheduling, limits and price. And why many run both.

A blue Fluf beside a clock between a coral Fluf and a lilac peach Fluf, under a violet night sky.
On this page

Part of How Fluf runs Claude Code with your own login (2026 rules)

Claude Code vs Codex comes down to three questions: which plan you already pay for, how much you want to extend the agent, and whether the source matters to you. Claude Code is Anthropic's agent: the richer extension model (subagent files, hooks, plugins, experimental agent teams) and a 1M-token context on current models. Codex is OpenAI's: an Apache-2.0 open-source CLI, subagents on by default, and included in every ChatGPT plan down to Free. Both are excellent. Below is the comparison from the official docs, checked 27 November 2026, and a verdict per type of developer.

The short answer

  • You already pay for Claude: start with Claude Code. Pro at $20 a month includes it.
  • You already pay for ChatGPT: start with Codex. Plus includes it, and so do Free and Go with lower limits.
  • You extend your tools heavily: Claude Code. Hooks, subagent files and plugins go further.
  • You want to read and patch the agent itself: Codex. The CLI is open source.
  • You run agents all day: both, with each agent on whichever plan has headroom.

Side by side

Claude CodeCodex
Vendor and modelsAnthropic: Opus 5.5 (default), Sonnet 5.5, Haiku 5.5, Fable 5.2OpenAI: GPT-6.x (Astra, Sol, Terra, Luna)
Open source CLINoYes, Apache-2.0, mostly Rust
Cheapest plan that includes itClaude Pro, $20/moChatGPT Free (Plus $20/mo for more)
Instruction fileCLAUDE.md (also reads AGENTS.md)AGENTS.md
SubagentsYes, Markdown files in .claude/agents/Yes, on by default, set in config.toml
Cloud sessionsYes, on Pro, Max, Ultra and TeamYes, Codex cloud, not on Free or Go
Desktop appYes, the Code tab in Claude DesktopYes, Codex mode in the ChatGPT app
Headless modeclaude -p, JSON and stream-JSONcodex exec, JSON Lines
SandboxYes, off by default (Seatbelt, bubblewrap)Yes, read-only, workspace-write or full access
Scheduled runsCloud scheduled tasks (research preview), desktop tasks, /loopScheduled tasks in the desktop app, cloud tasks
Five-hour limitPro and Max yes; Ultra noPlus and Business yes; Pro no

Sources: Anthropic's pricing, subagent, permission and model docs; OpenAI's pricing, subagent and sandboxing docs; openai/codex. All checked 27 November 2026.

Price and plans

Both start at $20 a month. Claude has Pro ($20, or $17 a month billed yearly), Max ($100, "5x Pro usage") and Ultra ($200, "No 5-hour limit", 10x Pro weekly), per claude.com/pricing. Claude's Free plan does not include Claude Code.

ChatGPT has Free, Go ($8), Plus ($20), Pro from $100 (tiers at $100, $200 and $500) and Business at $25 per user monthly, per OpenAI's Codex pricing. Codex cloud needs a paid plan above Go.

$20Claude Pro and ChatGPT Plus, a month
$100–$200Claude Max and Ultra, a month
$100–$500ChatGPT Pro tiers, a month

Neither vendor publishes fixed message counts. Claude's Pro and Max plans have "a five-hour session limit and a weekly limit," shared across Claude and Claude Code (Claude support). OpenAI publishes ranges per model for Plus and notes that "weekly limits may also apply." The ranges are wide: thousands of messages on the lightest GPT model, a handful on the heaviest.

Verdict on price: a draw at $20. Codex wins for trying it free. At the top end, compare your own usage pattern over a week rather than the list prices.

Agents and extension

Claude Code's extension model is the deepest in the category. A subagent is a Markdown file with a name, a description and optional tools and model, committed with your repo. Hooks fire shell commands, HTTP calls or prompts at points such as PreToolUse and Stop. Plugins bundle skills, agents, hooks and MCP servers from a marketplace. And agent teams, still experimental, let a lead session coordinate teammates that message each other, at a significant token cost.

Codex keeps it simpler. Subagents are on by default; you tune them in config.toml (max_concurrent_threads_per_session, a default subagent model and reasoning effort). The Ultra reasoning level fans out to subagents by itself. The desktop app runs parallel chats in separate Git worktrees.

Verdict on agents: Claude Code, if you will invest in configuring it. Codex, if you want fan-out without writing config. Deeper dives: Claude Code agents and Codex agents.

Safety and permissions

Claude Code has six permission modes, from default (asks before edits and commands) to auto (background safety checks) and bypassPermissions, which Anthropic says belongs in "Isolated containers and VMs only." Its OS sandbox for shell commands is off by default; turn it on with /sandbox.

Codex splits the question in two: a sandbox (read-only, workspace-write, danger-full-access) and an approval policy. codex exec starts read-only, which is the safer default for scripts. --full-auto is gone; use --sandbox workspace-write.

Verdict on safety: Codex has the safer defaults for automation. Claude Code has finer-grained controls once you set them.

Running unattended

Both run headless: claude -p with --output-format json, and codex exec --json. Both have official GitHub Actions. Both offer scheduling, with conditions. Claude's cloud scheduled tasks are in research preview with a one-hour minimum interval, and recurring tasks expire after 30 days (scheduled tasks). Codex scheduled tasks live in the desktop app; local ones need the computer on and the app running (Codex scheduled tasks).

Verdict on unattended work: a draw. Both are built for tasks, not for agents that persist. That gap is the same on both sides, which brings us to the real answer.

Why the best answer is often both

Plans run out. A developer with Claude Pro and ChatGPT Plus has two separate usage windows. The practical move is to put each job on whichever agent does it best and keep the other as headroom. What makes that painful is switching: a new tool, a new instruction file, a lost conversation.

Ana, Claude's window is nearly out. Finish the refactor on Codex.
Ana
Switching to Codex after this reply. I'll hand over a summary and keep the full conversation searchable.
Ana
On GPT-6.2 Sol now. Picking up at step 4 of 6: moving the retry logic into the client.

That is how it works in Fluf, a desktop app where you hire AI agents with a name, a memory and routines. Fluf runs your installed Claude Code and Codex, each signed in with your own login through the vendor's own flow; their terms and limits apply. Each agent has its own model. Switch one from Claude Code to Codex mid-task and it keeps its name, memory and history; What the new model gets decides whether the new model receives a smart summary, the full history or a short brief. More in switching AI models mid conversation.

The model picker in Fluf offering Claude Code and Codex models for the same agent
Claude Code and Codex side by side in one agent's model picker.

On top of both, agents get memory you can edit, routines on your machine or an always-on server, approvals on your phone, and a view of each login's usage window in App settings › AI accounts. The rules for running agents on your own plans are in our pillar on running AI employees on your Claude subscription.

Download Fluf and run Claude Code and Codex side by side, with agents that keep their memory when you switch.

Questions people ask

Is Claude Code better than Codex?
Neither wins everywhere. Claude Code has the deeper extension model (subagent files, hooks, plugins, agent teams) and a 1M-token context on current models. Codex has an open-source Apache-2.0 CLI, subagents on by default, and is included in every ChatGPT plan, Free and Go included. Pick by which plan you already pay for, then try both on your own repository.
Which is cheaper, Claude Code or Codex?
Both start at $20 a month: Claude Pro and ChatGPT Plus. Codex also runs on ChatGPT Free and Go with lower limits, while Claude Code is not included in Claude's Free plan. Heavy users pay $100 to $200 a month on either side.
Can I use Claude Code and Codex together?
Yes. They read different instruction files (CLAUDE.md and AGENTS.md, and Claude Code can read AGENTS.md too) and do not conflict. In Fluf, each agent picks its own model, so one agent can run on Claude Code and another on Codex, and you can switch an agent between them without losing its memory.
Do Claude Code and Codex have usage limits?
Yes. Claude Pro and Max have five-hour and weekly limits; Ultra drops the five-hour limit. ChatGPT plans use five-hour windows with possible weekly limits; Pro currently has no five-hour limit. Neither vendor publishes fixed message counts.

Sources

  1. Claude pricing, checked 27 November 2026
  2. Use Claude Code with your Pro, Max, or Ultra plan, checked 27 November 2026
  3. Claude Code: Create custom subagents, checked 27 November 2026
  4. Claude Code: Permission modes, checked 27 November 2026
  5. Claude Code: Scheduled tasks, checked 27 November 2026
  6. Claude Code: Model configuration, checked 27 November 2026
  7. Codex: Pricing and usage, checked 27 November 2026
  8. Codex: Subagents, checked 27 November 2026
  9. Codex: Sandboxing, checked 27 November 2026
  10. Codex: Scheduled tasks, checked 27 November 2026
  11. openai/codex on GitHub, checked 27 November 2026

TopicsClaude codeCodexDevelopersComparisons

    Search every docs page: setup, agents, models, memory, routines, chat apps and reference.