OpenAI is Ditching TypeScript to Rebuild Codex CLI with Rust
When OpenAI launched Codex CLI, the aim was to make it easier for developers to interact with AI in the terminal using a familiar stack—TypeScript and React-based Ink. While it tries to compete with Claude Code and similar tools, the team decided to revamp its foundation for better performance. “We’ve been working on a rewrite of Codex CLI into Rust,” Fouad Matin, a member of technical staff at OpenAI, said in a GitHub discussion thread. Although the TypeScript version was productive for fast prototyping, it started to show its limits as the Codex CLI matured with various use cases. Now, OpenAI plans to retire the TypeScript CLI entirely in favour of Rust. Matin mentioned that the TypeScript version will continue to receive bugfixes for now and that the focus is on bringing the native Rust build to feature parity and eventually making it the default. 4 Benefits of Rust at Its Core While Rust has its own set of problems and benefits, the switch isn’t about language ideology. As Matin put it, “We want to use the best tool for the job.” Codex CLI may have launched with “a neat terminal UI” built on React. However, he said that, at its core, the CLI functions as a tool working in a loop that keeps talking to the AI model and working with the system, instead of simply displaying a nice terminal interface. For that kind of repeated interaction with local system resources and APIs, TypeScript began to fall short. “We wanted to improve a few areas,” Matin explained. First, the installation experience required improvement, as the current version “requires Node v22+, which can be frustrating or a blocker for some users”. Second, improvements were to be made in native security bindings. “We already ship a Rust for Linux sandboxing since the bindings were available.” And third, the focus was on runtime performance. “No runtime garbage collection, resulting in lower memory consumption.” Beyond performance, Rust offered architectural breathing room. Matin said OpenAI is developing a “wire protocol” for Codex CLI, which will enable developers to extend the agent using various languages, such as TypeScript/JavaScript and Python. Rust is already supported for MCPs. In other words, Codex CLI isn’t just a tool; it aims to evolve into a cross-language, plug-in-friendly runtime for model-based automation. Work in Progress, but ‘Butter Smooth’ While the new Rust version is still under development, the response so far has been optimistic. One developer reported that “codex native is butter smooth so far”, even though there are still some discrepancies between the TypeScript and native versions. This includes configuration file support and the ability to use the free tier mode or log in with an OpenAI account. OpenAI is systematically addressing those gaps. In a separate GitHub thread, Michael Bolin, a member of technical staff at OpenAI, categorised the remaining work as P0 (must-fix), P1 (feature parity), and P2 (quality-of-life). High-priority features for the native Rust version include ‘Sign in with ChatGPT’ and improved interruption handling. Other features, like session management and prompt suggestions, are set to follow after the feature parity is handled. “We will ultimately be retiring the TypeScript version of the CLI in favour of the Rust one,” Bolin wrote in the GitHub thread. The roadmap reflects a methodical upgrade path rather than a rushed rewrite. Native is the New Normal? The move fits a larger industry narrative. On Hacker News, a user called it part of a “recent resurgence of tools going native”. The user explained that the notion of JIT (just-in-time) interpreters becoming better and eliminating the need for native languages is increasingly being challenged. Meanwhile, another user noted that Rust and Go have made native development far more accessible. “The package management is better, and statically linked native binaries eliminate so many deployment headaches,” the user wrote. With Rust, OpenAI isn’t just changing the codebase; it’s changing what kind of software Codex CLI can be. From terminal utility to programmable agent harness, the CLI is being rebuilt not just for speed, but also for flexibility, portability, and long-term maintainability. If the TypeScript version was deployed for a playground, the Rust rewrite is planned to be ready for the real world.
“We will ultimately be retiring the TypeScript version of the CLI in favour of the Rust one.”
“We will ultimately be retiring the TypeScript version of the CLI in favour of the Rust one.”
["OpenAI Codex", "Rust", "TypeScript"]
["Go", "ChatGPT", "OpenAI", "AI", "JavaScript", "TypeScript", "Python", "Aim", "Rust", "R", "OpenAI Codex"]
["AI", "ChatGPT", "OpenAI", "Aim", "Python", "R", "JavaScript", "TypeScript", "Go", "Rust"]
I am a tech aficionado and a computer science graduate with a keen interest in AI, Coding, Open Source, and Cloud. Have a tip? Reach out to ankush.das@aimmediahouse.com