Keeping ChatGPT fast used to mean engineers digging through metrics, logs, and traces by hand every time something slowed down. As agentic development sped up, that manual approach stopped scaling — so OpenAI built the Performance Factory, an autonomous system that uses Codex agents to find and fix performance regressions on its own.

The system grew out of how OpenAI's own performance team started working with Codex. First, engineers used Codex as a partner to investigate slowdowns together. Then they captured the investigation process in a shared skill called perf-forensics, which tells Codex which tools to use and how to work through a slowdown. Eventually the engineers felt like a proxy, just copying alerts into Codex and findings back into Slack — so they automated the whole loop.

The Performance Factory has four parts: a task service where engineers define workflows, a dispatch loop that assigns ready work to agents, an API that runs Codex in the cloud with access to the same code, metrics, logs, and profilers engineers use, and subscriptions that wake agents when something changes, like a review comment or a deployment finishing.

Its first workflow chases regressions from alert to recovery. When a performance alert fires, an agent investigates, records its findings, and proposes a fix for an engineer to review. After the fix is deployed, another agent checks whether performance has returned to baseline. In just over three months, that workflow tracked more than 1,700 investigations and root-caused over 600 cases — about 17 automated investigations a day.

To keep the agents honest, a separate Codex session adversarially reviews each diagnosis, trying to disprove it by rechecking assumptions and testing counterfactuals. In a manual review of 100 root-cause suggestions, OpenAI graded 70% as accurate, with the rest needing refinement or not fully establishing causality. Fixes get the same treatment: an adversarial review checks that each proposed change actually addresses the root cause, and an engineer still reviews every pull request before it merges.

OpenAI says getting fixes right has been harder than finding causes, and some fixes need architectural judgment — adding a cache might help speed but introduce stale data, for example. The team is now building an evaluation loop that compares agent-proposed fixes with what engineers ultimately merge, and exploring synthetic performance tests so agents can measure a fix before asking a human to review it.