Shipping with Codex

Codex: Kỹ Sư Phần Mềm AI Đã Tạo Ra “Sự Thay Đổi Cảm Hứng Lớn” (Vibe Shift) Trong Lập Trình

Gần đây, tại OpenAI, chúng ta đã chứng kiến một điều phi thường: một “sự thay đổi cảm hứng lớn” (vibe shift) trong cách chúng tôi xây dựng phần mềm. Kể từ tháng Tám, mức độ sử dụng Codex—kỹ sư phần mềm AI của chúng tôi—đã tăng gấp mười lần. Codex không chỉ là một công cụ; nó giống như một đồng nghiệp con người mà bạn có thể lập trình đôi, giao phó công việc hoặc đơn giản là để nó tự động thực hiện các nhiệm vụ phức tạp.

Sự bùng nổ này không phải ngẫu nhiên. Nó là kết quả của hàng loạt cập nhật lớn, biến Codex thành một tác nhân mạnh mẽ, an toàn và trực quan hơn, hoạt động trên mọi nền tảng mà bạn xây dựng.

1. Những Cập Nhật Đã Tạo Nên Sự Thay Đổi Lớn

Đại Tu Hoàn Toàn Tác Nhân (Agent Overhaul)

Chúng tôi định nghĩa tác nhân Codex là sự kết hợp của hai yếu tố: mô hình lý luậnbộ công cụ (harness) cho phép nó hành động và tạo ra giá trị.

  • Mô Hình Nâng Cấp: Ban đầu, chúng tôi đã ra mắt GPT-5, mô hình tác nhân tốt nhất của mình. Dựa trên phản hồi, chúng tôi tiếp tục tối ưu hóa và cho ra mắt GPT-5 Codex, một mô hình được tinh chỉnh đặc biệt cho công việc mã hóa. Người dùng mô tả nó như một “kỹ sư cấp cao thực thụ” vì nó không ngại đưa ra phản hồi thẳng thắn và từ chối những ý tưởng tồi.
  • Hệ Thống Công Cụ Mới (Harness): Chúng tôi đã viết lại hoàn toàn bộ công cụ để tận dụng tối đa các mô hình mới. Hệ thống này bổ sung các tính năng quan trọng như lập kế hoạch (planning), nén tự động bối cảnh (autoco compaction)—cho phép các cuộc trò chuyện và tương tác cực kỳ dài—và hỗ trợ cho MCP (Multi-Context Protocol).

Trải Nghiệm Người Dùng Được Tinh Chỉnh

Dù mô hình và tác nhân mạnh mẽ, phản hồi ban đầu cho thấy giao diện dòng lệnh (CLI) còn “sơ khai”.

  • CLI Revamp: Chúng tôi đã đại tu CLI, đơn giản hóa chế độ phê duyệt (approvals modes), tạo ra giao diện người dùng dễ đọc hơn và thêm nhiều chi tiết tinh tế. Quan trọng nhất, Codex CLI hiện mặc định hoạt động với sandboxing (môi trường hộp cát), đảm bảo an toàn theo mặc định trong khi vẫn trao toàn quyền kiểm soát cho người dùng.
  • Tiện Ích Mở Rộng IDE: Để hỗ trợ người dùng muốn xem và chỉnh sửa code cùng lúc với việc cộng tác với Codex, chúng tôi đã phát hành một extension bản địa (native extension) cho IDE. Tiện ích này hoạt động với VS Code, Cursor và các bản fork phổ biến khác. Nó đã bùng nổ ngay lập tức, thu hút 100.000 người dùng trong tuần đầu tiên—bằng cách sử dụng cùng một tác nhân mạnh mẽ và bộ công cụ mã nguồn mở (open-source harness) đã cung cấp sức mạnh cho CLI.
  • Codex Cloud Nhanh Hơn: Chúng tôi đã nâng cấp Codex Cloud để chạy nhiều tác vụ song song, tăng tốc độ tác vụ Cloud lên 90%. Tác vụ Cloud giờ đây có thể tự động thiết lập các phụ thuộc, thậm chí xác minh công việc bằng cách chụp ảnh màn hình và gửi cho bạn.

Codex Hoạt Động Mọi Nơi

Codex giờ đây hoạt động tích hợp sâu vào quy trình làm việc của bạn:

  • Slack và GitHub: Codex có thể được giao nhiệm vụ trực tiếp trong các công cụ cộng tác như Slack. Nó nhận toàn bộ bối cảnh từ luồng trò chuyện, tự mình khám phá vấn đề, viết code, và đăng giải pháp cùng với bản tóm tắt chỉ sau vài phút.
  • Review Code Độ Tin Cậy Cao: Việc đánh giá và duyệt code đang trở thành nút thắt cổ chai lớn. Chúng tôi đã huấn luyện GPT-5 Codex đặc biệt để thực hiện review code cực kỳ kỹ lưỡng (ultra thorough). Nó khám phá toàn bộ code và các phụ thuộc bên trong container của mình, xác minh ý định và việc triển khai. Kết quả là những phát hiện có tín hiệu rất cao (high signal), đến mức nhiều đội đã bật nó theo mặc định, thậm chí cân nhắc bắt buộc.

2. Codex Đang Thúc Đẩy OpenAI Như Thế Nào

Kết quả nội bộ tại OpenAI là minh chứng rõ ràng nhất cho sức mạnh của Codex:

  • 92% nhân viên kỹ thuật của OpenAI sử dụng Codex hàng ngày (tăng từ 50% vào tháng Bảy).
  • Các kỹ sư sử dụng Codex nộp 70% nhiều PR (Pull Requests) hơn mỗi tuần.
  • Hầu như tất cả các PR đều được Codex review. Khi nó tìm thấy lỗi, các kỹ sư cảm thấy hào hứng vì nó giúp tiết kiệm thời gian và tăng độ tin cậy khi triển khai.

3. Các Quy Trình Làm Việc Thực Tế Hàng Ngày

Các kỹ sư của chúng tôi đã chia sẻ những ví dụ thực tế về cách họ sử dụng Codex để giải quyết các vấn đề phức tạp.

Trường Hợp 1: Lặp Lại Giao Diện Người Dùng (UI) Với Bằng Chứng Hình Ảnh (Nacho)

Nacho, kỹ sư iOS, đã chia sẻ quy trình làm việc tận dụng tính năng đa phương thức (multimodal) của Codex:

  • Vấn Đề: Trong công việc front-end, 10% công việc đánh bóng cuối cùng—như căn chỉnh header/footer—thường chiếm đến 90% thời gian.
  • Giải Pháp: Nacho giao cho Codex nhiệm vụ triển khai UI từ một bản mockup. Khác với các agent cũ (được ví như “kỹ sư tập sự”), Codex (được ví như “kỹ sư cấp cao”) xác minh công việc của nó.
  • Quy Trình TDD & Multimodal:
    1. Nacho cung cấp cho Codex một công cụ đơn giản: một script Python (do Codex viết) để trích xuất các snapshot (ảnh chụp giao diện) từ các SwiftUI Previews.
    2. Nó được hướng dẫn sử dụng công cụ này để xác minh trực quan code UI mà nó viết.
    3. Codex lặp đi lặp lại: Viết code > Chạy test/Snapshot > Sửa lỗi cho đến khi giao diện đạt đến độ hoàn hảo về pixel (pixel perfect).
  • Kết Quả: Nacho có thể để Codex làm việc trên những chi tiết nhỏ (10% độ đánh bóng) trong khi anh làm những việc khác, biết rằng nó sẽ tự kiểm tra công việc của mình bằng hình ảnh.

Trường Hợp 2: Mở Rộng Giới Hạn Tác Vụ Lớn (Fel)

Fel, được biết đến là người có phiên làm việc Codex lâu nhất (hơn bảy giờ) và xử lý nhiều token nhất (hơn 150 triệu), đã chứng minh cách anh thực hiện các tác vụ refactor lớn chỉ với vài lời nhắc.

  • Vấn Đề: Thực hiện một refactor lớn (như thay đổi 15.000 dòng code) trong các dự án phức tạp (như bộ phân tích JSON cá nhân của anh) thường dẫn đến việc tất cả các bài kiểm tra thất bại trong thời gian dài.
  • Giải Pháp: Kế Hoạch Thực Thi (Exec Plan):
    1. Fel yêu cầu Codex viết một đặc tả (spec)—được gọi là plans.md—để triển khai tính năng, giao cho nó nhiệm vụ nghiên cứu thư viện và cách tích hợp.
    2. Anh định nghĩa plans.md là một “tài liệu thiết kế sống” (living document) mà Codex phải liên tục cập nhật, bao gồm mục tiêu lớn, danh sách việc cần làm, tiến trình, và nhật ký quyết định (decision log).
    3. Anh sử dụng thuật ngữ neo “exec plan” để đảm bảo mô hình biết khi nào cần tham chiếu và phản ánh lại tài liệu này.
    4. Sau khi Fel phê duyệt kế hoạch, anh ra lệnh: “Implement” (Thực thi).
  • Kết Quả: Codex có thể làm việc một cách hiệu quả trong nhiều giờ (thậm chí hơn một giờ trong buổi demo) trên một tính năng lớn, sử dụng plans.md như bộ nhớ và kim chỉ nam. Trong một phiên, nó đã tạo ra 4.200 dòng code chỉ trong khoảng một giờ—mọi thứ đều được kiểm tra và vượt qua.

Trường Hợp 3: Vòng Lặp Sửa Lỗi và Review Tại Chỗ (Daniel)

Daniel, một kỹ sư trong nhóm Codex, đã giới thiệu quy trình làm việc slash review mới, đưa khả năng review code chất lượng cao của GPT-5 Codex xuống môi trường cục bộ (local).

  • Vấn Đề: Ngay cả sau khi hoàn thành code, các kỹ sư cần một bộ mắt mới không bị thiên vị để tìm ra các lỗi khó.
  • Giải Pháp: Slash Review: Trước khi gửi PR, Daniel sử dụng lệnh /review trong CLI.
    • Anh chọn duyệt so với nhánh gốc (base branch), tương tự như một PR.
    • GPT-5 Codex bắt đầu luồng review chuyên biệt: Nó nghiên cứu sâu các tập tin, tìm kiếm các lỗi kỹ thuật, và thậm chí viết/chạy các script kiểm tra để xác minh các giả thuyết lỗi trước khi báo cáo.
    • Mô hình thiên vị: Luồng review chạy trong một luồng riêng biệt, có bối cảnh mới mẻ (fresh context), loại bỏ bất kỳ thiên vị triển khai (implementation bias) nào từ cuộc trò chuyện trước.
  • Vòng Lặp Sửa Lỗi: Khi Codex tìm thấy một vấn đề P0/P1, Daniel chỉ cần gõ “Please fix”.
  • Kết Quả: Codex sửa lỗi, và Daniel có thể chạy /review lần nữa cho đến khi nhận được “thumbs up” (chấp thuận) cuối cùng. Điều này đảm bảo code được kiểm tra kỹ lưỡng, được sửa lỗi cục bộ trước khi push, tiết kiệm thời gian và đảm bảo độ tin cậy cao hơn.

 

Ba chức năng chính của Codex, được nhấn mạnh trong bài thuyết trình, là:

  1. Lập Trình Đôi và Triển Khai Code (Implementation & Delegation):
    • Codex hoạt động như một đồng đội lập trình đôi trong IDE/CLI, giúp bạn viết code nhanh hơn.
    • Nó có thể nhận ủy quyền (delegate) các tác vụ lớn hơn (như refactor hoặc thêm tính năng) và tự thực hiện trong môi trường Cloud/Sandboxing, bao gồm cả việc tự thiết lập dependencies và chạy song song.
  2. Xác Minh và Kiểm Thử Tự Động (Verification & TDD):
    • Codex tích hợp sâu với quy trình Test-Driven Development (TDD).
    • Nó không chỉ viết code mà còn tự động chạy các bài kiểm thử (unit tests) và xác minh đa phương thức (ví dụ: tạo và kiểm tra snapshot UI) để đảm bảo code hoạt động chính xác và đạt độ hoàn hảo về mặt hình ảnh (pixel perfect).
  3. Review Code Độ Tin Cậy Cao (High-Signal Code Review):
    • Sử dụng mô hình GPT-5 Codex được tinh chỉnh, nó thực hiện review code cực kỳ kỹ lưỡng (ultra thorough) trên GitHub PR hoặc cục bộ thông qua lệnh /review.
    • Chức năng này giúp tìm ra các lỗi kỹ thuật khó và có thể được sử dụng trong vòng lặp Review -> Fix -> Review để đảm bảo chất lượng code trước khi merge, tiết kiệm thời gian và tăng độ tin cậy khi triển khai.

Link video: https://www.youtube.com/watch?v=Gr41tYOzE20

Codex CLI vs Gemini CLI vs Claude Code

1. Codex CLI – Capabilities and New Features

According to OpenAI’s official announcement (“Introducing upgrades to Codex”), Codex CLI has been rebuilt on top of GPT-5-Codex, turning it into an agentic programming assistant — a developer AI that can autonomously plan, reason, and execute tasks across coding environments.

🌟 Core Abilities

  • Handles both small and large tasks: From writing a single function to refactoring entire projects.
  • Cross-platform integration: Works seamlessly across terminal (CLI), IDE (extension), and cloud environments.
  • Task reasoning and autonomy: Can track progress, decompose goals, and manage multi-step operations independently.
  • Secure by design: Runs in a sandbox with explicit permission requests for risky operations.

📈 Performance Highlights

  • Uses 93.7% fewer reasoning tokens for simple tasks, but invests 2× more computation on complex ones.
  • Successfully ran over 7 hours autonomously on long software tasks during testing.
  • Produces more precise code reviews than older Codex versions.

🟢 In short: Codex CLI 2025 is not just a code generator — it’s an intelligent coding agent capable of reasoning, multitasking, and working securely across terminal, IDE, and cloud environments.

2.Codex CLI vs Gemini CLI vs Claude Code: The New Era of AI in the Terminal

The command line has quietly become the next frontier for artificial intelligence.
While graphical AI tools dominate headlines, the real evolution is unfolding inside the terminal — where AI coding assistants now operate directly beside you, as part of your shell workflow.

Three major players define this new space: Codex CLI, Gemini CLI, and Claude Code.
Each represents a different philosophy of how AI should collaborate with developers — from speed and connectivity to reasoning depth. Let’s break down what makes each contender unique, and where they shine.


🧩 Codex CLI — OpenAI’s Code-Focused Terminal Companion

Codex CLI acts as a conversational layer over your terminal.
It listens to natural language commands, interprets your intent, and translates it into executable code or shell operations.
Now powered by OpenAI’s Codex5-Medium, it builds on the strengths of the o4-mini generation while adding adaptive reasoning and a larger 256K-token context window.

Once installed, Codex CLI integrates seamlessly with your local filesystem.
You can type:

“Create a Python script that fetches GitHub issues and logs them daily,”
and watch it instantly scaffold the files, import the right modules, and generate functional code.

Codex CLI supports multiple languages — Python, JavaScript, Go, Rust, and more — and is particularly strong at rapid prototyping and bug fixing.
Its defining trait is speed: responses feel immediate, making it perfect for fast iteration cycles.

Best for: developers who want quick, high-quality code generation and real-time debugging without leaving the terminal.


🌤️ Gemini CLI — Google’s Adaptive Terminal Intelligence

Gemini CLI embodies Google’s broader vision for connected AI development — blending reasoning, utility, and live data access.
Built on Gemini 2.5 Pro, this CLI isn’t just a coding bot — it’s a true multitool for developers and power users alike.

Beyond writing code, Gemini CLI can run shell commands, retrieve live web data, or interface with Google Cloud services.
It’s ideal for workflows that merge coding with external context — for example:

  • fetching live API responses,

  • monitoring real-time metrics,

  • or updating deployment configurations on-the-fly.

Tight integration with VS Code, Google Cloud SDK, and Workspace tools turns Gemini CLI into a full-spectrum AI companion rather than a mere code generator.

Best for: developers seeking a versatile assistant that combines coding intelligence with live, connected utility inside the terminal.


🧠 Claude Code — Anthropic’s Deep Code Reasoner

If Codex is about speed, and Gemini is about connectivity, Claude Code represents depth.
Built on Claude Sonnet 4.5, Anthropic’s upgraded reasoning model, Claude Code is designed to operate as a true engineering collaborator.

It excels at understanding, refactoring, and maintaining large-scale codebases.
Claude Code can read entire repositories, preserve logic across files, and even generate complete pull requests with human-like commit messages.
Its upgraded 250K-token context window allows it to track dependencies, explain architectural patterns, and ensure code consistency over time.

Claude’s replies are more analytical — often including explanations, design alternatives, and justifications for each change.
It trades a bit of speed for a lot more insight and reliability.

Best for: professional engineers or teams managing complex, multi-file projects that demand reasoning, consistency, and full-codebase awareness.

3.Codex CLI vs Gemini CLI vs Claude Code: Hands-on With Two Real Projects

While benchmarks and specs are useful, nothing beats actually putting AI coding agents to work.
To see how they perform on real, practical front-end tasks, I tested three leading terminal assistants — Codex CLI (Codex5-Medium), Gemini CLI (Gemini 2.5 Pro), and Claude Code (Sonnet 4.5) — by asking each to build two classic web projects using only HTML, CSS, and JavaScript.

  • 🎮 Project 1: Snake Game — canvas-based, pixel-style, smooth movement, responsive.

  • Project 2: Todo App — CRUD features, inline editing, filters, localStorage, dark theme, accessibility + keyboard support.

🎮 Task 1 — Snake Game

Goal

Create a playable 2D Snake Game using HTML, CSS, and JavaScript.
Display a grid-based canvas with a moving snake that grows when it eats food.
The snake should move continuously and respond to arrow-key inputs.
The game ends when the snake hits the wall or itself.
Include a score counter and a restart button with pixel-style graphics and responsive design.

Prompt

Create a playable 2D Snake Game using HTML, CSS, and JavaScript.

  The game should display a grid-based canvas with a moving snake that grows when it eats

  food.

  The snake should move continuously and respond to keyboard arrow keys for direction

  changes.

  The game ends when the snake hits the wall or itself.

  Show a score counter and a restart button.

  Use smooth movement, pixel-style graphics, and responsive design for different screen sizes

Observations

Codex CLI — Generated the basic canvas scaffold in seconds. Game loop, input, and scoring worked out of the box, but it required minor tuning for smoother turning and anti-reverse logic.

Gemini CLI — Delivered well-structured, commented code and used requestAnimationFrame properly. Gameplay worked fine, though the UI looked plain — more functional than fun.

Claude Code — Produced modular, production-ready code with solid collision handling, restart logic, and a polished HUD. Slightly slower response but the most complete result overall.

✅ Task 2 — Todo App

Goal

Build a complete, user-friendly Todo List App using only HTML, CSS, and JavaScript (no frameworks).
Features: add/edit/delete tasks, mark complete/incomplete, filter All / Active / Completed, clear completed, persist via localStorage, live counter, dark responsive UI, and full keyboard accessibility (Enter/Space/Delete).
Deliverables: index.html, style.css, app.js — clean, modular, commented, semantic HTML + ARIA.

Prompt

Develop a complete and user-friendly Todo List App using only HTML, CSS, and JavaScript (no frameworks). The app should include the following functionality and design requirements:

    1. Input field and ‘Add’ button to create new tasks.
    2. Ability to mark tasks as complete/incomplete via checkboxes.
    3. Inline editing of tasks by double-clicking — pressing Enter saves changes and Esc cancels.
    4. Delete buttons to remove tasks individually.
    5. Filter controls for All, Active, and Completed tasks.
    6. A ‘Clear Completed’ button to remove all completed tasks at once.
    7. Automatic saving and loading of todos using localStorage.
    8. A live counter showing the number of active (incomplete) tasks.
    9. A modern, responsive dark theme UI using CSS variables, rounded corners, and hover effects.
    10. Keyboard accessibility — Enter to add, Space to toggle, Delete to remove tasks.
      Ensure the project is well structured with three separate files:
    • index.html
    • style.css
    • app.js
      Code should be clean, modular, and commented, with semantic HTML and appropriate ARIA attributes for accessibility.

Observations

Codex CLI — Created a functional 3-file structure with working CRUD, filters, and persistence. Fast, but accessibility and keyboard flows needed manual reminders.

Gemini CLI — Balanced logic and UI nicely. Used CSS variables for a simple dark theme and implemented localStorage properly.
Performance was impressive — Gemini was the fastest overall, but its default design felt utilitarian, almost as if it “just wanted to get the job done.”
Gemini focuses on correctness and functionality rather than visual finesse.

Claude Code — Implemented inline editing, keyboard shortcuts, ARIA live counters, and semantic roles perfectly. The result was polished, responsive, and highly maintainable.

4.Codex CLI vs Gemini CLI vs Claude Code — Real-World Comparison

When testing AI coding assistants, speed isn’t everything — clarity, structure, and the quality of generated code all matter. To see how today’s top command-line tools compare, I ran the same set of projects across Claude Code, Gemini CLI, and Codex CLI, including a 2D Snake Game and a Todo List App.
Here’s how they performed.


Claude Code: Polished and Reliable

Claude Code consistently produced the most professional and complete results.
Its generated code came with clear structure, organized logic, and well-commented sections.
In the Snake Game test, Claude built the best-looking user interface, with a balanced layout, responsive design, and smooth movement logic.
Error handling was handled cleanly, and the overall experience felt refined — something you could hand over to a production team with confidence.
Although it wasn’t the fastest, Claude made up for it with code quality, structure, and ease of prompt engineering.
If your workflow values polish, maintainability, and readability, Claude Code is the most dependable choice.


Gemini CLI: Fastest but Basic

Gemini CLI clearly took the top spot for speed.
It executed quickly, generated files almost instantly, and made iteration cycles shorter.
However, the output itself felt minimal and unrefined — both the UI and the underlying logic were quite basic compared to Claude or Codex.
In the Snake Game task, Gemini produced a playable result but lacked visual polish and consistent structure.
Documentation and comments were also limited.
In short, Gemini is great for rapid prototyping or testing ideas quickly, but not for projects where you need beautiful UI, advanced logic, or long-term maintainability.


Codex CLI: Flexible but Slower

Codex CLI offered good flexibility and handled diverse prompts reasonably well.
It could generate functional UIs with decent styling, somewhere between Gemini’s simplicity and Claude’s refinement.
However, its main drawback was speed — responses were slower, and sometimes additional manual intervention was needed to correct or complete the code.
Codex is still a solid option when you need to tweak results manually or explore multiple implementation approaches, but it doesn’t match Claude’s polish or Gemini’s speed.


Overall Impression

After testing multiple projects, the overall ranking became clear:

  • Gemini CLI is the fastest but produces simple and unpolished code.

  • Claude Code delivers the most reliable, structured, and visually refined results.

  • Codex CLI sits in between — flexible but slower and less cohesive.

Each tool has its strengths. Gemini is ideal for quick builds, Codex for experimentation, and Claude Code for professional, trust-ready outputs.

In short:

Gemini wins on speed. Claude wins on quality. Codex stands in between — flexible but slower.