Install with pip install --upgrade openai-codex==0.154.0 (Python 3.10 or later). This release includes the matching openai-codex-cli-bin==0.154.0 runtime.
- Add
maxandultrareasoning-effort values. #39662 - Add
ExternalMessageto synchronous and asynchronousrun()andturn()calls. External content can start a turn or join an active regular turn with tool-level authority; it does not grant user authorization. Consumers receive independent event streams. #44086 - Add
include_turnson resume/fork,turn_service_tierfor one newly started turn, andsourcemetadata. History selection changes the returned response, not model context. Existing defaults are preserved when these options are omitted. #44084 - Refresh generated protocol models and notifications, and preserve completion events that arrive before a turn-start response. #44032, #44400
Check these migrations when upgrading:
HookMetadatawraps its handler in.root. Replace accesses such ashook.commandwithhook.root.command, checkinghook.root.handler_typebefore reading handler-specific fields.- Some previously unknown notifications now have typed payloads. Read named fields instead of
.params; unknown or invalid payloads still useUnknownNotification. - Manually constructed or late-joining turn handles receive events from their attachment point. Earlier output is not replayed, so collected results can be partial; attaching after completion can raise
TransportClosedError. Usethread.read(include_turns=True)for saved history. Handles returned directly bythread.turn(...)retain events from when their request is sent.
Custom codex_bin overrides require CLI 0.151.0 or newer for ExternalMessage and the new history/per-turn options.