AI harnesses are the software wrapped around a language model that makes it capable of work. Codex is OpenAI’s agentic coding harness: a command line, an IDE extension, a web and desktop interface, and an SDK that let GPT models read files, run commands, execute tests and change code – locally, in the cloud, or embedded in ChatGPT. As of 20 September 2026.
What is Codex?
Codex CLI is an open-source project by OpenAI, maintained since April 2025 in the public openai/codex repository under the Apache-2.0 licence. It can be installed via an install script (curl -fsSL https://chatgpt.com/codex/install.sh | sh), via npm install -g @openai/codex, or via Homebrew; Windows uses a PowerShell script. After installation, Codex signs in either with a ChatGPT account (Plus, Pro, Business, Edu, Enterprise) or with an API key. Alongside the CLI, OpenAI offers an extension for VS Code and compatible editors such as Cursor and Windsurf, a native integration in JetBrains IDEs, a desktop app for macOS and Windows, and Codex Web and Codex Cloud at chatgpt.com/codex for delegated tasks that run on OpenAI-managed infrastructure.
Codex as an AI harness
Codex combines the classic building blocks of a harness in one tool: a loop of model call, sandboxed tool execution and feedback to the model; project-specific instructions via AGENTS.md files, which Codex reads hierarchically from the project root down to the working directory; permissions via a combination of sandbox level (read-only, workspace-write, danger-full-access) and approval policy (on-request, never); and subagents for parallel subtasks, whose results flow back into the main context in consolidated form. Codex is extensible through MCP servers, packaged skills (SKILL.md under .agents/skills), and plugins that connect team tools and data sources. For automation there is the non-interactive codex exec mode, which streams progress to stderr, prints the final message to stdout, and, with --json, provides a structured event stream for CI pipelines.
Models and model access
By default, Codex uses OpenAI’s GPT models, including reasoning variants optimised for coding tasks with adjustable reasoning effort. For more on the model family, see our overview of OpenAI GPT. The model_provider field in config.toml switches between the built-in OpenAI provider, Azure OpenAI and Amazon Bedrock; for Azure OpenAI, OpenAI documents a concrete [model_providers.azure] example with base_url, env_key and an API version, while Amazon Bedrock only requires model_provider = "amazon-bedrock" together with AWS credentials. Beyond that, arbitrary custom endpoints can be defined under [model_providers.<id>] with base_url, env_key and wire_api, or via openai_base_url directly on the built-in provider. This lets Codex run through a central, OpenAI-compatible proxy such as the AI Gateway, provided that endpoint speaks the OpenAI Responses API – per the configuration reference, responses is currently the only supported value for wire_api.
Enterprise use: data protection and governance
For ChatGPT Business, Enterprise and Edu workspaces, OpenAI documents that business data is not used for training by default and that data is encrypted in transit and at rest. Per the documentation, data residency applies only to selected, supported content and workloads; connected apps and external model providers can follow separate location rules. Cloud tasks run on OpenAI-managed infrastructure without access to local files, desktop apps or browser sessions. Workspace owners control local and cloud use separately through Enterprise settings with role-based access control; a compliance logs platform retains prompts and responses for supported workflows for a limited period, though per the documentation it does not necessarily capture every shell action or tool invocation. Regardless of provider, source code and prompts go to the chosen model provider (OpenAI, Azure or Amazon Bedrock) and should be reflected in your record of processing activities beforehand.
Orchestrating Codex with herdr
herdr is a terminal multiplexer and runtime for coding agents. Per herdr’s documentation, herdr detects Codex sessions via a screen-manifest mechanism, reading the visible terminal state rather than relying on lifecycle hooks. In the “session” integration role, Codex thereby provides a native session identity for restore, without herdr covering the entire session lifecycle through its own hooks.
Where it fits: developer harness and enterprise harness
Codex is a harness for a clearly bounded environment: a repository, a terminal or an IDE, a developer. Business users outside development need a different harness – one connected to line-of-business systems, company knowledge and role-based permissions – and that role is filled by CompanyGPT. Both layers can run through the AI Gateway as a shared cost and governance layer, keeping budgets, provider choice and logging consistent across developer and enterprise harnesses. For other harnesses, see our AI harness overview. If you would like to assess how Codex and CompanyGPT complement each other and how to govern both through the AI Gateway, we are happy to walk through this with one of your own use cases.
