# Python SDK 0.154.0

By Steven Van · 2026-09-10

The SDK adds max/ultra reasoning effort, an ExternalMessage type for run() and turn(), new turn-history options, and a required hook metadata migration.

The Codex Python SDK moves to version 0.154.0, installed with *pip install --upgrade openai-codex==0.154.0* on Python 3.10 or later, alongside a matching openai-codex-cli-bin==0.154.0 runtime. The release, covered in the [changelog](<https://github.com/openai/codex/releases/tag/python-v0.154.0>), adds two reasoning-effort settings and reworks how external content and turn history are handled.

- Reasoning effort gains two new values, **max** and **ultra**.

- Synchronous and asynchronous run() and turn() calls can now take an ExternalMessage. External content can start a turn or join an active one with tool-level authority, though it does not grant user authorization, and it produces its own independent event stream. Handles built manually or attached late only receive events from their attachment point onward, so collected results can be partial, and attaching after a turn has finished can raise a TransportClosedError; thread.read(include\_turns=True) returns the full saved history instead.

- resume and fork gain an include\_turns option, a newly started turn can get a turn\_service\_tier, and source metadata is now included. Which history is selected changes what the response returns, not the model's own context, and omitting these options keeps the existing defaults.

- Generated protocol models and notifications have been refreshed, and completion events that arrive before a turn-start response are now preserved instead of lost.

Two migration steps apply when upgrading: HookMetadata now wraps its handler in **.root**, so code reading hook.command should read hook.root.command instead (checking hook.root.handler\_type first), and some previously-unrecognised notifications now carry typed payloads, so their named fields should be read directly rather than through .params. Custom codex\_bin overrides need CLI 0.151.0 or newer to use ExternalMessage and the new history and per-turn options.

[![](<https://avatars.githubusercontent.com/u/219906144?s=60&v=4>)](<https://github.com/openai/codex/releases/tag/python-v0.154.0>)

![Codex](<https://creatorstoolbox.com/images/codex.png>)

Codex

Cloud-based AI coding agent by OpenAI — assign tasks and Codex writes, tests, and ships code in a sandboxed environment.

[View Codex →](<https://creatorstoolbox.com/tools/openai-codex>)

Sources

[Original source](<https://github.com/openai/codex/releases/tag/python-v0.154.0>)

[Read Python SDK 0.154.0 on Creators Toolbox](<https://creatorstoolbox.com/blog/codex-python-sdk-0-154-0>)

---
Canonical source: https://creatorstoolbox.com/blog/codex-python-sdk-0-154-0
