OpenAI Codex CLI v0.118: Rust Rewrite, 67K Stars, and the Rise of the Open-Source Coding Agent
April 1, 2026 · AI Coding
From TypeScript to Rust: A Full Rewrite
When OpenAI first open-sourced Codex CLI in April 2025, it was a TypeScript project. By version 0.118 (March 31, 2026), the codebase is 95.6% Rust, following the codex-rs rewrite initiative started in late 2025. The motivation: Rust provides memory safety, near-zero startup latency, and self-contained single-binary distribution — critical for a CLI tool used across diverse developer environments.
The result is a sub-100ms cold start, with the Spark model achieving over 1,000 tokens per second for inline edits. Developers running Codex CLI on low-power machines — laptops, remote SSH sessions, CI/CD containers — see significantly faster response times compared to the prior TypeScript version.
GPT-5.3-Codex-Spark: Speed-First Model
The v0.118 release introduces GPT-5.3-Codex-Spark, a lightweight model purpose-built for terminal coding assistance. Unlike GPT-5.4's 1-million-token context designed for deep reasoning, Spark prioritizes throughput: over 1,000 tokens per second for inline completions and small file edits.
Spark is accessed at no extra charge by ChatGPT Plus and Pro subscribers — a significant cost advantage over API-billed alternatives. Developers using Codex CLI for high-volume editing workflows pay only their existing ChatGPT subscription fee.
| Tool | License | Cost | Speed | Context | Sandbox |
|---|---|---|---|---|---|
| Codex CLI v0.118 | Apache 2.0 | Free w/ ChatGPT Plus ($20/mo) | 1,000+ TPS (Spark) | Standard | OS-level firewall |
| Claude Code | Source Available | API billing (usage-based) | Moderate | 1M tokens | Tool whitelist |
| GitHub Copilot CLI | Proprietary | $10/mo (Pro) / $19/mo (Pro+) | Fast | Limited | None |
| Cursor (terminal) | Proprietary | $20/mo+ | Fast | 256K (Composer 2) | IDE-level |
Enterprise Features in v0.118
OpenAI has steadily added enterprise-grade features to Codex CLI across the v0.110–0.118 release cycle:
OS-Level Sandbox Security: The sandbox now enforces OS firewall egress rules (Seatbelt on macOS, Landlock on Linux) rather than relying on environment variables. Malicious code generated by the AI cannot bypass network isolation by overwriting shell variables.
Custom CA Certificates: Corporate proxies using TLS inspection are now supported via SSL_CERT_FILE environment variables — a requirement in many enterprise network environments.
Prompt Hooks: Teams can intercept or augment prompts programmatically for audit logging, policy enforcement, and prompt template injection before requests reach the model.
Dynamic Bearer Tokens: Automatic token refresh supports custom model providers and internal LLM deployments — allowing companies to swap Codex CLI to point at their own fine-tuned models.
Python SDK: A new Python SDK wraps the Codex agent core, enabling programmatic embedding of the agent in custom workflows, CI/CD pipelines, and internal tooling.
Use Codex, Claude Code, and Gemini together in one place — no API keys needed.
Try Happycapy Pro — $17/month →Architecture: The Codex App Server Protocol
OpenAI published the Codex App Server architecture alongside v0.118. The protocol decouples the agent's core reasoning from its client surfaces — CLI, VS Code extension, web interface, and desktop app — through a bidirectional message bus.
This architecture allows third-party developers to build their own Codex-powered interfaces without re-implementing the agent. It also means OpenAI can ship new client surfaces without touching the agent core — a clean separation that accelerates the product roadmap.
Community Growth: 67K Stars
Codex CLI surpassed 67,000 GitHub stars and 400 contributors by late March 2026, up from 40,000 stars at the start of the year. The Rust rewrite attracted significant contributions from systems engineers who had previously avoided the TypeScript codebase. The project now has pre-built binaries for macOS (Apple Silicon and Intel), Linux (x86_64 and ARM), and Windows.
The community maintains a growing ecosystem of plugins, including git workflow integrations, Docker container awareness, database schema tools, and Slack notification hooks.
How to Get Started
Install via npm:
npm install -g @openai/codex
Install via Homebrew (macOS):
brew install --cask codex
Authenticate with your ChatGPT account using the device-code flow (works in headless environments with no browser callback). Select the Spark model for speed or GPT-5.4 for complex multi-file reasoning. Set your sandbox policy (--sandbox-policy) to control which filesystem paths the agent can modify.
Codex CLI vs. Claude Code: Which Should You Use?
The honest answer is: they are optimized for different use cases. Codex CLI Spark is the fastest tool for high-volume, quick edits — completing inline suggestions in under 100ms. Claude Code with its 1M token context window is better for reasoning across large codebases, understanding legacy systems, and long-horizon refactoring.
For teams that want both, Happycapy provides access to Claude, GPT-5.4, and Gemini in one interface. You can route quick edits to GPT-5.3-Codex-Spark via API and complex analysis to Claude Opus — optimizing cost and speed per task.
Frequently Asked Questions
What is OpenAI Codex CLI?
OpenAI Codex CLI is an open-source terminal coding agent licensed under Apache 2.0. Version 0.118 is 95.6% Rust, free for ChatGPT Plus/Pro subscribers, and supports GPT-5.4 and GPT-5.3-Codex-Spark models.
How does it compare to Claude Code?
Codex CLI is fully open-source and free with a ChatGPT subscription. Claude Code uses API billing and offers a 1M token context. Codex CLI's Spark model is faster for quick edits; Claude Code is stronger for large-codebase reasoning.
What is GPT-5.3-Codex-Spark?
A lightweight model producing 1,000+ tokens per second, designed for fast inline code edits. It's included at no extra cost for ChatGPT Plus and Pro subscribers.
How do I install Codex CLI?
Run npm install -g @openai/codex or brew install --cask codex on macOS. Sign in with your ChatGPT account for free access.
Access Claude, GPT-5.4, Gemini, and more — one subscription, all models.
Try Happycapy Free →