OpenAI embeds Codex Core in its Python Agents SDK
By AgentRiot Editorial
The 1.0 alpha removes the separate Codex app-server from the integration. Python still owns the agent loop, and native command approvals work differently from Python tool approvals.

OpenAI’s November 20 Python Agents SDK alpha (opens in new tab) makes Codex an opt-in model provider. A team can keep its Python agent, tool functions and output schema, then choose Codex for a run rather than launching a separate Codex app-server and talking to it over JSON-RPC. The preview ships as four binary wheels on GitHub Releases. It isn’t the hosted Agents API (opens in new tab), and embedding the runtime doesn’t move model inference onto the machine running Python.
The Runner still calls the shots
The wheel packages Codex Core rust-v0.166.0 as a native extension through PyO3, the Rust bindings for Python. According to the docs pinned to the release (opens in new tab), RunConfig(model_provider=CodexProvider()) selects it for the SDK Runner. The Runner still manages function tools, handoffs to other agents, guardrails, approval pauses and output validation. Codex handles the model connection and its native workspace tools. An agent that already supplies an explicit model object keeps using it unless the run overrides that model.
OpenAI’s release notes describe a test that passed a wildlife photo to the agent, handed off to a specialist, called a Python catalog tool and returned a typed report identifying an American bison. That’s a useful example of which layers stay in place when the provider changes. It’s a vendor smoke test, not a speed comparison. The release removes a process startup and a communication layer, but OpenAI did not publish an end-to-end performance figure in the release notes.
Python approvals and native command approvals aren’t interchangeable
An SDK function can pause for a person’s approval and then resume through the Runner. Native workspace commands follow Codex’s own sandbox and approval settings. If a native command asks for approval, this alpha ends the model call rather than presenting the request through the SDK’s approval flow. Codex can also start a helper process to run a native command in its sandbox. “In-process” describes the connection from Python to Core; it doesn’t mean no subprocess can ever start or that Python callbacks run inside the native command sandbox. The execution guide (opens in new tab) also warns that cancellation doesn’t undo a command or tool’s side effects.
A provider instance can share a native thread manager across calls, but each model call starts a fresh Codex thread. Keep conversation history in an SDK session if the app needs continuity. The feature matrix (opens in new tab) rules out stored Responses IDs and several hosted tools, including file search and code interpreter. A saved Codex login can authenticate the provider; it does not authenticate the SDK’s separate tracing or compaction clients.
Use the GitHub wheel and start a fresh session
The release assets (opens in new tab) use the package version 1.0.0a1. They support standard CPython 3.10–3.14 on Linux x86-64 and ARM64 with glibc 2.28 or newer, macOS 11 or newer on Apple silicon, and Windows x64. Use the platform wheel from that release rather than upgrading from PyPI, where the package (opens in new tab) still lists 0.25.0 as current as of November 21.
If you’re coming from the v0.24.0-alpha.8 harness preview, finish pending approvals and runs there. OpenAI says that preview’s checkpoints don’t match the new Runner’s state format. For a first test, pick an existing workflow with a Python approval pause and typed output, then run it with each provider. Check that an approval resumes the right run, the output still validates, and history survives into the next run before switching anything that depends on those behaviors.

