OpenAI's Performance Factory: Agents That Find and Fix Slowdowns
As agentic development accelerated, OpenAI's performance engineers could no longer keep up with manual regression hunting: reading metrics, comparing traces, and debugging live machines required deep service knowledge, and relevant signals were easy to miss. The team had already built more than 30 performance tools, but someone still had to decide which to use and when.
As agentic development accelerated, OpenAI's performance engineers could no longer keep up with manual regression hunting: reading metrics, comparing traces, and debugging live machines required deep service knowledge, and relevant signals were easy to miss. The team had already built more than 30 performance tools, but someone still had to decide which to use and when.
OpenAI describes a progression from engineers manually investigating slowdowns, to using Codex as a guided partner, to capturing the team's investigation playbook in a reusable skill called `perf-forensics`, and finally to the Performance Factory: a cloud system that runs end-to-end workflows. Each piece of work is a task with explicit states and allowed transitions, defined in Markdown configuration and prompts. A dispatch loop periodically assigns ready tasks to Codex agents, which run in the cloud with access to repositories and observability tools under a scoped service identity. When a task must wait for a human review or a deployment, it subscribes to events and wakes only when something changes. The first workflow, Regression Workflow, moves a task from investigation to root cause, proposed fix, engineer review and deploy, and finally verification that performance returned to baseline. To counter agents stopping at the first plausible explanation, a separate Codex session adversarially reviews each diagnosis, testing counterfactuals such as whether unaffected requests stayed healthy or whether a rollback restored the metric. In a manual review of 100 root-cause suggestions, 70% were graded accurate, with 30% needing refinement or not fully establishing causality. Fixing proved harder than diagnosing: proposed changes were sometimes overcomplicated or introduced new issues, so fixes also get adversarial review, and some tradeoffs (like caching versus stale data) still need an engineer. In just over three months, the workflow tracked more than 1,700 investigations and root-caused over 600 cases, about 17 automated investigations per day. OpenAI also backtests investigation skills against past incidents stripped of answer-revealing details, and runs a daily agent that scans logs for tool failures and opens repair tasks.
OpenAI's experience suggests the durable pattern is not a single clever agent but a task state machine with dispatch, adversarial review, and human checkpoints, which other teams can reuse for different workflows. Expect agent factories to expand from reacting to alerts toward proactively spotting regressions and optimizations, while human review remains the bottleneck for now.