Topic

Codex on GitHub

All digests tagged Codex on GitHub

Building on the Codex Harness — Dominik Kundel, OpenAI thumbnail

· 18:08

Building on the Codex Harness — Dominik Kundel, OpenAI

Dominik Kundel details the Codex App Server, an open-source JSON-RPC protocol designed to simplify building custom agent harnesses on top of the Codex framework. The App Server powers all first-party and third-party Codex interfaces (including IDE extensions and Xcode/JetBrains clients). It provides deep control over the agent, allowing developers to manage over 120 client messages, implement developer instructions, and utilize dynamic/deferred tools without polluting the context window. The talk also contrasts the App Server with `codex exec`, recommending the App Server for complex, multi-threaded, or highly customized client implementations.

Key takeaways

  1. Codex App Server Protocol 1:52

    The App Server is an open-source JSON-RPC protocol that wraps the Codex harness, allowing deep integration and building on top of the core functionality. It is compatible with any model provider that has a compatible API, and is licensed under Apache 2.

  2. Advanced Agent Customization 10:56

    Developers can augment the agent using 'developer instructions' (which append to the system prompt) and expose 'dynamic and deferred tools.' Deferred loading is crucial as it allows the agent to find tools via a search mechanism rather than injecting them directly into the context window.

  3. App Server vs. `codex exec`

    While `codex exec` is excellent for non-interactive scripting (e.g., CI/CD tasks like auto-fixing a PR), the App Server is superior for building comprehensive clients, managing multiple concurrent Codex threads, or implementing advanced features like goal mode.

  4. Shipping and Integration

    Best practices include shipping a custom version of the harness to avoid reliance on user-installed CLIs and marking new functions as deferred to prevent context window pollution.

Watch on YouTube Full article