Learning resourcesReviewed · OpenAI

Codex Advanced Configuration

Advanced Configuration is OpenAI's documentation page for developers and administrators who need finer control over Codex, OpenAI's AI coding agent for the terminal, IDE extension and ChatGPT desktop app. Settings depend on the client version and execution environment. It explains configuration layers, model providers, authentication, permissions, hooks, environment-variable filtering and telemetry.

Researched 14 Nov 2026

In short.

Advanced Configuration is OpenAI's documentation page for developers and administrators who need finer control over Codex, OpenAI's AI coding agent for the terminal, IDE extension and ChatGPT desktop app. Its local configuration examples must be checked against the Configuration Reference before being adapted for Local computer access with Work Cloud, where custom model providers and host-local paths do not carry over through managed configuration. Its most useful details explain configuration precedence, trusted project settings, profile migration and provider authentication. It also documents consequential defaults for environment variables and telemetry. Prices, redistribution rights and operational results are not established by the page.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is the complete selected documentation page at [https://learn.chatgpt.com/docs/config-file/config-advanced.md], including its Work Cloud applicability notice, configuration examples, migration notes, telemetry catalogs and desktop and terminal options. Linked pages are excluded, including detailed authentication, permissions, hooks, managed configuration and provider guides. No commands, scripts, model calls or configurations were executed; operational behavior and compatibility remain unassessed.

The overview

Identity

The resource is the Advanced Configuration documentation page for Codex at [https://learn.chatgpt.com/docs/config-file/config-advanced.md]. It teaches how to configure the coding assistant through local files, command-line options and provider settings.

Its scope includes local state, project configuration, hooks, model connections, approvals, sandboxing, telemetry, history, notifications and interface settings. Several detailed configuration and enterprise topics are delegated to linked documentation.

Assessment

The guide is useful when a working Codex installation needs more specific behavior: a reusable review profile, an organization’s model gateway, controlled command environments or exported activity logs. It explains interactions that can otherwise make settings appear ineffective, including project trust and configuration precedence.

It is less suitable as a first installation tutorial or a complete enterprise deployment manual. Authentication, permission profiles, hooks and managed configuration each require additional documentation for their full setup and constraints.

Users

Developers can use the guide to separate personal defaults from project settings and switch between named configurations. People running automated jobs may find the command-line overrides, history controls, notification events and telemetry settings particularly relevant.

Administrators get guidance on provider connections, credential helpers and the differences between local execution and cloud orchestration. Beginners should expect to edit TOML configuration files and use a terminal; the page points them toward Config basics at [https://learn.chatgpt.com/docs/config-file/config-basic].

Capabilities

The page explains named profiles, temporary command-line overrides, project-root detection and trusted project configuration. It also covers lifecycle hooks, which trigger custom actions around supported events, and notification programs for completed agent turns.

Provider examples cover custom gateways, command-backed token retrieval, gateway OAuth, Amazon Bedrock, Google Cloud Vertex AI, Azure and local providers through Ollama or LM Studio. These are configuration examples; the page does not demonstrate that every provider supports every Codex feature.

Operational controls include approval policies, filesystem and network sandbox settings, inherited environment variables, OpenTelemetry log export, metrics, feedback and local history. Desktop editor handlers and terminal-interface options are also described.

Using it

Requirements

Applying the examples requires a Codex client, access to the relevant configuration files and permission to use the chosen model or provider. The GPT-6.1 Sol examples explicitly require access through the signed-in account or workspace; another available model can be substituted.

Provider requirements differ. Vertex AI’s default authentication uses the Google Cloud CLI, command-backed authentication needs an external token program, and local-provider mode needs an appropriate local service. Hardware minimums and a complete operating-system compatibility matrix are not supplied.

Project configuration loads only for trusted projects. Workspace-managed requirements and deployment-specific restrictions may constrain the settings available to an individual user.

Mechanism

Codex stores user configuration under CODEX_HOME, which defaults to ~/.codex. Settings use TOML, a text format for configuration values. A named profile overlays the base user configuration and sits below project and command-line settings. Command-line --config values are parsed as TOML, with unparseable values treated as strings.

Within trusted projects, Codex loads .codex/config.toml files from the project root toward the working directory; the closest file wins when keys overlap. Relative paths resolve from the containing .codex directory. Project files cannot set certain provider, authentication-routing, notification or telemetry keys.

Environment-variable processing has a documented order: automatic exclusions, custom exclusions, explicit set values and finally include filters. Automatic exclusion of names containing KEY, SECRET or TOKEN is disabled by default because ignore_default_excludes defaults to true. Explicit set values can restore excluded variables, although a later include filter can remove them.

Setup

Begin with the configuration location appropriate to the change. Personal defaults belong in ~/.codex/config.toml; reusable profiles use separate files such as ~/.codex/deep-review.config.toml. Profile files contain top-level settings rather than nested profile tables.

Use trusted project configuration for applicable repository settings. Keep provider routing, provider authentication, notification programs and telemetry settings at user level where the page requires them. Dedicated command-line flags are preferred when available; --config handles arbitrary keys.

For hooks, choose either hooks.json or inline TOML within a configuration layer. If both are present, Codex loads both and warns. Local computer access with Work Cloud needs separate attention: where enabled for the workspace, it supports administrator-defined MCP hooks that run on the cloud coordinator. Command hooks and hooks from local configuration or plugins are not supported with cloud orchestration, even when tools run locally. Work Cloud containers keep their existing Work Cloud policies.

Example

For a reusable review configuration, the page illustrates ~/.codex/deep-review.config.toml with model = "gpt-6.1-sol", model_reasoning_effort = "medium" and approval_policy = "on-request" as separate top-level TOML entries. It then shows codex --profile deep-review for an interactive session and codex exec --profile deep-review "review this change" for a command-line task.

The example also includes a model_catalog_json path that can override the base configuration’s catalog. That path must refer to an appropriate local file, and the chosen model requires account or workspace access. The example describes intended usage; no execution result is supplied.

Assessment & evidence

Limitations

Local and cloud behavior differ materially. Custom model providers and host-local paths do not carry over to Work Cloud local-access features through managed configuration. Cloud orchestration does not support command hooks or hooks from local configuration or plugins, and MCP hooks do not provide a complete Compliance API audit trail.

Some features depend on the provider or model. model_verbosity applies only to Responses API providers. Advertising standalone web-search support does not enable it: the endpoint, model, runtime, search mode and managed restrictions must also permit it.

Telemetry and retention controls are separate. Disabling analytics does not also disable a custom OTLP metrics exporter, and disabling local history does not establish that other logs are absent. The page describes automatic usage metrics as anonymous and enabled by default; that privacy characterization is not independently established here.

No commands or configurations were executed. Runtime correctness, security enforcement, provider compatibility, performance and the effects of failure remain unassessed.

Reasoning

The guide’s strongest practical value is explaining why a configuration change may not have the expected effect. Profile precedence, project trust, restricted project keys and deployment differences directly affect whether settings load and where they apply.

Its suitability depends on the reader’s goal. It offers concrete instructions for targeted configuration work, while compatibility assurance and deployment validation require evidence beyond the examples on the page.

Alternatives

The page directs readers to Config basics for a quick start at [https://learn.chatgpt.com/docs/config-file/config-basic] and Configuration Reference for individual keys at [https://learn.chatgpt.com/docs/config-file/config-reference]. The contents of those linked pages are outside the available evidence.

Within this guide, a dedicated flag can handle a one-run change, while a profile stores reusable differences. For redirecting the built-in OpenAI provider to a proxy, router or residency endpoint, the page recommends openai_base_url instead of defining another provider. The evidence does not support comparisons with competing coding assistants or third-party guides.

Evidence

The evidence is the complete captured Advanced Configuration page at [https://learn.chatgpt.com/docs/config-file/config-advanced.md]. It contains explanatory text, configuration examples, command examples, a notification script and telemetry catalogs. These establish documented behavior, rather than observed operational results.

The captured source revision is sha256:df1b93e49b9ded57c5bbb70608aa5669197b5a25c75905b6a32a60f79da6c2c7. No linked documentation, source code, independent benchmark or record of running the examples is included.

Access & freshness

Costs

The page supplies no Codex subscription prices, model usage rates, gateway fees or local hardware costs. Total operating cost is unknown.

Access to the example model is an explicit prerequisite. The provider and deployment options may involve different billing arrangements, but the page does not establish their terms or support a cost comparison.

Rights

The captured page contains no explicit license or redistribution grant for its documentation or examples. Reuse and redistribution rights are therefore unknown from this evidence.

The OSS mode label describes connections to local providers such as Ollama and LM Studio. It does not establish the license or permitted uses of any particular model connected through them.

Freshness

The page was captured on 14 November 2026 at 23:26:55.350 UTC. It does not supply a publication or last-updated date, so the capture date does not establish when each instruction was last revised.

An explicit compatibility note says Codex 0.134.0 and later no longer reads nested profile tables or the top-level profile selector from config.toml; named profiles move to separate files. The page also identifies standalone web search as under development and disabled by default. Accuracy against a particular installed version is not assessed.

Actions

Identify the desired change and confirm the installed Codex version before applying an example. Choose a one-run flag, reusable profile or trusted project setting according to where the change should apply. For profile migration, move legacy settings into the named profile file and remove the obsolete selectors described by the page.

For provider connections, confirm model access, endpoint compatibility and authentication requirements. For execution controls, review approvals, sandbox access and environment-variable inheritance together. For telemetry, decide separately which logs, metrics, prompts, responses and local history should be retained or exported.

Verify the resulting behavior in the intended environment. For cloud MCP hooks, the page specifically calls for checking callback connectivity, received events and failure effects before relying on them.

Evidence for this report

selected-page.txtselected · checked 2026-11-14