In this article
Reuse the provider for runtime resources and use an explicit SDK session for conversation continuity.
On November 20, 2026, the Python Agents SDK published v1.0.0-alpha.1 with opt-in Codex provider support. The release describes a wheel embedding Codex Core inside the Python process. Reusing the provider shares a thread manager, while model calls get fresh native threads. The SDK session carries conversation history. These are different lifetimes that an integration should represent separately.
Start with a harmless fixture
Prepare a test agent that reads a small catalog of fictional records and returns a typed label. Run it once with the default provider and again with Codex explicitly selected. Check the selected model route and the final output type. Record the pinned wheel and platform with the result. An agent configured with its own model object deserves a separate test, since the documentation distinguishes that case from selecting a provider for a model name.
Test continuation and independence
Reuse a provider across ordinary calls and create an explicit SDK session for a multi-turn fixture. Seed the first turn with a fictional reference and verify that the next turn in the same session can resolve it. Run the follow-up with a distinct session as a control. Reusing connections or a thread manager should not be treated as permission to carry a user’s conversation into a new session. Keep session identifiers scoped to the application’s actual user and task boundaries.
Cover paused and interrupted work
Use a benign Python tool that requires approval and check that the application reports its waiting state accurately. The release distinguishes an SDK approval from a native Codex approval prompt, which can end the model call. Capture which boundary caused a pause or failure. Observe any effects that already occurred before retrying. Treat checkpoint formats from earlier previews as a migration concern and start the fresh sessions that the release notes call for.
Close the provider explicitly
Close the provider when its caller finishes. Use repeated start and shutdown tests to check resources and catch task state that survives longer than expected. Record lifecycle and output acceptance independently before deciding whether the alpha fits a pilot.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.