SpyBara
Go Premium Account
2026
19 Feb 2026, 20:53
19 May 2026, 11:58 18 May 2026, 22:01 14 May 2026, 21:00 14 May 2026, 07:00 13 May 2026, 00:57 12 May 2026, 01:59 11 May 2026, 18:00 7 May 2026, 20:02 7 May 2026, 17:08 5 May 2026, 23:00 2 May 2026, 06:45 2 May 2026, 00:48 1 May 2026, 18:29 30 Apr 2026, 18:36 29 Apr 2026, 12:40 29 Apr 2026, 00:50 25 Apr 2026, 06:37 25 Apr 2026, 00:42 24 Apr 2026, 18:20 24 Apr 2026, 12:28 23 Apr 2026, 18:31 23 Apr 2026, 12:28 23 Apr 2026, 00:46 22 Apr 2026, 18:29 22 Apr 2026, 00:42 21 Apr 2026, 18:29 21 Apr 2026, 12:30 21 Apr 2026, 06:45 20 Apr 2026, 18:26 20 Apr 2026, 06:53 18 Apr 2026, 18:18 17 Apr 2026, 00:44 16 Apr 2026, 18:31 16 Apr 2026, 00:46 15 Apr 2026, 18:31 15 Apr 2026, 06:44 14 Apr 2026, 18:31 14 Apr 2026, 12:29 13 Apr 2026, 18:37 13 Apr 2026, 00:44 12 Apr 2026, 06:38 10 Apr 2026, 18:23 9 Apr 2026, 00:33 8 Apr 2026, 18:32 8 Apr 2026, 00:40 7 Apr 2026, 00:40 2 Apr 2026, 18:23 31 Mar 2026, 06:35 31 Mar 2026, 00:39 28 Mar 2026, 06:26 28 Mar 2026, 00:36 27 Mar 2026, 18:23 27 Mar 2026, 00:39 26 Mar 2026, 18:27 25 Mar 2026, 18:24 23 Mar 2026, 18:22 20 Mar 2026, 00:35 18 Mar 2026, 12:23 18 Mar 2026, 00:36 17 Mar 2026, 18:24 17 Mar 2026, 00:33 16 Mar 2026, 18:25 16 Mar 2026, 12:23 14 Mar 2026, 00:32 13 Mar 2026, 18:15 13 Mar 2026, 00:34 11 Mar 2026, 00:31 9 Mar 2026, 00:34 8 Mar 2026, 18:10 8 Mar 2026, 00:35 7 Mar 2026, 18:10 7 Mar 2026, 06:14 7 Mar 2026, 00:33 6 Mar 2026, 00:38 5 Mar 2026, 18:41 5 Mar 2026, 06:22 5 Mar 2026, 00:34 4 Mar 2026, 18:18 4 Mar 2026, 06:20 3 Mar 2026, 18:20 3 Mar 2026, 00:35 27 Feb 2026, 18:15 24 Feb 2026, 06:27 24 Feb 2026, 00:33 23 Feb 2026, 18:27 21 Feb 2026, 00:33 20 Feb 2026, 12:16 19 Feb 2026, 20:53 19 Feb 2026, 20:37
24 Apr 2026, 18:20
19 May 2026, 11:58 18 May 2026, 22:01 14 May 2026, 21:00 14 May 2026, 07:00 13 May 2026, 00:57 12 May 2026, 01:59 11 May 2026, 18:00 7 May 2026, 20:02 7 May 2026, 17:08 5 May 2026, 23:00 2 May 2026, 06:45 2 May 2026, 00:48 1 May 2026, 18:29 30 Apr 2026, 18:36 29 Apr 2026, 12:40 29 Apr 2026, 00:50 25 Apr 2026, 06:37 25 Apr 2026, 00:42 24 Apr 2026, 18:20 24 Apr 2026, 12:28 23 Apr 2026, 18:31 23 Apr 2026, 12:28 23 Apr 2026, 00:46 22 Apr 2026, 18:29 22 Apr 2026, 00:42 21 Apr 2026, 18:29 21 Apr 2026, 12:30 21 Apr 2026, 06:45 20 Apr 2026, 18:26 20 Apr 2026, 06:53 18 Apr 2026, 18:18 17 Apr 2026, 00:44 16 Apr 2026, 18:31 16 Apr 2026, 00:46 15 Apr 2026, 18:31 15 Apr 2026, 06:44 14 Apr 2026, 18:31 14 Apr 2026, 12:29 13 Apr 2026, 18:37 13 Apr 2026, 00:44 12 Apr 2026, 06:38 10 Apr 2026, 18:23 9 Apr 2026, 00:33 8 Apr 2026, 18:32 8 Apr 2026, 00:40 7 Apr 2026, 00:40 2 Apr 2026, 18:23 31 Mar 2026, 06:35 31 Mar 2026, 00:39 28 Mar 2026, 06:26 28 Mar 2026, 00:36 27 Mar 2026, 18:23 27 Mar 2026, 00:39 26 Mar 2026, 18:27 25 Mar 2026, 18:24 23 Mar 2026, 18:22 20 Mar 2026, 00:35 18 Mar 2026, 12:23 18 Mar 2026, 00:36 17 Mar 2026, 18:24 17 Mar 2026, 00:33 16 Mar 2026, 18:25 16 Mar 2026, 12:23 14 Mar 2026, 00:32 13 Mar 2026, 18:15 13 Mar 2026, 00:34 11 Mar 2026, 00:31 9 Mar 2026, 00:34 8 Mar 2026, 18:10 8 Mar 2026, 00:35 7 Mar 2026, 18:10 7 Mar 2026, 06:14 7 Mar 2026, 00:33 6 Mar 2026, 00:38 5 Mar 2026, 18:41 5 Mar 2026, 06:22 5 Mar 2026, 00:34 4 Mar 2026, 18:18 4 Mar 2026, 06:20 3 Mar 2026, 18:20 3 Mar 2026, 00:35 27 Feb 2026, 18:15 24 Feb 2026, 06:27 24 Feb 2026, 00:33 23 Feb 2026, 18:27 21 Feb 2026, 00:33 20 Feb 2026, 12:16 19 Feb 2026, 20:53 19 Feb 2026, 20:37
Thu 2 18:23 Tue 7 00:40 Wed 8 00:40 Wed 8 18:32 Thu 9 00:33 Fri 10 18:23 Sun 12 06:38 Mon 13 00:44 Mon 13 18:37 Tue 14 12:29 Tue 14 18:31 Wed 15 06:44 Wed 15 18:31 Thu 16 00:46 Thu 16 18:31 Fri 17 00:44 Sat 18 18:18 Mon 20 06:53 Mon 20 18:26 Tue 21 06:45 Tue 21 12:30 Tue 21 18:29 Wed 22 00:42 Wed 22 18:29 Thu 23 00:46 Thu 23 12:28 Thu 23 18:31 Fri 24 12:28 Fri 24 18:20 Sat 25 00:42 Sat 25 06:37 Wed 29 00:50 Wed 29 12:40 Thu 30 18:36

config-advanced.md +219 −36

Details

2 2 

3Use these options when you need more control over providers, policies, and integrations. For a quick start, see [Config basics](https://developers.openai.com/codex/config-basic).3Use these options when you need more control over providers, policies, and integrations. For a quick start, see [Config basics](https://developers.openai.com/codex/config-basic).

4 4 

5For background on project guidance, reusable capabilities, custom slash commands, subagent workflows, and integrations, see [Customization](https://developers.openai.com/codex/concepts/customization). For configuration keys, see [Configuration Reference](https://developers.openai.com/codex/config-reference).

6 

5## Profiles7## Profiles

6 8 

7Profiles let you save named sets of configuration values and switch between them from the CLI.9Profiles let you save named sets of configuration values and switch between them from the CLI.


13Define profiles under `[profiles.<name>]` in `config.toml`, then run `codex --profile <name>`:15Define profiles under `[profiles.<name>]` in `config.toml`, then run `codex --profile <name>`:

14 16 

15```toml17```toml

16model = "gpt-5-codex"18model = "gpt-5.4"

17approval_policy = "on-request"19approval_policy = "on-request"

20model_catalog_json = "/Users/me/.codex/model-catalogs/default.json"

18 21 

19[profiles.deep-review]22[profiles.deep-review]

20model = "gpt-5-pro"23model = "gpt-5-pro"

21model_reasoning_effort = "high"24model_reasoning_effort = "high"

22approval_policy = "never"25approval_policy = "never"

26model_catalog_json = "/Users/me/.codex/model-catalogs/deep-review.json"

23 27 

24[profiles.lightweight]28[profiles.lightweight]

25model = "gpt-4.1"29model = "gpt-4.1"


28 32 

29To make a profile the default, add `profile = "deep-review"` at the top level of `config.toml`. Codex loads that profile unless you override it on the command line.33To make a profile the default, add `profile = "deep-review"` at the top level of `config.toml`. Codex loads that profile unless you override it on the command line.

30 34 

35Profiles can also override `model_catalog_json`. When both the top level and the selected profile set `model_catalog_json`, Codex prefers the profile value.

36 

31## One-off overrides from the CLI37## One-off overrides from the CLI

32 38 

33In addition to editing `~/.codex/config.toml`, you can override configuration for a single run from the CLI:39In addition to editing `~/.codex/config.toml`, you can override configuration for a single run from the CLI:


39 45 

40```shell46```shell

41# Dedicated flag47# Dedicated flag

42codex --model gpt-5.248codex --model gpt-5.4

43 49 

44# Generic key/value override (value is TOML, not JSON)50# Generic key/value override (value is TOML, not JSON)

45codex --config model='"gpt-5.2"'51codex --config model='"gpt-5.4"'

46codex --config sandbox_workspace_write.network_access=true52codex --config sandbox_workspace_write.network_access=true

47codex --config 'shell_environment_policy.include_only=["PATH","HOME"]'53codex --config 'shell_environment_policy.include_only=["PATH","HOME"]'

48```54```


68 74 

69For shared defaults, rules, and skills checked into repos or system paths, see [Team Config](https://developers.openai.com/codex/enterprise/admin-setup#team-config).75For shared defaults, rules, and skills checked into repos or system paths, see [Team Config](https://developers.openai.com/codex/enterprise/admin-setup#team-config).

70 76 

71If you just need to point the built-in OpenAI provider at an LLM proxy, router, or data-residency enabled project, set environment variable `OPENAI_BASE_URL` instead of defining a new provider. This overrides the default OpenAI endpoint without a `config.toml` change.77If you just need to point the built-in OpenAI provider at an LLM proxy, router, or data-residency enabled project, set `openai_base_url` in `config.toml` instead of defining a new provider. This changes the base URL for the built-in `openai` provider without requiring a separate `model_providers.<id>` entry.

72 78 

73```toml79```toml

74export OPENAI_BASE_URL="https://api.openai.com/v1"80openai_base_url = "https://us.api.openai.com/v1"

75codex

76```81```

77 82 

78## Project config files (`.codex/config.toml`)83## Project config files (`.codex/config.toml`)

79 84 

80In 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.

81 86 

82For 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.87For 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 

89Relative paths inside a project config (for example, `model_instructions_file`) are resolved relative to the `.codex/` folder that contains the `config.toml`.

90 

91## Hooks (experimental)

92 

93Codex can also load lifecycle hooks from `hooks.json` files that sit next to

94active config layers.

83 95 

84Relative paths inside a project config (for example, `experimental_instructions_file`) are resolved relative to the `.codex/` folder that contains the `config.toml`.96In practice, the two most useful locations are:

97 

98- `~/.codex/hooks.json`

99- `<repo>/.codex/hooks.json`

100 

101Project-local hooks load only when the project `.codex/` layer is trusted.

102User-level hooks remain independent of project trust.

103 

104Turn hooks on with:

105 

106```toml

107[features]

108codex_hooks = true

109```

110 

111For the current event list, input fields, output behavior, and limitations, see

112[Hooks](https://developers.openai.com/codex/hooks).

85 113 

86## Agent roles (`[agents]` in `config.toml`)114## Agent roles (`[agents]` in `config.toml`)

87 115 

88For multi-agent role configuration (`[agents]` in `config.toml`), see [Multi-agents](https://developers.openai.com/codex/multi-agent).116For subagent role configuration (`[agents]` in `config.toml`), see [Subagents](https://developers.openai.com/codex/subagents).

89 117 

90## Project root detection118## Project root detection

91 119 


102 130 

103## Custom model providers131## Custom model providers

104 132 

105A model provider defines how Codex connects to a model (base URL, wire API, and optional HTTP headers).133A model provider defines how Codex connects to a model (base URL, wire API, authentication, and optional HTTP headers). Custom providers can't reuse the reserved built-in provider IDs: `openai`, `ollama`, and `lmstudio`.

106 134 

107Define additional providers and point `model_provider` at them:135Define additional providers and point `model_provider` at them:

108 136 

109```toml137```toml

110model = "gpt-5.1"138model = "gpt-5.4"

111model_provider = "proxy"139model_provider = "proxy"

112 140 

113[model_providers.proxy]141[model_providers.proxy]


115base_url = "http://proxy.example.com"143base_url = "http://proxy.example.com"

116env_key = "OPENAI_API_KEY"144env_key = "OPENAI_API_KEY"

117 145 

118[model_providers.ollama]146[model_providers.local_ollama]

119name = "Ollama"147name = "Ollama"

120base_url = "http://localhost:11434/v1"148base_url = "http://localhost:11434/v1"

121 149 


133env_http_headers = { "X-Example-Features" = "EXAMPLE_FEATURES" }161env_http_headers = { "X-Example-Features" = "EXAMPLE_FEATURES" }

134```162```

135 163 

164Use command-backed authentication when a provider needs Codex to fetch bearer tokens from an external credential helper:

165 

166```toml

167[model_providers.proxy]

168name = "OpenAI using LLM proxy"

169base_url = "https://proxy.example.com/v1"

170wire_api = "responses"

171 

172[model_providers.proxy.auth]

173command = "/usr/local/bin/fetch-codex-token"

174args = ["--audience", "codex"]

175timeout_ms = 5000

176refresh_interval_ms = 300000

177```

178 

179The 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`.

180 

136## OSS mode (local providers)181## OSS mode (local providers)

137 182 

138Codex 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.183Codex 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.


151env_key = "AZURE_OPENAI_API_KEY"196env_key = "AZURE_OPENAI_API_KEY"

152query_params = { api-version = "2025-04-01-preview" }197query_params = { api-version = "2025-04-01-preview" }

153wire_api = "responses"198wire_api = "responses"

154 

155[model_providers.openai]

156request_max_retries = 4199request_max_retries = 4

157stream_max_retries = 10200stream_max_retries = 10

158stream_idle_timeout_ms = 300000201stream_idle_timeout_ms = 300000

159```202```

160 203 

204To change the base URL for the built-in OpenAI provider, use `openai_base_url`; don't create `[model_providers.openai]`, because you can't override built-in provider IDs.

205 

161## ChatGPT customers using data residency206## ChatGPT customers using data residency

162 207 

163Projects created with [data residency](https://help.openai.com/en/articles/9903489-data-residency-and-inference-residency-for-chatgpt) enabled can create a model provider to update the base_url with the [correct prefix](https://platform.openai.com/docs/guides/your-data#which-models-and-features-are-eligible-for-data-residency).208Projects created with [data residency](https://help.openai.com/en/articles/9903489-data-residency-and-inference-residency-for-chatgpt) enabled can create a model provider to update the base_url with the [correct prefix](https://platform.openai.com/docs/guides/your-data#which-models-and-features-are-eligible-for-data-residency).


182 227 

183## Approval policies and sandbox modes228## Approval policies and sandbox modes

184 229 

185Pick approval strictness (affects when Codex pauses) and sandbox level (affects file/network access). See [Sandbox & approvals](https://developers.openai.com/codex/security) for deeper examples.230Pick approval strictness (affects when Codex pauses) and sandbox level (affects file/network access).

186 231 

187```232For operational details to keep in mind while editing `config.toml`, see [Common sandbox and approval combinations](https://developers.openai.com/codex/agent-approvals-security#common-sandbox-and-approval-combinations), [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).

188approval_policy = "untrusted" # Other options: on-request, never233 

234You 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.

235 

236Set `approvals_reviewer = "auto_review"` to route eligible interactive approval

237requests through automatic review. This changes the reviewer, not the sandbox

238boundary.

239 

240Use `[auto_review].policy` for local reviewer policy instructions. Managed

241`guardian_policy_config` takes precedence.

242 

243```toml

244approval_policy = "untrusted" # Other options: on-request, never, or { granular = { ... } }

245approvals_reviewer = "user" # Or "auto_review" for automatic review

189sandbox_mode = "workspace-write"246sandbox_mode = "workspace-write"

247allow_login_shell = false # Optional hardening: disallow login shells for shell tools

248 

249# Example granular approval policy:

250# approval_policy = { granular = {

251# sandbox_approval = true,

252# rules = true,

253# mcp_elicitations = true,

254# request_permissions = false,

255# skill_approval = false

256# } }

190 257 

191[sandbox_workspace_write]258[sandbox_workspace_write]

192exclude_tmpdir_env_var = false # Allow $TMPDIR259exclude_tmpdir_env_var = false # Allow $TMPDIR

193exclude_slash_tmp = false # Allow /tmp260exclude_slash_tmp = false # Allow /tmp

194writable_roots = ["/Users/YOU/.pyenv/shims"]261writable_roots = ["/Users/YOU/.pyenv/shims"]

195network_access = false # Opt in to outbound network262network_access = false # Opt in to outbound network

263 

264[auto_review]

265policy = """

266Use your organization's automatic review policy.

267"""

196```268```

197 269 

270Need 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).

271 

198In workspace-write mode, some environments keep `.git/` and `.codex/`272In workspace-write mode, some environments keep `.git/` and `.codex/`

199 read-only even when the rest of the workspace is writable. This is why273 read-only even when the rest of the workspace is writable. This is why

200 commands like `git commit` may still require approval to run outside the274 commands like `git commit` may still require approval to run outside the


289| `codex.tool.call` | counter | `tool`, `success` | Tool invocation count by tool name and success/failure. |363| `codex.tool.call` | counter | `tool`, `success` | Tool invocation count by tool name and success/failure. |

290| `codex.tool.call.duration_ms` | histogram | `tool`, `success` | Tool execution duration in milliseconds by tool name and outcome. |364| `codex.tool.call.duration_ms` | histogram | `tool`, `success` | Tool execution duration in milliseconds by tool name and outcome. |

291 365 

292For more security and privacy guidance around telemetry, see [Security](https://developers.openai.com/codex/security#monitoring-and-telemetry).366For more security and privacy guidance around telemetry, see [Security](https://developers.openai.com/codex/agent-approvals-security#monitoring-and-telemetry).

293 367 

294### Metrics368### Metrics

295 369 


312 386 

313#### Metrics catalog387#### Metrics catalog

314 388 

315Each metric includes the required fields plus the default context fields above. Every metric is prefixed by `codex.`.389Each metric includes the required fields plus the default context fields above. Metric names below omit the `codex.` prefix.

390Most metric names are centralized in `codex-rs/otel/src/metrics/names.rs`; feature-specific metrics emitted outside that file are included here too.

316If 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.391If 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.

317 392 

393#### Runtime and model transport

394 

395| Metric | Type | Fields | Description |

396| --- | --- | --- | --- |

397| `api_request` | counter | `status`, `success` | API request count by HTTP status and success/failure. |

398| `api_request.duration_ms` | histogram | `status`, `success` | API request duration in milliseconds. |

399| `sse_event` | counter | `kind`, `success` | SSE event count by event kind and success/failure. |

400| `sse_event.duration_ms` | histogram | `kind`, `success` | SSE event processing duration in milliseconds. |

401| `websocket.request` | counter | `success` | WebSocket request count by success/failure. |

402| `websocket.request.duration_ms` | histogram | `success` | WebSocket request duration in milliseconds. |

403| `websocket.event` | counter | `kind`, `success` | WebSocket message/event count by type and success/failure. |

404| `websocket.event.duration_ms` | histogram | `kind`, `success` | WebSocket message/event processing duration in milliseconds. |

405| `responses_api_overhead.duration_ms` | histogram | | Responses API overhead timing from websocket responses. |

406| `responses_api_inference_time.duration_ms` | histogram | | Responses API inference timing from websocket responses. |

407| `responses_api_engine_iapi_ttft.duration_ms` | histogram | | Responses API engine IAPI time-to-first-token timing. |

408| `responses_api_engine_service_ttft.duration_ms` | histogram | | Responses API engine service time-to-first-token timing. |

409| `responses_api_engine_iapi_tbt.duration_ms` | histogram | | Responses API engine IAPI time-between-token timing. |

410| `responses_api_engine_service_tbt.duration_ms` | histogram | | Responses API engine service time-between-token timing. |

411| `transport.fallback_to_http` | counter | `from_wire_api` | WebSocket-to-HTTP fallback count. |

412| `remote_models.fetch_update.duration_ms` | histogram | | Time to fetch remote model definitions. |

413| `remote_models.load_cache.duration_ms` | histogram | | Time to load the remote model cache. |

414| `startup_prewarm.duration_ms` | histogram | `status` | Startup prewarm duration by outcome. |

415| `startup_prewarm.age_at_first_turn_ms` | histogram | `status` | Startup prewarm age when the first real turn resolves it. |

416| `cloud_requirements.fetch.duration_ms` | histogram | | Workspace-managed cloud requirements fetch duration. |

417| `cloud_requirements.fetch_attempt` | counter | See note | Workspace-managed cloud requirements fetch attempts. |

418| `cloud_requirements.fetch_final` | counter | See note | Final workspace-managed cloud requirements fetch outcome. |

419| `cloud_requirements.load` | counter | `trigger`, `outcome` | Workspace-managed cloud requirements load outcome. |

420 

421The `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.

422 

423#### Turn and tool activity

424 

425| Metric | Type | Fields | Description |

426| --- | --- | --- | --- |

427| `turn.e2e_duration_ms` | histogram | | End-to-end time for a full turn. |

428| `turn.ttft.duration_ms` | histogram | | Time to first token for a turn. |

429| `turn.ttfm.duration_ms` | histogram | | Time to first model output item for a turn. |

430| `turn.network_proxy` | counter | `active`, `tmp_mem_enabled` | Whether the managed network proxy was active for the turn. |

431| `turn.memory` | counter | `read_allowed`, `feature_enabled`, `config_use_memories`, `has_citations` | Per-turn memory read availability and memory citation usage. |

432| `turn.tool.call` | histogram | `tmp_mem_enabled` | Number of tool calls in the turn. |

433| `turn.token_usage` | histogram | `token_type`, `tmp_mem_enabled` | Per-turn token usage by token type (`total`, `input`, `cached_input`, `output`, or `reasoning_output`). |

434| `tool.call` | counter | `tool`, `success` | Tool invocation count by tool name and success/failure. |

435| `tool.call.duration_ms` | histogram | `tool`, `success` | Tool execution duration in milliseconds by tool name and outcome. |

436| `tool.unified_exec` | counter | `tty` | Unified exec tool calls by TTY mode. |

437| `approval.requested` | counter | `tool`, `approved` | Tool approval request result (`approved`, `approved_with_amendment`, `approved_for_session`, `denied`, `abort`). |

438| `mcp.call` | counter | See note | MCP tool invocation result. |

439| `mcp.call.duration_ms` | histogram | See note | MCP tool invocation duration. |

440| `mcp.tools.list.duration_ms` | histogram | `cache` | MCP tool-list duration, including cache hit/miss state. |

441| `mcp.tools.fetch_uncached.duration_ms` | histogram | | Duration of uncached MCP tool fetches. |

442| `mcp.tools.cache_write.duration_ms` | histogram | | Duration of Codex Apps MCP tool-cache writes. |

443| `hooks.run` | counter | `hook_name`, `source`, `status` | Hook run count by hook name, source, and status. |

444| `hooks.run.duration_ms` | histogram | `hook_name`, `source`, `status` | Hook run duration in milliseconds. |

445 

446The `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`.

447 

448#### Threads, tasks, and features

449 

318| Metric | Type | Fields | Description |450| Metric | Type | Fields | Description |

319| --- | --- | --- | --- |451| --- | --- | --- | --- |

320| `feature.state` | counter | `feature`, `value` | Feature values that differ from defaults (emit one row per non-default). |452| `feature.state` | counter | `feature`, `value` | Feature values that differ from defaults (emit one row per non-default). |

321| `thread.started` | counter | `is_git` | New thread created. |453| `status_line` | counter | | Session started with a configured status line. |

322| `thread.fork` | counter | | New thread created by forking an existing thread. |454| `model_warning` | counter | | Warning sent to the model. |

455| `thread.started` | counter | `is_git` | New thread created, tagged by whether the working directory is in a Git repo. |

456| `conversation.turn.count` | counter | | User/assistant turns per thread, recorded at the end of the thread. |

457| `thread.fork` | counter | `source` | New thread created by forking an existing thread. |

323| `thread.rename` | counter | | Thread renamed. |458| `thread.rename` | counter | | Thread renamed. |

459| `thread.side` | counter | `source` | Side conversation created. |

460| `thread.skills.enabled_total` | histogram | | Number of skills enabled for a new thread. |

461| `thread.skills.kept_total` | histogram | | Number of enabled skills kept after prompt rendering. |

462| `thread.skills.truncated` | histogram | | Whether skill rendering truncated the enabled skills list (`1` or `0`). |

324| `task.compact` | counter | `type` | Number of compactions per type (`remote` or `local`), including manual and auto. |463| `task.compact` | counter | `type` | Number of compactions per type (`remote` or `local`), including manual and auto. |

325| `task.user_shell` | counter | | Number of user shell actions (`!` in the TUI for example). |

326| `task.review` | counter | | Number of reviews triggered. |464| `task.review` | counter | | Number of reviews triggered. |

327| `task.undo` | counter | | Number of undo actions triggered. |465| `task.undo` | counter | | Number of undo actions triggered. |

328| `approval.requested` | counter | `tool`, `approved` | Tool approval request result (`approved`, `approved_with_amendment`, `approved_for_session`, `denied`, `abort`). |466| `task.user_shell` | counter | | Number of user shell actions (`!` in the TUI for example). |

329| `conversation.turn.count` | counter | | User/assistant turns per thread, recorded at the end of the thread. |467| `shell_snapshot` | counter | See note | Whether taking a shell snapshot succeeded. |

330| `turn.e2e_duration_ms` | histogram | | End-to-end time for a full turn. |

331| `mcp.call` | counter | `status` | MCP tool invocation result (`ok` or error string). |

332| `model_warning` | counter | | Warning sent to the model. |

333| `tool.call` | counter | `tool`, `success` | Tool invocation result (`success`: `true` or `false`). |

334| `tool.call.duration_ms` | histogram | `tool`, `success` | Tool execution time. |

335| `remote_models.fetch_update.duration_ms` | histogram | | Time to fetch remote model definitions. |

336| `remote_models.load_cache.duration_ms` | histogram | | Time to load the remote model cache. |

337| `shell_snapshot` | counter | `success` | Whether taking a shell snapshot succeeded. |

338| `shell_snapshot.duration_ms` | histogram | `success` | Time to take a shell snapshot. |468| `shell_snapshot.duration_ms` | histogram | `success` | Time to take a shell snapshot. |

339| `db.init` | counter | `status` | State DB initialization outcomes (`opened`, `created`, `open_error`, `init_error`). |469| `skill.injected` | counter | `status`, `skill` | Skill injection outcomes by skill. |

470| `plugins.startup_sync` | counter | `transport`, `status` | Curated plugin startup sync attempts. |

471| `plugins.startup_sync.final` | counter | `transport`, `status` | Final curated plugin startup sync outcome. |

472| `multi_agent.spawn` | counter | `role` | Agent spawns by role. |

473| `multi_agent.resume` | counter | | Agent resumes. |

474| `multi_agent.nickname_pool_reset` | counter | | Agent nickname pool resets. |

475 

476The `shell_snapshot` metric includes `success` and, on failures, `failure_reason`.

477 

478#### Memory and local state

479 

480| Metric | Type | Fields | Description |

481| --- | --- | --- | --- |

482| `memory.phase1` | counter | `status` | Memory phase 1 job counts by status. |

483| `memory.phase1.e2e_ms` | histogram | | End-to-end duration for memory phase 1. |

484| `memory.phase1.output` | counter | | Memory phase 1 outputs written. |

485| `memory.phase1.token_usage` | histogram | `token_type` | Memory phase 1 token usage by token type. |

486| `memory.phase2` | counter | `status` | Memory phase 2 job counts by status. |

487| `memory.phase2.e2e_ms` | histogram | | End-to-end duration for memory phase 2. |

488| `memory.phase2.input` | counter | | Memory phase 2 input count. |

489| `memory.phase2.token_usage` | histogram | `token_type` | Memory phase 2 token usage by token type. |

490| `memories.usage` | counter | `kind`, `tool`, `success` | Memory usage by kind, tool, and success/failure. |

491| `external_agent_config.detect` | counter | See note | External agent config detections by migration item type. |

492| `external_agent_config.import` | counter | See note | External agent config imports by migration item type. |

340| `db.backfill` | counter | `status` | Initial state DB backfill results (`upserted`, `failed`). |493| `db.backfill` | counter | `status` | Initial state DB backfill results (`upserted`, `failed`). |

341| `db.backfill.duration_ms` | histogram | `status` | Duration of the initial state DB backfill, tagged with `success`, `failed`, or `partial_failure`. |494| `db.backfill.duration_ms` | histogram | `status` | Duration of the initial state DB backfill. |

342| `db.error` | counter | `stage` | Errors during state DB operations (for example, `extract_metadata_from_rollout`, `backfill_sessions`, `apply_rollout_items`). |495| `db.error` | counter | `stage` | Errors during state DB operations. |

343| `db.compare_error` | counter | `stage`, `reason` | State DB discrepancies detected during reconciliation. |496 

497The `external_agent_config.detect` and `external_agent_config.import` metrics include `migration_type`; skills migrations also include `skills_count`.

498 

499#### Windows sandbox

500 

501| Metric | Type | Fields | Description |

502| --- | --- | --- | --- |

503| `windows_sandbox.setup_success` | counter | `originator`, `mode` | Windows sandbox setup successes. |

504| `windows_sandbox.setup_failure` | counter | `originator`, `mode` | Windows sandbox setup failures. |

505| `windows_sandbox.setup_duration_ms` | histogram | `result`, `originator`, `mode` | Windows sandbox setup duration. |

506| `windows_sandbox.elevated_setup_success` | counter | | Elevated Windows sandbox setup successes. |

507| `windows_sandbox.elevated_setup_failure` | counter | See note | Elevated Windows sandbox setup failures. |

508| `windows_sandbox.elevated_setup_canceled` | counter | See note | Canceled elevated Windows sandbox setup attempts. |

509| `windows_sandbox.elevated_setup_duration_ms` | histogram | `result` | Elevated Windows sandbox setup duration. |

510| `windows_sandbox.elevated_prompt_shown` | counter | | Elevated sandbox setup prompt shown. |

511| `windows_sandbox.elevated_prompt_accept` | counter | | Elevated sandbox setup prompt accepted. |

512| `windows_sandbox.elevated_prompt_use_legacy` | counter | | User chose legacy sandbox from the elevated prompt. |

513| `windows_sandbox.elevated_prompt_quit` | counter | | User quit from the elevated prompt. |

514| `windows_sandbox.fallback_prompt_shown` | counter | | Fallback sandbox prompt shown. |

515| `windows_sandbox.fallback_retry_elevated` | counter | | User retried elevated setup from the fallback prompt. |

516| `windows_sandbox.fallback_use_legacy` | counter | | User chose legacy sandbox from the fallback prompt. |

517| `windows_sandbox.fallback_prompt_quit` | counter | | User quit from the fallback prompt. |

518| `windows_sandbox.legacy_setup_preflight_failed` | counter | See note | Legacy Windows sandbox setup preflight failure. |

519| `windows_sandbox.setup_elevated_sandbox_command` | counter | | Elevated sandbox setup command invoked. |

520| `windows_sandbox.createprocessasuserw_failed` | counter | `error_code`, `path_kind`, `exe`, `level` | Windows `CreateProcessAsUserW` failures. |

521 

522The 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.

344 523 

345### Feedback controls524### Feedback controls

346 525 


418- `notify` runs an external program (good for webhooks, desktop notifiers, CI hooks).597- `notify` runs an external program (good for webhooks, desktop notifiers, CI hooks).

419- `tui.notifications` is built in to the TUI and can optionally filter by event type (for example, `agent-turn-complete` and `approval-requested`).598- `tui.notifications` is built in to the TUI and can optionally filter by event type (for example, `agent-turn-complete` and `approval-requested`).

420- `tui.notification_method` controls how the TUI emits terminal notifications (`auto`, `osc9`, or `bel`).599- `tui.notification_method` controls how the TUI emits terminal notifications (`auto`, `osc9`, or `bel`).

600- `tui.notification_condition` controls whether TUI notifications fire only when

601 the terminal is `unfocused` or `always`.

421 602 

422In `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.603In `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.

423 604 


464 645 

465- `tui.notifications`: enable/disable notifications (or restrict to specific types)646- `tui.notifications`: enable/disable notifications (or restrict to specific types)

466- `tui.notification_method`: choose `auto`, `osc9`, or `bel` for terminal notifications647- `tui.notification_method`: choose `auto`, `osc9`, or `bel` for terminal notifications

648- `tui.notification_condition`: choose `unfocused` or `always` for when

649 notifications fire

467- `tui.animations`: enable/disable ASCII animations and shimmer effects650- `tui.animations`: enable/disable ASCII animations and shimmer effects

468- `tui.alternate_screen`: control alternate screen usage (set to `never` to keep terminal scrollback)651- `tui.alternate_screen`: control alternate screen usage (set to `never` to keep terminal scrollback)

469- `tui.show_tooltips`: show or hide onboarding tooltips on the welcome screen652- `tui.show_tooltips`: show or hide onboarding tooltips on the welcome screen