Learning resourcesReviewed · OpenAI

Codex Sample Configuration

Codex Sample Configuration is an annotated settings guide for developers configuring Codex, but its examples must be adapted to their account, computer and organization rules. It explains config.toml options for models, approvals, sandboxing, integrations, providers, profiles and telemetry.

Researched 24 Nov 2026

In short.

Codex Sample Configuration is a settings reference for developers and administrators configuring Codex, but its examples must be adapted to the account, computer and organization using it. The commented TOML covers model selection, reasoning, permissions, authentication, MCP servers, providers, agents and observability. Its main value is explaining many controls together, including defaults and optional settings. The introductory notices distinguish local execution from Work Cloud orchestration; compatibility with a particular installation and actual runtime behavior are not assessed.

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

The scope is the entire documentation page at [https://learn.chatgpt.com/docs/config-file/config-sample.md], including its Work Cloud, managed-policy and MCP-hook notices and the configuration example through the Windows section. Linked documentation is excluded. No configuration or tool was executed; syntax acceptance, installed-version compatibility, account access, integration behavior and actual local or cloud policy enforcement are not assessed.

The overview

identity

Sample Configuration is a documentation page containing a large annotated example of Codex's config.toml settings. It describes most keys Codex reads and presents defaults, recommended examples and explanatory comments. The original page is available at [https://learn.chatgpt.com/docs/config-file/config-sample.md].

The resource is a configuration reference, with introductory notices explaining that Work Cloud and local computer access have additional applicability and policy considerations.

assessment

This is useful when a developer knows what behavior they want to change and needs to find the relevant setting. Comments distinguish active example values from optional entries and explain several dependencies that would be easy to miss in a short configuration snippet.

Beginners can use the explanations to understand the available controls, although the breadth makes this a demanding first introduction. The page explicitly recommends copying only necessary keys, so the full sample should not be treated as a ready-made configuration for every environment.

users

Developers can use it to choose models, adjust reasoning settings, control local tool permissions and maintain project-specific configuration. Integration developers can consult its MCP transport, authentication and provider examples.

Administrators and platform engineers may find the managed-policy notices, network controls, application approvals and telemetry settings particularly relevant. Readers need enough familiarity with configuration files to distinguish comments, root keys and TOML tables.

capabilities

The sample documents model and provider selection, service tiers, reasoning effort, verbosity, context limits, compaction, instruction overrides and web-search modes. It also covers spawned-agent defaults, skill overrides, project trust, history, notifications and terminal-interface preferences.

For integrations, it provides examples of local STDIO and remote HTTP MCP servers, tool allowlists and denylists, timeouts, OAuth and environment-based credentials. Further sections describe custom providers, application controls, permission profiles, network rules and OpenTelemetry exporters. These are documented configuration options; their availability varies where the page identifies model, client, platform or policy restrictions.

Using it

requirements

Using the settings requires a Codex environment that supports the relevant configuration keys. The selected example model, gpt-6.1-sol, requires access through the signed-in account or workspace; the page says to substitute an accessible model if necessary.

Optional integrations require their own prerequisites, such as an MCP server command or URL, authentication credentials, or cloud-provider configuration. Some settings are platform-specific: the symlink option is marked macOS-only, and Windows has a separate sandbox section. Minimum hardware requirements and a minimum compatible Codex release are not stated.

mechanism

Codex reads settings from TOML configuration files. The page identifies ~/.codex/config.toml for user configuration and .codex/config.toml for project configuration, and warns that root keys must precede tables. Commented optional entries do not take effect unless enabled. Named profiles use separate files under CODEX_HOME and are selected with an option such as codex --profile ci.

Approval policy controls when permission is requested, while sandbox settings control filesystem and network access for tool execution. Permission-profile domain rules require the network-proxy feature; web search, apps, connectors and MCP servers have separate controls. For local execution, the notice places MDM and legacy managed-device requirements above Agent Security, followed by the device's system requirements file.

setup

Choose the user or project configuration location, then copy only the keys needed for the intended behavior. Select an available model, replace example paths and endpoints, and remove unused provider or MCP examples. Keep root settings before table sections.

Review privacy-related values before copying them: the sample enables saved history and analytics, sets prompt logging to false, and configures no log or trace exporter. Its metrics exporter is Statsig. The comments state that disabling built-in analytics does not disable custom OTLP exporters.

example

A developer choosing a model and restricting local filesystem access could start with four settings shown in the sample: model = "gpt-6.1-sol", model_provider = "openai", approval_policy = "on-request" and sandbox_mode = "read-only". The model choice depends on account access.

The page describes on-request approval as letting the model decide when to ask. It does not mean every operation will prompt, and the local sandbox should not be assumed to govern apps, connectors and MCP servers. This configuration example was not executed.

Assessment & evidence

limitations

The sample contains optional, experimental and platform-dependent settings. It does not establish that every illustrated key is supported by every Codex client or release. Settings such as danger-full-access also change the security boundary substantially; their inclusion is not a recommendation to enable them.

Work Cloud orchestration has specific hook restrictions. Where enabled, it supports admin-defined MCP hooks on the cloud coordinator; command hooks and hooks from local configuration or plugins are unsupported with cloud orchestration. MCP hooks do not provide a complete Compliance API audit trail.

No configuration, integration or cloud workflow was executed. Parsing, authentication, policy enforcement and runtime compatibility remain unassessed.

reasoning

The resource's practical value comes from placing related controls together while explaining their different responsibilities. A developer can see that model selection, approval prompts, filesystem permissions and integration access require separate decisions.

That breadth supports configuration planning and identifying settings to investigate during troubleshooting. It provides no measured evidence that particular reasoning levels, service tiers or compaction settings improve accuracy, speed or cost for a given task.

alternatives

The page points readers to Config basics [https://learn.chatgpt.com/docs/config-file/config-basic], Advanced Config [https://learn.chatgpt.com/docs/config-file/config-advanced] and Config Reference [https://learn.chatgpt.com/docs/config-file/config-reference] for explanations and guidance.

It also links Managed configuration [https://learn.chatgpt.com/docs/enterprise/managed-configuration] for policy order, merge rules and network limits. These linked pages are outside the supplied scope, so their contents and relative usefulness are not assessed. No competing guide or assistant is compared.

evidence

The evidence consists of the complete Sample Configuration page at [https://learn.chatgpt.com/docs/config-file/config-sample.md], including its introductory notices and TOML example. Its comments support statements about documented options, example values, defaults and restrictions.

The page supplies no execution receipts, compatibility matrix or performance measurements. It establishes documented intent without demonstrating that a particular deployment accepts or enforces the settings.

Access & freshness

costs

The page states no subscription prices, model usage rates, service-tier premiums or integration charges. The cost of using a configuration based on it is unknown.

Model, service-tier and provider settings identify technical choices without establishing their price or inclusion in an account plan. The evidence does not support a cost comparison between the illustrated providers.

rights

The page encourages using the example as a starting point and copying needed settings into a configuration file. It does not state a licence or redistribution terms for the documentation or sample.

Rights to republish the complete page or distribute the sample as a separate file are therefore unknown. Terms governing the named models, providers and integrations are not established here.

freshness

The supplied page was captured on 24 November 2026 at 19:50:37 UTC. No publication date, last-updated date or applicable Codex release is stated, so the capture date does not establish when individual settings were introduced.

Code mode and rollout budget tracking are explicitly marked as under development and off by default. Model access, service-tier support and workspace-enabled capabilities also require confirmation for the intended environment.

actions

Identify whether the intended environment uses local Codex execution or Work Cloud with local access, then confirm the available model and applicable managed requirements. Build a minimal configuration around the desired outcome and check its syntax and supported keys before use.

Review approval, sandbox and integration controls separately. Enable provider, MCP and telemetry settings only after replacing placeholders and understanding their credential and data handling. If relying on cloud MCP hooks, verify callback connectivity, received events and failure behavior as the page recommends.

Evidence for this report

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