OpenAI Deploys Codex Agents to Automatically Hunt and Fix ChatGPT Performance Bottlenecks
OpenAI has revealed the Performance Factory, an internal infrastructure system that uses AI agents to automatically investigate and propose fixes for latency issues. The system processed over 1,700 investigations in three months, shifting human engineers from writing diagnostic scripts to reviewing machine-generated forensics.
Share this story
OpenAI has handed one of software engineering’s most tedious tasks to its own artificial intelligence. On November 19, 2026, the company disclosed the Performance Factory, an internal infrastructure system that uses Codex-powered agents to automatically detect, investigate, and propose fixes for latency bottlenecks in ChatGPT.[1][2]
The platform represents a shift from manual performance tuning to continuous, machine-driven optimization. As ChatGPT scales globally, even minor latency spikes can degrade the conversational experience for millions of concurrent users. The Performance Factory treats that response speed as a first-class engineering problem that agents can solve.[1][3]
According to an engineering report shared by OpenAI, the system processed more than 1,700 automated investigations in just over three months. That volume translates to an average of 17 performance probes running every day in the cloud, hunting for inefficiencies that would otherwise require days of manual log analysis.[1][2]
The Regression Workflow
The system relies on a pipeline called the Regression Workflow, which kicks into action whenever monitoring software detects a performance degradation alert. Rather than paging an engineer, the system files a single ticket and assigns a Codex agent to begin the forensic work.[1][2]
Because latency issues often begin hours before an alert actually fires, the assigned agent looks back through historical telemetry to pinpoint the exact starting point. It then cross-references deployments and feature-flag changes from that specific window to isolate the responsible code.[1][2]
Once the agent identifies the suspect code, it corroborates its findings by reading the relevant execution paths, trace logs, and resource utilization patterns. The system successfully identified the root cause in over 600 of its 1,700 investigations, achieving a 70 percent accuracy rate during the three-month window.[1][2]
From that pool of identified root causes, the agents generated approximately 400 proposed code fixes. These ranged from algorithmic improvements and memory management tweaks to identifying redundant computations and unnecessary database queries that were slowing down the inference pipeline.[1][2]
Adversarial Review and Human Oversight
To prevent confident but incorrect diagnoses from wasting engineering time, OpenAI built an adversarial review step into the factory. Before a proposed fix reaches a human, a separate AI agent attempts to actively disprove the original diagnosis and challenge the proposed solution.[1][2]
That internal friction is necessary, as agent-proposed changes can sometimes be overly complex or introduce new architectural risks. OpenAI noted that certain optimizations, such as aggressive caching, might improve speed but risk serving stale data—a trade-off that still requires human judgment.[1][2]
Engineers retain absolute final approval over what gets merged into the production codebase. The data reflects this boundary: of the 400 proposed fixes, only 15 were exact Codex-authored pull requests that engineers merged exactly as written by the machine.[1][2]
Agent suggestions heavily influenced roughly 50 additional fixes, pointing human developers in the right direction even if the code required rewriting. After a fix is deployed, a final agent checks the live production metrics to verify that performance has actually returned to the baseline.[1][2]
Shifting the Engineering Burden
The Performance Factory illustrates a broader transition in how OpenAI deploys its own models internally. Instead of asking an agent to generate a single block of code on command, the company is chaining multiple agents into persistent workflows that tackle recurring operational maintenance.[1][2]
OpenAI reports that its agents can now complete 46 percent of multi-hour research tasks autonomously, double the success rate from earlier in the year. However, the success rate for writing complex code for the inference infrastructure remains lower, highlighting a wide variance in current capabilities.[1][2]
The system effectively turns the human engineer’s role from a creator of diagnostic scripts into a reviewer of machine-generated forensics. By automating the initial hours of log parsing and metric correlation, the factory reserves human attention for the final architectural decisions.[1][2]
Moving Toward Proactive Discovery
Currently, the Performance Factory operates reactively, waiting for a configured alert to trigger an investigation. OpenAI plans to expand the system into proactive optimization, where agents actively hunt for inefficiencies that are too small to trip the standard monitoring thresholds.[1][2]
Future iterations will task agents with comparing CPU profiles, memory heap dumps, and request traces across different software releases. If an agent notices a slight increase in resource consumption between versions, it will open a task in the Regression Workflow before the issue compounds.[1][2]
The company is also developing workflows for service rightsizing, allowing agents to identify inefficient autoscaling configurations that keep more server replicas active than necessary. OpenAI is even investigating whether the system could eventually deploy certain low-risk code changes without requiring human approval at all.[1][2]
Scaling the AI Infrastructure
The need for such an automated system stems from the sheer scale of ChatGPT’s deployment. As the underlying language models grow in parameter count and complexity, manual performance tuning becomes an unsustainable bottleneck that delays feature releases and frustrates users during peak demand.[2][3]
By treating latency as a continuous integration problem, the factory ensures that performance improvements roll out just as quickly as functional updates. The system integrates directly into OpenAI’s existing deployment pipelines, staging agent-generated fixes in isolated environments for battery testing before they reach production.[2][3]
One specific example cited by the performance team involved redundant serialization. A code change inadvertently caused the application to serialize the same user conversation multiple times while processing a single request, burning unnecessary CPU cycles and slowing down the final response.[1][2]
The Codex agent successfully identified the duplicated effort by analyzing the execution trace. It then proposed a targeted fix to serialize the conversation exactly once and cache the result for reuse, instantly recovering the lost milliseconds without altering the user experience.[1][2]
Refining the Machine's Judgment
To further refine these capabilities, OpenAI has built a dedicated evaluation loop that continuously compares the fixes proposed by the agents against the final code merged by human engineers. This feedback mechanism helps the underlying Codex model learn from its architectural mistakes over time.[1][2]
The company is also developing synthetic performance tests that allow agents to measure the exact impact of their proposed fixes in a sandbox. This capability will enable the AI to validate its own work quantitatively before ever requesting a human review.[1][2]
For now, the Performance Factory remains strictly an internal tool, with no announced plans for external commercialization. It serves as a live stress test for Codex, proving that AI can maintain the very infrastructure required to serve AI to the public.[1][2]
Ultimately, the Performance Factory demonstrates that the most immediate enterprise use case for advanced AI may be maintaining software rather than writing it from scratch. As models become more capable, the tedious work of keeping them fast is increasingly being handled by the models themselves.[1][4]
Key points
- OpenAI launched the Performance Factory, an internal system using Codex agents to automatically investigate and fix ChatGPT latency issues.
- The system processed over 1,700 investigations in three months, identifying root causes with a 70 percent accuracy rate.
- An adversarial review step uses a separate AI to challenge proposed fixes before human engineers make the final merge decision.
- Future updates will allow agents to proactively hunt for inefficiencies across software releases rather than waiting for monitoring alerts.
What we don’t know
- Whether OpenAI plans to eventually commercialize the Performance Factory as a standalone enterprise product.
- How much compute power is required to run the continuous adversarial reviews and automated investigations.
- Independent media coverage of the internal system remains thin, with most technical details originating directly from OpenAI's own engineering reports and exclusive briefings.
- AI Infrastructure Engineers
- Advocates for automating performance tuning to match deployment velocity.
- Software Quality Advocates
- Emphasizes the necessity of adversarial review and human oversight.
Perspectives this story doesn't cover
- Independent Infrastructure Competitors
- Open-Source Developers
Sources
[1]OpenAIAI Infrastructure EngineersHow OpenAI's Performance Factory keeps ChatGPT fast
Read on OpenAI →
[2]VentureBeatAI Infrastructure EngineersExclusive: OpenAI reveals Performance Factory, a Codex-powered software optimization system that keeps ChatGPT fast
Read on VentureBeat →
[3]MOOGHSoftware Quality AdvocatesWhat is OpenAI's Performance Factory?
Read on MOOGH →
[4]Factlen Editorial TeamSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Technology
See all →AI Infrastructure
Cloud Giants AWS and Azure Turn to Nuclear Power to Secure AI Data Center Capacity
6 sources
Code Verification
Google DeepMind AI Agents Formally Verify Signal's End-to-End Encryption Code
7 sources
AI Authentication
1Password Launches Passkey Bridge to Let AI Agents Authenticate Without Seeing User Credentials
6 sources
AI Regulation
California Sues OpenAI Over Rogue Agent Hack on Hugging Face Repository
7 sources
Comments
Every angle. Every day.
Get Technology stories with full source coverage and perspective breakdowns, free every day.




