These are the two closest rivals among terminal coding agents, and each is effectively a perk of its maker's $20 chat plan. Claude Code is the more extensible tool, with skills, hooks, plugins and the Agent SDK. Codex is the better value for existing ChatGPT subscribers, but OpenAI changes its plans, limits and models often.
Claude Code and Codex now do the same job in much the same places. Both read a repository, plan, edit files and run commands; both work locally and as cloud tasks; both come bundled with a chat subscription rather than sold alone. For most people the deciding question is which subscription they already hold. A ChatGPT Plus subscriber gets Codex in the terminal, IDE, desktop app, web and iOS at no extra cost, and a Claude Pro subscriber gets Claude Code in the terminal, IDEs, desktop app, web, mobile and Slack.
Beyond that, Claude Code is the more customisable tool. A CLAUDE.md file holds project instructions, skills package repeatable workflows, hooks run shell commands around its actions, and the Agent SDK exposes the same engine for building your own agents. Cloud sessions and scheduled routines keep running when your laptop is off, and sessions can move between surfaces, for example pulling a web task into the terminal with --teleport. Codex has no extension system as deep.
Codex answers with model choice and headroom. Plus users can choose between GPT-6.1 Sol and the cheaper GPT-6 Luna; OpenAI's estimates for Plus run from 15 to 160 local messages per five hours with Sol, or 350 to 3,000 with Luna. The Pro tiers at $100, $200 and $500 currently have no five-hour limit. Claude Code offers one strong default, Opus 5.5, which became the default on Pro on September 22, 2026, but its usage is shared with Claude chat, and heavy agent users on Pro report hitting limits and moving to Max.
The weaknesses mirror each other. Claude Code is locked to Claude models and absent from the free plan. Codex's terms are unstable: pricing trackers report that OpenAI suspended the five-hour window for several plans in July 2026 and restored it for Plus in August, the $200 Pro tier reopened in October with a lower allowance, and GPT-5.5 was retired from Codex on October 14. Its usage figures are estimates rather than caps, and API-key mode drops the cloud features. Pick Codex for value today; pick Claude Code if you intend to build on it.