7User-level configuration lives in `~/.codex/config.toml`. You can also add project-scoped overrides in `.codex/config.toml` files. Codex loads project-scoped config files only when you trust the project.7User-level configuration lives in `~/.codex/config.toml`. You can also add project-scoped overrides in `.codex/config.toml` files. Codex loads project-scoped config files only when you trust the project.
8 8
9Project-scoped config can’t override machine-local provider, auth,9Project-scoped config can’t override machine-local provider, auth,
10notification, profile, or telemetry routing keys. Codex ignores10host-owned app request metadata, notification, configuration profile selection,
11`openai_base_url`, `chatgpt_base_url`, `model_provider`, `model_providers`,11or telemetry routing keys. Codex ignores `openai_base_url`,
12`notify`, `profile`, `profiles`, `experimental_realtime_ws_base_url`, and12`chatgpt_base_url`, `apps_mcp_product_sku`, `model_provider`,
13`otel` when they appear in a project-local `.codex/config.toml`; put those in13`model_providers`, `notify`, `profile`, `profiles`,
14user-level config instead.14`experimental_realtime_ws_base_url`, and `otel` when they appear in a
15project-local `.codex/config.toml`; put provider, notification, and telemetry
16keys in user-level config instead. Config [profile files](https://developers.openai.com/codex/config-advanced#profiles) live next to
17`config.toml` as `$CODEX_HOME/profile-name.config.toml`; select one with
18`--profile profile-name`.
15 19
16For sandbox and approval keys (`approval_policy`, `sandbox_mode`, and `sandbox_workspace_write.*`), pair this reference with [Sandbox and approvals](https://developers.openai.com/codex/agent-approvals-security#sandbox-and-approvals), [Protected paths in writable roots](https://developers.openai.com/codex/agent-approvals-security#protected-paths-in-writable-roots), and [Network access](https://developers.openai.com/codex/agent-approvals-security#network-access). For beta permission profiles, see [Permissions](https://developers.openai.com/codex/permissions).20For sandbox and approval keys (`approval_policy`, `sandbox_mode`, and `sandbox_workspace_write.*`), pair this reference with [Sandbox and approvals](https://developers.openai.com/codex/agent-approvals-security#sandbox-and-approvals), [Protected paths in writable roots](https://developers.openai.com/codex/agent-approvals-security#protected-paths-in-writable-roots), and [Network access](https://developers.openai.com/codex/agent-approvals-security#network-access). For beta permission profiles, see [Permissions](https://developers.openai.com/codex/permissions).
17 21
133| `memories.use_memories` | `boolean` | When `false`, Codex skips injecting existing memories into future sessions. Defaults to `true`. |137| `memories.use_memories` | `boolean` | When `false`, Codex skips injecting existing memories into future sessions. Defaults to `true`. |
134| `model` | `string` | Model to use (e.g., `gpt-5.5`). |138| `model` | `string` | Model to use (e.g., `gpt-5.5`). |
135| `model_auto_compact_token_limit` | `number` | Token threshold that triggers automatic history compaction (unset uses model defaults). |139| `model_auto_compact_token_limit` | `number` | Token threshold that triggers automatic history compaction (unset uses model defaults). |
136| `model_catalog_json` | `string (path)` | Optional path to a JSON model catalog loaded on startup. Profile-level `profiles.<name>.model_catalog_json` can override this per profile. |140| `model_catalog_json` | `string (path)` | Optional path to a JSON model catalog loaded on startup. A selected `$CODEX_HOME/profile-name.config.toml` profile file can override this per profile. |
137| `model_context_window` | `number` | Context window tokens available to the active model. |141| `model_context_window` | `number` | Context window tokens available to the active model. |
138| `model_instructions_file` | `string (path)` | Replacement for built-in instructions instead of `AGENTS.md`. |142| `model_instructions_file` | `string (path)` | Replacement for built-in instructions instead of `AGENTS.md`. |
139| `model_provider` | `string` | Provider id from `model_providers` (default: `openai`). |143| `model_provider` | `string` | Provider id from `model_providers` (default: `openai`). |
217| `plugins.<plugin>.mcp_servers.<server>.enabled` | `boolean` | Enable or disable an MCP server bundled by an installed plugin without changing the plugin manifest. |221| `plugins.<plugin>.mcp_servers.<server>.enabled` | `boolean` | Enable or disable an MCP server bundled by an installed plugin without changing the plugin manifest. |
218| `plugins.<plugin>.mcp_servers.<server>.enabled_tools` | `array<string>` | Allow list of tools exposed from a plugin-provided MCP server. |222| `plugins.<plugin>.mcp_servers.<server>.enabled_tools` | `array<string>` | Allow list of tools exposed from a plugin-provided MCP server. |
219| `plugins.<plugin>.mcp_servers.<server>.tools.<tool>.approval_mode` | `auto | prompt | approve` | Per-tool approval behavior override for a plugin-provided MCP tool. |223| `plugins.<plugin>.mcp_servers.<server>.tools.<tool>.approval_mode` | `auto | prompt | approve` | Per-tool approval behavior override for a plugin-provided MCP tool. |
220| `profile` | `string` | Default profile applied at startup (equivalent to `--profile`). |
221| `profiles.<name>.*` | `various` | Profile-scoped overrides for any of the supported configuration keys. |
222| `profiles.<name>.analytics.enabled` | `boolean` | Profile-scoped analytics enablement override. |
223| `profiles.<name>.experimental_use_unified_exec_tool` | `boolean` | Legacy name for enabling unified exec; prefer `[features].unified_exec`. |
224| `profiles.<name>.model_catalog_json` | `string (path)` | Profile-scoped model catalog JSON path override (applied on startup only; overrides the top-level `model_catalog_json` for that profile). |
225| `profiles.<name>.model_instructions_file` | `string (path)` | Profile-scoped replacement for the built-in instruction file. |
226| `profiles.<name>.oss_provider` | `lmstudio | ollama` | Profile-scoped OSS provider for `--oss` sessions. |
227| `profiles.<name>.personality` | `none | friendly | pragmatic` | Profile-scoped communication style override for supported models. |
228| `profiles.<name>.plan_mode_reasoning_effort` | `none | minimal | low | medium | high | xhigh` | Profile-scoped Plan-mode reasoning override. |
229| `profiles.<name>.service_tier` | `string` | Profile-scoped service tier preference for new turns. |
230| `profiles.<name>.tools_view_image` | `boolean` | Enable or disable the `view_image` tool in that profile. |
231| `profiles.<name>.web_search` | `disabled | cached | live` | Profile-scoped web search mode override (default: `"cached"`). |
232| `profiles.<name>.windows.sandbox` | `unelevated | elevated` | Profile-scoped Windows sandbox mode override. |
233| `project_doc_fallback_filenames` | `array<string>` | Additional filenames to try when `AGENTS.md` is missing. |224| `project_doc_fallback_filenames` | `array<string>` | Additional filenames to try when `AGENTS.md` is missing. |
234| `project_doc_max_bytes` | `number` | Maximum bytes read from `AGENTS.md` when building project instructions. |225| `project_doc_max_bytes` | `number` | Maximum bytes read from `AGENTS.md` when building project instructions. |
235| `project_root_markers` | `array<string>` | List of project root marker filenames; used when searching parent directories for the project root. |226| `project_root_markers` | `array<string>` | List of project root marker filenames; used when searching parent directories for the project root. |
1680 1671
1681Details1672Details
1682 1673
1683Optional path to a JSON model catalog loaded on startup. Profile-level `profiles.<name>.model_catalog_json` can override this per profile.1674Optional path to a JSON model catalog loaded on startup. A selected `$CODEX_HOME/profile-name.config.toml` profile file can override this per profile.
1684 1675
1685Key1676Key
1686 1677
2680 2671
2681Key2672Key
2682 2673
2683`profile`
2684
2685Type / Values
2686
2687`string`
2688
2689Details
2690
2691Default profile applied at startup (equivalent to `--profile`).
2692
2693Key
2694
2695`profiles.<name>.*`
2696
2697Type / Values
2698
2699`various`
2700
2701Details
2702
2703Profile-scoped overrides for any of the supported configuration keys.
2704
2705Key
2706
2707`profiles.<name>.analytics.enabled`
2708
2709Type / Values
2710
2711`boolean`
2712
2713Details
2714
2715Profile-scoped analytics enablement override.
2716
2717Key
2718
2719`profiles.<name>.experimental_use_unified_exec_tool`
2720
2721Type / Values
2722
2723`boolean`
2724
2725Details
2726
2727Legacy name for enabling unified exec; prefer `[features].unified_exec`.
2728
2729Key
2730
2731`profiles.<name>.model_catalog_json`
2732
2733Type / Values
2734
2735`string (path)`
2736
2737Details
2738
2739Profile-scoped model catalog JSON path override (applied on startup only; overrides the top-level `model_catalog_json` for that profile).
2740
2741Key
2742
2743`profiles.<name>.model_instructions_file`
2744
2745Type / Values
2746
2747`string (path)`
2748
2749Details
2750
2751Profile-scoped replacement for the built-in instruction file.
2752
2753Key
2754
2755`profiles.<name>.oss_provider`
2756
2757Type / Values
2758
2759`lmstudio | ollama`
2760
2761Details
2762
2763Profile-scoped OSS provider for `--oss` sessions.
2764
2765Key
2766
2767`profiles.<name>.personality`
2768
2769Type / Values
2770
2771`none | friendly | pragmatic`
2772
2773Details
2774
2775Profile-scoped communication style override for supported models.
2776
2777Key
2778
2779`profiles.<name>.plan_mode_reasoning_effort`
2780
2781Type / Values
2782
2783`none | minimal | low | medium | high | xhigh`
2784
2785Details
2786
2787Profile-scoped Plan-mode reasoning override.
2788
2789Key
2790
2791`profiles.<name>.service_tier`
2792
2793Type / Values
2794
2795`string`
2796
2797Details
2798
2799Profile-scoped service tier preference for new turns.
2800
2801Key
2802
2803`profiles.<name>.tools_view_image`
2804
2805Type / Values
2806
2807`boolean`
2808
2809Details
2810
2811Enable or disable the `view_image` tool in that profile.
2812
2813Key
2814
2815`profiles.<name>.web_search`
2816
2817Type / Values
2818
2819`disabled | cached | live`
2820
2821Details
2822
2823Profile-scoped web search mode override (default: `"cached"`).
2824
2825Key
2826
2827`profiles.<name>.windows.sandbox`
2828
2829Type / Values
2830
2831`unelevated | elevated`
2832
2833Details
2834
2835Profile-scoped Windows sandbox mode override.
2836
2837Key
2838
2839`project_doc_fallback_filenames`2674`project_doc_fallback_filenames`
2840 2675
2841Type / Values2676Type / Values