Habitat began in 2023 as a small Python library attached to a single database. By 2026, it had become a distributed service used by ChatGPT, the API, Codex and OpenAI’s internal systems. This spring, the company chose to rewrite it in Rust. The striking detail: OpenAI says the migration was carried out by two engineers with help from Codex and GPT-5.5.

Why a custom storage layer was needed

A product team wants to ask for an object to be saved or a user’s related records to be retrieved without deciding which database to use, how to encrypt data, where to route it or in which region it should live. Habitat hides that complexity behind a narrow set of operations and centrally enforces access controls, logging and routing across Azure Cosmos DB, caches and other layers.

The design deliberately does not let developers run arbitrary heavy queries or complicated table joins. A predictable operation is easier to scale, and one accidentally expensive command should not take down a service used by millions of people.

At first, all the logic lived in a client-side Python library. Every update then had to be rolled out in sync across dozens of services. If one service returned to an older version, a bug that had already been fixed could return with it. Moving Habitat into its own service created one place to update routing, security and observability.

Why Python was no longer enough

Python made it possible to build a working platform quickly, and it handled an unexpectedly large scale: at its peak, the Python version of Habitat served more than 20 million requests per second. The issue was not that the language suddenly became slow; it was the cost of continuing to grow.

Habitat performs network operations, compression, encryption, checksum validation, routing and background work. Asynchrony in Python can overlap waits for database responses, but computation inside a process still competes for a single execution thread. Under load, a ready response could wait while the event loop handled other work. OpenAI had to run many processes and closely watch rare but painful latency spikes.

The team also found an unexpected connection-reuse effect: new requests could increasingly land on a process that was already busy. Switching from a last-used-first policy to a more even queue broke the loop. At very large scale, failures often come not from one big mistake but from a harmless setting that amplifies itself.

An engineering migration from Python to Rust in a bright workspace✦ AI
An engineering migration from Python to Rust in a bright workspace

What the Rust migration changed

In the second quarter of 2026, two engineers, supported by Codex and GPT-5.5, rewrote the service in Rust. At the time of publication, the new version handled 95% of production traffic. OpenAI reports a sixfold improvement in CPU efficiency, a fifteenfold improvement in memory efficiency, and lower average and tail latency.

Those numbers are the company’s own. OpenAI has not disclosed the size of the codebase, the number of fixes after the migration, the share of generated code or the full amount of work by adjacent teams. The story should not be reduced to the slogan that two people and AI replaced an engineering department.

A more accurate conclusion is that experienced developers completed a major migration faster because an agent helped move repetitive code, locate equivalents and check changes. Choosing the new architecture, controlling risk and gradually shifting real traffic remained engineering work.

High-speed Habitat storage racks in a bright data center✦ AI
High-speed Habitat storage racks in a bright data center

Why users should care

People will never see a Habitat button in ChatGPT. But systems like this determine how quickly a long conversation opens, whether settings are preserved and whether a service withstands a busy evening. Saving CPU and memory also affects the cost of serving each request — and therefore, indirectly, product limits and pricing.

The Habitat story points to a broader shift. AI agents are moving from small demonstrations into work on critical infrastructure. Their value is not one good file written by a model; it is a team’s ability to validate thousands of interconnected changes and safely bring them to production.

Bottom line

OpenAI has not shown that large systems can now be entrusted to two people and a chatbot. It has shown something more practical: a capable engineering agent can noticeably accelerate a difficult migration when the architecture is understood, testing is strict and deployment is gradual. For ChatGPT users, the result is hidden behind the interface: a faster, more efficient storage layer intended to support further growth.

Sources

  1. OpenAI — scaling Habitat for one billion ChatGPT users
  2. OpenAI — GPT-5.5 and Codex in engineering work
  3. Zetik — analysis of the Habitat migration from Python to Rust
  4. Remio — information OpenAI has not disclosed about the migration