Codex harness explained: tools, sandboxing and API design

Explore Codex’s open-source harness: context construction, deferred tools, platform sandboxes, action review, WebSocket transport and goal loops.

Player not loading? Watch on YouTube

Dominik Kundel explains the Codex harness through the steps that follow a user message. The app server connects an interface to the harness, while the Responses API connects the harness to model inference. He describes the Rust harness as open source under Apache 2 and says developers can build their own interfaces or reuse it for an AI agent.

Context construction balances size, flexibility and caching. Kundel says deferred tools stay out of the initial context and become available through tool search. The available skills list has a 2% context-window budget, with descriptions shortened when necessary. He dates deferred tool loading in the Responses API to GPT-5.4.

For a coding assistant, the talk covers patch-based file edits, shell commands and browser interaction through Playwright code in a persistent Node REPL. Kundel describes Seatbelt sandboxing on macOS, Bubblewrap on Linux and a custom Windows sandbox. His auto-review example uses a separate subagent with read permissions only, which judges an action against user authorization and the conversation.

The final sections explain persistent WebSocket connections that send changed data rather than the full history, goal loops driven by continuation prompts, and server-side context compaction. These are architectural explanations and demonstrations, rather than a local model installation guide or evidence of offline operation.