Codex CLI 0.132.0: Python SDK First-Class Authentication & Faster TUI Startup
Codex CLI 0.132.0, released May 20, 2026, delivers first-class authentication support to the Python SDK (openai-codex), allowing developers to programmatically sign in via API key, ChatGPT browser flow, or device-code flow — all without leaving the Python environment. The release also simplifies turn APIs for text-only workflows, adds --output-schema support to codex exec resume for structured JSON output in ongoing automation sessions, and batches terminal capability checks to achieve noticeably faster TUI startup times.
Sources & Mentions
3 external resources covering this update
Python SDK Gets First-Class Authentication
The headline improvement in Codex CLI 0.132.0 is a comprehensive authentication upgrade to the Python SDK, distributed as the openai-codex package. Previously, SDK authentication required out-of-band credential management; this release makes authentication a first-class citizen of the Python API surface. The login_api_key() method handles API key authentication synchronously, while login_chatgpt() and login_chatgpt_device_code() support interactive ChatGPT browser and device-code flows respectively. Account inspection and logout APIs round out a complete credential lifecycle directly from Python code.
This matters for teams building automated workflows on top of Codex: CI/CD pipelines, internal tooling, and agent harnesses can now authenticate and manage Codex sessions entirely programmatically, without relying on shell credential files or manual setup steps outside the Python runtime.
Simplified Turn APIs
The turn API for text-only workflows was also simplified. Applications can now pass plain strings as turn input rather than wrapping values in structured message objects. Handle-based runs return enriched TurnResult objects that bundle collected items, timing data, and token usage metrics — making it easier to build metered or instrumented integrations on top of Codex.
--output-schema for Resumed Automations
The codex exec resume command now accepts an --output-schema flag. This allows long-running automation sessions to be resumed while enforcing structured JSON output, giving developers the ability to maintain full session context (conversation history, memory, tool state) across interruptions while still receiving machine-readable structured responses from the resumed run.
Faster TUI Startup
Terminal capability checks — used to determine color support, cursor movement, and other terminal features — are now batched and executed in parallel rather than serially. The result is measurably faster initial rendering when launching the interactive TUI, a consistent quality-of-life improvement for developers who frequently open new Codex sessions.
Remote Executor Registration
Standard Codex authentication now covers remote executor registration, eliminating a separate credential flow that previously complicated connecting to remote or hosted execution environments.
Bug Fixes
- Goal continuation: Goals now halt at usage limits or repeated blockers rather than entering excessive retry loops; completion responses use more natural language
- Session picker: Renamed threads display as "name (thread-id)" in resume hints; pasted text works in picker search
- Multi-session reliability: In-progress MCP calls remain marked active during replay; elicitation replies route correctly to the requesting thread
- Remote sessions: WebSocket connections stay alive; diff paths now show repo-relative paths instead of temporary directory paths
- Windows robustness:
codex doctorcorrectly detects npm-managed installations; MSVC release binaries no longer require a separate VC++ runtime DLL