AI Engineer World's Fair 2026

Building on the Codex Harness — Dominik Kundel, OpenAI

Slide chapters

24 slide and demo groups · Timestamps are approximate. 1 additional group was omitted from this pass.

Codex harness via app server

The App Server wraps the Codex harness in a protocol for building interfaces that integrate directly with it.

Text in image
CODEX HARNESS
VIA APP SERVER

OpenAI

Codex repository

The Codex repository is Apache-2.0 licensed. Kundel says you can fork it and connect another model provider with a Responses API-compatible API.

Text in image
OpenAI

Interface text:
Platform
Solutions
Resources
Open Source
Enterprise
Pricing
Search or jump to...
Sign in
Sign up

openai / codex
Public
Notifications
Fork 13.7k
Star 92.8k
Code
Issues 5k+
Pull requests 429
Discussions
Actions
Security and quality 1
Insights

main
4096 Branches
1069 Tags
Go to file
Code

[illegible] and [illegible] [codex] Reject unlowered PowerShell AST ...
[illegible] · 31 minutes ago
7,714 Commits

.codex — core: log AGENTS.md paths as URIs (#28989) — 4 days ago
.devcontainer — build: run buildifier from just fmt (#28125) — last week
.github — ci: restore custom Windows runner with hermetic LLVM 0.7... — 10 hours ago
.vscode — Recommend Bazel VSCode extension. (#25161) — 3 weeks ago
bazel — core: load AGENTS.md from foreign environments (#28958) — 4 days ago
codex-cli — cli: add package path from install context (#26189) — 3 weeks ago
codex-rs — [codex] Reject unlowered PowerShell AST regions (#24092) — 31 minutes ago
docs — [codex] Remove child AGENTS.md prompt experiment (#2... — 4 days ago
patches — ci: restore custom Windows runner with hermetic LLVM 0.7... — 10 hours ago
scripts — Make formatter output quiet on success (#29467) — 2 hours ago
sdk — Make formatter output quiet on success (#29467) — 2 hours ago
third_party — bazel: add PowerShell to Wine test harness (#28120) — last week
tools — build: run buildifier from just fmt (#28125) — last week

About
Lightweight coding agent that runs in your terminal
Readme
Apache-2.0 license
Contributing
Security policy
Activity
Custom properties
92.8k stars
504 watching
13.7k forks
Report repository

Releases 865
0.142.0 Latest
5 hours ago
+ 864 releases

Packages
No packages published

App server integrations

The Codex harness connects first-party products and third-party IDE integrations through the app server’s JSON-RPC protocol.

Text in image
App server

Client
Server

First-party products
Codex Desktop App
Codex TUI/CLI
Codex SSH Connection
JSON-RPC

CODEX HARNESS
VIA APP SERVER

Third-party integrations
JetBrains IDEs
VS Code (Codex)
Xcode
JSON-RPC

OpenAI

Codex plugin for Claude Code

The Claude Code plugin uses the same Codex app server and harness for code reviews or delegated tasks. The screen shows its installation command.

Text in image
/plugin install codex@openai-codex

Interface text:
Claude Code
Claude Code v2.1.85
Opus 4.6 · Claude Pro
~/Developer/codex
medium · /effort
OpenAI

JSON-RPC protocol flow

The client starts a thread and turn with requests; the server sends lifecycle events back, including the user message’s start and completion.

Text in image
JSON-RPC Protocol
How does it work?

Request
Event

CLIENT
SERVER

1 Initialization handshake
2 Thread and turn lifecycle

thread/start
thread/started
turn/start
(input: "run tests and summarize failures")
turn/started
item/started
(user message: {"text": "run tests and summarize failures."})
item/completed
(user message: {"text": "run tests and summarize failures."})

OpenAI

Codex app server traffic inspector

A custom inspector captures messages between Codex and its app server. Kundel opens it in the Codex app’s browser, where it waits for traffic; an earlier view shows a captured response and its compacted payload.

Text in image
Inspector

Frames
TIME ↓ | FLOW | TYPE | METHOD | ID
Waiting for Codex.app traffic
Requests and responses will appear after Codex.app connects through the capture relay.

Payload
No frame selected
Send a message from Codex.app, then select a request or response.

Interface text:
Codex  File  Edit  View  Window  Help
Wed Jul 1  3:48 PM
Codex Wire · Nan
127.0.0.1:5174
What should we work on?
Do anything
5.5
Review a PRD
Debug an issue
Summarize updates
Connect your favorite apps to Codex
relay ready  1 app connection  0 frames
passive capture  ~/.codex-demo

3:47Demo milestone · Completed build

Show 2 builds
  1. 3:31

    An inspector lists app-server messages and displays a compacted response payload.

    Text in image
    Inspector
    
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID | SIZE
    15:38:50.080 | SERVER → APP | RESPONSE | config/read | 02ee2c… | 280.0 KB
    15:38:50.053 | SERVER → APP | RESPONSE | permissionProfile/list | 67d69a… | 255 B
    15:38:50.041 | SERVER → APP | RESPONSE | config/read | be9251… | 61.2 KB
    15:38:50.041 | SERVER → APP | RESPONSE | permissionProfile/list | 693c00… | 255 B
    15:38:50.015 | APP → SERVER | REQUEST | config/read | 02ee2c… | 110 B
    15:38:50.015 | APP → SERVER | REQUEST | permissionProfile/list | 67d69a… | 126 B
    15:38:50.014 | APP → SERVER | REQUEST | config/read | be9251… | 111 B
    15:38:50.014 | APP → SERVER | REQUEST | permissionProfile/list | 693c00… | 127 B
    15:38:35.659 | SERVER → APP | RESPONSE | account/read | 73102a… | 168 B
    15:38:35.658 | APP → SERVER | REQUEST | account/read | 73102a… | 101 B
    15:37:34.069 | SERVER → APP | RESPONSE | hooks/list | 52dfe0… | 138 B
    15:37:33.326 | APP → SERVER | REQUEST | hooks/list | 52dfe0… | 115 B
    15:33:57.[illegible] | SERVER → APP | RESPONSE | mcpServerStatus/list | ab94f5… | 124.6 KB
    15:33:57.486 | SERVER → APP | RESPONSE | mcpServerStatus/list | 80f063… | 124.6 KB
    15:33:56.014 | SERVER → APP | RESPONSE | thread/list | 798748… | 9.9 KB
    15:33:56.004 | APP → SERVER | REQUEST | thread/list | 798748… | 206 B
    15:33:55.979 | SERVER → APP | RESPONSE | configRequirements/read | 82a67c… | 12.5 KB
    15:33:55.978 | SERVER → APP | RESPONSE | configRequirements/read | dec7fc… | 12.5 KB
    15:33:55.978 | SERVER → APP | RESPONSE | thread/list | c5ad3e… | 9.9 KB
    
    Payload
    RESPONSE  server → Codex.app
    config/read
    Request ID  02ee2ccd-e2a6-4480-a983-7dbcffe8702d
    Captured  15:38:50.080
    Size  280.0 KB
    Session  app-6
    Round trip  65 ms
    Payload  compacted by relay
    REQUEST  config/read  65 ms
    JSON PAYLOAD  COMPACTED
    {
      "id": "02ee2ccd-e2a6-4480-a983-7dbcffe8702d",
      "result": {
        "viewerNote": "Large result omitted by capture relay",
        "keys": [
          "config",
          "origins",
          "layers"
        ]
      },
      "capture": {
        "truncated": true,
        "originalBytes": 280024
      }
    }
    
    Interface text:
    relay ready  1 app connection  500 frames
    passive capture  ~/.codex-demo
  2. 3:47

    Codex beside an inspector waiting for app traffic.

    Text in image
    Inspector
    
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID
    Waiting for Codex.app traffic
    Requests and responses will appear after Codex.app connects through the capture relay.
    
    Payload
    No frame selected
    Send a message from Codex.app, then select a request or response.
    
    Interface text:
    Codex  File  Edit  View  Window  Help
    Wed Jul 1  3:48 PM
    Codex Wire · Nan
    127.0.0.1:5174
    What should we work on?
    Do anything
    5.5
    Review a PRD
    Debug an issue
    Summarize updates
    Connect your favorite apps to Codex
    relay ready  1 app connection  0 frames
    passive capture  ~/.codex-demo

Inspecting a streamed message

After “Hello” is sent in Codex, the inspector shows requests, responses, and notifications. The selected message-delta payload contains the text fragment “ greeting”.

Text in image
Inspector

Frames
TIME ↓ | FLOW | TYPE | METHOD | ID
15:48:35.420 | SERVER → APP | RESPONSE | thread/name/set | 551173...
15:48:35.420 | SERVER → APP | NOTIFICATION | thread/name/upda... | –
15:48:35.406 | SERVER → APP | RESPONSE | thread/list | a45586...
15:48:35.405 | APP → SERVER | REQUEST | thread/list | a45586...
15:48:35.404 | APP → SERVER | REQUEST | thread/name/set | 551173...
15:48:35.402 | SERVER → APP | RESPONSE | thread/list | b16e02...
15:48:35.401 | APP → SERVER | REQUEST | thread/list | b16e02...
15:48:35.399 | SERVER → APP | RESPONSE | thread/unsubscri... | thread...
15:48:35.398 | SERVER → APP | NOTIFICATION | turn/completed | –
15:48:35.398 | APP → SERVER | REQUEST | thread/unsubscri... | thread...
15:48:35.397 | SERVER → APP | NOTIFICATION | thread/status/ch... | –
15:48:35.395 | SERVER → APP | NOTIFICATION | thread/tokenUsag... | –
15:48:35.395 | SERVER → APP | NOTIFICATION | account/rateLimi... | –

Payload
NOTIFICATION  server → Codex.app
item/agentMessage/delta
Request ID  –
Captured  15:48:35.297
Size  231 B
Session  app-6
JSON PAYLOAD  COMPLETE
{
  "method": "item/agentMessage/delta",
  "params": {
    "threadId": "[illegible]",
    "turnId": "[illegible]",
    "itemId": "[illegible]",
    "delta": " greeting"
  }
}

Interface text:
Codex  File  Edit  View  Window  Help
Wed Jul 1 3:48 PM
Respond to gr...
Codex Wire · Nan
127.0.0.1:5174
Hello
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?
Ask for follow-up changes
5.5
relay ready  1 app connection  119 frames
passive capture  ~/.codex-demo

4:05Demo milestone

Inspecting Codex app server events

The inspector captures a new thread’s startup and configuration messages, then shows the delta notifications streaming the assistant’s response to the Codex app.

Text in image
Inspector
Frames
TIME ↓ | FLOW | TYPE | METHOD | ID
15:49:05.370 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.356 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.351 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.325 | SERVER → APP | NOTIFICATION | item/started | –
15:49:05.325 | SERVER → APP | NOTIFICATION | item/completed | –
15:49:05.323 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.318 | SERVER → APP | NOTIFICATION | item/started | –
15:49:05.317 | SERVER → APP | NOTIFICATION | item/completed | –
15:49:04.474 | SERVER → APP | NOTIFICATION | item/started | –
15:49:03.822 | SERVER → APP | NOTIFICATION | item/started | –
15:49:03.822 | SERVER → APP | NOTIFICATION | item/completed | –
15:49:03.272 | SERVER → APP | RESPONSE | model/list | a5d9e8...
15:49:03.271 | SERVER → APP | RESPONSE | thread/list | 4efdb2...

Payload
Request ID: –
Captured: 15:49:05.323
Size: 225 B
Session: app-6
JSON PAYLOAD  COMPLETE
{
  "method": "item/agentMessage/delta",
  "params": {
    "threadId": "[illegible]",
    "turnId": "[illegible]",
    "itemId": "[illegible]",
    "delta": "[illegible]"
  }
}

Interface text:
Codex  File  Edit  View  Window  Help
Greet user
Codex Wire - Nan
127.0.0.1:5174
Hello
Hello! What are we working on today?
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?
Ask for follow-up changes
5.5
relay ready  1 app connection  105 frames
passive capture  ~/.codex-demo

4:52Demo milestone · Completed build

Show 2 builds
  1. 4:33

    The inspector shows a thread-start notification and its payload beside a Codex conversation.

    Text in image
    Inspector
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID
    15:49:03.146 | APP → SERVER | REQUEST | configRequiremen... | 745685...
    15:49:03.144 | APP → SERVER | REQUEST | thread/start | thread...
    15:49:03.139 | SERVER → APP | RESPONSE | configRequiremen... | 7a7fd8...
    15:49:03.135 | APP → SERVER | REQUEST | configRequiremen... | 7a7fd8...
    15:49:03.127 | SERVER → APP | RESPONSE | config/read | fb39f2...
    15:49:03.118 | APP → SERVER | REQUEST | config/read | fb39f2...
    15:49:02.619 | APP → SERVER | RESPONSE | attestation/gene... | 7
    15:49:02.607 | SERVER → APP | REQUEST | attestation/gene... | 7
    15:49:02.603 | SERVER → APP | RESPONSE | thread/start | df43fc...
    15:49:02.603 | SERVER → APP | NOTIFICATION | thread/started | –
    15:49:02.501 | APP → SERVER | REQUEST | thread/start | df43fc...
    15:49:02.499 | SERVER → APP | RESPONSE | experimentalFeat... | 242410...
    15:49:02.489 | SERVER → APP | RESPONSE | model/list | d20e82...
    
    Payload
    NOTIFICATION  server → Codex.app
    thread/started
    Request ID: –
    Captured: 15:49:02.603
    Size: 657 B
    Session: app-6
    JSON PAYLOAD  COMPLETE
    {
      "method": "thread/started",
      "params": {
        "thread": {
          "id": "[illegible]",
          "sessionId": "[illegible]",
          "forkedFromId": null,
          "parentThreadId": null,
          "preview": "",
          "ephemeral": false,
          "modelProvider": "openai",
          "createdAt": 1782946142,
    [remainder not visible]
    
    Interface text:
    Codex  File  Edit  View  Window  Help
    Greet user
    Codex Wire - Nan
    127.0.0.1:5174
    Hello
    Hello! What are we working on today?
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    Ask for follow-up changes
    5.5
    relay ready  1 app connection  105 frames
    passive capture  ~/.codex-demo
  2. 4:52

    Codex conversation beside an inspector showing agent message notifications and a selected delta payload.

    Text in image
    Inspector
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID
    15:49:05.370 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.356 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.351 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.325 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:05.325 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:05.323 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.318 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:05.317 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:04.474 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:03.822 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:03.822 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:03.272 | SERVER → APP | RESPONSE | model/list | a5d9e8...
    15:49:03.271 | SERVER → APP | RESPONSE | thread/list | 4efdb2...
    
    Payload
    Request ID: –
    Captured: 15:49:05.323
    Size: 225 B
    Session: app-6
    JSON PAYLOAD  COMPLETE
    {
      "method": "item/agentMessage/delta",
      "params": {
        "threadId": "[illegible]",
        "turnId": "[illegible]",
        "itemId": "[illegible]",
        "delta": "[illegible]"
      }
    }
    
    Interface text:
    Codex  File  Edit  View  Window  Help
    Greet user
    Codex Wire - Nan
    127.0.0.1:5174
    Hello
    Hello! What are we working on today?
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    Ask for follow-up changes
    5.5
    relay ready  1 app connection  105 frames
    passive capture  ~/.codex-demo

Token usage event

The inspector captures a token-usage update with input, cached input, output and reasoning-token counts. Kundel says custom clients can use capabilities exposed through app-server traffic.

Text in image
Inspector

Frames
TIME | FLOW | TYPE | METHOD | ID
15:49:05.498 | SERVER → APP | NOTIFICATION | turn/completed | –
15:49:05.497 | SERVER → APP | NOTIFICATION | thread/tokenUsag... | –
15:49:05.468 | SERVER → APP | NOTIFICATION | item/completed | –
15:49:05.407 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.393 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.387 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.370 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.356 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.351 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.325 | SERVER → APP | NOTIFICATION | item/started | –
15:49:05.325 | SERVER → APP | NOTIFICATION | item/completed | –
15:49:05.323 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
15:49:05.318 | SERVER → APP | NOTIFICATION | item/started | –

Payload
JSON PAYLOAD
{
  "method": "thread/tokenUsage/updated",
  "params": {
    "threadId": "[illegible]",
    "turnId": "[illegible]",
    "tokenUsage": {
      "total": {
        "totalTokens": 10485,
        "inputTokens": 10414,
        "cachedInputTokens": 5632,
        "outputTokens": 71,
        "reasoningOutputTokens": 52
      },
      "last": {
        "totalTokens": 10485,
        "inputTokens": 10414,
        "cachedInputTokens": 5632,
        "outputTokens": 71,
        "reasoningOutputTokens": 52
      },
      "modelContextWindow": 258400
    }
  }
}

Interface text:
Codex  File  Edit  View  Window  Help
Wed Jul 1 3:49 PM
Greet user
Codex Wire · Nan
127.0.0.1:5174
Hello
Hello! What are we working on today?
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?
Ask for follow-up changes
5.5
relay ready  1 app connection  105 frames
passive capture  ~/.codex-demo

4:56Demo milestone

App server protocol

The app server exposes 120+ client request types, from threads and turns to plugins and file search. Clients can control the agent and authenticate with ChatGPT or an API.

Text in image
App server protocol

In-depth exposure
120+ different client request types

Agent and capability controls
Events to control goals, memories, plugins, etc. on top of customizations for the agent.

Built-in authentication
Offers support for “Sign in with ChatGPT” to bring your subscription or use API auth.

# Connection
- initialize
- initialized (notification)

# Threads
- thread/start
- thread/fork
- thread/goal/set
- ...
- thread/read
- thread/inject_items

# Turns and review
- turn/start
- turn/steer
- turn/interrupt
- review/start

## Skills and hooks
- skills/list
- ...

## Marketplaces, plugins, and apps
- marketplace/add
- plugin/list
- app/list
- ...

# Filesystem
# Models and features
# MCP
# Account
# Commands and processes
# Configuration and imports
# File search
# Windows sandbox
# Feedback

OpenAI

Interface text:
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?

Customize the agent

Developers can append instructions, define dynamic tools and change configuration per thread. Deferred loading lets Codex find tools through search instead of placing them in the system prompt.

Text in image
Customize the agent

Override prompts
Append guidance using developerInstructions or override the full instructions using baseInstructions.

Bring your own tools
Define dynamic tools for your client and control exposure by deferring discovery.

Control any config
Change the model provider, control sandbox behavior, and more.

{
  "method": "thread/start",
  "id": 10,
  "params": {
    "developerInstructions": "Use get_build_status [illegible] user asks about a build.",
    "dynamicTools": [
      {
        "name": "get_build_status",
        "description": "Returns the current status of a CI build.",
        "deferLoading": true,
        "inputSchema": {
          "type": "object",
          "properties": {
            "buildId": {
              "type": "string",
              "description": "The build identifier."
            }
          },
          "required": ["buildId"],
          "additionalProperties": false
        }
      }
    ]
  }
}

OpenAI

Interface text:
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?

Using app server

The app server is part of the Codex CLI and uses the same binary, so an existing CLI installation can start it.

Text in image
Using app server

OpenAI

Interface text:
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?

Check the bundled Codex CLI version

The Codex app bundles the CLI binary used to run the app server. Here, a version check on the bundled binary returns codex-cli 0.142.4.

Text in image
➜  ~  /Applications/Codex.app/Contents/Resources/codex --version
codex-cli 0.142.4

Interface text:
~
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?
OpenAI

8:43Demo milestone

App server command help

The app server can generate TypeScript bindings and JSON Schema for its protocol. Kundel says the protocol changes between versions, so generating them for the version being used helps developers build against its capabilities.

Text in image
➜  ~ codex app-server --help
[experimental] Run the app server or related tooling

Usage: codex app-server [OPTIONS] [COMMAND]

Commands:
  daemon                Manage the local app-server daemon
  proxy                 Proxy stdio bytes to the running app-server control socket
  generate-ts           [experimental] Generate TypeScript bindings for the app server protocol
  generate-json-schema  [experimental] Generate JSON Schema for the app server protocol
  help                  Print this message or the help of the given subcommand(s)

Options:
  -c, --config <key=value>
          Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal.

          Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`

Interface text:
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?
OpenAI

9:34Demo milestone

Python SDK

The Python SDK manages the app-server lifecycle and simplifies ChatGPT sign-in. The example starts a workspace-write thread, then runs a read-only review.

Text in image
Option 1
Python SDK

Wraps the Codex app server
No need to manage the app server lifecycle.

Convenience functionality
Easy way to handle the “Sign in with ChatGPT” auth flow.

pip install openai-codex

from openai_codex import Codex, Sandbox

with Codex() as codex:
    thread = codex.thread_start(
        model="gpt-5.5",
        sandbox=Sandbox.workspace_write,
    )
    result = thread.run(
        "Make a plan to diagnose and fix the CI failures",
    )
    print(result.final_response)
    review = thread.run(
        "Review the diff only.",
        sandbox=Sandbox.read_only,
    )

OpenAI

Interface text:
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?

Just ask Codex

The example asks Codex to build a macOS menu bar chat app using the app server documentation and the Build macOS Apps plugin, with styling modeled on iMessage.

Text in image
Option 2
Just ask Codex

Create a Build macOS Apps menubar chat app using developers.openai.com/codex/app-server. It should feel native using the same styling as iMessage

OpenAI

Interface text:
Approve for me
5.5 Extra High
Choose project
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?

Be creative!

Kundel suggests using the app server beyond a chat interface: trigger it inside an app, run it in the background, or bring it to unusual hardware and video games.

Text in image
Be creative!

OpenAI

Interface text:
Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?

Codex in Doom

A Doom scene places a Codex terminal inside the game. Kundel introduces a live demo of running Codex inside Doom.

Text in image
CODEX 101
AGM

Interface text:
520 AMMO
100% HEALTH
ARMS: 2 3 4 5 6 7
200% ARMOR
400 / 1
300 / 0
100 / 0
520 / 0

Greet user
Hello! What are we working on today?
Respond to greeting
Hello! What are we working on today?

OpenAI

Codex Doom app

Kundel starts a live Codex-in-Doom demo from a desktop app, then pauses to fix control capture in his dual-monitor setup.

Text in image
Codex Doom.app

Interface text:
Codex Doom
File  Edit  View  Window  Help
US
Wed Jul 1 3:57 PM

12:14Demo milestone

Codex Doom gameplay and terminal

A wall-mounted Codex terminal appears inside the Doom game. Kundel says interacting with it boots Codex and passes requests to the Electron app server through IPC.

Text in image
CODEX 101
A

AMMO
HEALTH 100%
ARMS 2 3 4 5 6 7
ARMOR 0%
50 / 1
300 / 0
1 / 0
50 / 0

Interface text:
Codex Doom  File  Edit  View  Window  Help
Wed Jul 1 3:57 PM

13:14Demo milestone · Completed build

Show 2 builds
  1. 12:54

    A Doom game window shows a dark corridor and the player's status display.

    Text in image
    AMMO
    HEALTH 100%
    ARMS 2 3 4 5 6 7
    ARMOR 0%
    50 / 1
    300 / 0
    1 / 0
    50 / 0
    
    Interface text:
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:57 PM
  2. 13:14

    A green Codex terminal built into a wall in the game.

    Text in image
    CODEX 101
    A
    
    AMMO
    HEALTH 100%
    ARMS 2 3 4 5 6 7
    ARMOR 0%
    50 / 1
    300 / 0
    1 / 0
    50 / 0
    
    Interface text:
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:57 PM

Updating health and armor

Codex calls a game tool to max health and armor at 200; the player then types a request for all weapons and ammo.

Text in image
C[illegible]TERM-101 | GPT-5.5 | LIVE

change.
> hello
codex> Hello.
> give me max health and armor
codex> Done. Health and armor are both maxed at 200.
[tool] doom_give_vitals [illegible] completed

doom$ give me all the weapons with all ammo_

enter send  sh+enter nl  cmd+up/down  cmd+n

Game HUD:
HEALTH 200%
ARMOR 200%
AMMO
ARMS
50 / 1
300 / 0
1 / 0
50 / 0

Interface text:
Codex Doom  File  Edit  View  Window  Help
Wed Jul 1 3:58 PM

13:55Demo milestone

Adding weapons and ammunition

After the request for all weapons and ammo, Codex completes two weapon calls and four ammunition calls. The Doom HUD shows updated ammunition counts.

Text in image
CODEXTERM-101 | GPT-5.5 | LIVE

[tool] doom_give_weapon ? completed
[tool] doom_give_weapon ? completed
[tool] doom_give_ammo ? completed
[tool] doom_give_ammo ? completed
[tool] doom_give_ammo ? completed
[tool] doom_give_ammo ? completed

doom> _

Interface text:
enter send  sh+enter nl  cmd+up/down  cmd+n
AMMO  HEALTH 200%  ARMS 2 3 4 [illegible] 6 7  ARMOR 200%
400 / 1
100 / 0
100 / 0
600 / 0
Codex Doom  File  Edit  View  Window  Help
Wed Jul 1 3:58 PM

14:07Demo milestone

Running a directory command

The in-game terminal runs pwd through zsh after a directory request. The presenter says the app server runs locally and has its own workspace.

Text in image
CDEXTERM-101 | GPT-5.5 | LIVE

- Shells: 100
- Rockets: 100
- Cells: 600
> What's the dir
codex> ...
[exec] /bin/zsh -lc pwd [illegible] completed

[illegible] _

Interface text:
enter send  sh+enter nl  cmd+up/down  cmd+n
AMMO  HEALTH 200%  ARMS  ARMOR 200%
Weapon slots: 2 3 4 [illegible] 6 7
400 / 1
100 / 0
100 / 0
600 / 0
Codex Doom  File  Edit  View  Window  Help
Wed Jul 1 3:58 PM

14:10Demo milestone

Tips using app server

Ship your own harness to avoid version surprises, mark added tools as deferred to keep them available without filling context, and add developerInstructions before replacing the base instructions.

Text in image
Tips using app server

01
Ship your own copy of the harness.

02
Inject dynamic tools as deferred.

03
Prefer using developerInstructions over changing the full instructions.

OpenAI

Read the talk

Building on the Codex Harness

The Codex App Server lets a custom interface use the same agent harness as the Codex app. Dominik Kundel explains the message protocol, customization and packaging choices, then puts the agent inside Doom.

From a talk by Dominik Kundel

At a glance

Ideas worth remembering

  • App Server gives custom clients access to Codex’s harness through action messages and events, including streaming, thread control and file operations.

  • Developer instructions preserve the tuned base prompt; deferred dynamic tools add application capabilities that Codex can discover through tool search.

  • Bundle the server binary and generate bindings for that version so the client does not depend on the user’s installed CLI being compatible.

  • Use codex exec for scripted tasks; use App Server when a client needs richer interaction, goal functionality or control over multiple concurrent threads.

Build the interface on an existing harness

Building an agent harness can feel intimidating before you even get to the interface you wanted to make. Dominik Kundel, who works on Codex developer experience at OpenAI, opens with that problem: how can developers build their own interfaces while reusing the machinery that already runs Codex?

The Codex App Server provides a protocol around the Codex harness. Like Agent Client Protocol, or ACP, it gives an application a way to communicate with an agent implementation. Here, the implementation is the same harness behind the Codex app, its IDE integrations and third-party clients. The client can change while the underlying agent machinery stays familiar.

Both the harness and App Server are open source under Apache 2. Developers can inspect or fork them, and the model provider is configurable: Kundel describes support for providers with a Responses API-compatible interface, plus convenience settings for LM Studio and Ollama. That compatibility condition matters; the claim is not that any arbitrary model endpoint can be substituted unchanged.

The JSON-RPC-style protocol already supports several kinds of client. Kundel names the Codex app, VS Code, Xcode and JetBrains integrations, as well as a plugin that lets Claude Code hand tasks to Codex or ask it to review code. These are different entry points into the same harness, rather than separate agent implementations built for each interface.

0:120:42
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

A message becomes thread activity and streaming events

At the protocol level, the application is the client and Codex App Server is the server. The client sends messages to perform actions and receives events describing what happens. To make that exchange concrete, Kundel builds an inspector that intercepts traffic between the real Codex app and its server, then opens the inspector in the app’s browser and sends a message.

The first inspection appears to include old buffered events, so he starts again. The fresh activity gives the reader a useful question to follow: which messages establish the work, and which carry its output? Kundel points out thread-start messages containing configuration and project context, configuration reads, and delta messages carrying streamed data. A response arrives through a sequence of events that a client can render as work progresses.

The protocol exposes considerably more than sending a prompt and collecting text. At the time of the talk, Kundel reports more than 120 client messages, with coverage that includes:

  • Client setup: initialization and configuration specific to the application.
  • Conversation and task control: thread modifications, turns and setting a goal for a custom version of goal mode.
  • Application capabilities: listing plugins, searching files and modifying the filesystem.

This breadth lets a custom client use capabilities that already appear in the Codex app, including streaming and file search.

That specificity is also Kundel’s distinction from ACP. ACP is described as the more generic protocol; App Server exposes controls over individual parts of the Codex harness. It also supports sign-in with ChatGPT, so users of a third-party application can bring their own subscription and consume their Codex usage allowance.

3:133:43
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:13 · section reference included

Add instructions and tools without replacing the base

Developer instructions provide the first customization layer. They augment Codex’s existing system instructions, which are themselves available in the repository. The recommendation is to add application-specific guidance through this layer, preserving the prompt work OpenAI has done for individual models. The Codex app uses this approach for functionality that differs from the IDE extension or CLI.

Tools provide a separate way to extend what the agent can do. An integration can use MCP or directly define dynamic tools that expose its own functions. Direct tool definitions make application behavior available to the agent: the interface can supply operations beyond the harness’s existing capabilities.

Deferred loading changes how those tools enter the agent’s context. Rather than putting every additional tool into the prompt upfront, deferred tools can be found through tool search. The functions remain available, while their definitions need not all occupy the context window from the start. This is especially useful as an application adds more functions; the mechanism is discovery on demand, rather than a growing inventory injected into every conversation.

Other settings can vary per thread. A client can choose a model provider or model, and control sandbox permissions such as which network connections are available and which files the agent can modify. Instructions, tools and permissions therefore answer different questions: how the agent should behave, what application functions it can call, and what access it has while doing the work.

6:597:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:59 · section reference included

Ship the binary and bindings together

App Server comes in the same binary as the Codex CLI. An existing CLI installation can therefore start it, but the Codex app takes a more controlled packaging approach: it includes the binary in its application bundle and updates that binary with the app. On Windows, it ships both Windows and Linux builds, selecting the Linux binary for WSL mode and the Windows binary for native operation.

The reason to bundle it is version alignment. App Server can generate TypeScript bindings or a JSON schema for a particular version, and the protocol changes between versions. Shipping the binary you built against keeps the client’s expected capabilities aligned with the server’s actual capabilities. Relying on a user’s installed CLI leaves that pairing dependent on when the user last updated.

The available integration choices solve different parts of the job:

  • Transport: the server supports standard input/output (stdio) and WebSockets. Kundel leaves the choice to the application’s use case rather than prescribing one transport for everyone.
  • Python SDK: the SDK handles much of the lifecycle management and makes features such as sign-in with ChatGPT easier to integrate through a familiar interface.
  • A custom client: developers can implement the protocol directly, including by asking Codex to build against its documentation.

Kundel’s own example is a Visual Basic client intended to feel native on Windows, which he says Codex built largely in one shot. It illustrates how reusing the harness can shift effort toward the application and its interface. That is a personal implementation result, rather than a measured guarantee about how quickly every client can be built.

8:288:59
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:28 · section reference included

Doom becomes a client—and tools change the game

A client does not have to be a conventional chat window. The agent might run in the background, respond to an interaction in an existing application, or appear inside a video game. Kundel takes the last option literally: “How can I shove this into video games?” His experiment runs Codex inside Doom.

After a brief window and control-capture problem associated with the dual-monitor setup, the demo works. The client is an Electron app using Cloudflare’s Doom WASM renderer. Most of the game engine is implemented in C, and it loads Freedoom with a game file that Codex has modified. The agent interface renders through the game engine itself, and interaction is passed to App Server using Electron’s IPC mechanism. Saying hello produces a Codex response inside the game.

The more revealing question is what happens when the conversation can change the game. Dynamic tools expose game functions to Codex. Requests for health and armor cause tool calls that grant them; a request for weapons and ammunition triggers further tool calls. The interface displays the conversation, while the tools give that conversation an effect on game state. These requests turn the earlier discussion of application-specific functions into a concrete example.

Codex reports the granted ammunition, while Doom’s HUD shows 200 health and armor plus filled ammo counters.Open full source frame
Codex reports the granted ammunition, while Doom’s HUD shows 200 health and armor plus filled ammo counters.

The same client still connects to an App Server running on Kundel’s machine. When he asks, “What’s the directory?”, Codex calls a shell, retrieves the current working directory and renders the result in the game. Game tools have been added alongside the harness’s local workspace capabilities. You could do coding work inside Doom, though Kundel’s practical verdict is that the Codex app is probably a better place for it.

11:3612:06
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:36 · section reference included

Use codex exec for scripts, App Server for client control

codex exec offers another entry point into Codex: a non-interactive command for starting tasks from scripts. Kundel gives a CI/CD workflow that automatically fixes a pull request as an example. When the surrounding system needs to kick off a task, a scripted command can be a suitable integration.

App Server becomes more useful when the application needs a comprehensive agent interface or many concurrent threads. An evaluation harness, for example, can start multiple threads through the protocol instead of building its own orchestration around separate codex exec calls. Goal functionality is another reason to use the richer interface. The distinction is the amount of harness control the application needs, including thread creation and task management.

14:4315:13
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:43 · section reference included

Three decisions that keep the integration manageable

The closing advice returns to three implementation decisions, each addressing a different source of trouble:

  • Bundle your own harness version. Experimental features can change, and users may have older CLIs without the features your client expects. Bundling makes the supported version a choice the application controls.
  • Expose application functions, then mark them deferred. The Codex app itself exposes functions for actions such as creating automations. Tool search keeps added functions available without putting their full inventory into the context unnecessarily.
  • Start with developer instructions. Replacing the base system prompt gives up the model-specific tuning already built into the harness. Adding instructions lets the application customize behavior while retaining that work.

The prompt warning is substantive. Kundel describes ongoing work to keep prompts in distribution and the agent performing well. Writing a replacement system prompt means taking responsibility for those concerns yourself. The recommended starting point is to retain the tuned base and add the instructions and functions that make the new application useful.

15:5616:26
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

15:56 · section reference included

Read the complete timestamped transcript

13 slide groups · 11 demo milestones. Extracted from the recording; expand builds to follow changes. Timestamps are approximate. 1 additional group was omitted from this pass.

  1. 0:12

    All right everyo- hi everyone. Um, I want to start with a quick raise of hands. How many of you have built your own agent harness? All right. How many of you, um, feel like it's way too intimidating to build an agent harness? Okay, cool. So, uh, over the next 18 minutes or so, I wanna talk to you all about how you can actually build on top of the Codex Harness, and hopefully make it a bit easier and less daunting for you to, um, actually build your own interfaces on an a- on an Agent Harness,

  2. 0:42

    and hopefully also a little bit fun. Uh, my name is Dom. I work, uh, at OpenAI on developer experience, specifically for Codex. Um, and I have one more raise of hands. I promise I'm gonna give you all a break. Um, but how many of you have heard of the Codex App Server? All right, this was a bit of a trick question because if you attended the keynote yesterday, all of you should have raised your, your hand, um, otherwise you probably didn't listen to Roman. Um, but, uh, we talked briefly about it yesterday, but we didn't really explain what the app server is.

  3. Codex harness via app server

    The App Server wraps the Codex harness in a protocol for building interfaces that integrate directly with it.

    Text in image
    CODEX HARNESS
    VIA APP SERVER
    
    OpenAI
  4. 1:13

    Um, so the app server's actually the protocol that wraps the Codex Harness. Um, if you've ever looked into something like Agent Client Protocol, this is a very similar concept where basically we have a protocol that allows you to directly build on top of the, uh, harness and deeply integrate into it. And we'll talk a bit in the talk about what the differences are between, uh, App Server and ACP. Uh, the big thing here to keep in mind is both the Codex Harness as well as the App Server itself are open source, so

  5. Codex repository

    The Codex repository is Apache-2.0 licensed. Kundel says you can fork it and connect another model provider with a Responses API-compatible API.

    Text in image
    OpenAI
    
    Interface text:
    Platform
    Solutions
    Resources
    Open Source
    Enterprise
    Pricing
    Search or jump to...
    Sign in
    Sign up
    
    openai / codex
    Public
    Notifications
    Fork 13.7k
    Star 92.8k
    Code
    Issues 5k+
    Pull requests 429
    Discussions
    Actions
    Security and quality 1
    Insights
    
    main
    4096 Branches
    1069 Tags
    Go to file
    Code
    
    [illegible] and [illegible] [codex] Reject unlowered PowerShell AST ...
    [illegible] · 31 minutes ago
    7,714 Commits
    
    .codex — core: log AGENTS.md paths as URIs (#28989) — 4 days ago
    .devcontainer — build: run buildifier from just fmt (#28125) — last week
    .github — ci: restore custom Windows runner with hermetic LLVM 0.7... — 10 hours ago
    .vscode — Recommend Bazel VSCode extension. (#25161) — 3 weeks ago
    bazel — core: load AGENTS.md from foreign environments (#28958) — 4 days ago
    codex-cli — cli: add package path from install context (#26189) — 3 weeks ago
    codex-rs — [codex] Reject unlowered PowerShell AST regions (#24092) — 31 minutes ago
    docs — [codex] Remove child AGENTS.md prompt experiment (#2... — 4 days ago
    patches — ci: restore custom Windows runner with hermetic LLVM 0.7... — 10 hours ago
    scripts — Make formatter output quiet on success (#29467) — 2 hours ago
    sdk — Make formatter output quiet on success (#29467) — 2 hours ago
    third_party — bazel: add PowerShell to Wine test harness (#28120) — last week
    tools — build: run buildifier from just fmt (#28125) — last week
    
    About
    Lightweight coding agent that runs in your terminal
    Readme
    Apache-2.0 license
    Contributing
    Security policy
    Activity
    Custom properties
    92.8k stars
    504 watching
    13.7k forks
    Report repository
    
    Releases 865
    0.142.0 Latest
    5 hours ago
    + 864 releases
    
    Packages
    No packages published
  6. 1:43

    we're gonna cover a couple of different things on how you can engage with it. Um, but more importantly, we're gonna both dive tomorrow in the afternoon into how a couple of these things work behind the scenes. But you can also always just ask Codex to read the repo and dive really deep into it. It's Apache 2 licensed, so feel free to fork it, do it, make it your own and have- have fun with it. You can even connect it to any other model provider as long as they have a responses API capab- uh, compatible API. Uh, we even have, uh, convenience

  7. 2:12

    settings to connect it easily to LM Studio or Ollama. Um, in terms of how it works, the App Server protocol is a JSON RPC style protocol that we actually use to power the Codex app, the IDE extension, uh, our VS code extension, so all of our first party interfaces, but also third-party ones. So if you've ever used Codex through Xcode, JetBrains, IDEs, um, or even some open source projects like Theos T3 Code or Remotex, you can actually... Uh,

  8. App server integrations

    The Codex harness connects first-party products and third-party IDE integrations through the app server’s JSON-RPC protocol.

    Text in image
    App server
    
    Client
    Server
    
    First-party products
    Codex Desktop App
    Codex TUI/CLI
    Codex SSH Connection
    JSON-RPC
    
    CODEX HARNESS
    VIA APP SERVER
    
    Third-party integrations
    JetBrains IDEs
    VS Code (Codex)
    Xcode
    JSON-RPC
    
    OpenAI
  9. 2:42

    all of these are powered by the same harness, the same app server. We even used it earlier this year to put Codex into Claude Code, um, using that same app server. So if you're still on u- uh Claude Code, uh, and you wanna use Codex from there, either to have it review your code or, um, you know, pass off tasks to Codex to handle it, you can actually use that plugin, and it uses that same app server, that same harness behind the scenes. Uh, if you've looked into things like ACP,

  10. Codex plugin for Claude Code

    The Claude Code plugin uses the same Codex app server and harness for code reviews or delegated tasks. The screen shows its installation command.

    Text in image
    /plugin install codex@openai-codex
    
    Interface text:
    Claude Code
    Claude Code v2.1.85
    Opus 4.6 · Claude Pro
    ~/Developer/codex
    medium · /effort
    OpenAI
  11. JSON-RPC protocol flow

    The client starts a thread and turn with requests; the server sends lifecycle events back, including the user message’s start and completion.

    Text in image
    JSON-RPC Protocol
    How does it work?
    
    Request
    Event
    
    CLIENT
    SERVER
    
    1 Initialization handshake
    2 Thread and turn lifecycle
    
    thread/start
    thread/started
    turn/start
    (input: "run tests and summarize failures")
    turn/started
    item/started
    (user message: {"text": "run tests and summarize failures."})
    item/completed
    (user message: {"text": "run tests and summarize failures."})
    
    OpenAI
  12. 3:13

    this should seem pretty familiar. At a high level, basically the app server, the way it works is we're gonna send messages between the client, which is the application you're building, and the server, which is the Codex App Server, uh, to perform different actions and receive events. But rather than showing you a bunch of hypothetical messages, um, I went a bit overboard and actually built a little inspector that intercepts all of the events between the real Codex app and the, uh, Codex App Server, so we can look at

  13. Codex app server traffic inspector

    A custom inspector captures messages between Codex and its app server. Kundel opens it in the Codex app’s browser, where it waits for traffic; an earlier view shows a captured response and its compacted payload.

    Text in image
    Inspector
    
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID | SIZE
    15:38:50.080 | SERVER → APP | RESPONSE | config/read | 02ee2c… | 280.0 KB
    15:38:50.053 | SERVER → APP | RESPONSE | permissionProfile/list | 67d69a… | 255 B
    15:38:50.041 | SERVER → APP | RESPONSE | config/read | be9251… | 61.2 KB
    15:38:50.041 | SERVER → APP | RESPONSE | permissionProfile/list | 693c00… | 255 B
    15:38:50.015 | APP → SERVER | REQUEST | config/read | 02ee2c… | 110 B
    15:38:50.015 | APP → SERVER | REQUEST | permissionProfile/list | 67d69a… | 126 B
    15:38:50.014 | APP → SERVER | REQUEST | config/read | be9251… | 111 B
    15:38:50.014 | APP → SERVER | REQUEST | permissionProfile/list | 693c00… | 127 B
    15:38:35.659 | SERVER → APP | RESPONSE | account/read | 73102a… | 168 B
    15:38:35.658 | APP → SERVER | REQUEST | account/read | 73102a… | 101 B
    15:37:34.069 | SERVER → APP | RESPONSE | hooks/list | 52dfe0… | 138 B
    15:37:33.326 | APP → SERVER | REQUEST | hooks/list | 52dfe0… | 115 B
    15:33:57.[illegible] | SERVER → APP | RESPONSE | mcpServerStatus/list | ab94f5… | 124.6 KB
    15:33:57.486 | SERVER → APP | RESPONSE | mcpServerStatus/list | 80f063… | 124.6 KB
    15:33:56.014 | SERVER → APP | RESPONSE | thread/list | 798748… | 9.9 KB
    15:33:56.004 | APP → SERVER | REQUEST | thread/list | 798748… | 206 B
    15:33:55.979 | SERVER → APP | RESPONSE | configRequirements/read | 82a67c… | 12.5 KB
    15:33:55.978 | SERVER → APP | RESPONSE | configRequirements/read | dec7fc… | 12.5 KB
    15:33:55.978 | SERVER → APP | RESPONSE | thread/list | c5ad3e… | 9.9 KB
    
    Payload
    RESPONSE  server → Codex.app
    config/read
    Request ID  02ee2ccd-e2a6-4480-a983-7dbcffe8702d
    Captured  15:38:50.080
    Size  280.0 KB
    Session  app-6
    Round trip  65 ms
    Payload  compacted by relay
    REQUEST  config/read  65 ms
    JSON PAYLOAD  COMPACTED
    {
      "id": "02ee2ccd-e2a6-4480-a983-7dbcffe8702d",
      "result": {
        "viewerNote": "Large result omitted by capture relay",
        "keys": [
          "config",
          "origins",
          "layers"
        ]
      },
      "capture": {
        "truncated": true,
        "originalBytes": 280024
      }
    }
    
    Interface text:
    relay ready  1 app connection  500 frames
    passive capture  ~/.codex-demo

    3:31Demo milestone

    Show 2 builds
    1. 3:31

      An inspector lists app-server messages and displays a compacted response payload.

      Text in image
      Inspector
      
      Frames
      TIME ↓ | FLOW | TYPE | METHOD | ID | SIZE
      15:38:50.080 | SERVER → APP | RESPONSE | config/read | 02ee2c… | 280.0 KB
      15:38:50.053 | SERVER → APP | RESPONSE | permissionProfile/list | 67d69a… | 255 B
      15:38:50.041 | SERVER → APP | RESPONSE | config/read | be9251… | 61.2 KB
      15:38:50.041 | SERVER → APP | RESPONSE | permissionProfile/list | 693c00… | 255 B
      15:38:50.015 | APP → SERVER | REQUEST | config/read | 02ee2c… | 110 B
      15:38:50.015 | APP → SERVER | REQUEST | permissionProfile/list | 67d69a… | 126 B
      15:38:50.014 | APP → SERVER | REQUEST | config/read | be9251… | 111 B
      15:38:50.014 | APP → SERVER | REQUEST | permissionProfile/list | 693c00… | 127 B
      15:38:35.659 | SERVER → APP | RESPONSE | account/read | 73102a… | 168 B
      15:38:35.658 | APP → SERVER | REQUEST | account/read | 73102a… | 101 B
      15:37:34.069 | SERVER → APP | RESPONSE | hooks/list | 52dfe0… | 138 B
      15:37:33.326 | APP → SERVER | REQUEST | hooks/list | 52dfe0… | 115 B
      15:33:57.[illegible] | SERVER → APP | RESPONSE | mcpServerStatus/list | ab94f5… | 124.6 KB
      15:33:57.486 | SERVER → APP | RESPONSE | mcpServerStatus/list | 80f063… | 124.6 KB
      15:33:56.014 | SERVER → APP | RESPONSE | thread/list | 798748… | 9.9 KB
      15:33:56.004 | APP → SERVER | REQUEST | thread/list | 798748… | 206 B
      15:33:55.979 | SERVER → APP | RESPONSE | configRequirements/read | 82a67c… | 12.5 KB
      15:33:55.978 | SERVER → APP | RESPONSE | configRequirements/read | dec7fc… | 12.5 KB
      15:33:55.978 | SERVER → APP | RESPONSE | thread/list | c5ad3e… | 9.9 KB
      
      Payload
      RESPONSE  server → Codex.app
      config/read
      Request ID  02ee2ccd-e2a6-4480-a983-7dbcffe8702d
      Captured  15:38:50.080
      Size  280.0 KB
      Session  app-6
      Round trip  65 ms
      Payload  compacted by relay
      REQUEST  config/read  65 ms
      JSON PAYLOAD  COMPACTED
      {
        "id": "02ee2ccd-e2a6-4480-a983-7dbcffe8702d",
        "result": {
          "viewerNote": "Large result omitted by capture relay",
          "keys": [
            "config",
            "origins",
            "layers"
          ]
        },
        "capture": {
          "truncated": true,
          "originalBytes": 280024
        }
      }
      
      Interface text:
      relay ready  1 app connection  500 frames
      passive capture  ~/.codex-demo
    2. 3:47

      Codex beside an inspector waiting for app traffic.

      Text in image
      Inspector
      
      Frames
      TIME ↓ | FLOW | TYPE | METHOD | ID
      Waiting for Codex.app traffic
      Requests and responses will appear after Codex.app connects through the capture relay.
      
      Payload
      No frame selected
      Send a message from Codex.app, then select a request or response.
      
      Interface text:
      Codex  File  Edit  View  Window  Help
      Wed Jul 1  3:48 PM
      Codex Wire · Nan
      127.0.0.1:5174
      What should we work on?
      Do anything
      5.5
      Review a PRD
      Debug an issue
      Summarize updates
      Connect your favorite apps to Codex
      relay ready  1 app connection  0 frames
      passive capture  ~/.codex-demo
  14. 3:43

    some real events. Um, let me actually switch over here to the Codex app. So I loaded up that same inspector in the, um, in-app browser here of the Codex app. And so if we send a message, we're gonna see here a bunch of different events coming in. Um, this might seem daunting at first, but as you're sort of going through some of these messages, a lot of this should feel relatively familiar. So, um, we can look through here, um,

  15. Inspecting a streamed message

    After “Hello” is sent in Codex, the inspector shows requests, responses, and notifications. The selected message-delta payload contains the text fragment “ greeting”.

    Text in image
    Inspector
    
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID
    15:48:35.420 | SERVER → APP | RESPONSE | thread/name/set | 551173...
    15:48:35.420 | SERVER → APP | NOTIFICATION | thread/name/upda... | –
    15:48:35.406 | SERVER → APP | RESPONSE | thread/list | a45586...
    15:48:35.405 | APP → SERVER | REQUEST | thread/list | a45586...
    15:48:35.404 | APP → SERVER | REQUEST | thread/name/set | 551173...
    15:48:35.402 | SERVER → APP | RESPONSE | thread/list | b16e02...
    15:48:35.401 | APP → SERVER | REQUEST | thread/list | b16e02...
    15:48:35.399 | SERVER → APP | RESPONSE | thread/unsubscri... | thread...
    15:48:35.398 | SERVER → APP | NOTIFICATION | turn/completed | –
    15:48:35.398 | APP → SERVER | REQUEST | thread/unsubscri... | thread...
    15:48:35.397 | SERVER → APP | NOTIFICATION | thread/status/ch... | –
    15:48:35.395 | SERVER → APP | NOTIFICATION | thread/tokenUsag... | –
    15:48:35.395 | SERVER → APP | NOTIFICATION | account/rateLimi... | –
    
    Payload
    NOTIFICATION  server → Codex.app
    item/agentMessage/delta
    Request ID  –
    Captured  15:48:35.297
    Size  231 B
    Session  app-6
    JSON PAYLOAD  COMPLETE
    {
      "method": "item/agentMessage/delta",
      "params": {
        "threadId": "[illegible]",
        "turnId": "[illegible]",
        "itemId": "[illegible]",
        "delta": " greeting"
      }
    }
    
    Interface text:
    Codex  File  Edit  View  Window  Help
    Wed Jul 1 3:48 PM
    Respond to gr...
    Codex Wire · Nan
    127.0.0.1:5174
    Hello
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    Ask for follow-up changes
    5.5
    relay ready  1 app connection  119 frames
    passive capture  ~/.codex-demo

    4:05Demo milestone

  16. 4:13

    some of these might be a... Let me do this once more. Um, I think I had some old ones buffered, so just gonna start a new one. Um,

  17. 4:28

    there we go. Also, don't mind my Codex pad up here. Uh, but you're gonna see like different messages from like threads being started, uh, with sort of your different configurations of what is actually happening, what project are we working on, uh, over to configuration reads, um, where is new threads being started, and then here's like some of your delta messages of like d- uh, data actually being streamed in.

  18. Inspecting Codex app server events

    The inspector captures a new thread’s startup and configuration messages, then shows the delta notifications streaming the assistant’s response to the Codex app.

    Text in image
    Inspector
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID
    15:49:03.146 | APP → SERVER | REQUEST | configRequiremen... | 745685...
    15:49:03.144 | APP → SERVER | REQUEST | thread/start | thread...
    15:49:03.139 | SERVER → APP | RESPONSE | configRequiremen... | 7a7fd8...
    15:49:03.135 | APP → SERVER | REQUEST | configRequiremen... | 7a7fd8...
    15:49:03.127 | SERVER → APP | RESPONSE | config/read | fb39f2...
    15:49:03.118 | APP → SERVER | REQUEST | config/read | fb39f2...
    15:49:02.619 | APP → SERVER | RESPONSE | attestation/gene... | 7
    15:49:02.607 | SERVER → APP | REQUEST | attestation/gene... | 7
    15:49:02.603 | SERVER → APP | RESPONSE | thread/start | df43fc...
    15:49:02.603 | SERVER → APP | NOTIFICATION | thread/started | –
    15:49:02.501 | APP → SERVER | REQUEST | thread/start | df43fc...
    15:49:02.499 | SERVER → APP | RESPONSE | experimentalFeat... | 242410...
    15:49:02.489 | SERVER → APP | RESPONSE | model/list | d20e82...
    
    Payload
    NOTIFICATION  server → Codex.app
    thread/started
    Request ID: –
    Captured: 15:49:02.603
    Size: 657 B
    Session: app-6
    JSON PAYLOAD  COMPLETE
    {
      "method": "thread/started",
      "params": {
        "thread": {
          "id": "[illegible]",
          "sessionId": "[illegible]",
          "forkedFromId": null,
          "parentThreadId": null,
          "preview": "",
          "ephemeral": false,
          "modelProvider": "openai",
          "createdAt": 1782946142,
    [remainder not visible]
    
    Interface text:
    Codex  File  Edit  View  Window  Help
    Greet user
    Codex Wire - Nan
    127.0.0.1:5174
    Hello
    Hello! What are we working on today?
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    Ask for follow-up changes
    5.5
    relay ready  1 app connection  105 frames
    passive capture  ~/.codex-demo

    4:33Demo milestone

  19. Inspecting Codex app server events

    The inspector captures a new thread’s startup and configuration messages, then shows the delta notifications streaming the assistant’s response to the Codex app.

    Text in image
    Inspector
    Frames
    TIME ↓ | FLOW | TYPE | METHOD | ID
    15:49:05.370 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.356 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.351 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.325 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:05.325 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:05.323 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.318 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:05.317 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:04.474 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:03.822 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:03.822 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:03.272 | SERVER → APP | RESPONSE | model/list | a5d9e8...
    15:49:03.271 | SERVER → APP | RESPONSE | thread/list | 4efdb2...
    
    Payload
    Request ID: –
    Captured: 15:49:05.323
    Size: 225 B
    Session: app-6
    JSON PAYLOAD  COMPLETE
    {
      "method": "item/agentMessage/delta",
      "params": {
        "threadId": "[illegible]",
        "turnId": "[illegible]",
        "itemId": "[illegible]",
        "delta": "[illegible]"
      }
    }
    
    Interface text:
    Codex  File  Edit  View  Window  Help
    Greet user
    Codex Wire - Nan
    127.0.0.1:5174
    Hello
    Hello! What are we working on today?
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    Ask for follow-up changes
    5.5
    relay ready  1 app connection  105 frames
    passive capture  ~/.codex-demo

    4:52Demo milestone

  20. Token usage event

    The inspector captures a token-usage update with input, cached input, output and reasoning-token counts. Kundel says custom clients can use capabilities exposed through app-server traffic.

    Text in image
    Inspector
    
    Frames
    TIME | FLOW | TYPE | METHOD | ID
    15:49:05.498 | SERVER → APP | NOTIFICATION | turn/completed | –
    15:49:05.497 | SERVER → APP | NOTIFICATION | thread/tokenUsag... | –
    15:49:05.468 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:05.407 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.393 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.387 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.370 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.356 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.351 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.325 | SERVER → APP | NOTIFICATION | item/started | –
    15:49:05.325 | SERVER → APP | NOTIFICATION | item/completed | –
    15:49:05.323 | SERVER → APP | NOTIFICATION | item/agentMessag... | –
    15:49:05.318 | SERVER → APP | NOTIFICATION | item/started | –
    
    Payload
    JSON PAYLOAD
    {
      "method": "thread/tokenUsage/updated",
      "params": {
        "threadId": "[illegible]",
        "turnId": "[illegible]",
        "tokenUsage": {
          "total": {
            "totalTokens": 10485,
            "inputTokens": 10414,
            "cachedInputTokens": 5632,
            "outputTokens": 71,
            "reasoningOutputTokens": 52
          },
          "last": {
            "totalTokens": 10485,
            "inputTokens": 10414,
            "cachedInputTokens": 5632,
            "outputTokens": 71,
            "reasoningOutputTokens": 52
          },
          "modelContextWindow": 258400
        }
      }
    }
    
    Interface text:
    Codex  File  Edit  View  Window  Help
    Wed Jul 1 3:49 PM
    Greet user
    Codex Wire · Nan
    127.0.0.1:5174
    Hello
    Hello! What are we working on today?
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    Ask for follow-up changes
    5.5
    relay ready  1 app connection  105 frames
    passive capture  ~/.codex-demo

    4:56Demo milestone

  21. 4:58

    And so there's a lot of additional information that you can find here. And one of the big things that makes this protocol so flexible is that we're really exposing anything that is really in the app, um, a key functionality. Meaning if we're streaming in things, we're doing file search, all of that information is actually handed back and forth between the app server and the, and the app. And so if you're building your own harness, uh, harness integration, your own client, you can actually leverage, uh, the same capabilities.

  22. App server protocol

    The app server exposes 120+ client request types, from threads and turns to plugins and file search. Clients can control the agent and authenticate with ChatGPT or an API.

    Text in image
    App server protocol
    
    In-depth exposure
    120+ different client request types
    
    Agent and capability controls
    Events to control goals, memories, plugins, etc. on top of customizations for the agent.
    
    Built-in authentication
    Offers support for “Sign in with ChatGPT” to bring your subscription or use API auth.
    
    # Connection
    - initialize
    - initialized (notification)
    
    # Threads
    - thread/start
    - thread/fork
    - thread/goal/set
    - ...
    - thread/read
    - thread/inject_items
    
    # Turns and review
    - turn/start
    - turn/steer
    - turn/interrupt
    - review/start
    
    ## Skills and hooks
    - skills/list
    - ...
    
    ## Marketplaces, plugins, and apps
    - marketplace/add
    - plugin/list
    - app/list
    - ...
    
    # Filesystem
    # Models and features
    # MCP
    # Account
    # Commands and processes
    # Configuration and imports
    # File search
    # Windows sandbox
    # Feedback
    
    OpenAI
    
    Interface text:
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
  23. 5:29

    In fact, we have right now over 120, um, so different client, uh, client messages that we continuously add more to. Um, and this goes from everything from initialization, where you're able to configure some of the more like specific things to your client, um, over thread modifications and, uh, turns, which are sort of the things that you would assume are like the most classic things, but also stu- uh, stuff like setting a goal if you wanna implement your own version of goal

  24. 5:59

    mode- Um, and listing plugins, doing all of the different other aspects that you might see in the app, all the way to things like file search and modific- uh, modifying the file system. So you can really have that full access. We also try to make it easy so that you can, uh, configure the underlying agent, and that's a bit different to ACP, where it's a more s- more, uh, generic protocol. We can actually give you more control over the individual parts of the harness as well through the protocol, and we'll look into that in a second. The other thing that is ex-

  25. 6:29

    exciting for a lot of people is you can actually, you- if you're using this protocol, you can have sign-in with ChatGPT as part of that, meaning that if someone is using your app, they can still bring their own ChatGPT subscription, and it goes off their Codex, uh, use- usage limit. So if you've used something like T3 Code or similar, you're actually using that. In terms of customizing the agent, the mo- the biggest two things then you might wanna look at if you're building on top of this app server is developer

  26. Customize the agent

    Developers can append instructions, define dynamic tools and change configuration per thread. Deferred loading lets Codex find tools through search instead of placing them in the system prompt.

    Text in image
    Customize the agent
    
    Override prompts
    Append guidance using developerInstructions or override the full instructions using baseInstructions.
    
    Bring your own tools
    Define dynamic tools for your client and control exposure by deferring discovery.
    
    Control any config
    Change the model provider, control sandbox behavior, and more.
    
    {
      "method": "thread/start",
      "id": 10,
      "params": {
        "developerInstructions": "Use get_build_status [illegible] user asks about a build.",
        "dynamicTools": [
          {
            "name": "get_build_status",
            "description": "Returns the current status of a CI build.",
            "deferLoading": true,
            "inputSchema": {
              "type": "object",
              "properties": {
                "buildId": {
                  "type": "string",
                  "description": "The build identifier."
                }
              },
              "required": ["buildId"],
              "additionalProperties": false
            }
          }
        ]
      }
    }
    
    OpenAI
    
    Interface text:
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
  27. 6:59

    instructions as a way for you to augment the instruction, the system instructions of the actual app, as well as, uh, bringing tools. So with developer instructions, we're actually appending on top of the system prompt of Codex. You can look at the actual system prompt of Codex as well. It's in the repo. Um, but we generally recommend that you actually append to that using the developer instructions. That way, you're still leveraging all of the work that we put into tweaking the prompts for the individual models, while still

  28. 7:28

    customizing it for your specific use case of the harness. This is, for example, what we do when, uh, you load up the Codex app, since there's some functionality that is, uh, more specific for the app over, like, the IDE extension or CLI, for example. And then the other part of this is dynamic tools, where you can expose, uh, additional functions that you wanna, uh, that wa- you want the agent to be able to use. You could use MCP or other things similar to what you would do in, like, the agent client protocol, but you can also just

  29. 7:58

    straight up define tools, and you can actually mark them as deferred loading, which means that rather than injecting them into the system prompt, it, uh, allows Codex to use a tool search tool, which we'll cover more tomorrow in the other session. Um, but it allows it to y- find these tools through tool search rather than polluting the, uh, overall context window. And then on top of that, you can even, on a per-thread basis, modify any other configuration that you might have for your agent. So think about,

  30. 8:28

    uh, setting a different model provider, choosing a different model, or even doing fine grain control on the sandbox, like what network connections, uh, it should have access to or what files it can modify. In terms of how you can actually use the app server, the first thing to, uh, know is that the app server actually comes as part of the Codex CLI. It's the same binary, so if you have the Codex CLI already on your system, you can just, uh, use that to spin up the app server right now.

  31. Using app server

    The app server is part of the Codex CLI and uses the same binary, so an existing CLI installation can start it.

    Text in image
    Using app server
    
    OpenAI
    
    Interface text:
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
  32. Check the bundled Codex CLI version

    The Codex app bundles the CLI binary used to run the app server. Here, a version check on the bundled binary returns codex-cli 0.142.4.

    Text in image
    ➜  ~  /Applications/Codex.app/Contents/Resources/codex --version
    codex-cli 0.142.4
    
    Interface text:
    ~
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    OpenAI

    8:43Demo milestone

  33. 8:59

    But you can also look at how we're, for example, shipping it with the Codex app. So the Codex app has the, uh, binary as part of the actual bundle. So if you're looking into your installed Codex app, you should find it in the contents of that bundle, and it changes with every version of the app that you're updating. We're shipping a new version of the CLI behind the scenes. On Windows, we actually ship with two versions of the binary, both the Linux compiled one and the Windows one, so that if you're loading the app in WSL mode, it

  34. 9:29

    uses, uh, the Linux one, and otherwise it starts up the app server in Windows native.

  35. App server command help

    The app server can generate TypeScript bindings and JSON Schema for its protocol. Kundel says the protocol changes between versions, so generating them for the version being used helps developers build against its capabilities.

    Text in image
    ➜  ~ codex app-server --help
    [experimental] Run the app server or related tooling
    
    Usage: codex app-server [OPTIONS] [COMMAND]
    
    Commands:
      daemon                Manage the local app-server daemon
      proxy                 Proxy stdio bytes to the running app-server control socket
      generate-ts           [experimental] Generate TypeScript bindings for the app server protocol
      generate-json-schema  [experimental] Generate JSON Schema for the app server protocol
      help                  Print this message or the help of the given subcommand(s)
    
    Options:
      -c, --config <key=value>
              Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal.
    
              Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
    
    Interface text:
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    OpenAI

    9:34Demo milestone

  36. 9:35

    Um, from here, you actually have a lot of different, um, additional convenience functionality. One, you can have Codex generate you, for that particular version of the app server, the TypeScript bindings or the, um, JSON schema, which is incredibly helpful since this, uh, protocol regularly changes between versions, which is also why you actually wanna bundle it with your application, which is what we're doing with the Codex app, so that you have full control over what are the actual capabilities of the version that you're

  37. 10:05

    expecting to build against. Um, in terms of protocols, you can spin up the app server both using standard input output, so stdio, or you can use WebSockets. It's gonna depend on your use case, and honestly, the easiest way to figure out what works better for you is probably to just ask Codex. Um, from here, there's two ways that you can integrate it, um, most easily. The first one is the Python SDK that we recently re- uh, released. It handles a lot of the life

  38. Python SDK

    The Python SDK manages the app-server lifecycle and simplifies ChatGPT sign-in. The example starts a workspace-write thread, then runs a read-only review.

    Text in image
    Option 1
    Python SDK
    
    Wraps the Codex app server
    No need to manage the app server lifecycle.
    
    Convenience functionality
    Easy way to handle the “Sign in with ChatGPT” auth flow.
    
    pip install openai-codex
    
    from openai_codex import Codex, Sandbox
    
    with Codex() as codex:
        thread = codex.thread_start(
            model="gpt-5.5",
            sandbox=Sandbox.workspace_write,
        )
        result = thread.run(
            "Make a plan to diagnose and fix the CI failures",
        )
        print(result.final_response)
        review = thread.run(
            "Review the diff only.",
            sandbox=Sandbox.read_only,
        )
    
    OpenAI
    
    Interface text:
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
  39. 10:35

    cycle management for you, so you don't have to deal with any of that. And then on top of that, it makes it a bit easier for you to, like, integrate things like sign-in with ChatGPT, and gives you, like, a familiar interface. That being said, we are at an AI engineer conference, so, um, probably most of you are gonna choose option two, which is you just ask Codex. So unsurprisingly, Codex is incredibly good at implementing this protocol, and you largely just have to point it at, um, the documentation. In most cases, you don't even have to do that, but it

  40. Just ask Codex

    The example asks Codex to build a macOS menu bar chat app using the app server documentation and the Build macOS Apps plugin, with styling modeled on iMessage.

    Text in image
    Option 2
    Just ask Codex
    
    Create a Build macOS Apps menubar chat app using developers.openai.com/codex/app-server. It should feel native using the same styling as iMessage
    
    OpenAI
    
    Interface text:
    Approve for me
    5.5 Extra High
    Choose project
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
  41. 11:05

    sometimes helps it to nudge it. Um, and from here, you can combine it with any of our plugins, like build macOS apps, um, if you wanna quickly spin up something or completely go wild. I used it, for example, to build a client using, um, Visual Basic, uh, to have a, like, truly Windows native app. Um, and it did it largely in one shot. So, uh, you can build really impressive applications with this in a fairly short amount of time without you having to learn all the nitty-gritty parts of buil- building an agent.

  42. Be creative!

    Kundel suggests using the app server beyond a chat interface: trigger it inside an app, run it in the background, or bring it to unusual hardware and video games.

    Text in image
    Be creative!
    
    OpenAI
    
    Interface text:
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
  43. 11:36

    The most interesting thing for me with this a- uh, with this app server though is that you're not limited to sort of the classic agent chat interface. You can really be creative, whether it's, um, you-- how you actually, like, trigger it inside of your UI and your existing app, whether you're running it in the background, whether you put it on weird hardware like Maddie does all the time, um , or if you're like me, you think about, "How can I shove this into video games?" Um, and recently, um, I think

  44. Codex in Doom

    A Doom scene places a Codex terminal inside the game. Kundel introduces a live demo of running Codex inside Doom.

    Text in image
    CODEX 101
    AGM
    
    Interface text:
    520 AMMO
    100% HEALTH
    ARMS: 2 3 4 5 6 7
    200% ARMOR
    400 / 1
    300 / 0
    100 / 0
    520 / 0
    
    Greet user
    Hello! What are we working on today?
    Respond to greeting
    Hello! What are we working on today?
    
    OpenAI
  45. 12:06

    like a month ago or so, I thought about, how can I actually run Codex inside of Doom rather than running Doom inside of Codex? Um, and I figured, let's actually do that live, and I'm gonna dismiss a couple of messages here. Uh, so I have this Codex app, Doom version, and I boot it up in the wrong window, so let me pull that over.

  46. Codex Doom app

    Kundel starts a live Codex-in-Doom demo from a desktop app, then pauses to fix control capture in his dual-monitor setup.

    Text in image
    Codex Doom.app
    
    Interface text:
    Codex Doom
    File  Edit  View  Window  Help
    US
    Wed Jul 1 3:57 PM

    12:14Demo milestone

  47. 12:29

    There we go.

  48. 12:36

    So this is... Oh, it messed up the controls. My bad. One sec. Something with this, like, dual monitor setup sometimes messes with the control capture. So let's hope that this works better now. Yep. Okay, so this is, um, an Electron app that has, uh, uses Cloudflare's Doom WASM renderer. Um, and it's, uh, so the most of the game engine itself is implemented in,

  49. Codex Doom gameplay and terminal

    A wall-mounted Codex terminal appears inside the Doom game. Kundel says interacting with it boots Codex and passes requests to the Electron app server through IPC.

    Text in image
    AMMO
    HEALTH 100%
    ARMS 2 3 4 5 6 7
    ARMOR 0%
    50 / 1
    300 / 0
    1 / 0
    50 / 0
    
    Interface text:
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:57 PM

    12:54Demo milestone

  50. 13:06

    uh, C, and then it loads the Freedoom game, except that I actually manipula- had Codex change the game file. So you can see here, this is rendered natively in the video game using all of their, that game engine. Um, and if we actually interact with it here, we're booting up Codex, and again, this is rendered natively inside the, um, actual video game, and then passes the, passes it to the app server using Electron's, um, IPC protocol. So if we say hello here,

  51. Codex Doom gameplay and terminal

    A wall-mounted Codex terminal appears inside the Doom game. Kundel says interacting with it boots Codex and passes requests to the Electron app server through IPC.

    Text in image
    CODEX 101
    A
    
    AMMO
    HEALTH 100%
    ARMS 2 3 4 5 6 7
    ARMOR 0%
    50 / 1
    300 / 0
    1 / 0
    50 / 0
    
    Interface text:
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:57 PM

    13:14Demo milestone

  52. 13:36

    um, we can see Codex actually responding. So this is using 5.5. The fun part, though, is you can actually use dynamic tools to expose additional functionality. So naturally, um, we can get, um,

  53. 13:53

    we can get all of the, um, armor and health, and it's calling the tools, gives me all that, or even, say, like, all the weapons with all ammo. Um, and it's calling all of the different tools. It's, so it's interacting with them. But again, r-remember, this is still an app server actually running on my machine, so if I say, like,

  54. Updating health and armor

    Codex calls a game tool to max health and armor at 200; the player then types a request for all weapons and ammo.

    Text in image
    C[illegible]TERM-101 | GPT-5.5 | LIVE
    
    change.
    > hello
    codex> Hello.
    > give me max health and armor
    codex> Done. Health and armor are both maxed at 200.
    [tool] doom_give_vitals [illegible] completed
    
    doom$ give me all the weapons with all ammo_
    
    enter send  sh+enter nl  cmd+up/down  cmd+n
    
    Game HUD:
    HEALTH 200%
    ARMOR 200%
    AMMO
    ARMS
    50 / 1
    300 / 0
    1 / 0
    50 / 0
    
    Interface text:
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:58 PM

    13:55Demo milestone

  55. Adding weapons and ammunition

    After the request for all weapons and ammo, Codex completes two weapon calls and four ammunition calls. The Doom HUD shows updated ammunition counts.

    Text in image
    CODEXTERM-101 | GPT-5.5 | LIVE
    
    [tool] doom_give_weapon ? completed
    [tool] doom_give_weapon ? completed
    [tool] doom_give_ammo ? completed
    [tool] doom_give_ammo ? completed
    [tool] doom_give_ammo ? completed
    [tool] doom_give_ammo ? completed
    
    doom> _
    
    Interface text:
    enter send  sh+enter nl  cmd+up/down  cmd+n
    AMMO  HEALTH 200%  ARMS 2 3 4 [illegible] 6 7  ARMOR 200%
    400 / 1
    100 / 0
    100 / 0
    600 / 0
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:58 PM

    14:07Demo milestone

  56. Running a directory command

    The in-game terminal runs pwd through zsh after a directory request. The presenter says the app server runs locally and has its own workspace.

    Text in image
    CDEXTERM-101 | GPT-5.5 | LIVE
    
    - Shells: 100
    - Rockets: 100
    - Cells: 600
    > What's the dir
    codex> ...
    [exec] /bin/zsh -lc pwd [illegible] completed
    
    [illegible] _
    
    Interface text:
    enter send  sh+enter nl  cmd+up/down  cmd+n
    AMMO  HEALTH 200%  ARMS  ARMOR 200%
    Weapon slots: 2 3 4 [illegible] 6 7
    400 / 1
    100 / 0
    100 / 0
    600 / 0
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:58 PM

    14:10Demo milestone

  57. 14:18

    um, "What's the directory?" It's actually calling zshell, getting the current working directory, and you can see here it's r- uh, rendering. It ha- it has its own workspace. So if you want, you can vibe code directly into code, i-in-inside Doom. Uh, not sure if I would recommend it. Uh, I think the app, uh, the Codex app is slightly better for this. But you can really have fun here and, and implement your own interface.

  58. Updating health and armor

    Codex calls a game tool to max health and armor at 200; the player then types a request for all weapons and ammo.

    Text in image
    C[illegible]TERM-101 | GPT-5.5 | LIVE
    
    change.
    > hello
    codex> Hello.
    > give me max health and armor
    codex> Done. Health and armor are both maxed at 200.
    [tool] doom_give_vitals [illegible] completed
    
    doom$ give me all the weapons with all ammo_
    
    enter send  sh+enter nl  cmd+up/down  cmd+n
    
    Game HUD:
    HEALTH 200%
    ARMOR 200%
    AMMO
    ARMS
    50 / 1
    300 / 0
    1 / 0
    50 / 0
    
    Interface text:
    Codex Doom  File  Edit  View  Window  Help
    Wed Jul 1 3:58 PM

    14:20Demo milestone

  59. 14:43

    Awesome. Uh, I talked with a couple of you already during the show about, uh, the app server, and one question that came up a lot of times is: What's the difference with Codex Exec? So if you've used the Codex CLI before, you're, might be familiar with this. There's another command called Codex Exec, which spins up a non-interactive interface for you to, uh, pass, uh, to kick off tasks to Codex. This is great for scripting. If you're building a CI/CD implementation and you want to script certain

  60. 15:13

    acts like auto-fixing a PR, um, this is a great opportunity. But if you're trying to build, like, a more comprehensive client, uh, where you're interfacing, uh, where you're showing the agent, or more importantly, if you're trying to do something where you're spinning up a bunch of different, uh, Codex threads at the same time, for example, um, you're running, um, you're, you're running your own, like, eval harness, or you wanna use, like, /goal, that's where the app server really shines because you have that full control

  61. 15:43

    over the harness, and you don't have to figure out your own way of parallelizing all of the Codex Exec calls rather than just sending off a bunch of, like, new thread events and spinning off tasks that way.

  62. 15:56

    Before I let you all go to the keynote, um, I have, uh, three more tips just to recap, um, what we talked about, things that you should keep in mind if you're using the app server. The first one is you should actually ship your own version of the harness. Uh, this will eliminate so many headaches for you. If you're, if you're relying on the user's installed CLI, you're gonna constantly run into things from, uh, like, breaking changes, even though we are trying to minimize them. But if you're relying on experimental features, that might happen. Um, but you

  63. Tips using app server

    Ship your own harness to avoid version surprises, mark added tools as deferred to keep them available without filling context, and add developerInstructions before replacing the base instructions.

    Text in image
    Tips using app server
    
    01
    Ship your own copy of the harness.
    
    02
    Inject dynamic tools as deferred.
    
    03
    Prefer using developerInstructions over changing the full instructions.
    
    OpenAI
  64. 16:26

    also don't have to worry about whether a user has actually updated their version and has the latest feature that you wanna use or have them nudge the, them updating it. So ship your own version of the harness. The other part is you should absolutely expose new, um, functions as part of your interface. We do this with a Codex app, for example, for it to be able to, um, c-control itself as part of the Codex, uh, thread, like spinning up automations, et cetera. But mark them as deferred. That way, you're not polluting

  65. 16:56

    the context window unnecessarily with all of the different additional functions that you're adding, and instead, still have them available for the agent without, um, necessarily confusing it. And if you are changing the instructions, try to start with over, uh, like, adding developer instructions rather than changing the base instructions. It might feel like you wanna immediately rush to, "I'm gonna write my own system prompt," but there's a lot of different things that we constantly have to think about when we're building a harness to make sure that the actual

  66. 17:25

    prompt is in distribution and make sure that the agent performs well. And you're losing out on all of that if you're actually jumping in and, like, writing your own system prompt. So be careful there, uh, if you're doing that. And with that, thank you so much. Uh, thanks for taking your time. Feel free to scan that QR code if you wanna have the slides, and I'll be around for, uh, like, the next 15 minutes at the OpenAI booth if you wanna ask me any questions there. Thank you so much.