config-advanced.md +224 −31
84 84
85In addition to your user config, Codex reads project-scoped overrides from `.codex/config.toml` files inside your repo. Codex walks from the project root to your current working directory and loads every `.codex/config.toml` it finds. If multiple files define the same key, the closest file to your working directory wins.85In addition to your user config, Codex reads project-scoped overrides from `.codex/config.toml` files inside your repo. Codex walks from the project root to your current working directory and loads every `.codex/config.toml` it finds. If multiple files define the same key, the closest file to your working directory wins.
86 86
8787For security, Codex loads project-scoped config files only when the project is trusted. If the project is untrusted, Codex ignores `.codex/config.toml` files in the project.For security, Codex loads project-scoped config files only when the project is trusted. If the project is untrusted, Codex ignores project `.codex/` layers, including `.codex/config.toml`, project-local hooks, and project-local rules. User and system layers remain separate and still load.
88 88
89Relative paths inside a project config (for example, `model_instructions_file`) are resolved relative to the `.codex/` folder that contains the `config.toml`.89Relative paths inside a project config (for example, `model_instructions_file`) are resolved relative to the `.codex/` folder that contains the `config.toml`.
90 90
9191## Hooks (experimental)Project config files can't override settings that redirect credentials, change
92provider auth, or run machine-local notification/telemetry commands.
93Codex ignores the following keys in project-local `.codex/config.toml` and
94prints a startup warning when it sees them: `openai_base_url`,
95`chatgpt_base_url`, `model_provider`, `model_providers`, `notify`, `profile`,
96`profiles`, `experimental_realtime_ws_base_url`, and `otel`. Set those keys in
97your user-level `~/.codex/config.toml` instead.
92 98
9399Codex can also load lifecycle hooks from `hooks.json` files that sit next to## Hooks
94active config layers.
95 100
96101In practice, the two most useful locations are:Codex can also load lifecycle hooks from either `hooks.json` files or inline
102`[hooks]` tables in `config.toml` files that sit next to active config layers.
103
104In practice, the four most useful locations are:
97 105
98- `~/.codex/hooks.json`106- `~/.codex/hooks.json`
107- `~/.codex/config.toml`
99- `<repo>/.codex/hooks.json`108- `<repo>/.codex/hooks.json`
109- `<repo>/.codex/config.toml`
110
111Project-local hooks load only when the project `.codex/` layer is trusted.
112User-level hooks remain independent of project trust.
100 113
101114Turn hooks on with:Inline TOML hooks use the same event structure as `hooks.json`:
102 115
103```toml116```toml
104117[features][[hooks.PreToolUse]]
105118codex_hooks = truematcher = "^Bash$"
119
120[[hooks.PreToolUse.hooks]]
121type = "command"
122command = '/usr/bin/python3 "$(git rev-parse --show-toplevel)/.codex/hooks/pre_tool_use_policy.py"'
123timeout = 30
124statusMessage = "Checking Bash command"
106```125```
107 126
127If a single layer contains both `hooks.json` and inline `[hooks]`, Codex loads
128both and warns. Prefer one representation per layer.
129
108For the current event list, input fields, output behavior, and limitations, see130For the current event list, input fields, output behavior, and limitations, see
109[Hooks](https://developers.openai.com/codex/hooks).131[Hooks](https://developers.openai.com/codex/hooks).
110 132
175 197
176The auth command receives no `stdin` and must print the token to stdout. Codex trims surrounding whitespace, treats an empty token as an error, and refreshes proactively at `refresh_interval_ms`; set `refresh_interval_ms = 0` to refresh only after an authentication retry. Don't combine `[model_providers.<id>.auth]` with `env_key`, `experimental_bearer_token`, or `requires_openai_auth`.198The auth command receives no `stdin` and must print the token to stdout. Codex trims surrounding whitespace, treats an empty token as an error, and refreshes proactively at `refresh_interval_ms`; set `refresh_interval_ms = 0` to refresh only after an authentication retry. Don't combine `[model_providers.<id>.auth]` with `env_key`, `experimental_bearer_token`, or `requires_openai_auth`.
177 199
200### Amazon Bedrock provider
201
202Codex includes a built-in `amazon-bedrock` model provider. Set it directly as
203`model_provider`; unlike custom providers, this built-in provider supports only
204the nested AWS profile and region overrides.
205
206```toml
207model_provider = "amazon-bedrock"
208model = "<bedrock-model-id>"
209
210[model_providers.amazon-bedrock.aws]
211profile = "default"
212region = "eu-central-1"
213```
214
215If you omit `profile`, Codex uses the standard AWS credential chain. Set
216`region` to the supported Bedrock region that should handle requests.
217
178## OSS mode (local providers)218## OSS mode (local providers)
179 219
180Codex can run against a local "open source" provider (for example, Ollama or LM Studio) when you pass `--oss`. If you pass `--oss` without specifying a provider, Codex uses `oss_provider` as the default.220Codex can run against a local "open source" provider (for example, Ollama or LM Studio) when you pass `--oss`. If you pass `--oss` without specifying a provider, Codex uses `oss_provider` as the default.
230 270
231You can also use a granular approval policy (`approval_policy = { granular = { ... } }`) to allow or auto-reject individual prompt categories. This is useful when you want normal interactive approvals for some cases but want others, such as `request_permissions` or skill-script prompts, to fail closed automatically.271You can also use a granular approval policy (`approval_policy = { granular = { ... } }`) to allow or auto-reject individual prompt categories. This is useful when you want normal interactive approvals for some cases but want others, such as `request_permissions` or skill-script prompts, to fail closed automatically.
232 272
233273```Set `approvals_reviewer = "auto_review"` to route eligible interactive approval
274requests through automatic review. This changes the reviewer, not the sandbox
275boundary.
276
277Use `[auto_review].policy` for local reviewer policy instructions. Managed
278`guardian_policy_config` takes precedence.
279
280```toml
234approval_policy = "untrusted" # Other options: on-request, never, or { granular = { ... } }281approval_policy = "untrusted" # Other options: on-request, never, or { granular = { ... } }
282approvals_reviewer = "user" # Or "auto_review" for automatic review
235sandbox_mode = "workspace-write"283sandbox_mode = "workspace-write"
236allow_login_shell = false # Optional hardening: disallow login shells for shell tools284allow_login_shell = false # Optional hardening: disallow login shells for shell tools
237 285
249exclude_slash_tmp = false # Allow /tmp297exclude_slash_tmp = false # Allow /tmp
250writable_roots = ["/Users/YOU/.pyenv/shims"]298writable_roots = ["/Users/YOU/.pyenv/shims"]
251network_access = false # Opt in to outbound network299network_access = false # Opt in to outbound network
300
301[auto_review]
302policy = """
303Use your organization's automatic review policy.
304"""
252```305```
253 306
307### Named permission profiles
308
309Set `default_permissions` to reuse a sandbox profile by name. Codex includes
310the built-in profiles `:read-only`, `:workspace`, and `:danger-no-sandbox`:
311
312```toml
313default_permissions = ":workspace"
314```
315
316For custom profiles, point `default_permissions` at a name you define under
317`[permissions.<name>]`:
318
319```toml
320default_permissions = "workspace"
321
322[permissions.workspace.filesystem]
323":project_roots" = { "." = "write", "**/*.env" = "none" }
324glob_scan_max_depth = 3
325
326[permissions.workspace.network]
327enabled = true
328mode = "limited"
329
330[permissions.workspace.network.domains]
331"api.openai.com" = "allow"
332```
333
334Use built-in names with a leading colon. Custom names don't use a leading
335colon and must have matching `permissions` tables.
336
254Need the complete key list (including profile-scoped overrides and requirements constraints)? See [Configuration Reference](https://developers.openai.com/codex/config-reference) and [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).337Need the complete key list (including profile-scoped overrides and requirements constraints)? See [Configuration Reference](https://developers.openai.com/codex/config-reference) and [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).
255 338
256In workspace-write mode, some environments keep `.git/` and `.codex/`339In workspace-write mode, some environments keep `.git/` and `.codex/`
257 read-only even when the rest of the workspace is writable. This is why340 read-only even when the rest of the workspace is writable. This is why
258 commands like `git commit` may still require approval to run outside the341 commands like `git commit` may still require approval to run outside the
259342sandbox. If you want Codex to skip specific commands (for example, block `git commit` outside the sandbox), use sandbox. If you want Codex to skip specific commands (for example, block `git
260343[rules](https://developers.openai.com/codex/rules). commit` outside the sandbox), use
344 <a href="/codex/rules">rules</a>.
261 345
262Disable sandboxing entirely (use only if your environment already isolates processes):346Disable sandboxing entirely (use only if your environment already isolates processes):
263 347
335Each metric below also includes default metadata tags: `auth_mode`, `originator`, `session_source`, `model`, and `app.version`.419Each metric below also includes default metadata tags: `auth_mode`, `originator`, `session_source`, `model`, and `app.version`.
336 420
337| Metric | Type | Fields | Description |421| Metric | Type | Fields | Description |
338422| --- | --- | --- | --- || ------------------------------------- | --------- | ------------------- | ----------------------------------------------------------------- |
339| `codex.api_request` | counter | `status`, `success` | API request count by HTTP status and success/failure. |423| `codex.api_request` | counter | `status`, `success` | API request count by HTTP status and success/failure. |
340| `codex.api_request.duration_ms` | histogram | `status`, `success` | API request duration in milliseconds. |424| `codex.api_request.duration_ms` | histogram | `status`, `success` | API request duration in milliseconds. |
341| `codex.sse_event` | counter | `kind`, `success` | SSE event count by event kind and success/failure. |425| `codex.sse_event` | counter | `kind`, `success` | SSE event count by event kind and success/failure. |
370 454
371#### Metrics catalog455#### Metrics catalog
372 456
373457Each metric includes the required fields plus the default context fields above. Every metric is prefixed by `codex.`.Each metric includes the required fields plus the default context fields above. Metric names below omit the `codex.` prefix.
458Most metric names are centralized in `codex-rs/otel/src/metrics/names.rs`; feature-specific metrics emitted outside that file are included here too.
374If a metric includes the `tool` field, it reflects the internal tool used (for example, `apply_patch` or `shell`) and doesn't contain the actual shell command or patch `codex` is trying to apply.459If a metric includes the `tool` field, it reflects the internal tool used (for example, `apply_patch` or `shell`) and doesn't contain the actual shell command or patch `codex` is trying to apply.
375 460
461#### Runtime and model transport
462
376| Metric | Type | Fields | Description |463| Metric | Type | Fields | Description |
377464| --- | --- | --- | --- || ----------------------------------------------- | --------- | -------------------- | ------------------------------------------------------------ |
465| `api_request` | counter | `status`, `success` | API request count by HTTP status and success/failure. |
466| `api_request.duration_ms` | histogram | `status`, `success` | API request duration in milliseconds. |
467| `sse_event` | counter | `kind`, `success` | SSE event count by event kind and success/failure. |
468| `sse_event.duration_ms` | histogram | `kind`, `success` | SSE event processing duration in milliseconds. |
469| `websocket.request` | counter | `success` | WebSocket request count by success/failure. |
470| `websocket.request.duration_ms` | histogram | `success` | WebSocket request duration in milliseconds. |
471| `websocket.event` | counter | `kind`, `success` | WebSocket message/event count by type and success/failure. |
472| `websocket.event.duration_ms` | histogram | `kind`, `success` | WebSocket message/event processing duration in milliseconds. |
473| `responses_api_overhead.duration_ms` | histogram | | Responses API overhead timing from WebSocket responses. |
474| `responses_api_inference_time.duration_ms` | histogram | | Responses API inference timing from WebSocket responses. |
475| `responses_api_engine_iapi_ttft.duration_ms` | histogram | | Responses API engine IAPI time-to-first-token timing. |
476| `responses_api_engine_service_ttft.duration_ms` | histogram | | Responses API engine service time-to-first-token timing. |
477| `responses_api_engine_iapi_tbt.duration_ms` | histogram | | Responses API engine IAPI time-between-token timing. |
478| `responses_api_engine_service_tbt.duration_ms` | histogram | | Responses API engine service time-between-token timing. |
479| `transport.fallback_to_http` | counter | `from_wire_api` | WebSocket-to-HTTP fallback count. |
480| `remote_models.fetch_update.duration_ms` | histogram | | Time to fetch remote model definitions. |
481| `remote_models.load_cache.duration_ms` | histogram | | Time to load the remote model cache. |
482| `startup_prewarm.duration_ms` | histogram | `status` | Startup prewarm duration by outcome. |
483| `startup_prewarm.age_at_first_turn_ms` | histogram | `status` | Startup prewarm age when the first real turn resolves it. |
484| `cloud_requirements.fetch.duration_ms` | histogram | | Workspace-managed cloud requirements fetch duration. |
485| `cloud_requirements.fetch_attempt` | counter | See note | Workspace-managed cloud requirements fetch attempts. |
486| `cloud_requirements.fetch_final` | counter | See note | Final workspace-managed cloud requirements fetch outcome. |
487| `cloud_requirements.load` | counter | `trigger`, `outcome` | Workspace-managed cloud requirements load outcome. |
488
489The `cloud_requirements.fetch_attempt` metric includes `trigger`, `attempt`, `outcome`, and `status_code` fields. The `cloud_requirements.fetch_final` metric includes `trigger`, `outcome`, `reason`, `attempt_count`, and `status_code` fields.
490
491#### Turn and tool activity
492
493| Metric | Type | Fields | Description |
494| -------------------------------------- | --------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
495| `turn.e2e_duration_ms` | histogram | | End-to-end time for a full turn. |
496| `turn.ttft.duration_ms` | histogram | | Time to first token for a turn. |
497| `turn.ttfm.duration_ms` | histogram | | Time to first model output item for a turn. |
498| `turn.network_proxy` | counter | `active`, `tmp_mem_enabled` | Whether the managed network proxy was active for the turn. |
499| `turn.memory` | counter | `read_allowed`, `feature_enabled`, `config_use_memories`, `has_citations` | Per-turn memory read availability and memory citation usage. |
500| `turn.tool.call` | histogram | `tmp_mem_enabled` | Number of tool calls in the turn. |
501| `turn.token_usage` | histogram | `token_type`, `tmp_mem_enabled` | Per-turn token usage by token type (`total`, `input`, `cached_input`, `output`, or `reasoning_output`). |
502| `tool.call` | counter | `tool`, `success` | Tool invocation count by tool name and success/failure. |
503| `tool.call.duration_ms` | histogram | `tool`, `success` | Tool execution duration in milliseconds by tool name and outcome. |
504| `tool.unified_exec` | counter | `tty` | Unified exec tool calls by TTY mode. |
505| `approval.requested` | counter | `tool`, `approved` | Tool approval request result (`approved`, `approved_with_amendment`, `approved_for_session`, `denied`, `abort`). |
506| `mcp.call` | counter | See note | MCP tool invocation result. |
507| `mcp.call.duration_ms` | histogram | See note | MCP tool invocation duration. |
508| `mcp.tools.list.duration_ms` | histogram | `cache` | MCP tool-list duration, including cache hit/miss state. |
509| `mcp.tools.fetch_uncached.duration_ms` | histogram | | Duration of MCP tool fetches that miss the cache. |
510| `mcp.tools.cache_write.duration_ms` | histogram | | Duration of Codex Apps MCP tool-cache writes. |
511| `hooks.run` | counter | `hook_name`, `source`, `status` | Hook run count by hook name, source, and status. |
512| `hooks.run.duration_ms` | histogram | `hook_name`, `source`, `status` | Hook run duration in milliseconds. |
513
514The `mcp.call` and `mcp.call.duration_ms` metrics include `status`; normal tool-call emissions also include `tool`, plus `connector_id` and `connector_name` when available. Blocked Codex Apps MCP calls may emit `mcp.call` with only `status`.
515
516#### Threads, tasks, and features
517
518| Metric | Type | Fields | Description |
519| --------------------------------- | --------- | --------------------- | -------------------------------------------------------------------------------- |
378| `feature.state` | counter | `feature`, `value` | Feature values that differ from defaults (emit one row per non-default). |520| `feature.state` | counter | `feature`, `value` | Feature values that differ from defaults (emit one row per non-default). |
379521| `thread.started` | counter | `is_git` | New thread created. || `status_line` | counter | | Session started with a configured status line. |
380522| `thread.fork` | counter | | New thread created by forking an existing thread. || `model_warning` | counter | | Warning sent to the model. |
523| `thread.started` | counter | `is_git` | New thread created, tagged by whether the working directory is in a Git repo. |
524| `conversation.turn.count` | counter | | User/assistant turns per thread, recorded at the end of the thread. |
525| `thread.fork` | counter | `source` | New thread created by forking an existing thread. |
381| `thread.rename` | counter | | Thread renamed. |526| `thread.rename` | counter | | Thread renamed. |
527| `thread.side` | counter | `source` | Side conversation created. |
528| `thread.skills.enabled_total` | histogram | | Number of skills enabled for a new thread. |
529| `thread.skills.kept_total` | histogram | | Number of enabled skills kept after prompt rendering. |
530| `thread.skills.truncated` | histogram | | Whether skill rendering truncated the enabled skills list (`1` or `0`). |
382| `task.compact` | counter | `type` | Number of compactions per type (`remote` or `local`), including manual and auto. |531| `task.compact` | counter | `type` | Number of compactions per type (`remote` or `local`), including manual and auto. |
383| `task.user_shell` | counter | | Number of user shell actions (`!` in the TUI for example). |
384| `task.review` | counter | | Number of reviews triggered. |532| `task.review` | counter | | Number of reviews triggered. |
385| `task.undo` | counter | | Number of undo actions triggered. |533| `task.undo` | counter | | Number of undo actions triggered. |
386534| `approval.requested` | counter | `tool`, `approved` | Tool approval request result (`approved`, `approved_with_amendment`, `approved_for_session`, `denied`, `abort`). || `task.user_shell` | counter | | Number of user shell actions (`!` in the TUI for example). |
387535| `conversation.turn.count` | counter | | User/assistant turns per thread, recorded at the end of the thread. || `shell_snapshot` | counter | See note | Whether taking a shell snapshot succeeded. |
388| `turn.e2e_duration_ms` | histogram | | End-to-end time for a full turn. |
389| `mcp.call` | counter | `status` | MCP tool invocation result (`ok` or error string). |
390| `model_warning` | counter | | Warning sent to the model. |
391| `tool.call` | counter | `tool`, `success` | Tool invocation result (`success`: `true` or `false`). |
392| `tool.call.duration_ms` | histogram | `tool`, `success` | Tool execution time. |
393| `remote_models.fetch_update.duration_ms` | histogram | | Time to fetch remote model definitions. |
394| `remote_models.load_cache.duration_ms` | histogram | | Time to load the remote model cache. |
395| `shell_snapshot` | counter | `success` | Whether taking a shell snapshot succeeded. |
396| `shell_snapshot.duration_ms` | histogram | `success` | Time to take a shell snapshot. |536| `shell_snapshot.duration_ms` | histogram | `success` | Time to take a shell snapshot. |
397537| `db.init` | counter | `status` | State DB initialization outcomes (`opened`, `created`, `open_error`, `init_error`). || `skill.injected` | counter | `status`, `skill` | Skill injection outcomes by skill. |
538| `plugins.startup_sync` | counter | `transport`, `status` | Curated plugin startup sync attempts. |
539| `plugins.startup_sync.final` | counter | `transport`, `status` | Final curated plugin startup sync outcome. |
540| `multi_agent.spawn` | counter | `role` | Agent spawns by role. |
541| `multi_agent.resume` | counter | | Agent resumes. |
542| `multi_agent.nickname_pool_reset` | counter | | Agent nickname pool resets. |
543
544The `shell_snapshot` metric includes `success` and, on failures, `failure_reason`.
545
546#### Memory and local state
547
548| Metric | Type | Fields | Description |
549| ------------------------------ | --------- | ------------------------- | --------------------------------------------------------- |
550| `memory.phase1` | counter | `status` | Memory phase 1 job counts by status. |
551| `memory.phase1.e2e_ms` | histogram | | End-to-end duration for memory phase 1. |
552| `memory.phase1.output` | counter | | Memory phase 1 outputs written. |
553| `memory.phase1.token_usage` | histogram | `token_type` | Memory phase 1 token usage by token type. |
554| `memory.phase2` | counter | `status` | Memory phase 2 job counts by status. |
555| `memory.phase2.e2e_ms` | histogram | | End-to-end duration for memory phase 2. |
556| `memory.phase2.input` | counter | | Memory phase 2 input count. |
557| `memory.phase2.token_usage` | histogram | `token_type` | Memory phase 2 token usage by token type. |
558| `memories.usage` | counter | `kind`, `tool`, `success` | Memory usage by kind, tool, and success/failure. |
559| `external_agent_config.detect` | counter | See note | External agent config detections by migration item type. |
560| `external_agent_config.import` | counter | See note | External agent config imports by migration item type. |
398| `db.backfill` | counter | `status` | Initial state DB backfill results (`upserted`, `failed`). |561| `db.backfill` | counter | `status` | Initial state DB backfill results (`upserted`, `failed`). |
399562| `db.backfill.duration_ms` | histogram | `status` | Duration of the initial state DB backfill, tagged with `success`, `failed`, or `partial_failure`. || `db.backfill.duration_ms` | histogram | `status` | Duration of the initial state DB backfill. |
400563| `db.error` | counter | `stage` | Errors during state DB operations (for example, `extract_metadata_from_rollout`, `backfill_sessions`, `apply_rollout_items`). || `db.error` | counter | `stage` | Errors during state DB operations. |
401564| `db.compare_error` | counter | `stage`, `reason` | State DB discrepancies detected during reconciliation. |
565The `external_agent_config.detect` and `external_agent_config.import` metrics include `migration_type`; skills migrations also include `skills_count`.
566
567#### Windows sandbox
568
569| Metric | Type | Fields | Description |
570| ------------------------------------------------ | --------- | ----------------------------------------- | ----------------------------------------------------- |
571| `windows_sandbox.setup_success` | counter | `originator`, `mode` | Windows sandbox setup successes. |
572| `windows_sandbox.setup_failure` | counter | `originator`, `mode` | Windows sandbox setup failures. |
573| `windows_sandbox.setup_duration_ms` | histogram | `result`, `originator`, `mode` | Windows sandbox setup duration. |
574| `windows_sandbox.elevated_setup_success` | counter | | Elevated Windows sandbox setup successes. |
575| `windows_sandbox.elevated_setup_failure` | counter | See note | Elevated Windows sandbox setup failures. |
576| `windows_sandbox.elevated_setup_canceled` | counter | See note | Canceled elevated Windows sandbox setup attempts. |
577| `windows_sandbox.elevated_setup_duration_ms` | histogram | `result` | Elevated Windows sandbox setup duration. |
578| `windows_sandbox.elevated_prompt_shown` | counter | | Elevated sandbox setup prompt shown. |
579| `windows_sandbox.elevated_prompt_accept` | counter | | Elevated sandbox setup prompt accepted. |
580| `windows_sandbox.elevated_prompt_use_legacy` | counter | | User chose legacy sandbox from the elevated prompt. |
581| `windows_sandbox.elevated_prompt_quit` | counter | | User quit from the elevated prompt. |
582| `windows_sandbox.fallback_prompt_shown` | counter | | Fallback sandbox prompt shown. |
583| `windows_sandbox.fallback_retry_elevated` | counter | | User retried elevated setup from the fallback prompt. |
584| `windows_sandbox.fallback_use_legacy` | counter | | User chose legacy sandbox from the fallback prompt. |
585| `windows_sandbox.fallback_prompt_quit` | counter | | User quit from the fallback prompt. |
586| `windows_sandbox.legacy_setup_preflight_failed` | counter | See note | Legacy Windows sandbox setup preflight failure. |
587| `windows_sandbox.setup_elevated_sandbox_command` | counter | | Elevated sandbox setup command invoked. |
588| `windows_sandbox.createprocessasuserw_failed` | counter | `error_code`, `path_kind`, `exe`, `level` | Windows `CreateProcessAsUserW` failures. |
589
590The elevated setup failure metrics include `code` and `message` when Windows setup failure details are available, and may include `originator` when emitted from the shared setup path. The `windows_sandbox.legacy_setup_preflight_failed` metric includes `originator` when emitted from the shared setup path, but fallback-prompt preflight failures may not include any fields.
402 591
403### Feedback controls592### Feedback controls
404 593
476- `notify` runs an external program (good for webhooks, desktop notifiers, CI hooks).665- `notify` runs an external program (good for webhooks, desktop notifiers, CI hooks).
477- `tui.notifications` is built in to the TUI and can optionally filter by event type (for example, `agent-turn-complete` and `approval-requested`).666- `tui.notifications` is built in to the TUI and can optionally filter by event type (for example, `agent-turn-complete` and `approval-requested`).
478- `tui.notification_method` controls how the TUI emits terminal notifications (`auto`, `osc9`, or `bel`).667- `tui.notification_method` controls how the TUI emits terminal notifications (`auto`, `osc9`, or `bel`).
668- `tui.notification_condition` controls whether TUI notifications fire only when
669 the terminal is `unfocused` or `always`.
479 670
480In `auto` mode, Codex prefers OSC 9 notifications (a terminal escape sequence some terminals interpret as a desktop notification) and falls back to BEL (`\x07`) otherwise.671In `auto` mode, Codex prefers OSC 9 notifications (a terminal escape sequence some terminals interpret as a desktop notification) and falls back to BEL (`\x07`) otherwise.
481 672
522 713
523- `tui.notifications`: enable/disable notifications (or restrict to specific types)714- `tui.notifications`: enable/disable notifications (or restrict to specific types)
524- `tui.notification_method`: choose `auto`, `osc9`, or `bel` for terminal notifications715- `tui.notification_method`: choose `auto`, `osc9`, or `bel` for terminal notifications
716- `tui.notification_condition`: choose `unfocused` or `always` for when
717 notifications fire
525- `tui.animations`: enable/disable ASCII animations and shimmer effects718- `tui.animations`: enable/disable ASCII animations and shimmer effects
526- `tui.alternate_screen`: control alternate screen usage (set to `never` to keep terminal scrollback)719- `tui.alternate_screen`: control alternate screen usage (set to `never` to keep terminal scrollback)
527- `tui.show_tooltips`: show or hide onboarding tooltips on the welcome screen720- `tui.show_tooltips`: show or hide onboarding tooltips on the welcome screen