🤖 AI Tools
· 4 min read

I Used Codex CLI for a Week — OpenAI's Terminal Coding Agent


This is week 21 of my “I Used It for a Week” series. Last week I reviewed Qoder, Alibaba’s CLI agent. This week: OpenAI’s entry into the terminal coding space.

Codex CLI is OpenAI’s answer to Claude Code. Terminal-based, uses GPT models, and aims for the same workflow: describe what you want, let the AI figure out the steps.

After a week of using Codex CLI on real projects, I think it’s a solid tool that’s hurt by OpenAI’s confusing model naming. The tool is good. The model selection is a mess.

How It Works

npm install -g @openai/codex
cd my-project
codex

It drops you into a terminal session where you describe tasks in natural language. Codex reads your files, makes changes, and runs commands.

The default model is GPT-5.6 Terra (the balanced tier). You can switch to Sol (frontier) or Luna (budget) depending on your needs.

Day 1: First Impressions

I opened a TypeScript project and asked: “Add input validation to all POST endpoints using Zod.”

Codex CLI read every route file, identified the POST handlers, generated Zod schemas, added validation middleware, and ran the tests. Total time: about 4 minutes.

The code quality was good. It used modern patterns, handled edge cases well, and the validation schemas matched my existing types.

Day 2-3: Model Selection Confusion

Here’s where Codex CLI gets frustrating. OpenAI has three GPT-5.6 models: Sol ($5/$30), Terra ($2.50/$15), and Luna ($1/$6). Which one should you use?

Sol is the frontier model but costs 5x more than Luna. Terra is the “balanced” option. Luna is the budget model but scores higher on Terminal-Bench than Terra.

I switched between models throughout the week:

  • Sol: Best quality, highest cost. Use for complex refactoring.
  • Terra: Middle ground. Decent quality, moderate cost.
  • Luna: Surprisingly good quality, lowest cost. My default after day 3.

The fact that Luna (84.3% Terminal-Bench) outperforms Terra (82.5%) makes the naming confusing. “Balanced” shouldn’t be worse than “budget.”

Day 4-5: Terminal Integration

Codex CLI runs your test suite automatically after changes. This is the edit-test loop that Claude Code pioneered, and Codex does it well.

It also handles git integration, though not as natively as Aider. Changes are staged but not auto-committed. You review and commit manually.

The thinking mode works well for complex tasks. I used it for a database migration and it reasoned through the schema changes before producing code.

What Blew Me Away

Luna model quality

GPT-5.6 Luna is surprisingly good at coding. At $1/$6, it’s the cheapest frontier model and performs well on real tasks.

Test integration

The automatic test running after changes is seamless. It catches errors early and iterates until tests pass.

Thinking mode

When enabled, the thinking is coherent and useful. It helps with complex reasoning tasks like architecture decisions and debugging.

What Frustrated Me

Model naming

Sol, Terra, Luna. The naming doesn’t tell you what each model does. You need to look up benchmarks to understand the tradeoffs. OpenAI needs better product naming.

No git-native workflow

Unlike Aider, Codex CLI doesn’t auto-commit. This means you lose the git history of AI interactions that Aider provides.

Token costs

GPT-5.6 models are expensive. A day of active coding with Sol can cost $10-15. Luna is cheaper but still costs more than Aider with DeepSeek.

No persistent memory

Codex CLI doesn’t remember your project across sessions. You start fresh every time. MiMo Code’s memory system is better here.

Model costs

The three-tier model system (Sol, Terra, Luna) is confusing for pricing too. You need to understand which model to use for which task to optimize costs. A single-model tool is simpler.

Learning curve

Figuring out which model to use and when takes time. The documentation helps, but the learning curve is steeper than single-model tools.

Real-World Use Cases

Quick code generation. For straightforward tasks like “add error handling to this function,” Luna is fast and cheap. It completes the task in seconds.

Complex refactoring. For multi-file changes, Sol’s thinking mode shines. It reasons through the problem and produces clean, working code.

Test generation. Codex CLI writes tests that match your existing patterns. The edit-test loop catches errors early.

Documentation. Generate documentation from code comments. The model understands the code context and produces accurate docs.

Codex CLI vs Claude Code vs Aider

  • Claude Code: Best ecosystem, best documentation. But locked to Claude models.
  • Aider: Best git integration, cheapest, most flexible model support.
  • Codex CLI: Best GPT integration, good thinking mode. But confusing model naming and higher costs.

Would I Keep Paying?

Codex CLI has a free tier with rate limits. The paid tiers are expensive compared to alternatives. For GPT fans, it’s the best terminal option. For cost-conscious developers, Aider with DeepSeek is better.

Rating: 7.5/10 — Good tool with good models, hurt by confusing naming and high costs.

FAQ

What is Codex CLI?

Codex CLI is OpenAI’s terminal-based coding agent. It uses GPT-5.6 models (Sol, Terra, Luna) to read, write, and refactor code through natural language commands.

Which GPT-5.6 model should I use?

For most tasks, Luna ($1/$6) offers the best value. It outperforms Terra on Terminal-Bench at a lower price. Use Sol ($5/$30) only for the most complex tasks.

Is Codex CLI better than Claude Code?

Codex CLI uses GPT models while Claude Code uses Claude models. Claude Code has better ecosystem and documentation. Codex CLI has better GPT integration and thinking mode. Choose based on which model family you prefer.

Does Codex CLI auto-commit to git?

No. Changes are staged but not auto-committed. You review diffs and commit manually. Aider auto-commits every change.

Related: Codex CLI Complete Guide · Claude Code vs Codex CLI vs Gemini CLI · Best AI Coding Tools 2026

Next week: I Used LM Studio for a Week — the most popular local model runner.