Skip to content

Blog

OpenAI has Codex fix ChatGPT models when they slow down

3 min read

Performance Factory flow from alert to investigation and verification
OpenAI Performance Factory

If ChatGPT is answering more slowly than usual, where should you look first? The model may have slowed down. But it may also be that more requests that naturally take longer came in than usual.

When ChatGPT slows down, OpenAI hands the investigation to Codex. The internal system it uses for this is called "Performance Factory." OpenAI made the system public on November 19. Codex finds the cause and then proposes a fix. Engineers decide whether to apply that fix to the live ChatGPT service.

Comparing requests of the same kind

First, it checks when the slowdown started and which requests were affected. For example, if the overall average got worse, Codex groups similar requests together and looks at them. The goal is to tell whether the same kind of request now takes longer than before, or whether only the share of slow requests has gone up.

A second Codex checks the cause the first Codex found

At first, Codex would sometimes find one plausible explanation and end the investigation there. So OpenAI opened a separate Codex session to look at the possibility that the first explanation was wrong. For example, if newly deployed code is the suspected cause, it checks whether similar requests without that code were still fast.

In one real case where image requests were failing, the first investigation pointed to an internal service that looks up file locations. But image requests kept failing even after that service recovered. The second review caught this, and the investigation started over.

After a performance alert, Codex investigates the cause, goes through a separate review, and proposes a fix. Once engineers review and deploy it, Codex checks whether the metrics have recovered.
Codex investigates performance regressions and drafts fixes, engineers review them and decide on deployment, and Codex verifies recovery after deployment (Source)

After the fix, it looks at the slow requests again

Once engineers review and deploy the fix, Codex checks whether the requests that had the problem are fast again. If there is no improvement, it investigates the same problem again. Deploying the code alone does not count as solving the problem.

OpenAI said it tracked more than 1,700 investigations over a little more than three months and found the cause in over 600 cases. Of 100 proposed causes that people reviewed separately, 70 were rated accurate. This does not mean Codex fixed 600 problems or resolved 70% of them automatically.

You need to confirm the problem is gone after deployment

On the AXIT platform we are building, we also use Sentry, a monitoring and error-tracking service. When Sentry catches an error, we start on a fix right away. AI investigates the cause and drafts a fix, and engineers check the changes before deploying.

When an error is detected, AI investigates the cause and proposes a fix, and engineers review and deploy it. After deployment, the same request is run again, and if the problem remains, it is investigated again.
An AI-assisted incident response loop

To build this kind of process, start by attaching the failed request and the deployed version to the task when an alert comes in. AI uses that record to find the cause and propose a fix and tests. Separately from error alerts, you can use a tool like AWS CloudWatch Synthetics to check regularly that key pages and APIs load properly.

After deployment, rerun the requests that failed. Check whether the error still reproduces and whether response times are back to normal. If the problem remains, keep the task open and investigate again. Having AI write fixes is not enough on its own. What matters more is a process that checks, after deployment, whether the problem is actually gone.

OpenAI technical blog