OpenAI introduced a new AI model, GPT-5-Codex, that it says can complete hours-long programming tasks without user assistance. The algorithm is an improved version of GPT-5 trained on additional coding data. It’s accessible through Codex, an AI programming tool included in paid ChatGPT plans. OpenAI says that GPT-5-Codex is better than its predecessor at complex, time-consuming programming tasks. “During testing, we’ve seen GPT‑5-Codex work independently for more than 7 hours at a time,” OpenAI staffers detailed in a blog post. GPT-5-Codex spots mistakes it makes during long coding sessions and fixes them automatically. According to OpenAI, the model’s ability to tackle time-consuming tasks makes it particularly useful for refactoring. That’s the process of changing an application’s code base not for the purpose of adding features but rather to improve its quality. Developers might, for example, wish to reduce a code snippet’s memory usage or boost response times. OpenAI evaluated GPT-5-Codex’s capabilities using an internally-developed refactoring benchmark. The model scored 51.3%, outperforming GPT by more than 17%. GPT-5-Codex can adjust the amount of time it spends on task based on its difficulty. As a result, the model processes simple requests significantly faster than GPT-5. “That means Codex will feel snappier on small, well-defined requests or while you are chatting with it,” the OpenA staffers wrote. The ChatGPT developer had employees send coding requests to GPT-5-Codex and ranked those requests based on their model-generated token counts, a measure of hardware usage. According to OpenAI, the bottom 10% used 93.7% fewer tokens than GPT‑5. The most complicated coding prompts, in contrast, cause GPT-5-Codex to spend significantly more time reasoning than GPT-5.