OpenAI's 'Performance Factory' In-Depth Analysis: The Reality of Codex-Based Autonomous Performance Engineering

OpenAI has built a 'Performance Factory' that automates the entire process from performance regression detection to correction verification using Codex agents. Over three months, more than 1,700 investigations were conducted, over 600 root causes identified, and an average of 17 automated investigations were achieved daily. The end-to-end workflow operates with four main components: task service, dispatch loop, cloud execution API, and subscription system.

The Crisis of Performance Engineering Created by Agentic Development Speed

OpenAI diagnoses that "the astonishing speed of agentic development has made traditional performance engineering approaches unsustainable." As large-scale services like ChatGPT continuously deploy new models and features, performance regression occurs frequently, but the existing method of having humans investigate and correct each instance has become unmanageable. In response, OpenAI has built the 'Performance Factory' that autonomously detects, diagnoses, corrects, and verifies performance issues by leveraging the full capabilities of Codex.

"The Performance Factory runs in the cloud and automates the investigation and resolution of performance issues, allowing us to align with our roadmap ambitions."

Six Stages of Evolution: From Manual Labor to Agent Factory

The OpenAI performance team summarized how their workflow changed before and after the introduction of Codex into six stages. This process serves as a roadmap for other service teams looking to adopt agentic workflows.

StageNameKey FeaturesHuman Role
1Pre-CodexManual analysis of metrics and logs, trace comparisons, live machine debugging, code readingSpecialized knowledge required, time-consuming
2Codex as a partnerCodex searches the codebase, explores metrics and traces, tracks interactions between services, performs profilingEngineers direct investigation, select tools
3Reusable skillsCodifying the investigation process with the `perf-forensics` skill: specifying when and how to use toolsSkill testing and improvement, validation based on evaluation sets
4The human proxyAlerts generated → Engineer copies and pastes into Codex → Shares results on SlackReduced to a simple relay role
5Automated investigationsAlerts automatically start Codex sessions, posting results in Slack threadsVerification after modification development and deployment remains manual
6The factoryEnd-to-end workflow automation: state-based management from investigation → correction suggestion → code review → deployment → verificationWorkflow definition, exception handling, approvals

`perf-forensics` Skill: Assetization of Investigation Know-How

The `perf-forensics` skill created in stage 3 encapsulates the investigation know-how of the performance team into a reusable skill. This skill instructs Codex on what tools are available, when to use each tool, and how to drill down into slowdowns. It is specifically designed to approach from the following perspectives:

OpenAI tested and improved this skill using evaluation sets (evals) based on past regression cases. As a result, for types of focus such as ChatGPT latency reduction and availability degradation, it became possible to reach a diagnosis with just one alert without additional human intervention.

Performance Factory Architecture: Four Key Components

The Performance Factory consists of the following four components:

1. Task Service + Configurable Workflow

2. Dispatch Loop

3. Cloud Execution API

4. Subscription System

  1. Alert Occurs
  2. Automatic Investigation Starts
  3. Root Cause Records and Correction Suggestions
  4. Engineer Code Review
  5. Automatic Verification After Deployment
  6. Baseline Recovery Confirmation

Regression Workflow: Complete Automation from Alert to Verification

The first workflow currently operational in the Performance Factory, 'Regression Workflow,' automates the entire process from the moment a performance alert occurs to recovery verification.

1. Alert Occurs → Task Opens: When a performance alert is triggered, a task is automatically created 2. Automatic Investigation: The agent investigates the cause of the slowdown, records findings in the task, and suggests corrections 3. Engineer Review: The engineer reviews and approves the proposed corrections 4. Automatic Verification After Deployment: Upon completion of deployment, the subscription system wakes another agent → confirms whether performance has recovered to baseline within the same task 5. Completion or Rework: The task ends upon confirmation of recovery; if not recovered, it enters an additional investigation loop

"This is the first workflow that automates the entire process from investigation to correction writing and mitigation verification."

Thanks to this design, the task's status and findings are persistently stored, allowing for smooth handovers between agents and engineers even during long waiting periods such as code reviews or deployments. Additionally, it supports creating separate workflows for common optimization patterns for regular execution, or interlinking workflows where optimization discovery workflows delegate tasks to implementation and testing workflows.

Initial Operational Results: Quantitative Metrics Over Three Months

The regression workflow of the Performance Factory recorded the following results over approximately three months (just over three months).

Total Investigations1700
Root Cause Identification600
Average Daily Automated Investigations17

These figures demonstrate a qualitative leap in throughput and speed compared to the era when investigations were conducted manually. This is particularly the result of the combination of the `perf-forensics` skill, which enables "single execution from alert to diagnosis," and the factory architecture where the agent autonomously performs the entire process except for the approval stage requiring human intervention.

Implications: Meaning for Developers, Companies, and the Industry

Developer Perspective: Democratization of Expertise and Reduced Cognitive Load

In the Pre-Codex era, "knowing where to look required deep service knowledge" and selecting from over 30 performance tools according to the situation was also the domain of skilled engineers. The Performance Factory has explicitly articulated this tacit knowledge with skills like `perf-forensics`, allowing agents to take over tool selection, execution, and interpretation, thereby enabling "more people to debug difficult investigations with less expertise and time."

Company Perspective: Reduced Operational Costs and Maintained Release Speed

The response to performance regression has transitioned from an operating model where humans were on standby to handle it to a model where autonomous agents handle it 24/7. An average of 17 automated investigations signifies the liberation of engineering personnel from repetitive diagnostic tasks, making it a strategic asset that maintains service quality standards without slowing down the deployment speed of new features.

Industry Perspective: A Signal of the Generalization of the 'Agent Factory' Pattern

The six-stage evolution of OpenAI from "manual → partner → skillification → proxy → automation → factory" can be interpreted as an agentic workflow adoption framework applicable to repetitive knowledge work across code generation, review, testing, security, and data pipelines. In particular, infrastructure patterns such as task state machines, dispatch loops, and event subscriptions are likely to become the reference architecture for enterprise-grade agent orchestration.

Verified figures

Our take

OpenAI's Performance Factory is a precedent that elevates LLM agents from mere code generation assistants to 'autonomous experts in the operational domain.' The state machine-based workflows and event subscription architecture are likely to become the standard for enterprise agent orchestration.

Open questions

Source

Back to catalog