OpenAI’s Codex CLI Gets a Rust Rewrite for Improved Stability and Performance
Hello everyone! We appreciate the enthusiasm and valuable feedback you’ve provided over the past month or so since the launch of Codex CLI. It’s been truly inspiring to see all the innovative projects you’ve built using Codex CLI and, more recently, Codex within ChatGPT. A big thank you to the contributors who have opened pull requests to improve the CLI for the entire community. Whether it’s fixing bugs or adding new features, collaborating with you has been both enjoyable and rewarding. Today, we’re sharing an update on some of the key themes that have emerged: cross-platform stability, security, performance, and extensibility. To tackle these challenges, we have been working on a complete rewrite of Codex CLI using Rust. You can try the new version right away by running the following command: sh cargo install codex-cli For those of you who, like me, are accustomed to working with TypeScript, you might be curious about the rationale behind this shift. The answer is simple: we aim to use the most effective tool for the job. While the current Codex CLI offers a user-friendly terminal interface powered by React-based Ink, the heart of the project lies in its "agentic" harness—essentially, a process that repeatedly calls the model. Our primary objectives for this rewrite include: Enhanced Performance: Rust is known for its speed and efficiency, which will significantly boost the CLI’s performance. Improved Security: Rust’s strong memory safety features will help us create a more secure environment. Cross-Platform Stability: Rust ensures better compatibility and stability across different operating systems. Easier Extensibility: With Rust, we plan to make the CLI more modular, allowing for easier integration and expansion. We are committed to continuing to merge bug fixes in the TypeScript version while we bring the Rust implementation up to feature parity in the coming weeks. Soon, we will provide more details on how TypeScript and other languages like Python will integrate into this project long-term. If you’re passionate about working with Rust, contributing to codex-cli, or exploring new modes of agentic coding, we’re currently expanding our team! Feel free to reach out to us at [email protected]. We look forward to hearing your thoughts and feedback on the new Rust-based version of Codex CLI as we move closer to making it the default experience. Happy building!