Speaker Notes

OpenAI Codex Masterclass — Vaibhav Srivastav & Katia Gil Guzman

OpenAI Codex combines frontier models with unified agent harnesses, WebSockets, git work trees, and subagents to power fast, scalable, and safe developer workflows.

AI Engineer · 1:01:59 · YouTube ↗

Talk · 2 hosts  Advanced · agent features, architecture, and workflows

Highlights

7 clips · 14 min of 62 min
    • Codex combines frontier models with a unified agent harness for tool execution and environment setup
    • Interaction surfaces include the Codex app, IDE extensions, CLI, Slack, and GitHub
    • Integrates with third-party tools like Figma, Linear, and Notion to mirror a human colleague
    • WebSockets create a direct connection between the device and API to deliver 1.75x faster tokens
    • Fast mode provides an additional 2x speedup on top of base WebSocket optimizations
    • Continuous infrastructure improvements focus on reducing latency for developer workflows
    • The Codex app supports working across multiple projects and concurrent features simultaneously
    • Native Git work tree support prevents task interference and context switching overhead
    • Allows separate feature requests, bug fixes, and Q&A sessions to run in parallel
    • Plugins bundle skills, external app integrations, and MCP servers into reusable packages
    • Skills encapsulate reusable instructions and scripts for frequent processes
    • MCP servers extend capabilities by exposing tools from external systems without manual setup
    • Codex code review acts as a reliable first pass for multi-feature development
    • Integrates automatically with GitHub pull requests to provide prioritized fix suggestions
    • Accessible via CLI slash commands and third-party tools like Claude Code plugins
    • Codex code review integrates with GitHub to automatically analyze pull requests and categorize issues by severity.
    • It contextualizes changes against the entire model repo, catching second-order effects in untouched modules.
    • Every PR across OpenAI is reviewed by Codex by default before human review.
    • Subagents allow splitting a master task into parallel, independent jobs running in separate environments.
    • Results from individual subagent runs are collated and returned to the main thread.
    • This approach scales to complex tasks like reviewing dozens of persona files simultaneously.
    • Guardian approvals use a subagent to verify whether a privileged command or tool requires human intervention.
    • It reduces human fatigue from constantly approving routine prompts while avoiding full yolo mode risks.

Questions this video answers

9 · every answer cites the moment it was said
01 How does Codex achieve lower latency for token generation? 2 sources · 6:20

OpenAI uses WebSockets to connect user devices directly to the API, delivering about 1.75x faster tokens without extra cost. Additionally, a fast mode can be enabled to squeeze out an extra 2x speed improvement.

02 What features does native work tree support provide in the Codex app? 2 sources · 8:09

The Codex app allows developers to manage individual projects and work on multiple features or bug fixes simultaneously inside the same project. Using native work trees prevents tasks from interfering with one another and reduces the need to context switch.

03 What is included inside a Codex plugin bundle? 2 sources · 10:33

Plugins bundle together skills, apps, and Model Context Protocol servers into a single reusable package. This eliminates the need to manually install multiple skills, connect various apps, or set up external tool connections one by one.

04 How can developers use automated background workflows in Codex? 2 sources · 14:44

Developers can set up automations that act like cron jobs running in the background to handle repetitive tasks. For example, Codex can be configured to summarize daily Slack messages or check for specific notifications automatically.

05 How does Codex code review handle changes across a repository? 2 sources · 31:18

Codex code review evaluates pull requests by contextualizing changes against the entire model repository rather than just looking at the direct diff. This enables it to catch second-order effects and bugs in modules that were not touched in the pull request itself. It is so effective that 100% of pull requests across OpenAI internal repositories are reviewed by default.

06 When should I configure a subagent to use read-only mode? 2 sources · 42:32

You should configure subagents like review agents or cybersecurity vulnerability scanners to always operate in read-only sandbox mode. This ensures the model cannot execute arbitrary code or make unintended write modifications while performing its analysis. In contrast, tasks like documentation writers require write access to execute actions and create bug reports.

07 What is the purpose of Guardian approvals in Codex? 2 sources · 50:32

Guardian approvals prevent the safety risks of running coding agents in unfettered YOLO mode by intercepting privileged tasks. Whenever Codex needs to run a privileged command, it spawns a subagent to verify whether human intervention is actually required. This mechanism successfully automates safe approvals and reduces developer fatigue.

08 How can session hooks be used for long-running tasks in Codex? 2 sources · 53:49

Session hooks allow developers to programmatically trigger scripts based on events like session startup, tool usage, or stopping. For example, a developer can configure a stop hook that runs a Python script to tell Codex to keep going after each turn. This enables automated, continuous execution for long-running tasks without manual prompting.

09 How do I hand off a local task to a cloud agent when closing my laptop? 2 sources · 58:37

You can seamlessly hand off your current task from the Codex app directly to a cloud agent before closing your laptop. The app allows you to select cloud execution and even parallelize runs, such as running a task multiple times in the cloud to pick the best output. This capability is built directly into the Codex app, IDE extension, and web interface.

Section-by-section summary

11 parts

Codex acts as a full software engineering agent

Built on top of frontier OpenAI models and a unified agent harness, Codex manages environment setup, tool execution, and safety. Developers can interact with it across multiple surfaces like the desktop app, IDE extensions, CLI, Slack, and GitHub.

Continuous model iteration combined with low-latency transport

OpenAI has rapidly evolved Codex with models ranging from GPT-5.2 to GPT-5.4, alongside specialized Spark and mini variants for different task lengths. Latency is minimized through native WebSockets and fast mode providing up to 2x faster token generation.

Native work trees and sandboxes streamline multitasking

The Codex app allows developers to manage multiple projects and concurrent features simultaneously using native Git work trees. It also provides robust background automations and native sandbox support across platforms including macOS and Windows.

Plugins bundle reusable workflows and external tools

Plugins unify skills, external app connections like Notion and Linear, and MCP servers into single reusable bundles. This eliminates manual setup and allows the model to match nuanced workflows during development.

Background automations and visual skills power complex workflows

Developers can configure scheduled background automations for tasks like triaging Slack messages and emails. Specialized plugins for game and web development combine image generation and interactive Playwright browsers to autonomously build and test visual applications.

Automated code reviews ensure quality across workflows

As agents handle multiple parallel tasks, automated code review becomes essential for catching issues without manual line-by-line inspection. Codex offers state-of-the-art code reviews directly within GitHub pull requests, the CLI, and external developer tools.

Delegating work with parallel subagents

Subagents decompose a large master task into parallel, independent jobs that run in dedicated environments and return their findings. Developers can use default personas like general purpose, worker, and explorer, or create custom personas tailored to specific workflows. These subagents can be restricted to readonly sandbox modes for tasks like security audits and documentation checks.

Creating custom subagents and MCP servers

Developers can define custom subagents via TOML files, specifying models, reasoning effort, and read-write sandbox permissions. Integrating Model Context Protocol (MCP) servers gives subagents direct access to external tools like documentation repositories, Sentry error logs, or issue trackers.

Guardian approvals reduce human fatigue safely

Guardian approvals act as an experimental safety layer that evaluates whether a privileged action requires human confirmation. Instead of running blindly in yolo mode or constantly prompting the user, a subagent decides if the privileged task is safe to execute.

Programmatic control via session hooks

Codex supports hooks at session startup, after tool use, and upon session stop to trigger custom actions programmatically. For example, a stop hook can run a script that repeatedly commands Codex to keep going until a long-running task is fully completed.

Auditing past sessions and cloud agent execution

Codex can analyze past local sessions stored within the configuration folder to recommend custom automations and subagents. Users can also offload tasks to cloud agents directly from the app interface, running multiple instances in parallel to select the best output.

0:00 / 1:01:59
k play/pause · f fullscreen · m mute
n next · p previous clip · t highlights/full
< > slower/faster · / search what was said
  • Codex64× · first 0:20

    OpenAI's software engineering agent that can run commands, write tests, and execute complex developer tasks.

  • MCP servers5× · first 10:33

    Servers exposing external tools to extend an agent's capabilities.

  • Subagents19× · first 1:06

    Independent secondary agents spawned from a master task to run parallel, decomposable tasks.

  • Guardian approvals3× · first 49:50

    An experimental feature that uses a verification subagent to safely evaluate whether privileged actions require human intervention.