---
title: "OpenAI brings Codex agent loop to Python applications in Agents SDK alpha"
canonical: "https://aiaulis.com/en/juttu/openai-brings-codex-agent-loop-to-python-applications-in-agents-sdk-ee9dda5c6006/"
language: "en"
published: "2026-12-03T05:25:45.690664+00:00"
publisher: "AI Aulis"
label: "AI GENERATED"
---

# OpenAI brings Codex agent loop to Python applications in Agents SDK alpha

**AI GENERATED** · Written by AI

[AI Aulis newsroom](https://aiaulis.com/en/tietoa/#toimitusperiaatteet) · 3 December 2026

github.com, openai.github.io, openai.com, developer.cloud.tencent.com, developers.openai.com · 7 sources · Sources published: 8 October–2 December 2026 · Some source publication dates are unknown

On 2 December OpenAI released 1.0.0-alpha.3, a prerelease of its Agents SDK, on GitHub. Applications using it run the Codex harness in their own process and handle tools, access checks, approvals and storage.

OpenAI released prerelease 1.0.0-alpha.3 of its Agents SDK library on GitHub on 2 December. In this version, the SDK’s root API uses the Codex harness to run agents. A harness is the program that controls an agent: it gives the model its tools and runs its steps.

In the current 0.x series, the SDK’s own Python loop runs the agent. The SDK’s tools documentation says Codex is available there as the experimental codex_tool, which an agent can hand a scoped task during a run. In the new prerelease, the import `from openai_agents import Agent, Runner` selects Codex, and the wheel includes the compiled engine. Unlike alpha.2, the prerelease uses the openai_agents namespace, and its root API always runs Codex. The root API has no agents alias and no switch for changing provider.

In a January blog post, OpenAI’s Michael Bolin described how the Codex agent loop works. The model either replies to the user or requests a tool call. The harness executes the call, adds the result to the prompt and queries the model again. When the token count exceeds a limit, the harness compacts the conversation. Codex agents can also resume from a saved checkpoint on another worker, the release notes say.

OpenAI’s Agents API also runs the Codex harness, but there OpenAI manages the agent and stores its progress. In the SDK, the harness runs in the application’s own process, and the application handles tools, access checks, approvals and storage.

Existing code needs changes. Developers can keep the Python loop by changing the import to `from openai_agents.classic import Agent, Runner`. The classic module also keeps Voice and the Python model adapters, while Realtime moves to `openai_agents.realtime`. Developers import Codex tools from `openai_agents.codex` and read a Codex agent’s reply from `result.output_text` rather than `result.final_output`.

Code and saved conversations do not migrate automatically. OpenAI advises testing the release in a separate environment and keeping existing conversations on the old loop until compatibility is confirmed.

The prerelease is available only on GitHub, not on the PyPI package repository. The wheels are built for x86-64 and ARM64 Linux machines, Apple Silicon Macs and 64-bit Windows, and require 64-bit CPython 3.10–3.14. The installation commands in the release notes pin the package and its SHA-256 hash. Given only the package name, pip may install the old 0.x series. The agent’s model calls are billed.

Read more: [How an agent works](https://aiaulis.com/en/sanasto/harnessit/) · [Agent map](https://aiaulis.com/en/sanasto/agenttikartta/)

## What this is based on

1. [OpenAI Agents SDK v1.0.0-alpha.3](https://github.com/openai/openai-agents-python/releases/tag/v1.0.0-alpha.3)
   openai · Publisher: github.com · published 2 December 2026 at 10:37 (UTC+02:00) · retrieved 3 December 2026 at 04:03 (UTC+02:00) · discovery channel: GitHub
2. [Release process/changelog - OpenAI Agents SDK](https://openai.github.io/openai-agents-python/release/)
   Publisher: openai.github.io · source publication time unknown · retrieved 2 December 2026 at 05:36 (UTC+02:00) · discovery channel: web
3. [Tools - OpenAI Agents SDK](https://openai.github.io/openai-agents-python/tools/)
   Publisher: openai.github.io · source publication time unknown · retrieved 3 December 2026 at 05:16 (UTC+02:00) · discovery channel: web
4. [Unrolling the Codex agent loop](https://openai.com/index/unrolling-the-codex-agent-loop/)
   Publisher: openai.com · source publication time unknown · retrieved 29 November 2026 at 05:24 (UTC+02:00) · discovery channel: web
5. [什么是OpenAI Agents SDK_OpenAI Agents SDK简介_OpenAI Agents SDK的优势以及应用场景-腾讯云开发者社区](https://developer.cloud.tencent.com/techpedia/2691)
   Publisher: developer.cloud.tencent.com · source publication time unknown · retrieved 3 December 2026 at 05:16 (UTC+02:00) · discovery channel: web
6. [Agents SDK | OpenAI API](https://developers.openai.com/api/docs/guides/agents/sdk)
   Publisher: developers.openai.com · source publication time unknown · retrieved 3 December 2026 at 05:16 (UTC+02:00) · discovery channel: web
7. [Agents | OpenAI API](https://developers.openai.com/api/docs/guides/agents)
   Publisher: developers.openai.com · published 8 October 2026 · retrieved 3 December 2026 at 05:16 (UTC+02:00) · discovery channel: web

Canonical: <https://aiaulis.com/en/juttu/openai-brings-codex-agent-loop-to-python-applications-in-agents-sdk-ee9dda5c6006/>

---

AI Aulis is a newspaper written and checked by artificial intelligence. No human reads the stories before publication, and AI can make mistakes: check important facts in the story's original sources. Publisher: Fiquan Holding Oy. Responsible editor: Jukka Haikala.
