SpyBara
Go Premium

Documentation 2026-06-09 18:50 UTC to 2026-06-10 20:00 UTC

75 files changed +7,847 −12,542. View all changes and history on the product overview
2026
Fri 12 00:59 Thu 11 20:02 Wed 10 20:00 Tue 9 18:50 Sat 6 00:58 Fri 5 18:45 Thu 4 01:09 Wed 3 19:27 Tue 2 19:22
Details

1# Agent approvals & security – Codex1# Agent approvals & security

2 2 

3Codex helps protect your code and data and reduces the risk of misuse.3Codex helps protect your code and data and reduces the risk of misuse.

4 4 

5This page covers how to operate Codex safely, including sandboxing, approvals,5This page covers how to operate Codex safely, including sandboxing, approvals,

6and network access. If you are looking for Codex Security, the product for6 and network access. If you are looking for Codex Security, the product for

7scanning connected GitHub repositories, see [Codex Security](https://developers.openai.com/codex/security).7 scanning connected GitHub repositories, see [Codex Security](https://developers.openai.com/codex/security).

8 8 

9By default, the agent runs with network access turned off. Locally, Codex uses an OS-enforced sandbox that limits what it can touch (typically to the current workspace), plus an approval policy that controls when it must stop and ask you before acting.9By default, the agent runs with network access turned off. Locally, Codex uses an OS-enforced sandbox that limits what it can touch (typically to the current workspace), plus an approval policy that controls when it must stop and ask you before acting.

10 10 


28 28 

29Codex asks for approval to edit files outside the workspace or to run commands that require network access. If you want to chat or plan without making changes, switch to `read-only` mode with the `/permissions` command.29Codex asks for approval to edit files outside the workspace or to run commands that require network access. If you want to chat or plan without making changes, switch to `read-only` mode with the `/permissions` command.

30 30 

31Codex can also elicit approval for app (connector) tool calls that advertise side effects, even when the action isnt a shell command or file change. Destructive app/MCP tool calls always require approval when the tool advertises a destructive annotation, even if it also advertises other hints (for example, read-only hints).31Codex can also elicit approval for app (connector) tool calls that advertise side effects, even when the action isn't a shell command or file change. Destructive app/MCP tool calls always require approval when the tool advertises a destructive annotation, even if it also advertises other hints (for example, read-only hints).

32 32 

33## Network access [Elevated Risk](https://help.openai.com/articles/20001061)33## Network access <ElevatedRiskBadge class="ml-2" />

34 34 

35For Codex cloud, see [agent internet access](https://developers.openai.com/codex/cloud/internet-access) to enable full internet access or a domain allow list.35For Codex cloud, see [agent internet access](https://developers.openai.com/codex/cloud/internet-access) to enable full internet access or a domain allow list.

36 36 

37For the Codex app, CLI, or IDE Extension, the default `workspace-write` sandbox mode keeps network access turned off unless you enable it in your configuration:37For the Codex app, CLI, or IDE Extension, the default `workspace-write` sandbox mode keeps network access turned off unless you enable it in your configuration:

38 38 

39```39```toml

40[sandbox_workspace_write]40[sandbox_workspace_write]

41network_access = true41network_access = true

42```42```


48already enabled, turn on the `network_proxy` feature to constrain that traffic48already enabled, turn on the `network_proxy` feature to constrain that traffic

49to the network policy you configure.49to the network policy you configure.

50 50 

51```51```toml

52[features.network_proxy]52[features.network_proxy]

53enabled = true53enabled = true

54domains = { "api.openai.com" = "allow", "example.com" = "deny" }54domains = { "api.openai.com" = "allow", "example.com" = "deny" }


57For a one-off CLI session, use the boolean shorthand when you only need the57For a one-off CLI session, use the boolean shorthand when you only need the

58toggle, and the table form when you also set policy options:58toggle, and the table form when you also set policy options:

59 59 

60```60```bash

61codex \61codex \

62 -c 'features.network_proxy=true' \62 -c 'features.network_proxy=true' \

63 -c 'sandbox_workspace_write.network_access=true'63 -c 'sandbox_workspace_write.network_access=true'


137`network_proxy` is off by default. When you enable it:137`network_proxy` is off by default. When you enable it:

138 138 

139| Setting | Default | Behavior |139| Setting | Default | Behavior |

140| --- | --- | --- |140| -------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

141| `enabled` | `false` | Starts sandboxed networking only when command network access is already on. |141| `enabled` | `false` | Starts sandboxed networking only when command network access is already on. |

142| `domains` | unset | Uses allowlist behavior, so no external destinations are allowed until you add `allow` rules. Supports exact hosts, scoped wildcards, and global `*` allow rules; `deny` always wins. |142| `domains` | unset | Uses allowlist behavior, so no external destinations are allowed until you add `allow` rules. Supports exact hosts, scoped wildcards, and global `*` allow rules; `deny` always wins. |

143| `unix_sockets` | unset | No Unix socket destinations are allowed until you add explicit `allow` rules. |143| `unix_sockets` | unset | No Unix socket destinations are allowed until you add explicit `allow` rules. |


150 150 

151You can also control the [web search tool](https://platform.openai.com/docs/guides/tools-web-search) without granting full network access to spawned commands. Codex defaults to using a web search cache to access results. The cache is an OpenAI-maintained index of web results, so cached mode returns pre-indexed results instead of fetching live pages. This reduces exposure to prompt injection from arbitrary live content, but you should still treat web results as untrusted. If you are using `--yolo` or another [full access sandbox setting](#common-sandbox-and-approval-combinations), web search defaults to live results. Use `--search` or set `web_search = "live"` to allow live browsing, or set it to `"disabled"` to turn the tool off:151You can also control the [web search tool](https://platform.openai.com/docs/guides/tools-web-search) without granting full network access to spawned commands. Codex defaults to using a web search cache to access results. The cache is an OpenAI-maintained index of web results, so cached mode returns pre-indexed results instead of fetching live pages. This reduces exposure to prompt injection from arbitrary live content, but you should still treat web results as untrusted. If you are using `--yolo` or another [full access sandbox setting](#common-sandbox-and-approval-combinations), web search defaults to live results. Use `--search` or set `web_search = "live"` to allow live browsing, or set it to `"disabled"` to turn the tool off:

152 152 

153```153```toml

154web_search = "cached" # default154web_search = "cached" # default

155# web_search = "disabled"155# web_search = "disabled"

156# web_search = "live" # same as --search156# web_search = "live" # same as --search


184 184 

185You can disable approval prompts with `--ask-for-approval never` or `-a never` (shorthand).185You can disable approval prompts with `--ask-for-approval never` or `-a never` (shorthand).

186 186 

187This option works with all `--sandbox` modes, so you still control Codexs level of autonomy. Codex makes a best effort within the constraints you set.187This option works with all `--sandbox` modes, so you still control Codex's level of autonomy. Codex makes a best effort within the constraints you set.

188 188 

189If you need Codex to read files, make edits, and run commands with network access without approval prompts, use `--sandbox danger-full-access` (or the `--dangerously-bypass-approvals-and-sandbox` flag). Use caution before doing so.189If you need Codex to read files, make edits, and run commands with network access without approval prompts, use `--sandbox danger-full-access` (or the `--dangerously-bypass-approvals-and-sandbox` flag). Use caution before doing so.

190 190 


194 194 

195By default, approval requests route to you:195By default, approval requests route to you:

196 196 

197```197```toml

198approvals_reviewer = "user"198approvals_reviewer = "user"

199```199```

200 200 


203`approvals_reviewer = "auto_review"` to route eligible approval requests203`approvals_reviewer = "auto_review"` to route eligible approval requests

204through a reviewer agent before Codex runs the request:204through a reviewer agent before Codex runs the request:

205 205 

206```206```toml

207approval_policy = "on-request"207approval_policy = "on-request"

208approvals_reviewer = "auto_review"208approvals_reviewer = "auto_review"

209```209```


242### Common sandbox and approval combinations242### Common sandbox and approval combinations

243 243 

244| Intent | Flags / config | Effect |244| Intent | Flags / config | Effect |

245| --- | --- | --- |245| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |

246| Auto (preset) | *no flags needed* or `--sandbox workspace-write --ask-for-approval on-request` | Codex can read files, make edits, and run commands in the workspace. Codex requires approval to edit outside the workspace or to access network. |246| Auto (preset) | _no flags needed_ or `--sandbox workspace-write --ask-for-approval on-request` | Codex can read files, make edits, and run commands in the workspace. Codex requires approval to edit outside the workspace or to access network. |

247| Safe read-only browsing | `--sandbox read-only --ask-for-approval on-request` | Codex can read files and answer questions. Codex requires approval to make edits, run commands, or access network. |247| Safe read-only browsing | `--sandbox read-only --ask-for-approval on-request` | Codex can read files and answer questions. Codex requires approval to make edits, run commands, or access network. |

248| Read-only non-interactive (CI) | `--sandbox read-only --ask-for-approval never` | Codex can only read files; never asks for approval. |248| Read-only non-interactive (CI) | `--sandbox read-only --ask-for-approval never` | Codex can only read files; never asks for approval. |

249| Automatically edit but ask for approval to run untrusted commands | `--sandbox workspace-write --ask-for-approval untrusted` | Codex can read and edit files but asks for approval before running untrusted commands. |249| Automatically edit but ask for approval to run untrusted commands | `--sandbox workspace-write --ask-for-approval untrusted` | Codex can read and edit files but asks for approval before running untrusted commands. |

250| Auto-review mode | `--sandbox workspace-write --ask-for-approval on-request -c approvals_reviewer=auto_review` or `approvals_reviewer = "auto_review"` | Same sandbox boundary as standard on-request mode, but eligible approval requests are reviewed by Auto-review instead of surfacing to the user. |250| Auto-review mode | `--sandbox workspace-write --ask-for-approval on-request -c approvals_reviewer=auto_review` or `approvals_reviewer = "auto_review"` | Same sandbox boundary as standard on-request mode, but eligible approval requests are reviewed by Auto-review instead of surfacing to the user. |

251| Dangerous full access | `--dangerously-bypass-approvals-and-sandbox` (alias: `--yolo`) | [Elevated Risk](https://help.openai.com/articles/20001061) No sandbox; no approvals *(not recommended)* |251| Dangerous full access | `--dangerously-bypass-approvals-and-sandbox` (alias: `--yolo`) | <ElevatedRiskBadge /> No sandbox; no approvals _(not recommended)_ |

252 252 

253For non-interactive runs, use `codex exec --sandbox workspace-write`; Codex keeps older `codex exec --full-auto` invocations as a deprecated compatibility path and prints a warning.253For non-interactive runs, use `codex exec --sandbox workspace-write`; Codex keeps older `codex exec --full-auto` invocations as a deprecated compatibility path and prints a warning.

254 254 


258 258 

259For the broader configuration workflow, see [Config basics](https://developers.openai.com/codex/config-basic), [Advanced Config](https://developers.openai.com/codex/config-advanced#approval-policies-and-sandbox-modes), and the [Configuration Reference](https://developers.openai.com/codex/config-reference).259For the broader configuration workflow, see [Config basics](https://developers.openai.com/codex/config-basic), [Advanced Config](https://developers.openai.com/codex/config-advanced#approval-policies-and-sandbox-modes), and the [Configuration Reference](https://developers.openai.com/codex/config-reference).

260 260 

261```261```toml

262# Always ask for approval mode262# Always ask for approval mode

263approval_policy = "untrusted"263approval_policy = "untrusted"

264sandbox_mode = "read-only"264sandbox_mode = "read-only"


280 280 

281You can also save presets as [profile files](https://developers.openai.com/codex/config-advanced#profiles), then select them with `codex --profile profile-name`:281You can also save presets as [profile files](https://developers.openai.com/codex/config-advanced#profiles), then select them with `codex --profile profile-name`:

282 282 

283```283```toml

284# ~/.codex/full_auto.config.toml284# ~/.codex/full_auto.config.toml

285approval_policy = "on-request"285approval_policy = "on-request"

286sandbox_mode = "workspace-write"286sandbox_mode = "workspace-write"

287```287```

288 288 

289```289```toml

290# ~/.codex/readonly_quiet.config.toml290# ~/.codex/readonly_quiet.config.toml

291approval_policy = "never"291approval_policy = "never"

292sandbox_mode = "read-only"292sandbox_mode = "read-only"


296 296 

297To see what happens when a command runs under the Codex sandbox, use these Codex CLI commands:297To see what happens when a command runs under the Codex sandbox, use these Codex CLI commands:

298 298 

299```299```bash

300# macOS300# macOS

301codex sandbox macos [--permissions-profile <name>] [--log-denials] [COMMAND]...301codex sandbox macos [--permissions-profile <name>] [--log-denials] [COMMAND]...

302# Linux302# Linux


315- **Linux** uses `bwrap` plus `seccomp` by default.315- **Linux** uses `bwrap` plus `seccomp` by default.

316- **Windows** uses the Linux sandbox implementation when running in [Windows Subsystem for Linux 2 (WSL2)](https://developers.openai.com/codex/windows#windows-subsystem-for-linux). WSL1 was supported through Codex `0.114`; starting in `0.115`, the Linux sandbox moved to `bwrap`, so WSL1 is no longer supported. When running natively on Windows, Codex uses a [Windows sandbox](https://developers.openai.com/codex/windows#windows-sandbox) implementation.316- **Windows** uses the Linux sandbox implementation when running in [Windows Subsystem for Linux 2 (WSL2)](https://developers.openai.com/codex/windows#windows-subsystem-for-linux). WSL1 was supported through Codex `0.114`; starting in `0.115`, the Linux sandbox moved to `bwrap`, so WSL1 is no longer supported. When running natively on Windows, Codex uses a [Windows sandbox](https://developers.openai.com/codex/windows#windows-sandbox) implementation.

317 317 

318If you use the Codex IDE extension on Windows, it supports WSL2 directly. Set the following in your VS Code settings to keep the agent inside WSL2 whenever its available:318If you use the Codex IDE extension on Windows, it supports WSL2 directly. Set the following in your VS Code settings to keep the agent inside WSL2 whenever it's available:

319 319 

320```320```json

321{321{

322 "chatgpt.runCodexInWindowsSubsystemForLinux": true322 "chatgpt.runCodexInWindowsSubsystemForLinux": true

323}323}


327 327 

328When running natively on Windows, configure the native sandbox mode in `config.toml`:328When running natively on Windows, configure the native sandbox mode in `config.toml`:

329 329 

330```330```toml

331[windows]331[windows]

332sandbox = "unelevated" # or "elevated"332sandbox = "unelevated" # or "elevated"

333# sandbox_private_desktop = true # default; set false only for compatibility333# sandbox_private_desktop = true # default; set false only for compatibility


346Use the [Codex secure devcontainer example](https://github.com/openai/codex/tree/main/.devcontainer) as a reference implementation. The example installs Codex, common development tools, `bubblewrap`, and firewall-based outbound controls.346Use the [Codex secure devcontainer example](https://github.com/openai/codex/tree/main/.devcontainer) as a reference implementation. The example installs Codex, common development tools, `bubblewrap`, and firewall-based outbound controls.

347 347 

348Devcontainers provide substantial protection, but they do not prevent every348Devcontainers provide substantial protection, but they do not prevent every

349attack. If you run Codex with `--sandbox danger-full-access` or349 attack. If you run Codex with `--sandbox danger-full-access` or

350`--dangerously-bypass-approvals-and-sandbox` inside the container, a malicious350 `--dangerously-bypass-approvals-and-sandbox` inside the container, a malicious

351project can exfiltrate anything available inside the devcontainer, including351 project can exfiltrate anything available inside the devcontainer, including

352Codex credentials. Use this pattern only with trusted repositories, and352 Codex credentials. Use this pattern only with trusted repositories, and

353monitor Codex activity as you would in any other elevated environment.353 monitor Codex activity as you would in any other elevated environment.

354 354 

355The reference implementation includes:355The reference implementation includes:

356 356 


364 364 

3651. Install Visual Studio Code and the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).3651. Install Visual Studio Code and the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).

3662. Copy the Codex example `.devcontainer` setup into your repository, or start from the Codex repository directly.3662. Copy the Codex example `.devcontainer` setup into your repository, or start from the Codex repository directly.

3673. In VS Code, run **Dev Containers: Open Folder in Container** and select `.devcontainer/devcontainer.secure.json`.3673. In VS Code, run **Dev Containers: Open Folder in Container...** and select `.devcontainer/devcontainer.secure.json`.

3684. After the container starts, open a terminal and run `codex`.3684. After the container starts, open a terminal and run `codex`.

369 369 

370You can also start the container from the CLI:370You can also start the container from the CLI:

371 371 

372```372```bash

373devcontainer up --workspace-folder . --config .devcontainer/devcontainer.secure.json373devcontainer up --workspace-folder . --config .devcontainer/devcontainer.secure.json

374```374```

375 375 


383 383 

384Inside the container, choose one of these modes:384Inside the container, choose one of these modes:

385 385 

386- Keep Codexs Linux sandbox enabled if the Dev Container profile grants the capabilities needed for `bwrap` to create the inner sandbox.386- Keep Codex's Linux sandbox enabled if the Dev Container profile grants the capabilities needed for `bwrap` to create the inner sandbox.

387- If the container is your intended security boundary, run Codex with `--sandbox danger-full-access` inside the container so Codex does not try to create a second sandbox layer.387- If the container is your intended security boundary, run Codex with `--sandbox danger-full-access` inside the container so Codex does not try to create a second sandbox layer.

388 388 

389## Version control389## Version control


408 408 

409Add an `[otel]` block to your Codex configuration (typically `~/.codex/config.toml`), choosing an exporter and whether to log prompt text.409Add an `[otel]` block to your Codex configuration (typically `~/.codex/config.toml`), choosing an exporter and whether to log prompt text.

410 410 

411```411```toml

412[otel]412[otel]

413environment = "staging" # dev | staging | prod413environment = "staging" # dev | staging | prod

414exporter = "none" # none | otlp-http | otlp-grpc414exporter = "none" # none | otlp-http | otlp-grpc

415log_user_prompt = false # redact prompt text unless policy allows415log_user_prompt = false # redact prompt text unless policy allows

416```416```

417 417 

418- `exporter = "none"` leaves instrumentation active but doesnt send data anywhere.418- `exporter = "none"` leaves instrumentation active but doesn't send data anywhere.

419- To send events to your own collector, pick one of:419- To send events to your own collector, pick one of:

420 420 

421```421```toml

422[otel]422[otel]

423exporter = { otlp-http = {423exporter = { otlp-http = {

424 endpoint = "https://otel.example.com/v1/logs",424 endpoint = "https://otel.example.com/v1/logs",


427}}427}}

428```428```

429 429 

430```430```toml

431[otel]431[otel]

432exporter = { otlp-grpc = {432exporter = { otlp-grpc = {

433 endpoint = "https://otel.example.com:4317",433 endpoint = "https://otel.example.com:4317",


458- Keep `log_user_prompt = false` unless policy explicitly permits storing prompt contents. Prompts can include source code and sensitive data.458- Keep `log_user_prompt = false` unless policy explicitly permits storing prompt contents. Prompts can include source code and sensitive data.

459- Route telemetry only to collectors you control; apply retention limits and access controls aligned with your compliance requirements.459- Route telemetry only to collectors you control; apply retention limits and access controls aligned with your compliance requirements.

460- Treat tool arguments and outputs as sensitive. Favor redaction at the collector or SIEM when possible.460- Treat tool arguments and outputs as sensitive. Favor redaction at the collector or SIEM when possible.

461- Review local data retention settings (for example, `history.persistence` / `history.max_bytes`) if you dont want Codex to save session transcripts under `CODEX_HOME`. See [Advanced Config](https://developers.openai.com/codex/config-advanced#history-persistence) and [Configuration Reference](https://developers.openai.com/codex/config-reference).461- Review local data retention settings (for example, `history.persistence` / `history.max_bytes`) if you don't want Codex to save session transcripts under `CODEX_HOME`. See [Advanced Config](https://developers.openai.com/codex/config-advanced#history-persistence) and [Configuration Reference](https://developers.openai.com/codex/config-reference).

462- If you run the CLI with network access turned off, OTel export cant reach your collector. To export, allow network access in `workspace-write` mode for the OTel endpoint, or export from Codex cloud with the collector domain on your approved list.462- If you run the CLI with network access turned off, OTel export can't reach your collector. To export, allow network access in `workspace-write` mode for the OTel endpoint, or export from Codex cloud with the collector domain on your approved list.

463- Review events periodically for approval/sandbox changes and unexpected tool executions.463- Review events periodically for approval/sandbox changes and unexpected tool executions.

464 464 

465OTel is optional and designed to complement, not replace, the sandbox and approval protections described above.465OTel is optional and designed to complement, not replace, the sandbox and approval protections described above.

amazon-bedrock.md +465 −89

Details

7## How it works7## How it works

8 8 

9When you configure Codex with Amazon Bedrock as the model provider, the9When you configure Codex with Amazon Bedrock as the model provider, the

10OpenAI-hosted Responses API isnt in the request path. Codex sends model10OpenAI-hosted Responses API isn't in the request path. Codex sends model

11requests to Amazon Bedrock, and Bedrock provides an OpenAI-compatible Responses11requests to Amazon Bedrock, and Bedrock provides an OpenAI-compatible Responses

12API implementation for supported OpenAI models.12API implementation for supported OpenAI models.

13 13 

14Authentication is AWS-native. Users authenticate with a Bedrock API key or AWS14Authentication is AWS-native. Users authenticate with a Bedrock API key or AWS

15IAM credentials. They do not use ChatGPT sign-in or `OPENAI_API_KEY` for this15 IAM credentials. They do not use ChatGPT sign-in or `OPENAI_API_KEY` for this

16provider.16 provider.

17 17 

18## Before you start18## Before you start

19 19 


30`~/.codex/config.toml`. Supplying a model is optional. Select a supported model30`~/.codex/config.toml`. Supplying a model is optional. Select a supported model

31explicitly when needed.31explicitly when needed.

32 32 

33```33```toml

34model_provider = "amazon-bedrock"34model_provider = "amazon-bedrock"

35```35```

36 36 

37This guide covers the Amazon Bedrock Mantle path in supported commercial AWS37This guide covers the Amazon Bedrock Mantle path in supported commercial AWS

38Regions. Codex doesnt support Bedrock Mantle endpoints in AWS GovCloud38 Regions. Codex doesn't support Bedrock Mantle endpoints in AWS GovCloud

39Regions.39 Regions.

40 40 

41## Authentication options41## Authentication options

42 42 


50Set the Bedrock API key in the environment Codex reads. You must specify a50Set the Bedrock API key in the environment Codex reads. You must specify a

51Region when using API-key authentication.51Region when using API-key authentication.

52 52 

53```53```shell

54export AWS_BEARER_TOKEN_BEDROCK=<your-bedrock-api-key>54export AWS_BEARER_TOKEN_BEDROCK=<your-bedrock-api-key>

55export AWS_REGION=us-east-255export AWS_REGION=us-east-2

56```56```


62 62 

631. Shared AWS `config` and `credentials` files.631. Shared AWS `config` and `credentials` files.

64 64 

65 ```65 ```shell

66 aws configure66 aws configure

67 ```67 ```

68 

682. Environment variables.692. Environment variables.

69 70 

70 ```71 ```shell

71 export AWS_ACCESS_KEY_ID=<your-access-key-id>72 export AWS_ACCESS_KEY_ID=<your-access-key-id>

72 export AWS_SECRET_ACCESS_KEY=<your-secret-access-key>73 export AWS_SECRET_ACCESS_KEY=<your-secret-access-key>

73 export AWS_SESSION_TOKEN=<your-session-token>74 export AWS_SESSION_TOKEN=<your-session-token>

74 ```75 ```

76 

753. AWS Management Console credentials.773. AWS Management Console credentials.

76 78 

77 ```79 ```shell

78 aws login80 aws login

79 ```81 ```

82 

804. AWS SSO or a named profile.834. AWS SSO or a named profile.

81 84 

82 ```85 ```shell

83 aws sso login --profile codex-bedrock86 aws sso login --profile codex-bedrock

84 export AWS_PROFILE=codex-bedrock87 export AWS_PROFILE=codex-bedrock

85 ```88 ```


865. Federated identity configured with `credential_process`. For corporate SSO or905. Federated identity configured with `credential_process`. For corporate SSO or

87 OIDC federation, configure the AWS profile outside Codex and let the AWS SDK91 OIDC federation, configure the AWS profile outside Codex and let the AWS SDK

88 resolve credentials. Put browser login, token exchange, caching, and refresh92 resolve credentials. Put browser login, token exchange, caching, and refresh

89 in your AWS profiles `credential_process` helper.93 in your AWS profile's `credential_process` helper.

90 94 

91## Desktop app and VS Code extension95## Desktop app and VS Code extension

92 96 


94shell. Put required values in `~/.codex/.env`, then restart the app or98shell. Put required values in `~/.codex/.env`, then restart the app or

95extension.99extension.

96 100 

97```101```shell

98export AWS_BEARER_TOKEN_BEDROCK=<your-bedrock-api-key>102export AWS_BEARER_TOKEN_BEDROCK=<your-bedrock-api-key>

99export AWS_REGION=us-east-2103export AWS_REGION=us-east-2

100```104```


112 116 

113Use exact model IDs:117Use exact model IDs:

114 118 

115```119```text

116openai.gpt-5.5120openai.gpt-5.5

117openai.gpt-5.4121openai.gpt-5.4

118```122```


124## Feature availability128## Feature availability

125 129 

126This configuration supports local Codex workflows. Some features that depend on130This configuration supports local Codex workflows. Some features that depend on

127OpenAI-hosted cloud services, hosted tools, or cloud-managed discovery arent131OpenAI-hosted cloud services, hosted tools, or cloud-managed discovery aren't

128currently available.132currently available.

129 133 

130Fast Mode isnt available with Amazon Bedrock. Fast Mode uses priority134Fast Mode isn't available with Amazon Bedrock. Fast Mode uses priority

131processing, and the initial Amazon Bedrock offering supports on-demand135 processing, and the initial Amazon Bedrock offering supports on-demand

132inference only.136 inference only.

133 137 

134Detailed feature availability138<ToggleSection title="Detailed feature availability">

135 139 <CodexPlanFeatureMatrix

136| Feature | Amazon Bedrock |140 client:load

137| --- | --- |141 data={{

138| Access and surfaces | |142 plans: [

139| --- | --- |143 {

140| [Codex web](https://developers.openai.com/codex/cloud) | — |144 id: "bedrock",

141| [Codex app for local tasks](https://developers.openai.com/codex/app) | |145 shortLabel: "Amazon Bedrock",

142| [Codex CLI](https://developers.openai.com/codex/cli) | |146 label: "Amazon Bedrock",

143| [IDE extension](https://developers.openai.com/codex/ide) | |147 },

144| [Codex SDK, `codex exec`, and scriptable workflows](https://developers.openai.com/codex/sdk) | |148 ],

145| Models and multimodal | |149 sections: [

146| [Bedrock-backed inference with supported OpenAI models](https://developers.openai.com/codex/amazon-bedrock) | |150 {

147| [Fast mode](https://developers.openai.com/codex/speed) | |151 title: "Access and surfaces",

148| [Image generation and editing](https://developers.openai.com/codex/app/features#image-generation) | — |152 features: [

149| [Voice dictation](https://developers.openai.com/codex/app/features#voice-dictation) | — |153 {

150| [Web search](https://developers.openai.com/codex/app/features#web-search) | — |154 name: "Codex web",

151| Local features | |155 href: "/codex/cloud",

152| [Local code review with `/review`](https://developers.openai.com/codex/workflows#do-a-local-code-review) | |156 availability: {

153| [Auto-review for approval requests](https://developers.openai.com/codex/concepts/sandboxing/auto-review) | |157 bedrock: "unavailable",

154| [Sandboxing and permission controls](https://developers.openai.com/codex/permissions) | |158 },

155| [Project and standalone app automations](https://developers.openai.com/codex/app/automations) | |159 },

156| [Automations](https://developers.openai.com/codex/app/automations) | |160 {

157| [Worktrees and built-in Git tools](https://developers.openai.com/codex/app/worktrees) | |161 name: "Codex app for local tasks",

158| [Local environments and repeatable actions](https://developers.openai.com/codex/app/local-environments) | |162 href: "/codex/app",

159| [Appshots](https://developers.openai.com/codex/appshots) | |163 availability: {

160| Browser and remote control | |164 bedrock: "available",

161| [In-app browser previews and comments](https://developers.openai.com/codex/app/browser) | |165 },

162| [Browser Use automation](https://developers.openai.com/codex/app/browser#browser-use) | [Limited\*](#codex-plan-region-limits "Available with regional limits") |166 },

163| [Chrome extension browser control](https://developers.openai.com/codex/app/chrome-extension) | [Limited\*](#codex-plan-region-limits "Available with regional limits") |167 {

164| [Computer Use](https://developers.openai.com/codex/app/computer-use) | [Limited\*](#codex-plan-region-limits "Available with regional limits") |168 name: "Codex CLI",

165| [SSH remote connections](https://developers.openai.com/codex/remote-connections#connect-to-an-ssh-host) | |169 href: "/codex/cli",

166| [Mobile remote control](https://developers.openai.com/codex/remote-connections) | — |170 availability: {

167| Customization and extensions | |171 bedrock: "available",

168| [Custom instructions with `AGENTS.md`](https://developers.openai.com/codex/guides/agents-md) | |172 },

169| [Skills](https://developers.openai.com/codex/skills) | |173 },

170| [Plugins](https://developers.openai.com/codex/plugins) | [Limited†](#codex-plan-plugin-limits "Available with plugin limits") |174 {

171| [Plugin sharing](https://developers.openai.com/codex/plugins/build#share-a-local-plugin-with-your-workspace) | — |175 name: "IDE extension",

172| [App connectors](https://developers.openai.com/codex/plugins) | — |176 href: "/codex/ide",

173| [MCP](https://developers.openai.com/codex/mcp) | |177 availability: {

174| [Subagents and custom agents](https://developers.openai.com/codex/subagents) | |178 bedrock: "available",

175| [Memories](https://developers.openai.com/codex/memories) | [Limited\*](#codex-plan-region-limits "Available with regional limits") |179 },

176| [Chronicle](https://developers.openai.com/codex/memories/chronicle) | — |180 },

177| Cloud and integrations | |181 {

178| [Codex cloud tasks](https://developers.openai.com/codex/cloud) | |182 name: "Codex SDK, `codex exec`, and scriptable workflows",

179| [Sites](https://developers.openai.com/codex/sites) | |183 shortName: "Codex SDK and scripting",

180| [GitHub issue and PR delegation with `@codex`](https://developers.openai.com/codex/integrations/github#give-codex-other-tasks) | — |184 href: "/codex/sdk",

181| [GitHub code review and automatic PR reviews](https://developers.openai.com/codex/integrations/github) | — |185 availability: {

182| [Slack cloud integration](https://developers.openai.com/codex/integrations/slack) | — |186 bedrock: "available",

183| [Linear cloud integration](https://developers.openai.com/codex/integrations/linear) | — |187 },

184| Admin, security, and analytics | |188 },

185| [SAML SSO, MFA, and workspace user management](https://developers.openai.com/codex/enterprise/admin-setup) | — |189 ],

186| [`requirements.toml` managed config](https://developers.openai.com/codex/enterprise/managed-configuration) | |190 },

187| [Cloud-managed config policies](https://developers.openai.com/codex/enterprise/managed-configuration#cloud-managed-requirements) | — |191 {

188| [Codex RBAC and custom roles](https://developers.openai.com/codex/enterprise/admin-setup#step-2-set-up-custom-roles-rbac) | |192 title: "Models and multimodal",

189| [SCIM, EKM, and domain verification](https://developers.openai.com/codex/enterprise/admin-setup#enterprise-grade-security-and-privacy) | — |193 features: [

190| [Enterprise retention and residency controls](https://developers.openai.com/codex/enterprise/admin-setup#enterprise-grade-security-and-privacy) | — |194 {

191| [No training on API or business data by default](https://openai.com/business-data/) | |195 name: "Bedrock-backed inference with supported OpenAI models",

192| [Analytics dashboard](https://developers.openai.com/codex/enterprise/governance#analytics-dashboard) | — |196 shortName: "Bedrock-backed inference",

193| [Analytics API](https://developers.openai.com/codex/enterprise/governance#analytics-api) | — |197 href: "/codex/amazon-bedrock",

194| [Compliance API and audit logs](https://developers.openai.com/codex/enterprise/governance#compliance-api) | — |198 availability: {

195| [Codex Security for connected GitHub repositories](https://developers.openai.com/codex/security) | — |199 bedrock: "available",

196 200 },

197\* Feature is currently limited to only specific regions. Check201 },

198the individual feature documentation to learn more about geo restrictions.202 {

199 203 name: "Fast mode",

200† Some first party plugins are not available.204 href: "/codex/speed",

205 availability: {

206 bedrock: "unavailable",

207 },

208 },

209 {

210 name: "Image generation and editing",

211 href: "/codex/app/features#image-generation",

212 availability: {

213 bedrock: "unavailable",

214 },

215 },

216 {

217 name: "Voice dictation",

218 href: "/codex/app/features#voice-dictation",

219 availability: {

220 bedrock: "unavailable",

221 },

222 },

223 {

224 name: "Web search",

225 href: "/codex/app/features#web-search",

226 availability: {

227 bedrock: "unavailable",

228 },

229 },

230 ],

231 },

232 {

233 title: "Local features",

234 features: [

235 {

236 name: "Local code review with `/review`",

237 shortName: "Local code review",

238 href: "/codex/workflows#do-a-local-code-review",

239 availability: {

240 bedrock: "available",

241 },

242 },

243 {

244 name: "Auto-review for approval requests",

245 href: "/codex/concepts/sandboxing/auto-review",

246 availability: {

247 bedrock: "available",

248 },

249 },

250 {

251 name: "Sandboxing and permission controls",

252 href: "/codex/permissions",

253 availability: {

254 bedrock: "available",

255 },

256 },

257 {

258 name: "Project and standalone app automations",

259 shortName: "App automations",

260 href: "/codex/app/automations",

261 availability: {

262 bedrock: "available",

263 },

264 },

265 {

266 name: "Automations",

267 href: "/codex/app/automations",

268 availability: {

269 bedrock: "available",

270 },

271 },

272 {

273 name: "Worktrees and built-in Git tools",

274 shortName: "Built-in Git tools",

275 href: "/codex/app/worktrees",

276 availability: {

277 bedrock: "available",

278 },

279 },

280 {

281 name: "Local environments and repeatable actions",

282 shortName: "Repeatable actions",

283 href: "/codex/app/local-environments",

284 availability: {

285 bedrock: "available",

286 },

287 },

288 {

289 name: "Appshots",

290 href: "/codex/appshots",

291 availability: {

292 bedrock: "available",

293 },

294 },

295 ],

296 },

297 {

298 title: "Browser and remote control",

299 features: [

300 {

301 name: "In-app browser previews and comments",

302 shortName: "In-app browser",

303 href: "/codex/app/browser",

304 availability: {

305 bedrock: "available",

306 },

307 },

308 {

309 name: "Browser Use automation",

310 href: "/codex/app/browser#browser-use",

311 availability: {

312 bedrock: "limited",

313 },

314 },

315 {

316 name: "Chrome extension browser control",

317 shortName: "Chrome browser control",

318 href: "/codex/app/chrome-extension",

319 availability: {

320 bedrock: "limited",

321 },

322 },

323 {

324 name: "Computer Use",

325 href: "/codex/app/computer-use",

326 availability: {

327 bedrock: "limited",

328 },

329 },

330 {

331 name: "SSH remote connections",

332 shortName: "SSH remote",

333 href: "/codex/remote-connections#connect-to-an-ssh-host",

334 availability: {

335 bedrock: "available",

336 },

337 },

338 {

339 name: "Mobile remote control",

340 href: "/codex/remote-connections",

341 availability: {

342 bedrock: "unavailable",

343 },

344 },

345 ],

346 },

347 {

348 title: "Customization and extensions",

349 features: [

350 {

351 name: "Custom instructions with `AGENTS.md`",

352 shortName: "Custom instructions",

353 href: "/codex/guides/agents-md",

354 availability: {

355 bedrock: "available",

356 },

357 },

358 {

359 name: "Skills",

360 href: "/codex/skills",

361 availability: {

362 bedrock: "available",

363 },

364 },

365 {

366 name: "Plugins",

367 href: "/codex/plugins",

368 availability: {

369 bedrock: "limited",

370 },

371 limitedFootnote: "plugins",

372 },

373 {

374 name: "Plugin sharing",

375 href: "/codex/plugins/build#share-a-local-plugin-with-your-workspace",

376 availability: {

377 bedrock: "unavailable",

378 },

379 },

380 {

381 name: "App connectors",

382 href: "/codex/plugins",

383 availability: {

384 bedrock: "unavailable",

385 },

386 },

387 {

388 name: "MCP",

389 href: "/codex/mcp",

390 availability: {

391 bedrock: "available",

392 },

393 },

394 {

395 name: "Subagents and custom agents",

396 shortName: "Subagents",

397 href: "/codex/subagents",

398 availability: {

399 bedrock: "available",

400 },

401 },

402 {

403 name: "Memories",

404 href: "/codex/memories",

405 availability: {

406 bedrock: "limited",

407 },

408 },

409 {

410 name: "Chronicle",

411 href: "/codex/memories/chronicle",

412 availability: {

413 bedrock: "unavailable",

414 },

415 },

416 ],

417 },

418 {

419 title: "Cloud and integrations",

420 features: [

421 {

422 name: "Codex cloud tasks",

423 shortName: "Cloud tasks",

424 href: "/codex/cloud",

425 availability: {

426 bedrock: "unavailable",

427 },

428 },

429 {

430 name: "Sites",

431 href: "/codex/sites",

432 availability: {

433 bedrock: "unavailable",

434 },

435 },

436 {

437 name: "GitHub issue and PR delegation with `@codex`",

438 shortName: "GitHub delegation",

439 href: "/codex/integrations/github#give-codex-other-tasks",

440 availability: {

441 bedrock: "unavailable",

442 },

443 },

444 {

445 name: "GitHub code review and automatic PR reviews",

446 shortName: "GitHub PR reviews",

447 href: "/codex/integrations/github",

448 availability: {

449 bedrock: "unavailable",

450 },

451 },

452 {

453 name: "Slack cloud integration",

454 shortName: "Slack integration",

455 href: "/codex/integrations/slack",

456 availability: {

457 bedrock: "unavailable",

458 },

459 },

460 {

461 name: "Linear cloud integration",

462 shortName: "Linear integration",

463 href: "/codex/integrations/linear",

464 availability: {

465 bedrock: "unavailable",

466 },

467 },

468 ],

469 },

470 {

471 title: "Admin, security, and analytics",

472 features: [

473 {

474 name: "SAML SSO, MFA, and workspace user management",

475 shortName: "Workspace management",

476 href: "/codex/enterprise/admin-setup",

477 availability: {

478 bedrock: "unavailable",

479 },

480 },

481 {

482 name: "`requirements.toml` managed config",

483 shortName: "`requirements.toml` config",

484 href: "/codex/enterprise/managed-configuration",

485 availability: {

486 bedrock: "available",

487 },

488 },

489 {

490 name: "Cloud-managed config policies",

491 shortName: "Cloud-managed policies",

492 href: "/codex/enterprise/managed-configuration#cloud-managed-requirements",

493 availability: {

494 bedrock: "unavailable",

495 },

496 },

497 {

498 name: "Codex RBAC and custom roles",

499 shortName: "RBAC and roles",

500 href: "/codex/enterprise/admin-setup#step-2-set-up-custom-roles-rbac",

501 availability: {

502 bedrock: "unavailable",

503 },

504 },

505 {

506 name: "SCIM, EKM, and domain verification",

507 shortName: "SCIM, EKM, and domains",

508 href: "/codex/enterprise/admin-setup#enterprise-grade-security-and-privacy",

509 availability: {

510 bedrock: "unavailable",

511 },

512 },

513 {

514 name: "Enterprise retention and residency controls",

515 shortName: "Retention and residency",

516 href: "/codex/enterprise/admin-setup#enterprise-grade-security-and-privacy",

517 availability: {

518 bedrock: "unavailable",

519 },

520 },

521 {

522 name: "No training on API or business data by default",

523 shortName: "No default training",

524 href: "https://openai.com/business-data/",

525 availability: {

526 bedrock: "available",

527 },

528 },

529 {

530 name: "Analytics dashboard",

531 href: "/codex/enterprise/governance#analytics-dashboard",

532 availability: {

533 bedrock: "unavailable",

534 },

535 },

536 {

537 name: "Analytics API",

538 href: "/codex/enterprise/governance#analytics-api",

539 availability: {

540 bedrock: "unavailable",

541 },

542 },

543 {

544 name: "Compliance API and audit logs",

545 shortName: "Compliance and audit logs",

546 href: "/codex/enterprise/governance#compliance-api",

547 availability: {

548 bedrock: "unavailable",

549 },

550 },

551 {

552 name: "Codex Security for connected GitHub repositories",

553 shortName: "Codex Security",

554 href: "/codex/security",

555 availability: {

556 bedrock: "unavailable",

557 },

558 },

559 ],

560 },

561 ],

562 }}

563 />

564 

565 <div

566 id="codex-plan-region-limits"

567 className="not-prose mt-3 text-sm text-secondary"

568 >

569 <sup>*</sup> Feature is currently limited to only specific regions. Check

570 the individual feature documentation to learn more about geo restrictions.

571 </div>

572 <div

573 id="codex-plan-plugin-limits"

574 className="not-prose mt-1 text-sm text-secondary"

575 >

576 <sup>†</sup> Some first party plugins are not available.

577 </div>

578</ToggleSection>

201 579 

202## Troubleshooting580## Troubleshooting

203 581 


207- You specify an AWS Region where the model is available.585- You specify an AWS Region where the model is available.

208- The Bedrock API key or AWS credentials are valid and not expired.586- The Bedrock API key or AWS credentials are valid and not expired.

209- The AWS identity has permission to access the selected Bedrock model.587- The AWS identity has permission to access the selected Bedrock model.

210- `AWS_BEARER_TOKEN_BEDROCK` isnt set to an expired or unintended key.588- `AWS_BEARER_TOKEN_BEDROCK` isn't set to an expired or unintended key.

211- For desktop app or VS Code extension usage, required environment variables589- For desktop app or VS Code extension usage, required environment variables

212 are present in `~/.codex/.env`.590 are present in `~/.codex/.env`.

213 591 


219 597 

220For AWS credentials, IAM permissions, Bedrock model access, quotas, billing,598For AWS credentials, IAM permissions, Bedrock model access, quotas, billing,

221regional availability, Bedrock request failures, AWS service logs, or Bedrock599regional availability, Bedrock request failures, AWS service logs, or Bedrock

222service behavior, contact the customers AWS administrator or AWS Support.600service behavior, contact the customer's AWS administrator or AWS Support.

223 

app.md +185 −34

Details

1# App – Codex1# Codex app

2 2 

3The Codex app is a focused desktop experience for working on Codex threads in parallel, with built-in worktree support, automations, and Git functionality.3The Codex app is a focused desktop experience for working on Codex threads in parallel, with built-in worktree support, automations, and Git functionality.

4 4 

5ChatGPT Plus, Pro, Business, Edu, and Enterprise plans include Codex. Learn more about [whats included](https://developers.openai.com/codex/pricing).5ChatGPT Plus, Pro, Business, Edu, and Enterprise plans include Codex. Learn more about [what's included](https://developers.openai.com/codex/pricing).

6 6 

7![Codex app for Windows showing a project sidebar, active thread, and review pane](/images/codex/windows/codex-windows-light.webp)7<PlatformSpecificContent>

8 8 <CodexScreenshot

9![Codex app window with a project sidebar, active thread, and review pane](/images/codex/app/app-screenshot-light.webp)9 slot="windows"

10 alt="Codex app for Windows showing a project sidebar, active thread, and review pane"

11 lightSrc="/images/codex/windows/codex-windows-light.webp"

12 darkSrc="/images/codex/windows/codex-windows-dark.webp"

13 variant="no-wallpaper"

14 maxHeight="300px"

15 />

16 <CodexScreenshot

17 alt="Codex app window with a project sidebar, active thread, and review pane"

18 lightSrc="/images/codex/app/app-screenshot-light.webp"

19 darkSrc="/images/codex/app/app-screenshot-dark.webp"

20 variant="no-wallpaper"

21 maxHeight="300px"

22 />

23</PlatformSpecificContent>

10 24 

11## Getting started25## Getting started

12 26 


15Most Codex app features are available on both platforms. The relevant docs29Most Codex app features are available on both platforms. The relevant docs

16describe platform-specific exceptions.30describe platform-specific exceptions.

17 31 

32<WorkflowSteps variant="headings">

181. Download and install the Codex app331. Download and install the Codex app

19 34 

20 Download the Codex app for macOS or Windows. Choose the Intel build if youre using an Intel-based Mac.35 Download the Codex app for macOS or Windows. Choose the Intel build if you're using an Intel-based Mac.

21 

22 [Download for macOS (Apple Silicon)](https://persistent.oaistatic.com/codex-app-prod/Codex.dmg)[Download for macOS (Intel)](https://persistent.oaistatic.com/codex-app-prod/Codex-latest-x64.dmg)

23 36 

24 Need a different operating system?37 <CodexAppDownloadCta client:load className="mb-4" />

25 

26 [Download for Windows](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi)

27 38 

39 <div class="text-sm">

28 [Get notified for Linux](https://openai.com/form/codex-app/)40 [Get notified for Linux](https://openai.com/form/codex-app/)

41 </div>

42 

292. Open Codex and sign in432. Open Codex and sign in

30 44 

31 Once you downloaded and installed the Codex app, open it and sign in with your ChatGPT account or an OpenAI API key.45 Once you downloaded and installed the Codex app, open it and sign in with your ChatGPT account or an OpenAI API key.


35 50 

36 Choose a project folder that you want Codex to work in.51 Choose a project folder that you want Codex to work in.

37 52 

38If you used the Codex app, CLI, or IDE Extension before youll see past projects that you worked on.53If you used the Codex app, CLI, or IDE Extension before you'll see past projects that you worked on.

39 54 

404. Send your first message554. Send your first message

41 56 


43 58 

44 You can ask Codex anything about the project or your computer in general. Here are some examples:59 You can ask Codex anything about the project or your computer in general. Here are some examples:

45 60 

46- Tell me about this project61 <ExampleGallery>

47- Build a classic Snake game in this repo.62 <ExampleTask

48- Find and fix bugs in my codebase with minimal, high-confidence changes.63 client:load

64 id="intro"

65 prompt="Tell me about this project"

66 iconName="brain"

67 />

68 <ExampleTask

69 client:load

70 id="snake-game"

71 shortDescription="Build a classic Snake game in this repo."

72 prompt={[

73 "Build a classic Snake game in this repo.",

74 "",

75 "Scope & constraints:",

76 "- Implement ONLY the classic Snake loop: grid movement, growing snake, food spawn, score, game-over, restart.",

77 "- Reuse existing project tooling/frameworks; do NOT add new dependencies unless truly required.",

78 "- Keep UI minimal and consistent with the repo’s existing styles (no new design systems, no extra animations).",

79 "",

80 "Implementation plan:",

81 "1) Inspect the repo to find the right place to add a small interactive game (existing pages/routes/components).",

82 "2) Implement game state (snake positions, direction, food, score, tick timer) with deterministic, testable logic.",

83 "3) Render: simple grid + snake + food; support keyboard controls (arrow keys/WASD) and on-screen controls if mobile is present in the repo.",

84 "4) Add basic tests for the core game logic (movement, collisions, growth, food placement) if the repo has a test runner.",

85 "",

86 "Deliverables:",

87 "- A small set of files/changes with clear names.",

88 "- Short run instructions (how to start dev server + where to navigate).",

89 "- A brief checklist of what to manually verify (controls, pause/restart, boundaries).",

90 ].join("\n")}

91 iconName="gamepad"

92 />

93 <ExampleTask

94 client:load

95 id="fix-bugs"

96 shortDescription="Find and fix bugs in my codebase with minimal, high-confidence changes."

97 prompt={[

98 "Find and fix bugs in my codebase with minimal, high-confidence changes.",

99 "",

100 "Method (grounded + disciplined):",

101 "1) Reproduce: run tests/lint/build (or follow the existing repo scripts). If I provided an error, reproduce that exact failure.",

102 "2) Localize: identify the smallest set of files/lines involved (stack traces, failing tests, logs).",

103 "3) Fix: implement the minimal change that resolves the issue without refactors or unrelated cleanup.",

104 "4) Prove: add/update a focused test (or a tight repro) that fails before and passes after.",

105 "",

106 "Constraints:",

107 "- Do NOT invent errors or pretend to run commands you cannot run.",

108 "- No scope drift: no new features, no UI embellishments, no style overhauls.",

109 "- If information is missing, state what you can confirm from the repo and what remains unknown.",

110 "",

111 "Output:",

112 "- Summary (3–6 sentences max): what was broken, why, and the fix.",

113 "- Then ≤5 bullets: What changed, Where (paths), Evidence (tests/logs), Risks, Next steps.",

114 ].join("\n")}

115 iconName="search"

116 />

117 </ExampleGallery>

49 118 

50 If you need more inspiration, explore [Codex use cases](https://developers.openai.com/codex/use-cases).119 If you need more inspiration, explore [Codex use cases](https://developers.openai.com/codex/use-cases).

51 If youre new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).120 If you're new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).

121 

122</WorkflowSteps>

52 123 

53---124---

54 125 

55## Work with the Codex app126## Work with the Codex app

56 127 

57[### Multitask across projects128<BentoContainer class="mt-6">

129 <BentoContent href="/codex/app/features#multitask-across-projects">

130 

131### Multitask across projects

132 

133Run project threads side by side and switch between them quickly.

134 

135 </BentoContent>

136 <BentoContent href="/codex/app/worktrees">

58 137 

59Run project threads side by side and switch between them quickly.](https://developers.openai.com/codex/app/features#multitask-across-projects)[### Worktrees138### Worktrees

60 139 

61Keep parallel code changes isolated with built-in Git worktree support.](https://developers.openai.com/codex/app/worktrees)[### Remote connections140Keep parallel code changes isolated with built-in Git worktree support.

141 

142 </BentoContent>

143 <BentoContent href="/codex/remote-connections">

144 

145### Remote connections

62 146 

63Use the ChatGPT mobile app to start, steer, approve, and review Codex work on a147Use the ChatGPT mobile app to start, steer, approve, and review Codex work on a

64connected host.](https://developers.openai.com/codex/remote-connections)[### Computer use148connected host.

149 

150 </BentoContent>

151 <BentoContent href="/codex/app/computer-use">

152 

153### Computer use

154 

155Let Codex use macOS apps for GUI tasks, browser flows, and native app testing.

156 

157 </BentoContent>

158 <BentoContent href="/codex/appshots">

159 

160### Appshots

161 

162Send the frontmost Mac app window to Codex with a screenshot and available text.

163 

164 </BentoContent>

165 <BentoContent href="/codex/app/review">

166 

167### Review and ship changes

65 168 

66Let Codex use macOS apps for GUI tasks, browser flows, and native app testing.](https://developers.openai.com/codex/app/computer-use)[### Appshots169Inspect diffs, address PR feedback, stage files, commit, and push.

67 170 

68Send the frontmost Mac app window to Codex with a screenshot and available text.](https://developers.openai.com/codex/appshots)[### Review and ship changes171 </BentoContent>

172 <BentoContent href="/codex/app/features#integrated-terminal">

69 173 

70Inspect diffs, address PR feedback, stage files, commit, and push.](https://developers.openai.com/codex/app/review)[### Terminal and actions174### Terminal and actions

71 175 

72Run commands in each thread and launch repeatable project actions.](https://developers.openai.com/codex/app/features#integrated-terminal)[### In-app browser176Run commands in each thread and launch repeatable project actions.

73 177 

74Open rendered pages, leave comments, or let Codex operate local browser flows.](https://developers.openai.com/codex/app/browser)[### Chrome extension178 </BentoContent>

179 <BentoContent href="/codex/app/browser">

75 180 

76Add the Chrome plugin so Codex can use Chrome for signed-in browser tasks while you manage website approvals.](https://developers.openai.com/codex/app/chrome-extension)[### Image generation181### In-app browser

77 182 

78Generate or edit images in a thread while you work on the surrounding code and assets.](https://developers.openai.com/codex/app/features#image-generation)[### Automations183Open rendered pages, leave comments, or let Codex operate local browser flows.

79 184 

80Schedule recurring tasks, or wake up the same thread for ongoing checks.](https://developers.openai.com/codex/app/automations)[### Skills185 </BentoContent>

186 <BentoContent href="/codex/app/chrome-extension">

81 187 

82Reuse instructions and workflows across the app, CLI, and IDE Extension.](https://developers.openai.com/codex/app/features#skills-support)[### Sidebar and artifacts188### Chrome extension

83 189 

84Follow plans, sources, task summaries, and generated file previews.](https://developers.openai.com/codex/app/features#richer-outputs-and-artifacts)[### Plugins190Add the Chrome plugin so Codex can use Chrome for signed-in browser tasks while you manage website approvals.

85 191 

86Connect apps, skills, and MCP servers to extend what Codex can do.](https://developers.openai.com/codex/plugins)[### Sites192 </BentoContent>

193 <BentoContent href="/codex/app/features#image-generation">

87 194 

88Build and deploy hosted websites, web apps, and games with the Sites plugin.](https://developers.openai.com/codex/sites)[### IDE Extension sync195### Image generation

89 196 

90Share Auto Context and active threads across app and IDE sessions.](https://developers.openai.com/codex/app/features#sync-with-the-ide-extension)197Generate or edit images in a thread while you work on the surrounding code and assets.

198 

199 </BentoContent>

200 <BentoContent href="/codex/app/automations">

201 

202### Automations

203 

204Schedule recurring tasks, or wake up the same thread for ongoing checks.

205 

206 </BentoContent>

207 <BentoContent href="/codex/app/features#skills-support">

208 

209### Skills

210 

211Reuse instructions and workflows across the app, CLI, and IDE Extension.

212 

213 </BentoContent>

214 <BentoContent href="/codex/app/features#richer-outputs-and-artifacts">

215 

216### Sidebar and artifacts

217 

218Follow plans, sources, task summaries, and generated file previews.

219 

220 </BentoContent>

221 <BentoContent href="/codex/plugins">

222 

223### Plugins

224 

225Connect apps, skills, and MCP servers to extend what Codex can do.

226 

227 </BentoContent>

228 <BentoContent href="/codex/sites">

229 

230### Sites

231 

232Build and deploy hosted websites, web apps, and games with the Sites plugin.

233 

234 </BentoContent>

235 <BentoContent href="/codex/app/features#sync-with-the-ide-extension">

236 

237### IDE Extension sync

238 

239Share Auto Context and active threads across app and IDE sessions.

240 

241 </BentoContent>

242</BentoContainer>

91 243 

92---244---

93 245 

app-server.md +140 −136

Details

1# App Server – Codex1# Codex App Server

2 2 

3Codex app-server is the interface Codex uses to power rich clients (for example, the Codex VS Code extension). Use it when you want a deep integration inside your own product: authentication, conversation history, approvals, and streamed agent events. The app-server implementation is open source in the Codex GitHub repository ([openai/codex/codex-rs/app-server](https://github.com/openai/codex/tree/main/codex-rs/app-server)). See the [Open Source](https://developers.openai.com/codex/open-source) page for the full list of open-source Codex components.3Codex app-server is the interface Codex uses to power rich clients (for example, the Codex VS Code extension). Use it when you want a deep integration inside your own product: authentication, conversation history, approvals, and streamed agent events. The app-server implementation is open source in the Codex GitHub repository ([openai/codex/codex-rs/app-server](https://github.com/openai/codex/tree/main/codex-rs/app-server)). See the [Open Source](https://developers.openai.com/codex/open-source) page for the full list of open-source Codex components.

4 4 

5If you are automating jobs or running Codex in CI, use the5If you are automating jobs or running Codex in CI, use the

6[Codex SDK](https://developers.openai.com/codex/sdk) instead.6 <a href="/codex/sdk">Codex SDK</a> instead.

7 7 

8## Protocol8## Protocol

9 9 


15- `websocket` (`--listen ws://IP:PORT`, experimental and unsupported): one15- `websocket` (`--listen ws://IP:PORT`, experimental and unsupported): one

16 JSON-RPC message per WebSocket text frame.16 JSON-RPC message per WebSocket text frame.

17- Unix socket (`--listen unix://` or `--listen unix://PATH`): WebSocket17- Unix socket (`--listen unix://` or `--listen unix://PATH`): WebSocket

18 connections over Codexs default app-server control socket or a custom Unix18 connections over Codex's default app-server control socket or a custom Unix

19 socket path, using the standard HTTP Upgrade handshake.19 socket path, using the standard HTTP Upgrade handshake.

20- `off` (`--listen off`): dont expose a local transport.20- `off` (`--listen off`): don't expose a local transport.

21 21 

22When you run with `--listen ws://IP:PORT`, the same listener also serves basic22When you run with `--listen ws://IP:PORT`, the same listener also serves basic

23HTTP health probes:23HTTP health probes:

24 24 

25- `GET /readyz` returns `200 OK` once the listener accepts new connections.25- `GET /readyz` returns `200 OK` once the listener accepts new connections.

26- `GET /healthz` returns `200 OK` when the request doesnt include an `Origin`26- `GET /healthz` returns `200 OK` when the request doesn't include an `Origin`

27 header.27 header.

28- Requests with an `Origin` header are rejected with `403 Forbidden`.28- Requests with an `Origin` header are rejected with `403 Forbidden`.

29 29 


58 58 

59Requests include `method`, `params`, and `id`:59Requests include `method`, `params`, and `id`:

60 60 

61```61```json

62{ "method": "thread/start", "id": 10, "params": { "model": "gpt-5.4" } }62{ "method": "thread/start", "id": 10, "params": { "model": "gpt-5.4" } }

63```63```

64 64 

65Responses echo the `id` with either `result` or `error`:65Responses echo the `id` with either `result` or `error`:

66 66 

67```67```json

68{ "id": 10, "result": { "thread": { "id": "thr_123" } } }68{ "id": 10, "result": { "thread": { "id": "thr_123" } } }

69```69```

70 70 

71```71```json

72{ "id": 10, "error": { "code": 123, "message": "Something went wrong" } }72{ "id": 10, "error": { "code": 123, "message": "Something went wrong" } }

73```73```

74 74 

75Notifications omit `id` and use only `method` and `params`:75Notifications omit `id` and use only `method` and `params`:

76 76 

77```77```json

78{ "method": "turn/started", "params": { "turn": { "id": "turn_456" } } }78{ "method": "turn/started", "params": { "turn": { "id": "turn_456" } } }

79```79```

80 80 

81You can generate a TypeScript schema or a JSON Schema bundle from the CLI. Each output is specific to the Codex version you ran, so the generated artifacts match that version exactly:81You can generate a TypeScript schema or a JSON Schema bundle from the CLI. Each output is specific to the Codex version you ran, so the generated artifacts match that version exactly:

82 82 

83```83```bash

84codex app-server generate-ts --out ./schemas84codex app-server generate-ts --out ./schemas

85codex app-server generate-json-schema --out ./schemas85codex app-server generate-json-schema --out ./schemas

86```86```


95 95 

96Example (Node.js / TypeScript):96Example (Node.js / TypeScript):

97 97 

98```98```ts

99import { spawn } from "node:child_process";99 

100import readline from "node:readline";100 

101 101 

102const proc = spawn("codex", ["app-server"], {102const proc = spawn("codex", ["app-server"], {

103 stdio: ["pipe", "pipe", "inherit"],103 stdio: ["pipe", "pipe", "inherit"],


171 171 

172Example (from the Codex VS Code extension):172Example (from the Codex VS Code extension):

173 173 

174```174```json

175{175{

176 "method": "initialize",176 "method": "initialize",

177 "id": 0,177 "id": 0,


187 187 

188Example with notification opt-out:188Example with notification opt-out:

189 189 

190```190```json

191{191{

192 "method": "initialize",192 "method": "initialize",

193 "id": 1,193 "id": 1,


212- Omit `capabilities` (or set `experimentalApi` to `false`) to stay on the stable API surface, and the server rejects experimental methods/fields.212- Omit `capabilities` (or set `experimentalApi` to `false`) to stay on the stable API surface, and the server rejects experimental methods/fields.

213- Set `capabilities.experimentalApi` to `true` to enable experimental methods and fields.213- Set `capabilities.experimentalApi` to `true` to enable experimental methods and fields.

214 214 

215```215```json

216{216{

217 "method": "initialize",217 "method": "initialize",

218 "id": 1,218 "id": 1,


240- `thread/fork` - fork a thread into a new thread id by copying stored history; emits `thread/started` for the new thread. Returned threads include `forkedFromId` when available.240- `thread/fork` - fork a thread into a new thread id by copying stored history; emits `thread/started` for the new thread. Returned threads include `forkedFromId` when available.

241- `thread/read` - read a stored thread by id without resuming it; set `includeTurns` to return full turn history. Returned `thread` objects include runtime `status`.241- `thread/read` - read a stored thread by id without resuming it; set `includeTurns` to return full turn history. Returned `thread` objects include runtime `status`.

242- `thread/list` - page through stored thread logs; supports cursor-based pagination plus `modelProviders`, `sourceKinds`, `archived`, `cwd`, and `searchTerm` filters. Returned `thread` objects include runtime `status`.242- `thread/list` - page through stored thread logs; supports cursor-based pagination plus `modelProviders`, `sourceKinds`, `archived`, `cwd`, and `searchTerm` filters. Returned `thread` objects include runtime `status`.

243- `thread/turns/list` - page through a stored threads turn history without resuming it. `itemsView` controls whether turn items are omitted, summarized, or fully loaded.243- `thread/turns/list` - page through a stored thread's turn history without resuming it. `itemsView` controls whether turn items are omitted, summarized, or fully loaded.

244- `thread/turns/items/list` - reserved for paged turn-item loading; currently returns unsupported.244- `thread/turns/items/list` - reserved for paged turn-item loading; currently returns unsupported.

245- `thread/loaded/list` - list the thread ids currently loaded in memory.245- `thread/loaded/list` - list the thread ids currently loaded in memory.

246- `thread/name/set` - set or update a threads user-facing name for a loaded thread or a persisted rollout; emits `thread/name/updated`.246- `thread/name/set` - set or update a thread's user-facing name for a loaded thread or a persisted rollout; emits `thread/name/updated`.

247- `thread/goal/set` - set the goal for a thread; emits `thread/goal/updated`.247- `thread/goal/set` - set the goal for a thread; emits `thread/goal/updated`.

248- `thread/goal/get` - read the current goal for a thread.248- `thread/goal/get` - read the current goal for a thread.

249- `thread/goal/clear` - clear the goal for a thread; emits `thread/goal/cleared`.249- `thread/goal/clear` - clear the goal for a thread; emits `thread/goal/cleared`.

250- `thread/metadata/update` - patch SQLite-backed stored thread metadata; currently supports persisted `gitInfo`.250- `thread/metadata/update` - patch SQLite-backed stored thread metadata; currently supports persisted `gitInfo`.

251- `thread/archive` - move a threads log file into the archived directory; returns `{}` on success and emits `thread/archived`.251- `thread/archive` - move a thread's log file into the archived directory; returns `{}` on success and emits `thread/archived`.

252- `thread/unsubscribe` - unsubscribe this connection from thread turn/item events. If this was the last subscriber, the server unloads the thread after a no-subscriber inactivity grace period and emits `thread/closed`.252- `thread/unsubscribe` - unsubscribe this connection from thread turn/item events. If this was the last subscriber, the server unloads the thread after a no-subscriber inactivity grace period and emits `thread/closed`.

253- `thread/unarchive` - restore an archived thread rollout back into the active sessions directory; returns the restored `thread` and emits `thread/unarchived`.253- `thread/unarchive` - restore an archived thread rollout back into the active sessions directory; returns the restored `thread` and emits `thread/unarchived`.

254- `thread/status/changed` - notification emitted when a loaded threads runtime `status` changes.254- `thread/status/changed` - notification emitted when a loaded thread's runtime `status` changes.

255- `thread/compact/start` - trigger conversation history compaction for a thread; returns `{}` immediately while progress streams via `turn/*` and `item/*` notifications.255- `thread/compact/start` - trigger conversation history compaction for a thread; returns `{}` immediately while progress streams via `turn/*` and `item/*` notifications.

256- `thread/shellCommand` - run a user-initiated shell command against a thread. This runs outside the sandbox with full access and doesnt inherit the thread sandbox policy.256- `thread/shellCommand` - run a user-initiated shell command against a thread. This runs outside the sandbox with full access and doesn't inherit the thread sandbox policy.

257- `thread/backgroundTerminals/clean` - stop all running background terminals for a thread (experimental; requires `capabilities.experimentalApi`).257- `thread/backgroundTerminals/clean` - stop all running background terminals for a thread (experimental; requires `capabilities.experimentalApi`).

258- `thread/rollback` - drop the last N turns from the in-memory context and persist a rollback marker; returns the updated `thread`.258- `thread/rollback` - drop the last N turns from the in-memory context and persist a rollback marker; returns the updated `thread`.

259- `turn/start` - add user input to a thread and begin Codex generation; responds with the initial `turn` and streams events. For `collaborationMode`, `settings.developer_instructions: null` means use built-in instructions for the selected mode.259- `turn/start` - add user input to a thread and begin Codex generation; responds with the initial `turn` and streams events. For `collaborationMode`, `settings.developer_instructions: null` means "use built-in instructions for the selected mode."

260- `thread/inject_items` - append raw Responses API items to a loaded threads model-visible history without starting a user turn.260- `thread/inject_items` - append raw Responses API items to a loaded thread's model-visible history without starting a user turn.

261- `turn/steer` - append user input to the active in-flight turn for a thread; returns the accepted `turnId`.261- `turn/steer` - append user input to the active in-flight turn for a thread; returns the accepted `turnId`.

262- `turn/interrupt` - request cancellation of an in-flight turn; success is `{}` and the turn ends with `status: "interrupted"`.262- `turn/interrupt` - request cancellation of an in-flight turn; success is `{}` and the turn ends with `status: "interrupted"`.

263- `review/start` - kick off the Codex reviewer for a thread; emits `enteredReviewMode` and `exitedReviewMode` items.263- `review/start` - kick off the Codex reviewer for a thread; emits `enteredReviewMode` and `exitedReviewMode` items.


266- `command/exec/resize` - resize a running PTY-backed `command/exec` session.266- `command/exec/resize` - resize a running PTY-backed `command/exec` session.

267- `command/exec/terminate` - stop a running `command/exec` session.267- `command/exec/terminate` - stop a running `command/exec` session.

268- `command/exec/outputDelta` (notify) - emitted for base64-encoded stdout/stderr chunks from a streaming `command/exec` session.268- `command/exec/outputDelta` (notify) - emitted for base64-encoded stdout/stderr chunks from a streaming `command/exec` session.

269- `process/spawn` - start an explicit process session outside Codexs sandbox (experimental; requires `capabilities.experimentalApi`).269- `process/spawn` - start an explicit process session outside Codex's sandbox (experimental; requires `capabilities.experimentalApi`).

270- `process/writeStdin` - write stdin bytes to a running `process/spawn` session or close stdin (experimental).270- `process/writeStdin` - write stdin bytes to a running `process/spawn` session or close stdin (experimental).

271- `process/resizePty` - resize a running PTY-backed process session (experimental).271- `process/resizePty` - resize a running PTY-backed process session (experimental).

272- `process/kill` - terminate a running process session (experimental).272- `process/kill` - terminate a running process session (experimental).


278- `collaborationMode/list` - list collaboration mode presets (experimental, no pagination).278- `collaborationMode/list` - list collaboration mode presets (experimental, no pagination).

279- `skills/list` - list skills for one or more `cwd` values (supports `forceReload` and optional `perCwdExtraUserRoots`).279- `skills/list` - list skills for one or more `cwd` values (supports `forceReload` and optional `perCwdExtraUserRoots`).

280- `skills/changed` (notify) - emitted when watched local skill files change.280- `skills/changed` (notify) - emitted when watched local skill files change.

281- `marketplace/add` - add a remote plugin marketplace and persist it into the users marketplace config.281- `marketplace/add` - add a remote plugin marketplace and persist it into the user's marketplace config.

282- `marketplace/upgrade` - refresh a configured Git marketplace, or all configured Git marketplaces when you omit the marketplace name.282- `marketplace/upgrade` - refresh a configured Git marketplace, or all configured Git marketplaces when you omit the marketplace name.

283- `plugin/list` - list discovered plugin marketplaces and plugin state, including install/auth policy metadata, marketplace load errors, featured plugin ids, and local, Git, or remote plugin source metadata.283- `plugin/list` - list discovered plugin marketplaces and plugin state, including install/auth policy metadata, marketplace load errors, featured plugin ids, and local, Git, or remote plugin source metadata.

284- `plugin/read` - read one plugin by marketplace path or remote marketplace name and plugin name, including bundled skills, apps, and MCP server names when those details are available.284- `plugin/read` - read one plugin by marketplace path or remote marketplace name and plugin name, including bundled skills, apps, and MCP server names when those details are available.


291- `config/mcpServer/reload` - reload MCP server configuration from disk and queue a refresh for loaded threads.291- `config/mcpServer/reload` - reload MCP server configuration from disk and queue a refresh for loaded threads.

292- `mcpServerStatus/list` - list MCP servers, tools, resources, and auth status (cursor + limit pagination). Use `detail: "full"` for full data or `detail: "toolsAndAuthOnly"` to omit resources.292- `mcpServerStatus/list` - list MCP servers, tools, resources, and auth status (cursor + limit pagination). Use `detail: "full"` for full data or `detail: "toolsAndAuthOnly"` to omit resources.

293- `mcpServer/resource/read` - read a single MCP resource through an initialized MCP server.293- `mcpServer/resource/read` - read a single MCP resource through an initialized MCP server.

294- `mcpServer/tool/call` - call a tool on a threads configured MCP server.294- `mcpServer/tool/call` - call a tool on a thread's configured MCP server.

295- `mcpServer/startupStatus/updated` (notify) - emitted when a configured MCP servers startup status changes for a loaded thread.295- `mcpServer/startupStatus/updated` (notify) - emitted when a configured MCP server's startup status changes for a loaded thread.

296- `windowsSandbox/setupStart` - start Windows sandbox setup for `elevated` or `unelevated` mode; returns quickly and later emits `windowsSandbox/setupCompleted`.296- `windowsSandbox/setupStart` - start Windows sandbox setup for `elevated` or `unelevated` mode; returns quickly and later emits `windowsSandbox/setupCompleted`.

297- `feedback/upload` - submit a feedback report (classification + optional reason/logs + conversation id, plus optional `extraLogFiles` attachments).297- `feedback/upload` - submit a feedback report (classification + optional reason/logs + conversation id, plus optional `extraLogFiles` attachments).

298- `config/read` - fetch the effective configuration on disk after resolving configuration layering.298- `config/read` - fetch the effective configuration on disk after resolving configuration layering.

299- `externalAgentConfig/detect` - detect external-agent artifacts that can be migrated with `includeHome` and optional `cwds`; each detected item includes `cwd` (`null` for home).299- `externalAgentConfig/detect` - detect external-agent artifacts that can be migrated with `includeHome` and optional `cwds`; each detected item includes `cwd` (`null` for home).

300- `externalAgentConfig/import` - apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home). Supported item types include config, skills, `AGENTS.md`, plugins, MCP server config, subagents, hooks, commands, and sessions; plugin imports emit `externalAgentConfig/import/completed`.300- `externalAgentConfig/import` - apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home). Supported item types include config, skills, `AGENTS.md`, plugins, MCP server config, subagents, hooks, commands, and sessions; plugin imports emit `externalAgentConfig/import/completed`.

301- `config/value/write` - write a single configuration key/value to the users `config.toml` on disk.301- `config/value/write` - write a single configuration key/value to the user's `config.toml` on disk.

302- `config/batchWrite` - apply configuration edits atomically to the users `config.toml` on disk.302- `config/batchWrite` - apply configuration edits atomically to the user's `config.toml` on disk.

303- `configRequirements/read` - fetch requirements from `requirements.toml` and/or MDM, including allow-lists, pinned `featureRequirements`, and residency/network requirements (or `null` if you havent set any up).303- `configRequirements/read` - fetch requirements from `requirements.toml` and/or MDM, including allow-lists, pinned `featureRequirements`, and residency/network requirements (or `null` if you haven't set any up).

304- `fs/readFile`, `fs/writeFile`, `fs/createDirectory`, `fs/getMetadata`, `fs/readDirectory`, `fs/remove`, `fs/copy`, `fs/watch`, `fs/unwatch`, and `fs/changed` (notify) - operate on absolute filesystem paths through the app-server v2 filesystem API.304- `fs/readFile`, `fs/writeFile`, `fs/createDirectory`, `fs/getMetadata`, `fs/readDirectory`, `fs/remove`, `fs/copy`, `fs/watch`, `fs/unwatch`, and `fs/changed` (notify) - operate on absolute filesystem paths through the app-server v2 filesystem API.

305 305 

306Plugin summaries include a `source` union. Local plugins return306Plugin summaries include a `source` union. Local plugins return


317 317 

318Call `model/list` to discover available models and their capabilities before rendering model or personality selectors.318Call `model/list` to discover available models and their capabilities before rendering model or personality selectors.

319 319 

320```320```json

321{ "method": "model/list", "id": 6, "params": { "limit": 20, "includeHidden": false } }321{ "method": "model/list", "id": 6, "params": { "limit": 20, "includeHidden": false } }

322{ "id": 6, "result": {322{ "id": 6, "result": {

323 "data": [{323 "data": [{


357 357 

358Use this endpoint to discover feature flags with metadata and lifecycle stage:358Use this endpoint to discover feature flags with metadata and lifecycle stage:

359 359 

360```360```json

361{ "method": "experimentalFeature/list", "id": 7, "params": { "limit": 20 } }361{ "method": "experimentalFeature/list", "id": 7, "params": { "limit": 20 } }

362{ "id": 7, "result": {362{ "id": 7, "result": {

363 "data": [{363 "data": [{


378## Threads378## Threads

379 379 

380- `thread/read` reads a stored thread without subscribing to it; set `includeTurns` to include turns.380- `thread/read` reads a stored thread without subscribing to it; set `includeTurns` to include turns.

381- `thread/turns/list` pages through a stored threads turn history without381- `thread/turns/list` pages through a stored thread's turn history without

382 resuming it. Use `itemsView` to choose whether turn items are omitted,382 resuming it. Use `itemsView` to choose whether turn items are omitted,

383 summarized, or fully loaded.383 summarized, or fully loaded.

384- `thread/list` supports cursor pagination plus `modelProviders`, `sourceKinds`, `archived`, `cwd`, and `searchTerm` filtering.384- `thread/list` supports cursor pagination plus `modelProviders`, `sourceKinds`, `archived`, `cwd`, and `searchTerm` filtering.

385- `thread/loaded/list` returns the thread IDs currently in memory.385- `thread/loaded/list` returns the thread IDs currently in memory.

386- `thread/archive` moves the threads persisted JSONL log into the archived directory.386- `thread/archive` moves the thread's persisted JSONL log into the archived directory.

387- `thread/metadata/update` patches stored thread metadata, currently including persisted `gitInfo`.387- `thread/metadata/update` patches stored thread metadata, currently including persisted `gitInfo`.

388- `thread/unsubscribe` unsubscribes the current connection from a loaded thread and can trigger `thread/closed` after an inactivity grace period.388- `thread/unsubscribe` unsubscribes the current connection from a loaded thread and can trigger `thread/closed` after an inactivity grace period.

389- `thread/unarchive` restores an archived thread rollout back into the active sessions directory.389- `thread/unarchive` restores an archived thread rollout back into the active sessions directory.

390- `thread/compact/start` triggers compaction and returns `{}` immediately.390- `thread/compact/start` triggers compaction and returns `{}` immediately.

391- `thread/rollback` drops the last N turns from the in-memory context and records a rollback marker in the threads persisted JSONL log.391- `thread/rollback` drops the last N turns from the in-memory context and records a rollback marker in the thread's persisted JSONL log.

392- `thread/inject_items` appends raw Responses API items to a loaded threads model-visible history without starting a user turn.392- `thread/inject_items` appends raw Responses API items to a loaded thread's model-visible history without starting a user turn.

393 393 

394### Start or resume a thread394### Start or resume a thread

395 395 

396Start a fresh thread when you need a new Codex conversation.396Start a fresh thread when you need a new Codex conversation.

397 397 

398```398```json

399{ "method": "thread/start", "id": 10, "params": {399{ "method": "thread/start", "id": 10, "params": {

400 "model": "gpt-5.4",400 "model": "gpt-5.4",

401 "cwd": "/Users/me/project",401 "cwd": "/Users/me/project",


417{ "method": "thread/started", "params": { "thread": { "id": "thr_123" } } }417{ "method": "thread/started", "params": { "thread": { "id": "thr_123" } } }

418```418```

419 419 

420`serviceName` is optional. Set it when you want app-server to tag thread-level metrics with your integrations service name.420`serviceName` is optional. Set it when you want app-server to tag thread-level metrics with your integration's service name.

421 421 

422`thread.sessionId` identifies the current live session tree root. Root threads422`thread.sessionId` identifies the current live session tree root. Root threads

423use their own thread id as the session id; forked threads keep the session id423use their own thread id as the session id; forked threads keep the session id


426 426 

427To continue a stored session, call `thread/resume` with the `thread.id` you recorded earlier. The response shape matches `thread/start`. You can also pass the same configuration overrides supported by `thread/start`, such as `personality`:427To continue a stored session, call `thread/resume` with the `thread.id` you recorded earlier. The response shape matches `thread/start`. You can also pass the same configuration overrides supported by `thread/start`, such as `personality`:

428 428 

429```429```json

430{ "method": "thread/resume", "id": 11, "params": {430{ "method": "thread/resume", "id": 11, "params": {

431 "threadId": "thr_123",431 "threadId": "thr_123",

432 "personality": "friendly"432 "personality": "friendly"


434{ "id": 11, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes", "ephemeral": false } } }434{ "id": 11, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes", "ephemeral": false } } }

435```435```

436 436 

437Resuming a thread doesnt update `thread.updatedAt` (or the rollout files modified time) by itself. The timestamp updates when you start a turn.437Resuming a thread doesn't update `thread.updatedAt` (or the rollout file's modified time) by itself. The timestamp updates when you start a turn.

438 438 

439If you mark an enabled MCP server as `required` in config and that server fails to initialize, `thread/start` and `thread/resume` fail instead of continuing without it.439If you mark an enabled MCP server as `required` in config and that server fails to initialize, `thread/start` and `thread/resume` fail instead of continuing without it.

440 440 

441`dynamicTools` on `thread/start` is an experimental field (requires `capabilities.experimentalApi = true`). Codex persists these dynamic tools in the thread rollout metadata and restores them on `thread/resume` when you dont supply new dynamic tools.441`dynamicTools` on `thread/start` is an experimental field (requires `capabilities.experimentalApi = true`). Codex persists these dynamic tools in the thread rollout metadata and restores them on `thread/resume` when you don't supply new dynamic tools.

442 442 

443If you resume with a different model than the one recorded in the rollout, Codex emits a warning and applies a one-time model-switch instruction on the next turn.443If you resume with a different model than the one recorded in the rollout, Codex emits a warning and applies a one-time model-switch instruction on the next turn.

444 444 


447Use `thread/goal/set`, `thread/goal/get`, and `thread/goal/clear` to manage the447Use `thread/goal/set`, `thread/goal/get`, and `thread/goal/clear` to manage the

448same persisted goal state surfaced by `/goal` in the TUI.448same persisted goal state surfaced by `/goal` in the TUI.

449 449 

450```450```json

451{ "method": "thread/goal/set", "id": 13, "params": {451{ "method": "thread/goal/set", "id": 13, "params": {

452 "threadId": "thr_123",452 "threadId": "thr_123",

453 "objective": "Finish the migration and keep tests green",453 "objective": "Finish the migration and keep tests green",


482 482 

483To branch from a stored session, call `thread/fork` with the `thread.id`. This creates a new thread id and emits a `thread/started` notification for it:483To branch from a stored session, call `thread/fork` with the `thread.id`. This creates a new thread id and emits a `thread/started` notification for it:

484 484 

485```485```json

486{ "method": "thread/fork", "id": 12, "params": { "threadId": "thr_123" } }486{ "method": "thread/fork", "id": 12, "params": { "threadId": "thr_123" } }

487{ "id": 12, "result": { "thread": { "id": "thr_456", "sessionId": "thr_123", "forkedFromId": "thr_123" } } }487{ "id": 12, "result": { "thread": { "id": "thr_456", "sessionId": "thr_123", "forkedFromId": "thr_123" } } }

488{ "method": "thread/started", "params": { "thread": { "id": "thr_456" } } }488{ "method": "thread/started", "params": { "thread": { "id": "thr_456" } } }


492 492 

493### Read a stored thread (without resuming)493### Read a stored thread (without resuming)

494 494 

495Use `thread/read` when you want stored thread data but dont want to resume the thread or subscribe to its events.495Use `thread/read` when you want stored thread data but don't want to resume the thread or subscribe to its events.

496 496 

497- `includeTurns` - when `true`, the response includes the threads turns; when `false` or omitted, you get the thread summary only.497- `includeTurns` - when `true`, the response includes the thread's turns; when `false` or omitted, you get the thread summary only.

498- Returned `thread` objects include runtime `status` (`notLoaded`, `idle`, `systemError`, or `active` with `activeFlags`).498- Returned `thread` objects include runtime `status` (`notLoaded`, `idle`, `systemError`, or `active` with `activeFlags`).

499 499 

500```500```json

501{ "method": "thread/read", "id": 19, "params": { "threadId": "thr_123", "includeTurns": true } }501{ "method": "thread/read", "id": 19, "params": { "threadId": "thr_123", "includeTurns": true } }

502{ "id": 19, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes", "ephemeral": false, "status": { "type": "notLoaded" }, "turns": [] } } }502{ "id": 19, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes", "ephemeral": false, "status": { "type": "notLoaded" }, "turns": [] } } }

503```503```

504 504 

505Unlike `thread/resume`, `thread/read` doesnt load the thread into memory or emit `thread/started`.505Unlike `thread/resume`, `thread/read` doesn't load the thread into memory or emit `thread/started`.

506 506 

507### List thread turns507### List thread turns

508 508 

509Use `thread/turns/list` to page a stored threads turn history without resuming it. Results default to newest-first so clients can fetch older turns with `nextCursor`. The response also includes `backwardsCursor`; pass it as `cursor` with `sortDirection: "asc"` to fetch turns newer than the first item from the earlier page.509Use `thread/turns/list` to page a stored thread's turn history without resuming it. Results default to newest-first so clients can fetch older turns with `nextCursor`. The response also includes `backwardsCursor`; pass it as `cursor` with `sortDirection: "asc"` to fetch turns newer than the first item from the earlier page.

510 510 

511`itemsView` controls how much turn-item data the response includes:511`itemsView` controls how much turn-item data the response includes:

512 512 


514- `summary` returns summarized item data and is the default when omitted.514- `summary` returns summarized item data and is the default when omitted.

515- `full` returns full item data.515- `full` returns full item data.

516 516 

517```517```json

518{ "method": "thread/turns/list", "id": 20, "params": {518{ "method": "thread/turns/list", "id": 20, "params": {

519 "threadId": "thr_123",519 "threadId": "thr_123",

520 "limit": 50,520 "limit": 50,


559 559 

560Example:560Example:

561 561 

562```562```json

563{ "method": "thread/list", "id": 20, "params": {563{ "method": "thread/list", "id": 20, "params": {

564 "cursor": null,564 "cursor": null,

565 "limit": 25,565 "limit": 25,


580 580 

581Use `thread/metadata/update` to patch stored thread metadata without resuming the thread. Today this supports persisted `gitInfo`; omitted fields are left unchanged, and explicit `null` clears a stored value.581Use `thread/metadata/update` to patch stored thread metadata without resuming the thread. Today this supports persisted `gitInfo`; omitted fields are left unchanged, and explicit `null` clears a stored value.

582 582 

583```583```json

584{ "method": "thread/metadata/update", "id": 21, "params": {584{ "method": "thread/metadata/update", "id": 21, "params": {

585 "threadId": "thr_123",585 "threadId": "thr_123",

586 "gitInfo": { "branch": "feature/sidebar-pr" }586 "gitInfo": { "branch": "feature/sidebar-pr" }


595 595 

596### Track thread status changes596### Track thread status changes

597 597 

598`thread/status/changed` is emitted whenever a loaded threads runtime status changes. The payload includes `threadId` and the new `status`.598`thread/status/changed` is emitted whenever a loaded thread's runtime status changes. The payload includes `threadId` and the new `status`.

599 599 

600```600```json

601{601{

602 "method": "thread/status/changed",602 "method": "thread/status/changed",

603 "params": {603 "params": {


611 611 

612`thread/loaded/list` returns thread IDs currently loaded in memory.612`thread/loaded/list` returns thread IDs currently loaded in memory.

613 613 

614```614```json

615{ "method": "thread/loaded/list", "id": 21 }615{ "method": "thread/loaded/list", "id": 21 }

616{ "id": 21, "result": { "data": ["thr_123", "thr_456"] } }616{ "id": 21, "result": { "data": ["thr_123", "thr_456"] } }

617```617```

618 618 

619### Unsubscribe from a loaded thread619### Unsubscribe from a loaded thread

620 620 

621`thread/unsubscribe` removes the current connections subscription to a thread. The response status is one of:621`thread/unsubscribe` removes the current connection's subscription to a thread. The response status is one of:

622 622 

623- `unsubscribed` when the connection was subscribed and is now removed.623- `unsubscribed` when the connection was subscribed and is now removed.

624- `notSubscribed` when the connection wasnt subscribed to that thread.624- `notSubscribed` when the connection wasn't subscribed to that thread.

625- `notLoaded` when the thread isnt loaded.625- `notLoaded` when the thread isn't loaded.

626 626 

627If this was the last subscriber, the server keeps the thread loaded until it has no subscribers and no thread activity for 30 minutes. When the grace period expires, app-server unloads the thread and emits a `thread/status/changed` transition to `notLoaded` plus `thread/closed`.627If this was the last subscriber, the server keeps the thread loaded until it has no subscribers and no thread activity for 30 minutes. When the grace period expires, app-server unloads the thread and emits a `thread/status/changed` transition to `notLoaded` plus `thread/closed`.

628 628 

629```629```json

630{ "method": "thread/unsubscribe", "id": 22, "params": { "threadId": "thr_123" } }630{ "method": "thread/unsubscribe", "id": 22, "params": { "threadId": "thr_123" } }

631{ "id": 22, "result": { "status": "unsubscribed" } }631{ "id": 22, "result": { "status": "unsubscribed" } }

632```632```

633 633 

634If the thread later expires:634If the thread later expires:

635 635 

636```636```json

637{ "method": "thread/status/changed", "params": {637{ "method": "thread/status/changed", "params": {

638 "threadId": "thr_123",638 "threadId": "thr_123",

639 "status": { "type": "notLoaded" }639 "status": { "type": "notLoaded" }


645 645 

646Use `thread/archive` to move the persisted thread log (stored as a JSONL file on disk) into the archived sessions directory.646Use `thread/archive` to move the persisted thread log (stored as a JSONL file on disk) into the archived sessions directory.

647 647 

648```648```json

649{ "method": "thread/archive", "id": 22, "params": { "threadId": "thr_b" } }649{ "method": "thread/archive", "id": 22, "params": { "threadId": "thr_b" } }

650{ "id": 22, "result": {} }650{ "id": 22, "result": {} }

651{ "method": "thread/archived", "params": { "threadId": "thr_b" } }651{ "method": "thread/archived", "params": { "threadId": "thr_b" } }

652```652```

653 653 

654Archived threads wont appear in future calls to `thread/list` unless you pass `archived: true`.654Archived threads won't appear in future calls to `thread/list` unless you pass `archived: true`.

655 655 

656### Unarchive a thread656### Unarchive a thread

657 657 

658Use `thread/unarchive` to move an archived thread rollout back into the active sessions directory.658Use `thread/unarchive` to move an archived thread rollout back into the active sessions directory.

659 659 

660```660```json

661{ "method": "thread/unarchive", "id": 24, "params": { "threadId": "thr_b" } }661{ "method": "thread/unarchive", "id": 24, "params": { "threadId": "thr_b" } }

662{ "id": 24, "result": { "thread": { "id": "thr_b", "name": "Bug bash notes" } } }662{ "id": 24, "result": { "thread": { "id": "thr_b", "name": "Bug bash notes" } } }

663{ "method": "thread/unarchived", "params": { "threadId": "thr_b" } }663{ "method": "thread/unarchived", "params": { "threadId": "thr_b" } }


669 669 

670App-server emits progress as standard `turn/*` and `item/*` notifications on the same `threadId`, including a `contextCompaction` item lifecycle (`item/started` then `item/completed`).670App-server emits progress as standard `turn/*` and `item/*` notifications on the same `threadId`, including a `contextCompaction` item lifecycle (`item/started` then `item/completed`).

671 671 

672```672```json

673{ "method": "thread/compact/start", "id": 25, "params": { "threadId": "thr_b" } }673{ "method": "thread/compact/start", "id": 25, "params": { "threadId": "thr_b" } }

674{ "id": 25, "result": {} }674{ "id": 25, "result": {} }

675```675```


678 678 

679Use `thread/shellCommand` for user-initiated shell commands that belong to a thread. The request returns immediately with `{}` while progress streams through standard `turn/*` and `item/*` notifications.679Use `thread/shellCommand` for user-initiated shell commands that belong to a thread. The request returns immediately with `{}` while progress streams through standard `turn/*` and `item/*` notifications.

680 680 

681This API runs outside the sandbox with full access and doesnt inherit the thread sandbox policy. Clients should expose it only for explicit user-initiated commands.681This API runs outside the sandbox with full access and doesn't inherit the thread sandbox policy. Clients should expose it only for explicit user-initiated commands.

682 682 

683If the thread already has an active turn, the command runs as an auxiliary action on that turn and its formatted output is injected into the turns message stream. If the thread is idle, app-server starts a standalone turn for the shell command.683If the thread already has an active turn, the command runs as an auxiliary action on that turn and its formatted output is injected into the turn's message stream. If the thread is idle, app-server starts a standalone turn for the shell command.

684 684 

685```685```json

686{ "method": "thread/shellCommand", "id": 26, "params": { "threadId": "thr_b", "command": "git status --short" } }686{ "method": "thread/shellCommand", "id": 26, "params": { "threadId": "thr_b", "command": "git status --short" } }

687{ "id": 26, "result": {} }687{ "id": 26, "result": {} }

688```688```


691 691 

692Use `thread/backgroundTerminals/clean` to stop all running background terminals associated with a thread. This method is experimental and requires `capabilities.experimentalApi = true`.692Use `thread/backgroundTerminals/clean` to stop all running background terminals associated with a thread. This method is experimental and requires `capabilities.experimentalApi = true`.

693 693 

694```694```json

695{ "method": "thread/backgroundTerminals/clean", "id": 27, "params": { "threadId": "thr_b" } }695{ "method": "thread/backgroundTerminals/clean", "id": 27, "params": { "threadId": "thr_b" } }

696{ "id": 27, "result": {} }696{ "id": 27, "result": {} }

697```697```


700 700 

701Use `thread/rollback` to remove the last `numTurns` entries from the in-memory context and persist a rollback marker in the rollout log. The returned `thread` includes `turns` populated after the rollback.701Use `thread/rollback` to remove the last `numTurns` entries from the in-memory context and persist a rollback marker in the rollout log. The returned `thread` includes `turns` populated after the rollback.

702 702 

703```703```json

704{ "method": "thread/rollback", "id": 28, "params": { "threadId": "thr_b", "numTurns": 1 } }704{ "method": "thread/rollback", "id": 28, "params": { "threadId": "thr_b", "numTurns": 1 } }

705{ "id": 28, "result": { "thread": { "id": "thr_b", "name": "Bug bash notes", "ephemeral": false } } }705{ "id": 28, "result": { "thread": { "id": "thr_b", "name": "Bug bash notes", "ephemeral": false } } }

706```706```


715 715 

716You can override configuration settings per turn (model, effort, personality, `cwd`, sandbox policy, summary). When specified, these settings become the defaults for later turns on the same thread. `outputSchema` applies only to the current turn. For `sandboxPolicy.type = "externalSandbox"`, set `networkAccess` to `restricted` or `enabled`; for `workspaceWrite`, `networkAccess` remains a boolean.716You can override configuration settings per turn (model, effort, personality, `cwd`, sandbox policy, summary). When specified, these settings become the defaults for later turns on the same thread. `outputSchema` applies only to the current turn. For `sandboxPolicy.type = "externalSandbox"`, set `networkAccess` to `restricted` or `enabled`; for `workspaceWrite`, `networkAccess` remains a boolean.

717 717 

718For `turn/start.collaborationMode`, `settings.developer_instructions: null` means use built-in instructions for the selected mode rather than clearing mode instructions.718For `turn/start.collaborationMode`, `settings.developer_instructions: null` means "use built-in instructions for the selected mode" rather than clearing mode instructions.

719 719 

720### Sandbox read access (`ReadOnlyAccess`)720### Sandbox read access (`ReadOnlyAccess`)

721 721 


726 726 

727Restricted read access shape:727Restricted read access shape:

728 728 

729```729```json

730{730{

731 "type": "restricted",731 "type": "restricted",

732 "includePlatformDefaults": true,732 "includePlatformDefaults": true,


738 738 

739Examples:739Examples:

740 740 

741```741```json

742{ "type": "readOnly", "access": { "type": "fullAccess" } }742{ "type": "readOnly", "access": { "type": "fullAccess" } }

743```743```

744 744 

745```745```json

746{746{

747 "type": "workspaceWrite",747 "type": "workspaceWrite",

748 "writableRoots": ["/Users/me/project"],748 "writableRoots": ["/Users/me/project"],


757 757 

758### Start a turn758### Start a turn

759 759 

760```760```json

761{ "method": "turn/start", "id": 30, "params": {761{ "method": "turn/start", "id": 30, "params": {

762 "threadId": "thr_123",762 "threadId": "thr_123",

763 "input": [ { "type": "text", "text": "Run tests" } ],763 "input": [ { "type": "text", "text": "Run tests" } ],


784 784 

785### Inject items into a thread785### Inject items into a thread

786 786 

787Use `thread/inject_items` to append prebuilt Responses API items to a loaded threads prompt history without starting a user turn. These items are persisted to the rollout and included in subsequent model requests.787Use `thread/inject_items` to append prebuilt Responses API items to a loaded thread's prompt history without starting a user turn. These items are persisted to the rollout and included in subsequent model requests.

788 788 

789```789```json

790{ "method": "thread/inject_items", "id": 31, "params": {790{ "method": "thread/inject_items", "id": 31, "params": {

791 "threadId": "thr_123",791 "threadId": "thr_123",

792 "items": [792 "items": [


806 806 

807- Include `expectedTurnId`; it must match the active turn id.807- Include `expectedTurnId`; it must match the active turn id.

808- The request fails if there is no active turn on the thread.808- The request fails if there is no active turn on the thread.

809- `turn/steer` doesnt emit a new `turn/started` notification.809- `turn/steer` doesn't emit a new `turn/started` notification.

810- `turn/steer` doesnt accept turn-level overrides (`model`, `cwd`, `sandboxPolicy`, or `outputSchema`).810- `turn/steer` doesn't accept turn-level overrides (`model`, `cwd`, `sandboxPolicy`, or `outputSchema`).

811 811 

812```812```json

813{ "method": "turn/steer", "id": 32, "params": {813{ "method": "turn/steer", "id": 32, "params": {

814 "threadId": "thr_123",814 "threadId": "thr_123",

815 "input": [ { "type": "text", "text": "Actually focus on failing tests first." } ],815 "input": [ { "type": "text", "text": "Actually focus on failing tests first." } ],


822 822 

823Invoke a skill explicitly by including `$<skill-name>` in the text input and adding a `skill` input item alongside it.823Invoke a skill explicitly by including `$<skill-name>` in the text input and adding a `skill` input item alongside it.

824 824 

825```825```json

826{ "method": "turn/start", "id": 33, "params": {826{ "method": "turn/start", "id": 33, "params": {

827 "threadId": "thr_123",827 "threadId": "thr_123",

828 "input": [828 "input": [


835 835 

836### Interrupt a turn836### Interrupt a turn

837 837 

838```838```json

839{ "method": "turn/interrupt", "id": 31, "params": { "threadId": "thr_123", "turnId": "turn_456" } }839{ "method": "turn/interrupt", "id": 31, "params": { "threadId": "thr_123", "turnId": "turn_456" } }

840{ "id": 31, "result": {} }840{ "id": 31, "result": {} }

841```841```


855 855 

856Example request/response:856Example request/response:

857 857 

858```858```json

859{ "method": "review/start", "id": 40, "params": {859{ "method": "review/start", "id": 40, "params": {

860 "threadId": "thr_123",860 "threadId": "thr_123",

861 "delivery": "inline",861 "delivery": "inline",


878 878 

879Codex streams the usual `turn/started` notification followed by an `item/started` with an `enteredReviewMode` item:879Codex streams the usual `turn/started` notification followed by an `item/started` with an `enteredReviewMode` item:

880 880 

881```881```json

882{882{

883 "method": "item/started",883 "method": "item/started",

884 "params": {884 "params": {


893 893 

894When the reviewer finishes, the server emits `item/started` and `item/completed` containing an `exitedReviewMode` item with the final review text:894When the reviewer finishes, the server emits `item/started` and `item/completed` containing an `exitedReviewMode` item with the final review text:

895 895 

896```896```json

897{897{

898 "method": "item/completed",898 "method": "item/completed",

899 "params": {899 "params": {


911## Process execution911## Process execution

912 912 

913`process/*` is an experimental, explicit process-control API. It requires913`process/*` is an experimental, explicit process-control API. It requires

914`capabilities.experimentalApi = true` and runs outside Codexs sandbox. Use it914`capabilities.experimentalApi = true` and runs outside Codex's sandbox. Use it

915only when your client intentionally exposes local process control without a915only when your client intentionally exposes local process control without a

916sandbox.916sandbox.

917 917 


920`process/outputDelta` notifications and completion streams through920`process/outputDelta` notifications and completion streams through

921`process/exited`.921`process/exited`.

922 922 

923```923```json

924{ "method": "process/spawn", "id": 48, "params": {924{ "method": "process/spawn", "id": 48, "params": {

925 "command": ["python3", "-m", "pytest", "-q"],925 "command": ["python3", "-m", "pytest", "-q"],

926 "processHandle": "pytest-1",926 "processHandle": "pytest-1",


947 947 

948`command/exec` runs a single command (`argv` array) under the server sandbox without creating a thread.948`command/exec` runs a single command (`argv` array) under the server sandbox without creating a thread.

949 949 

950```950```json

951{ "method": "command/exec", "id": 50, "params": {951{ "method": "command/exec", "id": 50, "params": {

952 "command": ["ls", "-la"],952 "command": ["ls", "-la"],

953 "cwd": "/Users/me/project",953 "cwd": "/Users/me/project",


971 971 

972Use `configRequirements/read` to inspect the effective admin requirements loaded from `requirements.toml` and/or MDM.972Use `configRequirements/read` to inspect the effective admin requirements loaded from `requirements.toml` and/or MDM.

973 973 

974```974```json

975{ "method": "configRequirements/read", "id": 52, "params": {} }975{ "method": "configRequirements/read", "id": 52, "params": {} }

976{ "id": 52, "result": {976{ "id": 52, "result": {

977 "requirements": {977 "requirements": {


997 997 

998Custom Windows clients can trigger sandbox setup asynchronously instead of blocking on startup checks.998Custom Windows clients can trigger sandbox setup asynchronously instead of blocking on startup checks.

999 999 

1000```1000```json

1001{ "method": "windowsSandbox/setupStart", "id": 53, "params": { "mode": "elevated" } }1001{ "method": "windowsSandbox/setupStart", "id": 53, "params": { "mode": "elevated" } }

1002{ "id": 53, "result": { "started": true } }1002{ "id": 53, "result": { "started": true } }

1003```1003```

1004 1004 

1005App-server starts setup in the background and later emits a completion notification:1005App-server starts setup in the background and later emits a completion notification:

1006 1006 

1007```1007```json

1008{1008{

1009 "method": "windowsSandbox/setupCompleted",1009 "method": "windowsSandbox/setupCompleted",

1010 "params": { "mode": "elevated", "success": true, "error": null }1010 "params": { "mode": "elevated", "success": true, "error": null }


1020 1020 

1021The v2 filesystem APIs operate on absolute paths. Use `fs/watch` when a client needs to invalidate UI state after a file or directory changes.1021The v2 filesystem APIs operate on absolute paths. Use `fs/watch` when a client needs to invalidate UI state after a file or directory changes.

1022 1022 

1023```1023```json

1024{ "method": "fs/watch", "id": 54, "params": {1024{ "method": "fs/watch", "id": 54, "params": {

1025 "watchId": "0195ec6b-1d6f-7c2e-8c7a-56f2c4a8b9d1",1025 "watchId": "0195ec6b-1d6f-7c2e-8c7a-56f2c4a8b9d1",

1026 "path": "/Users/me/project/.git/HEAD"1026 "path": "/Users/me/project/.git/HEAD"


1049- Exact-match only: `item/agentMessage/delta` suppresses only that method.1049- Exact-match only: `item/agentMessage/delta` suppresses only that method.

1050- Unknown method names are ignored.1050- Unknown method names are ignored.

1051- Applies to the current `thread/*`, `turn/*`, `item/*`, and related v2 notifications.1051- Applies to the current `thread/*`, `turn/*`, `item/*`, and related v2 notifications.

1052- Doesnt apply to requests, responses, or errors.1052- Doesn't apply to requests, responses, or errors.

1053 1053 

1054### Fuzzy file search events (experimental)1054### Fuzzy file search events (experimental)

1055 1055 


1128 1128 

1129## Approvals1129## Approvals

1130 1130 

1131Depending on a users Codex settings, command execution and file changes may require approval. The app-server sends a server-initiated JSON-RPC request to the client, and the client responds with a decision payload.1131Depending on a user's Codex settings, command execution and file changes may require approval. The app-server sends a server-initiated JSON-RPC request to the client, and the client responds with a decision payload.

1132 1132 

1133- Command execution decisions: `accept`, `acceptForSession`, `decline`, `cancel`, or `{ "acceptWithExecpolicyAmendment": { "execpolicy_amendment": ["cmd", "..."] } }`.1133- Command execution decisions: `accept`, `acceptForSession`, `decline`, `cancel`, or `{ "acceptWithExecpolicyAmendment": { "execpolicy_amendment": ["cmd", "..."] } }`.

1134- File change decisions: `accept`, `acceptForSession`, `decline`, `cancel`.1134- File change decisions: `accept`, `acceptForSession`, `decline`, `cancel`.


1185 1186 

1186Invoke a skill by including `$<skill-name>` in the user text input. Add a `skill` input item (recommended) so the server injects full skill instructions instead of relying on the model to resolve the name.1187Invoke a skill by including `$<skill-name>` in the user text input. Add a `skill` input item (recommended) so the server injects full skill instructions instead of relying on the model to resolve the name.

1187 1188 

1188```1189```json

1189{1190{

1190 "method": "turn/start",1191 "method": "turn/start",

1191 "id": 101,1192 "id": 101,


1214$skill-creator Add a new skill for triaging flaky CI and include step-by-step usage.1215$skill-creator Add a new skill for triaging flaky CI and include step-by-step usage.

1215```1216```

1216 1217 

1217Use `skills/list` to fetch available skills (optionally scoped by `cwds`, with `forceReload`). You can also include `perCwdExtraUserRoots` to scan extra absolute paths as `user` scope for specific `cwd` values. App-server ignores entries whose `cwd` isnt present in `cwds`. `skills/list` may reuse a cached result per `cwd`; set `forceReload: true` to refresh from disk. When present, the server reads `interface` and `dependencies` from `SKILL.json`.1218Use `skills/list` to fetch available skills (optionally scoped by `cwds`, with `forceReload`). You can also include `perCwdExtraUserRoots` to scan extra absolute paths as `user` scope for specific `cwd` values. App-server ignores entries whose `cwd` isn't present in `cwds`. `skills/list` may reuse a cached result per `cwd`; set `forceReload: true` to refresh from disk. When present, the server reads `interface` and `dependencies` from `SKILL.json`.

1218 1219 

1219```1220```json

1220{ "method": "skills/list", "id": 25, "params": {1221{ "method": "skills/list", "id": 25, "params": {

1221 "cwds": ["/Users/me/project", "/Users/me/other-project"],1222 "cwds": ["/Users/me/project", "/Users/me/other-project"],

1222 "forceReload": true,1223 "forceReload": true,


1265 1266 

1266To enable or disable a skill by path:1267To enable or disable a skill by path:

1267 1268 

1268```1269```json

1269{1270{

1270 "method": "skills/config/write",1271 "method": "skills/config/write",

1271 "id": 26,1272 "id": 26,


1280 1281 

1281Use `app/list` to fetch available apps. In the CLI/TUI, `/apps` is the user-facing picker; in custom clients, call `app/list` directly. Each entry includes both `isAccessible` (available to the user) and `isEnabled` (enabled in `config.toml`) so clients can distinguish install/access from local enabled state. App entries can also include optional `branding`, `appMetadata`, and `labels` fields.1282Use `app/list` to fetch available apps. In the CLI/TUI, `/apps` is the user-facing picker; in custom clients, call `app/list` directly. Each entry includes both `isAccessible` (available to the user) and `isEnabled` (enabled in `config.toml`) so clients can distinguish install/access from local enabled state. App entries can also include optional `branding`, `appMetadata`, and `labels` fields.

1282 1283 

1283```1284```json

1284{ "method": "app/list", "id": 50, "params": {1285{ "method": "app/list", "id": 50, "params": {

1285 "cursor": null,1286 "cursor": null,

1286 "limit": 50,1287 "limit": 50,


1308} }1309} }

1309```1310```

1310 1311 

1311If you provide `threadId`, app feature gating (`features.apps`) uses that threads config snapshot. When omitted, app-server uses the latest global config.1312If you provide `threadId`, app feature gating (`features.apps`) uses that thread's config snapshot. When omitted, app-server uses the latest global config.

1312 1313 

1313`app/list` returns after both accessible apps and directory apps load. Set `forceRefetch: true` to bypass app caches and fetch fresh data. Cache entries are only replaced when refreshes succeed.1314`app/list` returns after both accessible apps and directory apps load. Set `forceRefetch: true` to bypass app caches and fetch fresh data. Cache entries are only replaced when refreshes succeed.

1314 1315 

1315The server also emits `app/list/updated` notifications whenever either source (accessible apps or directory apps) finishes loading. Each notification includes the latest merged app list.1316The server also emits `app/list/updated` notifications whenever either source (accessible apps or directory apps) finishes loading. Each notification includes the latest merged app list.

1316 1317 

1317```1318```json

1318{1319{

1319 "method": "app/list/updated",1320 "method": "app/list/updated",

1320 "params": {1321 "params": {


1340 1341 

1341Invoke an app by inserting `$<app-slug>` in the text input and adding a `mention` input item with the `app://<id>` path (recommended).1342Invoke an app by inserting `$<app-slug>` in the text input and adding a `mention` input item with the `app://<id>` path (recommended).

1342 1343 

1343```1344```json

1344{1345{

1345 "method": "turn/start",1346 "method": "turn/start",

1346 "id": 51,1347 "id": 51,


1367 1368 

1368Read the effective app config shape (including `_default` and per-tool overrides):1369Read the effective app config shape (including `_default` and per-tool overrides):

1369 1370 

1370```1371```json

1371{ "method": "config/read", "id": 60, "params": { "includeLayers": false } }1372{ "method": "config/read", "id": 60, "params": { "includeLayers": false } }

1372{ "id": 60, "result": {1373{ "id": 60, "result": {

1373 "config": {1374 "config": {


1392 1393 

1393Update a single app setting:1394Update a single app setting:

1394 1395 

1395```1396```json

1396{1397{

1397 "method": "config/value/write",1398 "method": "config/value/write",

1398 "id": 61,1399 "id": 61,


1406 1407 

1407Apply multiple app edits atomically:1408Apply multiple app edits atomically:

1408 1409 

1409```1410```json

1410{1411{

1411 "method": "config/batchWrite",1412 "method": "config/batchWrite",

1412 "id": 62,1413 "id": 62,


1433 1434 

1434Detection example:1435Detection example:

1435 1436 

1436```1437```json

1437{ "method": "externalAgentConfig/detect", "id": 63, "params": {1438{ "method": "externalAgentConfig/detect", "id": 63, "params": {

1438 "includeHome": true,1439 "includeHome": true,

1439 "cwds": ["/Users/me/project"]1440 "cwds": ["/Users/me/project"]


1456 1457 

1457Import example:1458Import example:

1458 1459 

1459```1460```json

1460{ "method": "externalAgentConfig/import", "id": 64, "params": {1461{ "method": "externalAgentConfig/import", "id": 64, "params": {

1461 "migrationItems": [1462 "migrationItems": [

1462 {1463 {


1476`marketplaceName` and the `pluginNames` Codex can try to migrate. Detection1477`marketplaceName` and the `pluginNames` Codex can try to migrate. Detection

1477returns only items that still have work to do. For example, Codex skips AGENTS1478returns only items that still have work to do. For example, Codex skips AGENTS

1478migration when `AGENTS.md` already exists and is non-empty, and skill imports1479migration when `AGENTS.md` already exists and is non-empty, and skill imports

1479dont overwrite existing skill directories.1480don't overwrite existing skill directories.

1480 1481 

1481When detecting plugins from `.claude/settings.json`, Codex reads configured1482When detecting plugins from `.claude/settings.json`, Codex reads configured

1482marketplace sources from `extraKnownMarketplaces`. If `enabledPlugins` contains1483marketplace sources from `extraKnownMarketplaces`. If `enabledPlugins` contains


1493 1494 

1494- **API key (`apikey`)** - the caller supplies an OpenAI API key with `type: "apiKey"`, and Codex stores it for API requests.1495- **API key (`apikey`)** - the caller supplies an OpenAI API key with `type: "apiKey"`, and Codex stores it for API requests.

1495- **ChatGPT managed (`chatgpt`)** - Codex owns the ChatGPT OAuth flow, persists tokens, and refreshes them automatically. Start with `type: "chatgpt"` for the browser flow or `type: "chatgptDeviceCode"` for the device-code flow.1496- **ChatGPT managed (`chatgpt`)** - Codex owns the ChatGPT OAuth flow, persists tokens, and refreshes them automatically. Start with `type: "chatgpt"` for the browser flow or `type: "chatgptDeviceCode"` for the device-code flow.

1496- **ChatGPT external tokens (`chatgptAuthTokens`)** - experimental and intended for host apps that already own the users ChatGPT auth lifecycle. The host app supplies an `accessToken`, `chatgptAccountId`, and optional `chatgptPlanType` directly, and must refresh the token when asked.1497- **ChatGPT external tokens (`chatgptAuthTokens`)** - experimental and intended for host apps that already own the user's ChatGPT auth lifecycle. The host app supplies an `accessToken`, `chatgptAccountId`, and optional `chatgptPlanType` directly, and must refresh the token when asked.

1497 1498 

1498### API overview1499### API overview

1499 1500 


1505- `account/updated` (notify) - emitted whenever auth mode changes (`authMode`: `apikey`, `chatgpt`, `chatgptAuthTokens`, or `null`) and includes `planType` when available.1506- `account/updated` (notify) - emitted whenever auth mode changes (`authMode`: `apikey`, `chatgpt`, `chatgptAuthTokens`, or `null`) and includes `planType` when available.

1506- `account/chatgptAuthTokens/refresh` (server request) - request fresh externally managed ChatGPT tokens after an authorization error.1507- `account/chatgptAuthTokens/refresh` (server request) - request fresh externally managed ChatGPT tokens after an authorization error.

1507- `account/rateLimits/read` - fetch ChatGPT rate limits.1508- `account/rateLimits/read` - fetch ChatGPT rate limits.

1508- `account/rateLimits/updated` (notify) - emitted whenever a users ChatGPT rate limits change.1509- `account/rateLimits/updated` (notify) - emitted whenever a user's ChatGPT rate limits change.

1509- `account/sendAddCreditsNudgeEmail` - ask ChatGPT to email a workspace owner about depleted credits or a reached usage limit.1510- `account/sendAddCreditsNudgeEmail` - ask ChatGPT to email a workspace owner about depleted credits or a reached usage limit.

1510- `mcpServer/oauthLogin/completed` (notify) - emitted after a `mcpServer/oauth/login` flow finishes; payload includes `{ name, success, error? }`.1511- `mcpServer/oauthLogin/completed` (notify) - emitted after a `mcpServer/oauth/login` flow finishes; payload includes `{ name, success, error? }`.

1511- `mcpServer/startupStatus/updated` (notify) - emitted when a configured MCP servers startup status changes for a loaded thread; payload includes `{ name, status, error }`.1512- `mcpServer/startupStatus/updated` (notify) - emitted when a configured MCP server's startup status changes for a loaded thread; payload includes `{ name, status, error }`.

1512 1513 

1513### 1) Check auth state1514### 1) Check auth state

1514 1515 

1515Request:1516Request:

1516 1517 

1517```1518```json

1518{ "method": "account/read", "id": 1, "params": { "refreshToken": false } }1519{ "method": "account/read", "id": 1, "params": { "refreshToken": false } }

1519```1520```

1520 1521 

1521Response examples:1522Response examples:

1522 1523 

1523```1524```json

1524{ "id": 1, "result": { "account": null, "requiresOpenaiAuth": false } }1525{ "id": 1, "result": { "account": null, "requiresOpenaiAuth": false } }

1525```1526```

1526 1527 

1527```1528```json

1528{ "id": 1, "result": { "account": null, "requiresOpenaiAuth": true } }1529{ "id": 1, "result": { "account": null, "requiresOpenaiAuth": true } }

1529```1530```

1530 1531 

1531```1532```json

1532{1533{

1533 "id": 1,1534 "id": 1,

1534 "result": { "account": { "type": "apiKey" }, "requiresOpenaiAuth": true }1535 "result": { "account": { "type": "apiKey" }, "requiresOpenaiAuth": true }

1535}1536}

1536```1537```

1537 1538 

1538```1539```json

1539{1540{

1540 "id": 1,1541 "id": 1,

1541 "result": {1542 "result": {


1558 1559 

15591. Send:15601. Send:

1560 1561 

1561 ```1562 ```json

1562 {1563 {

1563 "method": "account/login/start",1564 "method": "account/login/start",

1564 "id": 2,1565 "id": 2,

1565 "params": { "type": "apiKey", "apiKey": "sk-..." }1566 "params": { "type": "apiKey", "apiKey": "sk-..." }

1566 }1567 }

1567 ```1568 ```

1569 

15682. Expect:15702. Expect:

1569 1571 

1570 ```1572 ```json

1571 { "id": 2, "result": { "type": "apiKey" } }1573 { "id": 2, "result": { "type": "apiKey" } }

1572 ```1574 ```

1575 

15733. Notifications:15763. Notifications:

1574 1577 

1575 ```1578 ```json

1576 {1579 {

1577 "method": "account/login/completed",1580 "method": "account/login/completed",

1578 "params": { "loginId": null, "success": true, "error": null }1581 "params": { "loginId": null, "success": true, "error": null }

1579 }1582 }

1580 ```1583 ```

1581 1584 

1582 ```1585 ```json

1583 {1586 {

1584 "method": "account/updated",1587 "method": "account/updated",

1585 "params": { "authMode": "apikey", "planType": null }1588 "params": { "authMode": "apikey", "planType": null }


1590 1593 

15911. Start:15941. Start:

1592 1595 

1593 ```1596 ```json

1594 { "method": "account/login/start", "id": 3, "params": { "type": "chatgpt" } }1597 { "method": "account/login/start", "id": 3, "params": { "type": "chatgpt" } }

1595 ```1598 ```

1596 1599 

1597 ```1600 ```json

1598 {1601 {

1599 "id": 3,1602 "id": 3,

1600 "result": {1603 "result": {


16072. Open `authUrl` in a browser; the app-server hosts the local callback.16112. Open `authUrl` in a browser; the app-server hosts the local callback.

16083. Wait for notifications:16123. Wait for notifications:

1609 1613 

1610 ```1614 ```json

1611 {1615 {

1612 "method": "account/login/completed",1616 "method": "account/login/completed",

1613 "params": { "loginId": "<uuid>", "success": true, "error": null }1617 "params": { "loginId": "<uuid>", "success": true, "error": null }

1614 }1618 }

1615 ```1619 ```

1616 1620 

1617 ```1621 ```json

1618 {1622 {

1619 "method": "account/updated",1623 "method": "account/updated",

1620 "params": { "authMode": "chatgpt", "planType": "plus" }1624 "params": { "authMode": "chatgpt", "planType": "plus" }


1627 1631 

16281. Start:16321. Start:

1629 1633 

1630 ```1634 ```json

1631 {1635 {

1632 "method": "account/login/start",1636 "method": "account/login/start",

1633 "id": 4,1637 "id": 4,


1635 }1639 }

1636 ```1640 ```

1637 1641 

1638 ```1642 ```json

1639 {1643 {

1640 "id": 4,1644 "id": 4,

1641 "result": {1645 "result": {


16492. Show `verificationUrl` and `userCode` to the user; the frontend owns the UX.16542. Show `verificationUrl` and `userCode` to the user; the frontend owns the UX.

16503. Wait for notifications:16553. Wait for notifications:

1651 1656 

1652 ```1657 ```json

1653 {1658 {

1654 "method": "account/login/completed",1659 "method": "account/login/completed",

1655 "params": { "loginId": "<uuid>", "success": true, "error": null }1660 "params": { "loginId": "<uuid>", "success": true, "error": null }

1656 }1661 }

1657 ```1662 ```

1658 1663 

1659 ```1664 ```json

1660 {1665 {

1661 "method": "account/updated",1666 "method": "account/updated",

1662 "params": { "authMode": "chatgpt", "planType": "plus" }1667 "params": { "authMode": "chatgpt", "planType": "plus" }


1665 1670 

1666### 3c) Log in with externally managed ChatGPT tokens (`chatgptAuthTokens`)1671### 3c) Log in with externally managed ChatGPT tokens (`chatgptAuthTokens`)

1667 1672 

1668Use this experimental mode only when a host application owns the users ChatGPT auth lifecycle and supplies tokens directly. Clients must set `capabilities.experimentalApi = true` during `initialize` before using this login type.1673Use this experimental mode only when a host application owns the user's ChatGPT auth lifecycle and supplies tokens directly. Clients must set `capabilities.experimentalApi = true` during `initialize` before using this login type.

1669 1674 

16701. Send:16751. Send:

1671 1676 

1672 ```1677 ```json

1673 {1678 {

1674 "method": "account/login/start",1679 "method": "account/login/start",

1675 "id": 7,1680 "id": 7,


1681 }1686 }

1682 }1687 }

1683 ```1688 ```

1689 

16842. Expect:16902. Expect:

1685 1691 

1686 ```1692 ```json

1687 { "id": 7, "result": { "type": "chatgptAuthTokens" } }1693 { "id": 7, "result": { "type": "chatgptAuthTokens" } }

1688 ```1694 ```

1695 

16893. Notifications:16963. Notifications:

1690 1697 

1691 ```1698 ```json

1692 {1699 {

1693 "method": "account/login/completed",1700 "method": "account/login/completed",

1694 "params": { "loginId": null, "success": true, "error": null }1701 "params": { "loginId": null, "success": true, "error": null }

1695 }1702 }

1696 ```1703 ```

1697 1704 

1698 ```1705 ```json

1699 {1706 {

1700 "method": "account/updated",1707 "method": "account/updated",

1701 "params": { "authMode": "chatgptAuthTokens", "planType": "business" }1708 "params": { "authMode": "chatgptAuthTokens", "planType": "business" }


1704 1711 

1705When the server receives a `401 Unauthorized`, it may request refreshed tokens from the host app:1712When the server receives a `401 Unauthorized`, it may request refreshed tokens from the host app:

1706 1713 

1707```1714```json

1708{1715{

1709 "method": "account/chatgptAuthTokens/refresh",1716 "method": "account/chatgptAuthTokens/refresh",

1710 "id": 8,1717 "id": 8,


1717 1724 

1718### 4) Cancel a ChatGPT login1725### 4) Cancel a ChatGPT login

1719 1726 

1720```1727```json

1721{ "method": "account/login/cancel", "id": 4, "params": { "loginId": "<uuid>" } }1728{ "method": "account/login/cancel", "id": 4, "params": { "loginId": "<uuid>" } }

1722{ "method": "account/login/completed", "params": { "loginId": "<uuid>", "success": false, "error": "..." } }1729{ "method": "account/login/completed", "params": { "loginId": "<uuid>", "success": false, "error": "..." } }

1723```1730```

1724 1731 

1725### 5) Logout1732### 5) Logout

1726 1733 

1727```1734```json

1728{ "method": "account/logout", "id": 5 }1735{ "method": "account/logout", "id": 5 }

1729{ "id": 5, "result": {} }1736{ "id": 5, "result": {} }

1730{ "method": "account/updated", "params": { "authMode": null, "planType": null } }1737{ "method": "account/updated", "params": { "authMode": null, "planType": null } }


1732 1739 

1733### 6) Rate limits (ChatGPT)1740### 6) Rate limits (ChatGPT)

1734 1741 

1735```1742```json

1736{ "method": "account/rateLimits/read", "id": 6 }1743{ "method": "account/rateLimits/read", "id": 6 }

1737{ "id": 6, "result": {1744{ "id": 6, "result": {

1738 "rateLimits": {1745 "rateLimits": {


1784 1791 

1785Use `account/sendAddCreditsNudgeEmail` to ask ChatGPT to email a workspace owner when credits are depleted or a usage limit has been reached.1792Use `account/sendAddCreditsNudgeEmail` to ask ChatGPT to email a workspace owner when credits are depleted or a usage limit has been reached.

1786 1793 

1787```1794```json

1788{ "method": "account/sendAddCreditsNudgeEmail", "id": 7, "params": { "creditType": "credits" } }1795{ "method": "account/sendAddCreditsNudgeEmail", "id": 7, "params": { "creditType": "credits" } }

1789{ "id": 7, "result": { "status": "sent" } }1796{ "id": 7, "result": { "status": "sent" } }

1790```1797```

app/automations.md +24 −11

Details

1# Automations – Codex app1# Automations

2 2 

3Automate recurring tasks in the background. Codex adds findings to the inbox, or automatically archives the task if there’s nothing to report. You can combine automations with [skills](https://developers.openai.com/codex/skills) for more complex tasks.3<div class="feature-grid">

4 

5<div>

6 

7Automate recurring tasks in the background. Codex adds findings to the inbox, or automatically archives the task if there's nothing to report. You can combine automations with [skills](https://developers.openai.com/codex/skills) for more complex tasks.

4 8 

5For project-scoped automations, the machine running the local Codex app must be9For project-scoped automations, the machine running the local Codex app must be

6powered on, Codex must be running, and the selected project must still be10powered on, Codex must be running, and the selected project must still be


16You can also leave the model and reasoning effort on their default settings, or20You can also leave the model and reasoning effort on their default settings, or

17choose them explicitly if you want more control over how the automation runs.21choose them explicitly if you want more control over how the automation runs.

18 22 

19![Automation creation form with schedule and prompt fields](/images/codex/app/codex-automations-light.webp)23</div>

24 

25<CodexScreenshot

26 alt="Automation creation form with schedule and prompt fields"

27 lightSrc="/images/codex/app/codex-automations-light.webp"

28 darkSrc="/images/codex/app/codex-automations-dark.webp"

29 maxHeight="400px"

30/>

31 

32</div>

20 33 

21## Managing tasks34## Managing tasks

22 35 

23Find all automations and their runs in the automations pane inside your Codex app sidebar.36Find all automations and their runs in the automations pane inside your Codex app sidebar.

24 37 

25The Triage section acts as your inbox. Automation runs with findings show up there, and you can filter your inbox to show all automation runs or only unread ones.38The "Triage" section acts as your inbox. Automation runs with findings show up there, and you can filter your inbox to show all automation runs or only unread ones.

26 39 

27Standalone automations start fresh runs on a schedule and report results in40Standalone automations start fresh runs on a schedule and report results in

28Triage. Use them when each run should be independent or when one automation41Triage. Use them when each run should be independent or when one automation


65current thread. Use them when you want Codex to keep returning to the same78current thread. Use them when you want Codex to keep returning to the same

66conversation on a schedule.79conversation on a schedule.

67 80 

68Use a thread automation when the scheduled work should preserve the threads81Use a thread automation when the scheduled work should preserve the thread's

69context instead of starting from a new prompt each time.82context instead of starting from a new prompt each time.

70 83 

71Thread automations can use minute-based intervals for active follow-up loops,84Thread automations can use minute-based intervals for active follow-up loops,


126 can run with full access.139 can run with full access.

127 140 

128If you are in a managed environment, admins can restrict these behaviors using141If you are in a managed environment, admins can restrict these behaviors using

129admin-enforced requirements. For example, they can disallow `approval_policy = "never"` or constrain allowed sandbox modes. See142admin-enforced requirements. For example, they can disallow `approval_policy =

143"never"` or constrain allowed sandbox modes. See

130[Admin-enforced requirements (`requirements.toml`)](https://developers.openai.com/codex/enterprise/managed-configuration#admin-enforced-requirements-requirementstoml).144[Admin-enforced requirements (`requirements.toml`)](https://developers.openai.com/codex/enterprise/managed-configuration#admin-enforced-requirements-requirementstoml).

131 145 

132Automations use `approval_policy = "never"` when your organization policy146Automations use `approval_policy = "never"` when your organization policy


137 151 

138### Automatically create new skills152### Automatically create new skills

139 153 

140```154```markdown

141Scan all of the `~/.codex/sessions` files from the past day and if there have been any issues using particular skills, update the skills to be more helpful. Personal skills only, no repo skills.155Scan all of the `~/.codex/sessions` files from the past day and if there have been any issues using particular skills, update the skills to be more helpful. Personal skills only, no repo skills.

142 156 

143If there’s anything we’ve been doing often and struggle with that we should save as a skill to speed up future work, let’s do it.157If there’s anything we’ve been doing often and struggle with that we should save as a skill to speed up future work, let’s do it.


149 163 

150### Stay up-to-date with your project164### Stay up-to-date with your project

151 165 

152```166```markdown

153Look at the latest remote origin/master or origin/main . Then produce an exec briefing for the last 24 hours of commits that touch <DIRECTORY>167Look at the latest remote origin/master or origin/main . Then produce an exec briefing for the last 24 hours of commits that touch <DIRECTORY>

154 168 

155Formatting + structure:169Formatting + structure:


180 194 

181Create a new skill that tries to fix a bug introduced by your own commits by creating a new `$recent-code-bugfix` and [store it in your personal skills](https://developers.openai.com/codex/skills#where-to-save-skills).195Create a new skill that tries to fix a bug introduced by your own commits by creating a new `$recent-code-bugfix` and [store it in your personal skills](https://developers.openai.com/codex/skills#where-to-save-skills).

182 196 

183```197```markdown

184---198---

185name: recent-code-bugfix199name: recent-code-bugfix

186description: Find and fix a bug introduced by the current author within the last week in the current working directory. Use when a user wants a proactive bugfix from their recent changes, when the prompt is empty, or when asked to triage/fix issues caused by their recent commits. Root cause must map directly to the author’s own changes.200description: Find and fix a bug introduced by the current author within the last week in the current working directory. Use when a user wants a proactive bugfix from their recent changes, when the prompt is empty, or when asked to triage/fix issues caused by their recent commits. Root cause must map directly to the author’s own changes.


232 246 

233Afterward, create a new automation:247Afterward, create a new automation:

234 248 

235```249```markdown

236Check my commits from the last 24h and submit a $recent-code-bugfix.250Check my commits from the last 24h and submit a $recent-code-bugfix.

237```251```

238 

app/browser.md +37 −18

Details

1# In-app browser – Codex app1# In-app browser

2 2 

3The in-app browser gives you and Codex a shared view of rendered web pages3The in-app browser gives you and Codex a shared view of rendered web pages

4inside a thread. Use it when youre building or debugging a web app and want to4inside a thread. Use it when you're building or debugging a web app and want to

5preview pages and attach visual comments.5preview pages and attach visual comments.

6 6 

7Use it for local development servers, file-backed previews, and public pages7Use it for local development servers, file-backed previews, and public pages

8that dont require sign-in. For anything that depends on login state or browser8that don't require sign-in. For anything that depends on login state or browser

9extensions, use your regular browser or the9extensions, use your regular browser or the

10[Codex Chrome extension](https://developers.openai.com/codex/app/chrome-extension).10[Codex Chrome extension](https://developers.openai.com/codex/app/chrome-extension).

11 11 

12Open the in-app browser from the toolbar, by clicking a URL, by navigating12Open the in-app browser from the toolbar, by clicking a URL, by navigating

13manually in the browser, or by pressing `Cmd`+`Shift`+`B`13manually in the browser, or by pressing <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd>

14(`Ctrl`+`Shift`+`B` on Windows).14(<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> on Windows).

15 15 

16The in-app browser does not support authentication flows, signed-in pages,16The in-app browser does not support authentication flows, signed-in pages,

17your regular browser profile, cookies, extensions, or existing tabs. Use it17 your regular browser profile, cookies, extensions, or existing tabs. Use it

18for pages Codex can open without logging in.18 for pages Codex can open without logging in.

19 19 

20Treat page content as untrusted context. Dont paste secrets into browser flows.20Treat page content as untrusted context. Don't paste secrets into browser flows.

21 21 

22![Codex app showing a browser comment on a local web app preview](/images/codex/app/in-app-browser-light.webp)22<CodexScreenshot

23 alt="Codex app showing a browser comment on a local web app preview"

24 lightSrc="/images/codex/app/in-app-browser-light.webp"

25 darkSrc="/images/codex/app/in-app-browser-dark.webp"

26 maxHeight="420px"

27 variant="no-wallpaper"

28/>

23 29 

24## Browser use30## Browser use

25 31 


35 41 

36Example:42Example:

37 43 

38```44```text

39Use the browser to open http://localhost:3000/settings, reproduce the layout45Use the browser to open http://localhost:3000/settings, reproduce the layout

40bug, and fix only the overflowing controls.46bug, and fix only the overflowing controls.

41```47```

42 48 

43Codex asks before using a website unless youve allowed it. Removing a site from49Codex asks before using a website unless you've allowed it. Removing a site from

44the allowed list means Codex asks again before using it; removing a site from the50the allowed list means Codex asks again before using it; removing a site from the

45blocked list means Codex can ask again instead of treating it as blocked.51blocked list means Codex can ask again instead of treating it as blocked.

46 52 


49 55 

50## Preview a page56## Preview a page

51 57 

521. Start your apps development server in the [integrated terminal](https://developers.openai.com/codex/app/features#integrated-terminal) or with a [local environment action](https://developers.openai.com/codex/app/local-environments#actions).581. Start your app's development server in the [integrated terminal](https://developers.openai.com/codex/app/features#integrated-terminal) or with a [local environment action](https://developers.openai.com/codex/app/local-environments#actions).

532. Open an unauthenticated local route, file-backed page, or public page by592. Open an unauthenticated local route, file-backed page, or public page by

54 clicking a URL or navigating manually in the browser.60 clicking a URL or navigating manually in the browser.

553. Review the rendered state alongside the code diff.613. Review the rendered state alongside the code diff.


58 64 

59Example feedback:65Example feedback:

60 66 

61```67```text

62I left comments on the pricing page in the in-app browser. Address the mobile68I left comments on the pricing page in the in-app browser. Address the mobile

63layout issues and keep the card structure unchanged.69layout issues and keep the card structure unchanged.

64```70```


69Codex precise feedback on the page.75Codex precise feedback on the page.

70 76 

71- Turn on Annotation mode, select an element or area, and submit a comment.77- Turn on Annotation mode, select an element or area, and submit a comment.

72- In Annotation mode, hold `Shift` and click to select an area.78- In Annotation mode, hold <kbd>Shift</kbd> and click to select an area.

73- Hold `Cmd` while clicking to send a comment immediately.79- Hold <kbd>Cmd</kbd> while clicking to send a comment immediately.

74 80 

75After you leave comments, send a message in the thread asking Codex to address81After you leave comments, send a message in the thread asking Codex to address

76them. Comments are most useful when Codex needs to make a precise visual change.82them. Comments are most useful when Codex needs to make a precise visual change.

77 83 

78Good feedback is specific:84Good feedback is specific:

79 85 

80```86```text

81This button overflows on mobile. Keep the label on one line if it fits,87This button overflows on mobile. Keep the label on one line if it fits,

82otherwise wrap it without changing the card height.88otherwise wrap it without changing the card height.

83```89```

84 90 

85```91```text

86This tooltip covers the data point under the cursor. Reposition the tooltip so92This tooltip covers the data point under the cursor. Reposition the tooltip so

87it stays inside the chart bounds.93it stays inside the chart bounds.

88```94```

89 95 

96<section class="feature-grid">

97 

98<div>

99 

90### Styling feedback100### Styling feedback

91 101 

92When you add an annotation to a section on the page, press the config icon next102When you add an annotation to a section on the page, press the config icon next


94values like font, text, spacing, and color, preview the result directly on the104values like font, text, spacing, and color, preview the result directly on the

95page, and then send the annotation so Codex has a clearer target for the change.105page, and then send the annotation so Codex has a clearer target for the change.

96 106 

97![Codex app showing in-app browser annotation style controls](/images/codex/app/iab-annotations-light.webp)107</div>

108 

109<CodexScreenshot

110 alt="Codex app showing in-app browser annotation style controls"

111 lightSrc="/images/codex/app/iab-annotations-light.webp"

112 darkSrc="/images/codex/app/iab-annotations-dark.webp"

113 maxHeight="420px"

114/>

115 

116</section>

98 117 

99## Keep browser tasks scoped118## Keep browser tasks scoped

100 119 

app/commands.md +75 −47

Details

1# Commands – Codex app1# Codex app commands

2 2 

3Use these commands and keyboard shortcuts to navigate the Codex app.3Use these commands and keyboard shortcuts to navigate the Codex app.

4 4 

5## Keyboard shortcuts5## Keyboard shortcuts

6 6 

7| | Action | macOS shortcut |7| | Action | macOS shortcut |

8| --- | --- | --- |8| ----------- | ------------------ | --------------------------------------------------------------------------------- |

9| **General** | | |9| **General** | | |

10| | Command menu | `Cmd` + `Shift` + `P` or `Cmd` + `K` |10| | Command menu | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or <kbd>Cmd</kbd> + <kbd>K</kbd> |

11| | Settings | `Cmd` + `,` |11| | Settings | <kbd>Cmd</kbd> + <kbd>,</kbd> |

12| | Keyboard shortcuts | `Cmd` + `/` |12| | Keyboard shortcuts | <kbd>Cmd</kbd> + <kbd>/</kbd> |

13| | Open folder | `Cmd` + `O` |13| | Open folder | <kbd>Cmd</kbd> + <kbd>O</kbd> |

14| | Navigate back | `Cmd` + `[` |14| | Navigate back | <kbd>Cmd</kbd> + <kbd>[</kbd> |

15| | Navigate forward | `Cmd` + `]` |15| | Navigate forward | <kbd>Cmd</kbd> + <kbd>]</kbd> |

16| | Increase font size | `Cmd` + `+` or `Cmd` + `=` |16| | Increase font size | <kbd>Cmd</kbd> + <kbd>+</kbd> or <kbd>Cmd</kbd> + <kbd>=</kbd> |

17| | Decrease font size | `Cmd` + `-` or `Cmd` + `_` |17| | Decrease font size | <kbd>Cmd</kbd> + <kbd>-</kbd> or <kbd>Cmd</kbd> + <kbd>\_</kbd> |

18| | Toggle sidebar | `Cmd` + `B` |18| | Toggle sidebar | <kbd>Cmd</kbd> + <kbd>B</kbd> |

19| | Toggle diff panel | `Cmd` + `Option` + `B` |19| | Toggle diff panel | <kbd>Cmd</kbd> + <kbd>Option</kbd> + <kbd>B</kbd> |

20| | Toggle terminal | `Cmd` + `J` |20| | Toggle terminal | <kbd>Cmd</kbd> + <kbd>J</kbd> |

21| | Clear the terminal | `Ctrl` + `L` |21| | Clear the terminal | <kbd>Ctrl</kbd> + <kbd>L</kbd> |

22| **Thread** | | |22| **Thread** | | |

23| | New thread | `Cmd` + `N` or `Cmd` + `Shift` + `O` |23| | New thread | <kbd>Cmd</kbd> + <kbd>N</kbd> or <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> |

24| | Search threads | `Cmd` + `G` |24| | Search threads | <kbd>Cmd</kbd> + <kbd>G</kbd> |

25| | Find in thread | `Cmd` + `F` |25| | Find in thread | <kbd>Cmd</kbd> + <kbd>F</kbd> |

26| | Previous thread | `Cmd` + `Shift` + `[` |26| | Previous thread | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>[</kbd> |

27| | Next thread | `Cmd` + `Shift` + `]` |27| | Next thread | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>]</kbd> |

28| | Dictation | `Ctrl` + `M` |28| | Dictation | <kbd>Ctrl</kbd> + <kbd>M</kbd> |

29 29 

30To find, customize, or reset shortcuts, open **Settings > Keyboard Shortcuts**.30To find, customize, or reset shortcuts, open **Settings > Keyboard Shortcuts**.

31You can search by command name or switch the search field into keystroke mode31You can search by command name or switch the search field into keystroke mode


33 33 

34## Search past threads and find in a thread34## Search past threads and find in a thread

35 35 

36Use thread search (`Cmd`/`Ctrl` + `G`) to reopen a36Use thread search (<kbd>Cmd</kbd>/<kbd>Ctrl</kbd> + <kbd>G</kbd>) to reopen a

37past conversation. When expanded matching is available in your Codex desktop37past conversation. When expanded matching is available in your Codex desktop

38app, it can also match conversation content and Git branch names, so you can38app, it can also match conversation content and Git branch names, so you can

39search for a phrase from the thread or a branch such as `fix/login-redirect`.39search for a phrase from the thread or a branch such as `fix/login-redirect`.

40 40 

41Use **Find in thread** (`Cmd` + `F`) after opening a thread41Use **Find in thread** (<kbd>Cmd</kbd> + <kbd>F</kbd>) after opening a thread

42to find text within that current conversation. It does not search across other42to find text within that current conversation. It does not search across other

43threads.43threads.

44 44 


58### Available slash commands58### Available slash commands

59 59 

60| Slash command | Description |60| Slash command | Description |

61| --- | --- |61| ------------- | -------------------------------------------------------------------------------------- |

62| `/feedback` | Open the feedback dialog to submit feedback and optionally include logs. |62| `/feedback` | Open the feedback dialog to submit feedback and optionally include logs. |

63| `/goal` | Set a persistent goal for Codex to work toward; use `/plan` first to shape it. |63| `/goal` | Set a persistent goal for Codex to work toward; use `/plan` first to shape it. |

64| `/mcp` | Open MCP status to view connected servers. |64| `/mcp` | Open MCP status to view connected servers. |


73more input. To define the goal with Codex first, start with `/plan`, then set73more input. To define the goal with Codex first, start with `/plan`, then set

74the refined goal with `/goal`.74the refined goal with `/goal`.

75 75 

76If `/goal` doesnt appear in the slash command list, enable `features.goals`76If `/goal` doesn't appear in the slash command list, enable `features.goals`

77in `config.toml`:77in `config.toml`:

78 78 

79```79```toml

80[features]80[features]

81goals = true81goals = true

82```82```

83 83 

84You can also run `codex features enable goals` from the CLI or ask Codex to run it.84You can also run `codex features enable goals` from the CLI or ask Codex to run it.

85 85 

86![Codex app goal progress controls above the composer](/images/codex/app/goal-dialog-light.webp)86<CodexScreenshot

87 alt="Codex app goal progress controls above the composer"

88 lightSrc="/images/codex/app/goal-dialog-light.webp"

89 darkSrc="/images/codex/app/goal-dialog-dark.webp"

90 class="mb-6"

91/>

87 92 

88When a goal is active, the app shows its progress above the composer. Use the93When a goal is active, the app shows its progress above the composer. Use the

89buttons in that progress row to pause or resume the goal, edit the goal text, or94buttons in that progress row to pause or resume the goal, edit the goal text, or


94 99 

95## Deep links100## Deep links

96 101 

97The Codex app registers the `codex://` URL scheme so links can open specific parts of the app directly.102The Codex app registers the `codex://` URL scheme so links can open specific parts of the app directly. Encode query string values before adding them to a URL.

98 103 

99### Common links104### Supported links

100 105 

101Use these links when you just need to open a common app destination. The sections below list the full reference by link type.106Use these canonical forms when you create links. The sections below list the full reference by link type.

102 107 

103| Deep link | Opens |108| Deep link | Opens |

104| --- | --- |109| --------------------------------------------------------------------------- | ---------------------------------------------------------------- |

105| `codex://threads/new` | A new local thread. |110| `codex://threads/new` | A new local thread. |

106| `codex://threads/<thread-id>` | A local thread. `<thread-id>` must be the thread’s session UUID. |111| `codex://new?<query>` | A new local thread with at least one new-thread query parameter. |

112| `codex://threads/<thread-id>` | A local thread. `<thread-id>` must be the thread's session UUID. |

107| `codex://settings` | Settings. |113| `codex://settings` | Settings. |

108| `codex://skills` | Skills. |114| `codex://skills` | Skills. |

109| `codex://automations` | Automations with the create flow open. |115| `codex://automations` | Automations with the create flow open. |

116| `codex://plugins/install/<plugin-name>?marketplace=<marketplace-name>` | The install flow for a plugin from a known marketplace. |

117| `codex://plugins/<plugin-id>` | A plugin detail page. |

118| `codex://plugins/<plugin-name>?marketplacePath=<absolute-marketplace-path>` | A local plugin detail page from a local marketplace. |

119| `codex://pets/install?name=<pet-name>&imageUrl=<https-image-url>` | The pet install flow. |

110 120 

111### Threads121### Threads

112 122 

113Use these links when you need to open an existing local thread or start a new one.123Use these links when you need to open an existing local thread or start a new one.

114 124 

115| Deep link | Opens |125| Deep link | Opens |

116| --- | --- |126| ----------------------------- | -------------------------------------------------------------------------------------------------------------- |

117| `codex://threads/<thread-id>` | A local thread. `<thread-id>` must be the threads session UUID. |127| `codex://threads/<thread-id>` | A local thread. `<thread-id>` must be the thread's session UUID. |

118| `codex://threads/new` | A new local thread. |128| `codex://threads/new` | A new local thread. |

129| `codex://threads/new?<query>` | A new local thread with optional query parameters. |

130| `codex://new?<query>` | A new local thread. Include at least one of `prompt`, `path`, or `originUrl`; otherwise the link does nothing. |

119 131 

120For `codex://threads/new`, add any of these query parameters as needed; you can combine them in the same URL.132For `codex://threads/new` or `codex://new`, add any of these query parameters as needed; you can combine them in the same URL.

121 133 

122| Query parameter | Required | What it does |134| Query parameter | Required | What it does |

123| --- | --- | --- |135| ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |

124| `prompt=<text>` | No | Sets the initial composer text. |136| `prompt=<text>` | No | Sets the initial composer text. |

125| `path=<absolute-path>` | No | Opens the new thread in a local workspace. `path` must be an absolute path to a local directory. When valid, Codex uses that directory as the active workspace. |137| `path=<absolute-path>` | No | Opens the new thread in a local workspace. `path` must be an absolute path to a local directory. When valid, Codex uses that directory as the active workspace. |

126| `originUrl=<git-remote-url>` | No | Matches one of your current workspace roots by Git remote URL. If `path` is also present, Codex resolves `path` first. |138| `originUrl=<git-remote-url>` | No | Matches one of your current workspace roots by Git remote URL. If `path` is also present, Codex resolves `path` first. |

127 139 

128Example: [Show me some fun stats about how Ive been using Codex](codex://threads/new?prompt=Show%20me%20some%20fun%20stats%20about%20how%20I%27ve%20been%20using%20Codex)140Example: [Show me some fun stats about how I've been using Codex](codex://threads/new?prompt=Show%20me%20some%20fun%20stats%20about%20how%20I%27ve%20been%20using%20Codex)

129 141 

130### Settings142### Settings

131 143 

132Use these links when you need to open Settings or a specific settings page.144Use these links when you need to open Settings or a specific settings page.

133 145 

134| Deep link | Opens |146| Deep link | Opens |

135| --- | --- |147| --------------------------------------------- | ---------------------------------------- |

136| `codex://settings` | Settings. |148| `codex://settings` | Settings. |

137| `codex://settings/browser-use` | Browser use settings. |149| `codex://settings/browser-use` | Browser use settings. |

138| `codex://settings/computer-use/google-chrome` | Google Chrome settings for computer use. |150| `codex://settings/computer-use/google-chrome` | Google Chrome settings for computer use. |

139| `codex://settings/connections` | Remote connections settings. |151| `codex://settings/connections` | Remote connections settings. |

140 152 

153Unsupported `codex://settings/...` paths open the main Settings page.

154 

141### Skills155### Skills

142 156 

143Use these links when you need to open Skills.157Use these links when you need to open Skills.

144 158 

145| Deep link | Opens |159| Deep link | Opens |

146| --- | --- |160| ---------------- | ------- |

147| `codex://skills` | Skills. |161| `codex://skills` | Skills. |

148 162 

149### Automations163### Automations


151Use these links when you need to open Automations.165Use these links when you need to open Automations.

152 166 

153| Deep link | Opens |167| Deep link | Opens |

154| --- | --- |168| --------------------- | -------------------------------------- |

155| `codex://automations` | Automations with the create flow open. |169| `codex://automations` | Automations with the create flow open. |

156 170 

157### Plugins171### Plugins

158 172 

159Plugin links use different forms depending on whether you are opening a plugin, installing from a marketplace, or working from a local `marketplace.json`. For plugin basics, see [Plugins](https://developers.openai.com/codex/plugins). For local or repo marketplace setup, see [Build plugins](https://developers.openai.com/codex/plugins/build#build-your-own-curated-plugin-list).173Plugin links use different forms depending on whether you are installing from a marketplace, opening a plugin, or working from a local `marketplace.json`. For plugin basics, see [Plugins](https://developers.openai.com/codex/plugins). For local or repo marketplace setup, see [Build plugins](https://developers.openai.com/codex/plugins/build#build-your-own-curated-plugin-list).

174 

175#### Plugin install

176 

177Use this form to open the install flow for a plugin from a marketplace that Codex already knows about.

178 

179| Deep link | Opens |

180| ---------------------------------------------------------------------- | ----------------------------------------------- |

181| `codex://plugins/install/<plugin-name>?marketplace=<marketplace-name>` | The plugin detail or install flow for a plugin. |

182 

183| Query parameter | Required | What it does |

184| -------------------------------- | -------- | ------------------------------------------------------------------------------- |

185| `marketplace=<marketplace-name>` | Yes | Identifies the marketplace. For an OpenAI-curated plugin, use `openai-curated`. |

186 

187The install link accepts only the `marketplace` query parameter. If Codex cannot find the requested marketplace or plugin, it opens the Plugins page instead.

160 188 

161#### Plugin detail189#### Plugin detail

162 190 

163| Deep link | Opens |191| Deep link | Opens |

164| --- | --- |192| ----------------------------- | --------------------- |

165| `codex://plugins/<plugin-id>` | A plugin detail page. |193| `codex://plugins/<plugin-id>` | A plugin detail page. |

166 194 

167`<plugin-id>` must identify the plugin. For an OpenAI-curated plugin, use the form `<plugin-name>@openai-curated`.195`<plugin-id>` must identify the plugin. For an OpenAI-curated plugin, use the form `<plugin-name>@openai-curated`.


169Codex-generated plugin links can also include these query parameters. Omit both when you handwrite a link.197Codex-generated plugin links can also include these query parameters. Omit both when you handwrite a link.

170 198 

171| Query parameter | Required | What it does |199| Query parameter | Required | What it does |

172| --- | --- | --- |200| ------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |

173| `hostId=<host-id>` | No | Identifies the Codex host that owns the plugin context, such as `local` or one of your configured remote connections. Codex provides these IDs. |201| `hostId=<host-id>` | No | Identifies the Codex host that owns the plugin context, such as `local` or one of your configured remote connections. Codex provides these IDs. |

174| `source=manage` | No | Preserves the apps plugin-management entry point. It is not admin-only. |202| `source=manage` | No | Preserves the app's plugin-management entry point. It is not admin-only. |

175 203 

176Example: [Open the OpenAI Developers plugin](codex://plugins/openai-developers@openai-curated)204Example: [Open the OpenAI Developers plugin](codex://plugins/openai-developers@openai-curated)

177 205 


180For local or repo marketplace setup, see [Build plugins](https://developers.openai.com/codex/plugins/build#build-your-own-curated-plugin-list).208For local or repo marketplace setup, see [Build plugins](https://developers.openai.com/codex/plugins/build#build-your-own-curated-plugin-list).

181 209 

182| Deep link | Opens |210| Deep link | Opens |

183| --- | --- |211| --------------------------------------------------------------------------- | ---------------------------------------------------- |

184| `codex://plugins/<plugin-name>?marketplacePath=<absolute-marketplace-path>` | A local plugin detail page from a local marketplace. |212| `codex://plugins/<plugin-name>?marketplacePath=<absolute-marketplace-path>` | A local plugin detail page from a local marketplace. |

185 213 

186| Query parameter | Required | What it does |214| Query parameter | Required | What it does |

187| --- | --- | --- |215| --------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------- |

188| `marketplacePath=<absolute-marketplace-path>` | Yes | Absolute path to the local `marketplace.json`, for example `/Users/alex/.agents/plugins/marketplace.json`. |216| `marketplacePath=<absolute-marketplace-path>` | Yes | Absolute path to the local `marketplace.json`, for example `/Users/alex/.agents/plugins/marketplace.json`. |

189| `mode=share` | No | Opens the share flow for that local plugin. |217| `mode=share` | No | Opens the share flow for that local plugin. |

190 218 


193Use these links to open the pet install flow when that feature is enabled.221Use these links to open the pet install flow when that feature is enabled.

194 222 

195| Deep link | Opens |223| Deep link | Opens |

196| --- | --- |224| ----------------------------------------------------------------- | --------------------- |

197| `codex://pets/install?name=<pet-name>&imageUrl=<https-image-url>` | The pet install flow. |225| `codex://pets/install?name=<pet-name>&imageUrl=<https-image-url>` | The pet install flow. |

198 226 

199| Query parameter | Required | What it does |227| Query parameter | Required | What it does |

200| --- | --- | --- |228| ---------------------------- | -------- | ------------------------------------------------- |

201| `name=<pet-name>` | Yes | Sets the pet name. |229| `name=<pet-name>` | Yes | Sets the pet name. |

202| `imageUrl=<https-image-url>` | Yes | Sets the pet image URL. `imageUrl` must be HTTPS. |230| `imageUrl=<https-image-url>` | Yes | Sets the pet image URL. `imageUrl` must be HTTPS. |

203| `description=<text>` | No | Sets the optional pet description. |231| `description=<text>` | No | Sets the optional pet description. |

Details

1# Computer Use – Codex app1# Computer Use

2 2 

3In the Codex app, computer use is available on macOS and Windows, except in3In the Codex app, computer use is available on macOS and Windows, except in

4the European Economic Area, the United Kingdom, and Switzerland at launch.4 the European Economic Area, the United Kingdom, and Switzerland at launch.

5Install the Computer Use plugin. On macOS, grant Screen Recording and5 Install the Computer Use plugin. On macOS, grant Screen Recording and

6Accessibility permissions when prompted.6 Accessibility permissions when prompted.

7 7 

8With computer use, Codex can see and operate graphical user interfaces on macOS8With computer use, Codex can see and operate graphical user interfaces on macOS

9or Windows. Use it for tasks where command-line tools or structured integrations9or Windows. Use it for tasks where command-line tools or structured integrations

10arent enough, such as checking a desktop app, using a browser, changing app10aren't enough, such as checking a desktop app, using a browser, changing app

11settings, working with a data source that isnt available as a plugin, or11settings, working with a data source that isn't available as a plugin, or

12reproducing a bug that only happens in a graphical user interface.12reproducing a bug that only happens in a graphical user interface.

13 13 

14Because computer use can affect app and system state outside your project14Because computer use can affect app and system state outside your project


30 30 

31## When to use computer use31## When to use computer use

32 32 

33Choose computer use when the task depends on a graphical user interface thats33Choose computer use when the task depends on a graphical user interface that's

34hard to verify through files or command output alone.34hard to verify through files or command output alone.

35 35 

36Good fits include:36Good fits include:


40- Performing a task that requires your web browser.40- Performing a task that requires your web browser.

41- Reproducing a bug that only appears in a graphical interface.41- Reproducing a bug that only appears in a graphical interface.

42- Changing app settings that require clicking through a UI.42- Changing app settings that require clicking through a UI.

43- Inspecting information in an app or data source that isnt available through a43- Inspecting information in an app or data source that isn't available through a

44 plugin.44 plugin.

45- On macOS, running a scoped task in the background while you keep working45- On macOS, running a scoped task in the background while you keep working

46 elsewhere.46 elsewhere.


51 51 

52### Windows foreground use52### Windows foreground use

53 53 

54On Windows, computer use runs on the active desktop. It cant operate in the54On Windows, computer use runs on the active desktop. It can't operate in the

55background while you keep using the same Windows session, so expect Codex to55background while you keep using the same Windows session, so expect Codex to

56move the pointer, type, and take over the foreground while the task runs.56move the pointer, type, and take over the foreground while the task runs.

57 57 


66Mention `@Computer` or `@AppName` in your prompt, or ask Codex to use66Mention `@Computer` or `@AppName` in your prompt, or ask Codex to use

67computer use. Describe the exact app, window, or flow Codex should operate.67computer use. Describe the exact app, window, or flow Codex should operate.

68 68 

69```69```text

70Open the app with computer use, reproduce the onboarding bug, and fix the70Open the app with computer use, reproduce the onboarding bug, and fix the

71smallest code path that causes it. After each change, run the same UI flow71smallest code path that causes it. After each change, run the same UI flow

72again.72again.

73```73```

74 74 

75```75```text

76Open @Chrome and verify the checkout page still works after the latest changes.76Open @Chrome and verify the checkout page still works after the latest changes.

77```77```

78 78 


94without asking again. You can remove apps from the **Always allow** list in the94without asking again. You can remove apps from the **Always allow** list in the

95**Computer Use** section of Codex settings.95**Computer Use** section of Codex settings.

96 96 

97![Codex app asking for permission to use Calculator with computer use](/images/codex/app/computer-use-approval-light.webp)97<CodexScreenshot

98 alt="Codex app asking for permission to use Calculator with computer use"

99 lightSrc="/images/codex/app/computer-use-approval-light.webp"

100 darkSrc="/images/codex/app/computer-use-approval-dark.webp"

101 maxHeight="420px"

102 variant="no-wallpaper"

103/>

98 104 

99Codex may also ask for permission before taking sensitive or disruptive actions.105Codex may also ask for permission before taking sensitive or disruptive actions.

100 106 

101If Codex cant see or control an app, open **System Settings > Privacy &107If Codex can't see or control an app, open **System Settings > Privacy &

102Security** and check **Screen Recording** and **Accessibility** for the Codex108Security** and check **Screen Recording** and **Accessibility** for the Codex

103app on macOS. On Windows, make sure the target app is visible in the active109app on macOS. On Windows, make sure the target app is visible in the active

104desktop session.110desktop session.


115[authorization plug-in](https://developer.apple.com/documentation/security/authorization-plug-ins)121[authorization plug-in](https://developer.apple.com/documentation/security/authorization-plug-ins)

116that participates in the macOS unlock flow.122that participates in the macOS unlock flow.

117 123 

118Locked use is intentionally narrow. Its not a general-purpose remote-unlock124Locked use is intentionally narrow. It's not a general-purpose remote-unlock

119path for your Mac, and it doesnt let other apps or local processes unlock the125path for your Mac, and it doesn't let other apps or local processes unlock the

120computer.126computer.

121 127 

122To use locked computer use:128To use locked computer use:

123 129 

1241. Open **Codex settings > Computer Use**.1301. Open **Codex settings > Computer Use**.

1252. Enable locked computer use.1312. Enable locked computer use.

1263. Start a task that uses computer use from a connected device after your Macs1323. Start a task that uses computer use from a connected device after your Mac's

127 screen has locked.133 screen has locked.

128 134 

129When a Codex task accesses an app via Computer Use after your Mac locks, Codex135When a Codex task accesses an app via Computer Use after your Mac locks, Codex


152 158 

153- Give Codex one clear target app or flow at a time.159- Give Codex one clear target app or flow at a time.

154- You can stop the task or take over your computer at any time.160- You can stop the task or take over your computer at any time.

155- Keep sensitive apps closed unless theyre required for the task.161- Keep sensitive apps closed unless they're required for the task.

156- On Windows, expect Codex to take over foreground input while it works; use a162- On Windows, expect Codex to take over foreground input while it works; use a

157 secondary device, a VM, or stop the task before using that desktop yourself.163 secondary device, a VM, or stop the task before using that desktop yourself.

158- Avoid tasks that require secrets unless youre present and can approve each164- Avoid tasks that require secrets unless you're present and can approve each

159 step.165 step.

160- Review app permission prompts before allowing Codex to use an app.166- Review app permission prompts before allowing Codex to use an app.

161- Use **Always allow** only for apps you trust Codex to use automatically in167- Use **Always allow** only for apps you trust Codex to use automatically in


164 credential-related settings.170 credential-related settings.

165- Cancel the task if Codex starts interacting with the wrong window.171- Cancel the task if Codex starts interacting with the wrong window.

166 172 

167If Codex uses your browser, it can interact with pages where youre already173If Codex uses your browser, it can interact with pages where you're already

168signed in. Review website actions as if you were taking them yourself: web pages174signed in. Review website actions as if you were taking them yourself: web pages

169can contain malicious or misleading content, and sites may treat approved clicks,175can contain malicious or misleading content, and sites may treat approved clicks,

170form submissions, and signed-in actions as coming from your account. To keep176form submissions, and signed-in actions as coming from your account. To keep

171using your browser while Codex works, ask Codex to use a different browser.177using your browser while Codex works, ask Codex to use a different browser.

172 178 

173The feature cant automate terminal apps or Codex itself, since automating them179The feature can't automate terminal apps or Codex itself, since automating them

174could bypass Codex security policies. It also cant authenticate as an180could bypass Codex security policies. It also can't authenticate as an

175administrator or approve security and privacy permission prompts on your181administrator or approve security and privacy permission prompts on your

176computer.182computer.

177 183 

178File edits and shell commands still follow Codex approval and sandbox settings184File edits and shell commands still follow Codex approval and sandbox settings

179where applicable. Changes made through desktop apps may not appear in the review185where applicable. Changes made through desktop apps may not appear in the review

180pane until theyre saved to disk and tracked by the project. Your ChatGPT data186pane until they're saved to disk and tracked by the project. Your ChatGPT data

181controls apply to content processed through Codex, including screenshots taken187controls apply to content processed through Codex, including screenshots taken

182by computer use.188by computer use.

183 

app/features.md +222 −37

Details

1# Features – Codex app1# Codex app features

2 2 

3The Codex app is a focused desktop experience for working on Codex threads in parallel,3The Codex app is a focused desktop experience for working on Codex threads in parallel,

4with built-in worktree support, automations, and Git functionality.4with built-in worktree support, automations, and Git functionality.


6Most Codex app features are available on both macOS and Windows.6Most Codex app features are available on both macOS and Windows.

7The sections below note platform-specific exceptions.7The sections below note platform-specific exceptions.

8 8 

9<YouTubeEmbed

10 title="Introducing the Codex app"

11 videoId="HFM3se4lNiw"

12 class="max-w-md"

13/>

14 

9---15---

10 16 

17<section class="feature-grid">

18 

19<div>

20 

11## Multitask across projects21## Multitask across projects

12 22 

13Use one Codex app window to run tasks across projects. Add a project for each23Use one Codex app window to run tasks across projects. Add a project for each


16When available in your Codex desktop app, you can ask Codex to manage threads26When available in your Codex desktop app, you can ask Codex to manage threads

17in your local projects or worktrees. For example, ask it to find a related27in your local projects or worktrees. For example, ask it to find a related

18thread, continue an existing thread, or pin or archive a thread. To create a28thread, continue an existing thread, or pin or archive a thread. To create a

19separate background thread, make that request explicit: `Create a separate background thread in a worktree for this project to update the tests.`29separate background thread, make that request explicit: `Create a separate

30background thread in a worktree for this project to update the tests.`

20 31 

21If youve used the [Codex CLI](https://developers.openai.com/codex/cli), a project is like starting a32If you've used the [Codex CLI](https://developers.openai.com/codex/cli), a project is like starting a

22session in a specific directory.33session in a specific directory.

23 34 

24If you work in a single repository with two or more apps or packages, split35If you work in a single repository with two or more apps or packages, split

25distinct projects into separate app projects so the [sandbox](https://developers.openai.com/codex/agent-approvals-security)36distinct projects into separate app projects so the [sandbox](https://developers.openai.com/codex/agent-approvals-security)

26only includes the files for that project.37only includes the files for that project.

27 38 

28![Codex app showing multiple projects in the sidebar and threads in the main pane](/images/codex/app/multitask-light.webp)39</div>

40 

41<CodexScreenshot

42 alt="Codex app showing multiple projects in the sidebar and threads in the main pane"

43 lightSrc="/images/codex/app/multitask-light.webp"

44 darkSrc="/images/codex/app/multitask-dark.webp"

45 maxHeight="400px"

46/>

47 

48</section>

49 

50<section class="feature-grid inverse">

51 

52<div>

29 53 

30## Skills support54## Skills support

31 55 


33IDE Extension. You can also view and explore new skills that your team has57IDE Extension. You can also view and explore new skills that your team has

34created across your different projects by clicking Skills in the sidebar.58created across your different projects by clicking Skills in the sidebar.

35 59 

36![Skills picker showing available skills in the Codex app](/images/codex/app/skill-selector-light.webp)60</div>

61 

62<CodexScreenshot

63 alt="Skills picker showing available skills in the Codex app"

64 lightSrc="/images/codex/app/skill-selector-light.webp"

65 darkSrc="/images/codex/app/skill-selector-dark.webp"

66 maxHeight="400px"

67/>

68 

69</section>

70 

71<section class="feature-grid">

72 

73<div>

37 74 

38## Automations75## Automations

39 76 


42codebase changes. For ongoing work that should stay in one thread, use a79codebase changes. For ongoing work that should stay in one thread, use a

43[thread automation](https://developers.openai.com/codex/app/automations#thread-automations).80[thread automation](https://developers.openai.com/codex/app/automations#thread-automations).

44 81 

45![Automation creation form with schedule and prompt fields](/images/codex/app/create-automation-light.webp)82</div>

83 

84<CodexScreenshot

85 alt="Automation creation form with schedule and prompt fields"

86 lightSrc="/images/codex/app/create-automation-light.webp"

87 darkSrc="/images/codex/app/create-automation-dark.webp"

88 maxHeight="400px"

89/>

90 

91</section>

92 

93<section class="feature-grid inverse">

94 

95<div>

46 96 

47## Modes97## Modes

48 98 


56 106 

57For the full glossary and concepts, explore the [concepts section](https://developers.openai.com/codex/prompting).107For the full glossary and concepts, explore the [concepts section](https://developers.openai.com/codex/prompting).

58 108 

59![New thread composer with Local, Worktree, and Cloud mode options](/images/codex/app/modes-light.webp)109</div>

110 

111<CodexScreenshot

112 alt="New thread composer with Local, Worktree, and Cloud mode options"

113 lightSrc="/images/codex/app/modes-light.webp"

114 darkSrc="/images/codex/app/modes-dark.webp"

115 maxHeight="400px"

116/>

117 

118</section>

119 

120<section class="feature-grid">

121 

122<div>

60 123 

61## Built-in Git tools124## Built-in Git tools

62 125 


70 133 

71For more advanced Git tasks, use the [integrated terminal](#integrated-terminal).134For more advanced Git tasks, use the [integrated terminal](#integrated-terminal).

72 135 

73![Git diff and commit panel with a commit message field](/images/codex/app/git-commit-light.webp)136</div>

137 

138<CodexScreenshot

139 alt="Git diff and commit panel with a commit message field"

140 lightSrc="/images/codex/app/git-commit-light.webp"

141 darkSrc="/images/codex/app/git-commit-dark.webp"

142 maxHeight="400px"

143/>

144 

145</section>

146 

147<section class="feature-grid inverse">

148 

149<div>

74 150 

75## Worktree support151## Worktree support

76 152 


85 161 

86[Learn more about using worktrees in the Codex app.](https://developers.openai.com/codex/app/worktrees)162[Learn more about using worktrees in the Codex app.](https://developers.openai.com/codex/app/worktrees)

87 163 

88![Worktree thread view showing branch actions and worktree details](/images/codex/app/worktree-light.webp)164</div>

165 

166<CodexScreenshot

167 alt="Worktree thread view showing branch actions and worktree details"

168 lightSrc="/images/codex/app/worktree-light.webp"

169 darkSrc="/images/codex/app/worktree-dark.webp"

170 maxHeight="400px"

171/>

172 

173</section>

174 

175<section class="feature-grid">

176 

177<div>

89 178 

90## Integrated terminal179## Integrated terminal

91 180 

92Each thread includes a built-in terminal scoped to the current project or181Each thread includes a built-in terminal scoped to the current project or

93worktree. Toggle it using the terminal icon in the top right of the app or by182worktree. Toggle it using the terminal icon in the top right of the app or by

94pressing `Cmd`+`J`.183pressing <kbd>Cmd</kbd>+<kbd>J</kbd>.

95 184 

96Use the terminal to validate changes, run scripts, and perform Git operations185Use the terminal to validate changes, run scripts, and perform Git operations

97without leaving the app. Codex can also read the current terminal output, so186without leaving the app. Codex can also read the current terminal output, so


107 196 

108If you run a task regularly, you can define an **action** inside your [local environment](https://developers.openai.com/codex/app/local-environments) to add a shortcut button to the top of your Codex app window.197If you run a task regularly, you can define an **action** inside your [local environment](https://developers.openai.com/codex/app/local-environments) to add a shortcut button to the top of your Codex app window.

109 198 

110Note that `Cmd`+`K` opens the command palette in the Codex199Note that <kbd>Cmd</kbd>+<kbd>K</kbd> opens the command palette in the Codex

111app. It doesnt clear the terminal. To clear the terminal use `Ctrl`+`L`.200app. It doesn't clear the terminal. To clear the terminal use <kbd>Ctrl</kbd>+<kbd>L</kbd>.

201 

202</div>

112 203 

113![Integrated terminal drawer open beneath a Codex thread](/images/codex/app/integrated-terminal-light.webp)204<CodexScreenshot

205 alt="Integrated terminal drawer open beneath a Codex thread"

206 lightSrc="/images/codex/app/integrated-terminal-light.webp"

207 darkSrc="/images/codex/app/integrated-terminal-dark.webp"

208 maxHeight="400px"

209/>

210 

211</section>

212 

213<section class="feature-grid inverse">

214 

215<div>

114 216 

115## Native Windows sandbox217## Native Windows sandbox

116 218 


120 222 

121[Learn more about Windows setup and sandboxing](https://developers.openai.com/codex/app/windows).223[Learn more about Windows setup and sandboxing](https://developers.openai.com/codex/app/windows).

122 224 

123![Codex app Windows sandbox setup prompt above the message composer](/images/codex/windows/windows-sandbox-setup.webp)225</div>

226 

227<CodexScreenshot

228 alt="Codex app Windows sandbox setup prompt above the message composer"

229 lightSrc="/images/codex/windows/windows-sandbox-setup.webp"

230 darkSrc="/images/codex/windows/windows-sandbox-setup.webp"

231 maxHeight="400px"

232/>

233 

234</section>

235 

236<section class="feature-grid inverse">

237 

238<div>

124 239 

125## Voice dictation240## Voice dictation

126 241 

127Use your voice to prompt Codex. Hold `Ctrl`+`M` while the composer is visible and start talking. Your voice will be transcribed. Edit the transcribed prompt or hit send to have Codex start work.242Use your voice to prompt Codex. Hold <kbd>Ctrl</kbd>+<kbd>M</kbd> while the composer is visible and start talking. Your voice will be transcribed. Edit the transcribed prompt or hit send to have Codex start work.

128 243 

129![Voice dictation indicator in the composer with a transcribed prompt](/images/codex/app/voice-dictation-light.webp)244</div>

245 

246<CodexScreenshot

247 alt="Voice dictation indicator in the composer with a transcribed prompt"

248 lightSrc="/images/codex/app/voice-dictation-light.webp"

249 darkSrc="/images/codex/app/voice-dictation-dark.webp"

250 maxHeight="400px"

251/>

252 

253</section>

254 

255<section class="feature-grid">

256 

257<div>

130 258 

131## Floating pop-out window259## Floating pop-out window

132 260 


137You can also toggle the pop-out window to stay on top when you want it to remain265You can also toggle the pop-out window to stay on top when you want it to remain

138visible across your workflow.266visible across your workflow.

139 267 

140![Pop-out window preview in light mode](/images/codex/app/popover-light.webp)268</div>

269 

270<CodexScreenshot

271 alt="Pop-out window preview in light mode"

272 lightSrc="/images/codex/app/popover-light.webp"

273 darkSrc="/images/codex/app/popover-dark.webp"

274 maxHeight="400px"

275/>

276 

277</section>

278 

279<section class="feature-grid">

280 

281<div>

141 282 

142## In-app browser283## In-app browser

143 284 

144Use the [in-app browser](https://developers.openai.com/codex/app/browser) to preview, review, and comment on285Use the [in-app browser](https://developers.openai.com/codex/app/browser) to preview, review, and comment on

145local development servers, file-backed previews, and public pages that dont286local development servers, file-backed previews, and public pages that don't

146require sign-in while you iterate on a web app.287require sign-in while you iterate on a web app.

147 288 

148The in-app browser doesnt support authentication flows, signed-in pages, your289The in-app browser doesn't support authentication flows, signed-in pages, your

149regular browser profile, cookies, extensions, or existing tabs.290regular browser profile, cookies, extensions, or existing tabs.

150 291 

151Use browser comments to mark specific elements or areas on a page, then ask292Use browser comments to mark specific elements or areas on a page, then ask


156file-backed pages. You can manage the Browser plugin, allowed websites, and297file-backed pages. You can manage the Browser plugin, allowed websites, and

157blocked websites from settings.298blocked websites from settings.

158 299 

159![Codex app showing a browser comment on a local web app preview](/images/codex/app/in-app-browser-light.webp)300</div>

301 

302<CodexScreenshot

303 alt="Codex app showing a browser comment on a local web app preview"

304 lightSrc="/images/codex/app/in-app-browser-light.webp"

305 darkSrc="/images/codex/app/in-app-browser-dark.webp"

306 maxHeight="400px"

307 variant="no-wallpaper"

308/>

309 

310</section>

311 

312<section class="feature-grid inverse">

313 

314<div>

160 315 

161## Computer use316## Computer use

162 317 

163[Computer use](https://developers.openai.com/codex/app/computer-use) helps Codex operate a macOS or Windows318[Computer use](https://developers.openai.com/codex/app/computer-use) helps Codex operate a macOS or Windows

164app by seeing, clicking, and typing. This is useful for testing desktop apps,319app by seeing, clicking, and typing. This is useful for testing desktop apps,

165checking browser or simulator flows, working with data sources that arent320checking browser or simulator flows, working with data sources that aren't

166available as plugins, changing app settings, and reproducing GUI-only bugs.321available as plugins, changing app settings, and reproducing GUI-only bugs.

167 322 

168Because computer use can affect app and system state outside your project323Because computer use can affect app and system state outside your project

169workspace, keep tasks narrow and review permission prompts before continuing.324workspace, keep tasks narrow and review permission prompts before continuing.

170 325 

171The feature isnt available in the European Economic Area, the United Kingdom, or326The feature isn't available in the European Economic Area, the United Kingdom, or

172Switzerland at launch.327Switzerland at launch.

173 328 

174![Codex app asking for permission to use Calculator with computer use](/images/codex/app/computer-use-approval-light.webp)329</div>

330 

331<CodexScreenshot

332 alt="Codex app asking for permission to use Calculator with computer use"

333 lightSrc="/images/codex/app/computer-use-approval-light.webp"

334 darkSrc="/images/codex/app/computer-use-approval-dark.webp"

335 maxHeight="400px"

336 variant="no-wallpaper"

337/>

338 

339</section>

340 

341<section class="feature-grid">

342 

343<div>

344 

345<a id="richer-outputs-and-artifacts"></a>

346<a id="task-sidebar"></a>

347<a id="artifact-viewer"></a>

175 348 

176## Work with non-code artifacts349## Work with non-code artifacts

177 350 


184and how it checked the result.357and how it checked the result.

185 358 

186Use the task sidebar to follow what Codex is doing while a thread runs. It can359Use the task sidebar to follow what Codex is doing while a thread runs. It can

187surface the agents plan, sources, generated artifacts, and task summary so you360surface the agent's plan, sources, generated artifacts, and task summary so you

188can steer the work, inspect generated files, and decide what needs another pass.361can steer the work, inspect generated files, and decide what needs another pass.

189 362 

190![Codex app showing a generated presentation in the artifact viewer](/images/codex/app/artifact-viewer-light.webp)363</div>

364 

365<CodexScreenshot

366 alt="Codex app showing a generated presentation in the artifact viewer"

367 lightSrc="/images/codex/app/artifact-viewer-light.webp"

368 darkSrc="/images/codex/app/artifact-viewer-dark.webp"

369 maxHeight="420px"

370 variant="no-wallpaper"

371/>

372 

373</section>

191 374 

192---375---

193 376 


197your Codex app and IDE Extension automatically sync when both are in the same380your Codex app and IDE Extension automatically sync when both are in the same

198project.381project.

199 382 

200When they sync, you see an **IDE context** option in the Codex app composer. With Auto context383When they sync, you see an **IDE context** option in the Codex app composer. With "Auto context"

201enabled, the Codex app tracks the files youre viewing, so you can reference them indirectly (for384enabled, the Codex app tracks the files you're viewing, so you can reference them indirectly (for

202example, Whats this file about?). You can also see threads running in the Codex app inside the385example, "What's this file about?"). You can also see threads running in the Codex app inside the

203IDE Extension, and vice versa.386IDE Extension, and vice versa.

204 387 

205If youre unsure whether the app includes context, toggle it off and ask the388If you're unsure whether the app includes context, toggle it off and ask the

206same question again to compare results.389same question again to compare results.

207 390 

208## Thread automations391## Thread automations

209 392 

210Automations can also attach to a single thread. These thread automations are393Automations can also attach to a single thread. These thread automations are

211recurring wake-up calls that preserve the threads context so Codex can check394recurring wake-up calls that preserve the thread's context so Codex can check

212on long-running work, poll a source for new information, or continue a follow-up395on long-running work, poll a source for new information, or continue a follow-up

213loop. Use them for heartbeat-style automations that should keep returning to the396loop. Use them for heartbeat-style automations that should keep returning to the

214same conversation on a schedule.397same conversation on a schedule.


228granting different scopes of permission for tool execution. If you are unsure,411granting different scopes of permission for tool execution. If you are unsure,

229approve the narrowest option and continue iterating.412approve the narrowest option and continue iterating.

230 413 

231By default, Codex scopes work to the current project. In most cases, thats the414By default, Codex scopes work to the current project. In most cases, that's the

232right constraint.415right constraint.

233 416 

234If your task requires work across more than one repository or directory, prefer417If your task requires work across more than one repository or directory, prefer


247## MCP support430## MCP support

248 431 

249The Codex app, CLI, and IDE Extension share [Model Context Protocol (MCP)](https://developers.openai.com/codex/mcp) settings.432The Codex app, CLI, and IDE Extension share [Model Context Protocol (MCP)](https://developers.openai.com/codex/mcp) settings.

250If youve already configured MCP servers in one, theyre automatically adopted by the others. To433If you've already configured MCP servers in one, they're automatically adopted by the others. To

251configure new servers, open the MCP section in the apps settings and either enable a recommended434configure new servers, open the MCP section in the app's settings and either enable a recommended

252server or add a new server to your configuration.435server or add a new server to your configuration.

253 436 

254## Web search437## Web search


275while dropping an image to add the image to the context.458while dropping an image to add the image to the context.

276 459 

277You can also ask Codex to view images on your system. By giving Codex tools to take screenshots of460You can also ask Codex to view images on your system. By giving Codex tools to take screenshots of

278the app you are working on, Codex can verify the work its doing.461the app you are working on, Codex can verify the work it's doing.

462 

463<a id="projectless-threads"></a>

279 464 

280## Chats465## Chats

281 466 

282Chats are threads you can start when the task doesnt need a specific project467Chats are threads you can start when the task doesn't need a specific project

283folder or Git repository. Use them for research, triage, planning,468folder or Git repository. Use them for research, triage, planning,

284plugin-heavy workflows, and other conversations where Codex should use connected469plugin-heavy workflows, and other conversations where Codex should use connected

285tools instead of editing a codebase.470tools instead of editing a codebase.


290## Memories475## Memories

291 476 

292[Memories](https://developers.openai.com/codex/memories), where available, let Codex carry useful context477[Memories](https://developers.openai.com/codex/memories), where available, let Codex carry useful context

293from past tasks into future threads. Theyre most useful for stable preferences,478from past tasks into future threads. They're most useful for stable preferences,

294project conventions, recurring work patterns, and known pitfalls that would479project conventions, recurring work patterns, and known pitfalls that would

295otherwise need to repeat.480otherwise need to repeat.

296 481 


305## Keep your computer awake490## Keep your computer awake

306 491 

307Since your tasks might take a while to complete, you can have the Codex app prevent your computer492Since your tasks might take a while to complete, you can have the Codex app prevent your computer

308from going to sleep by enabling the Prevent sleep while running toggle in the apps settings.493from going to sleep by enabling the "Prevent sleep while running" toggle in the app's settings.

309 494 

310## See also495## See also

311 496 

app/settings.md +30 −21

Details

1# Settings – Codex app1# Codex app settings

2 2 

3Use the settings panel to tune how the Codex app behaves, how it opens files,3Use the settings panel to tune how the Codex app behaves, how it opens files,

4and how it connects to tools. Open [**Settings**](codex://settings) from the app menu or4and how it connects to tools. Open [**Settings**](codex://settings) from the app menu or

5press `Cmd`+`,`.5press <kbd>Cmd</kbd>+<kbd>,</kbd>.

6 6 

7## General7## General

8 8 

9Choose where files open, how much command output appears in threads, and where9Choose where files open, how much command output appears in threads, and where

10terminal tabs open by default. You can also require `Cmd`+`Enter`10terminal tabs open by default. You can also require <kbd>Cmd</kbd>+<kbd>Enter</kbd>

11for multiline prompts or prevent sleep while a thread runs.11for multiline prompts or prevent sleep while a thread runs.

12 12 

13## Profile13## Profile


43adjusting accent, background, and foreground colors, and changing the UI and code43adjusting accent, background, and foreground colors, and changing the UI and code

44fonts. You can also share your custom theme with friends.44fonts. You can also share your custom theme with friends.

45 45 

46![Codex app Appearance settings showing theme selection, color controls, and font options](/images/codex/app/theme-selection-light.webp)46<CodexScreenshot

47 alt="Codex app Appearance settings showing theme selection, color controls, and font options"

48 lightSrc="/images/codex/app/theme-selection-light.webp"

49 darkSrc="/images/codex/app/theme-selection-dark.webp"

50 maxHeight="720px"

51 class="mb-8"

52/>

47 53 

48### Codex pets54### Codex pets

49 55 

50Codex pets are optional animated companions for the app. In **Settings**,56<div class="grid gap-5 md:grid-cols-[minmax(0,1fr)_minmax(15rem,50%)] md:items-start xl:grid-cols-[minmax(0,1fr)_minmax(16rem,30%)]">

51go to **Appearance** and choose **Pets** to select a built-in pet or57 <div>

52refresh custom pets from your local Codex home. Type `/pet` in the58 Codex pets are optional animated companions for the app. In **Settings**,

53composer, use **Wake Pet** or **Tuck Away Pet** in **Settings > Appearance**, or59 go to **Appearance** and choose **Pets** to select a built-in pet or

54press `Cmd+K` or `Ctrl+K` and run the same commands to60 refresh custom pets from your local Codex home. Type `/pet` in the

55toggle the floating overlay.61 composer, use **Wake Pet** or **Tuck Away Pet** in **Settings > Appearance**, or

62 press <kbd>Cmd+K</kbd> or <kbd>Ctrl+K</kbd> and run the same commands to

63 toggle the floating overlay.

56 64 

57The overlay keeps active Codex work visible while you use other apps. It65 The overlay keeps active Codex work visible while you use other apps. It

58shows the active thread, reflects whether Codex is running, waiting for66 shows the active thread, reflects whether Codex is running, waiting for

59input, or ready for review, and pairs that state with a short progress67 input, or ready for review, and pairs that state with a short progress

60prompt so you can glance at what changed without reopening the thread.68 prompt so you can glance at what changed without reopening the thread.

61 69 

621/870 </div>

63 71 

64CodexI found a tiny loose thread in settings. Want me to tug it?72 <CodexPetsDemo client:load />

73</div>

65 74 

66To create your own pet, install the `hatch-pet` skill:75To create your own pet, install the `hatch-pet` skill:

67 76 

68```77```text

69$skill-installer hatch-pet78$skill-installer hatch-pet

70```79```

71 80 

72Reload skills from the command menu. Press `Cmd+K` or `Ctrl+K`,81Reload skills from the command menu. Press <kbd>Cmd+K</kbd> or <kbd>Ctrl+K</kbd>,

73choose **Force Reload Skills**, then ask the skill to create a pet:82choose **Force Reload Skills**, then ask the skill to create a pet:

74 83 

75```84```text

76$hatch-pet create a new pet inspired by my recent projects85$hatch-pet create a new pet inspired by my recent projects

77```86```

78 87 


93 102 

94Use these settings to install or enable the bundled Browser plugin, set up the103Use these settings to install or enable the bundled Browser plugin, set up the

95[Codex Chrome extension](https://developers.openai.com/codex/app/chrome-extension), and manage allowed and104[Codex Chrome extension](https://developers.openai.com/codex/app/chrome-extension), and manage allowed and

96blocked websites. Codex asks before using a website unless youve allowed it.105blocked websites. Codex asks before using a website unless you've allowed it.

97Removing a blocked site lets Codex ask again before using it in the browser.106Removing a blocked site lets Codex ask again before using it in the browser.

98 107 

99See [In-app browser](https://developers.openai.com/codex/app/browser) for browser preview, comment, and108See [In-app browser](https://developers.openai.com/codex/app/browser) for browser preview, comment, and


104Check your Computer Use settings to review desktop-app access and related113Check your Computer Use settings to review desktop-app access and related

105preferences after setup. On macOS, revoke system-level access by updating Screen114preferences after setup. On macOS, revoke system-level access by updating Screen

106Recording or Accessibility permissions in macOS Privacy & Security settings. The115Recording or Accessibility permissions in macOS Privacy & Security settings. The

107feature isnt available in the EEA, the United Kingdom, or Switzerland at launch.116feature isn't available in the EEA, the United Kingdom, or Switzerland at launch.

108 117 

109## Personalization118## Personalization

110 119 

app/windows.md +67 −31

Details

1# Windows – Codex app1# Windows

2 2 

3The [Codex app for Windows](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi) gives you one interface for3The [Codex app for Windows](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi) gives you one interface for

4working across projects, running parallel agent threads, and reviewing results.4working across projects, running parallel agent threads, and reviewing results.


8[Windows sandbox](https://developers.openai.com/codex/windows#windows-sandbox), or you can configure it to8[Windows sandbox](https://developers.openai.com/codex/windows#windows-sandbox), or you can configure it to

9run in [Windows Subsystem for Linux 2 (WSL2)](#windows-subsystem-for-linux-wsl).9run in [Windows Subsystem for Linux 2 (WSL2)](#windows-subsystem-for-linux-wsl).

10 10 

11![Codex app for Windows showing a project sidebar, active thread, and review pane](/images/codex/windows/codex-windows-light.webp)11<CodexScreenshot

12 alt="Codex app for Windows showing a project sidebar, active thread, and review pane"

13 lightSrc="/images/codex/windows/codex-windows-light.webp"

14 darkSrc="/images/codex/windows/codex-windows-dark.webp"

15 variant="no-wallpaper"

16 maxHeight="320px"

17/>

12 18 

13## Download and update the Codex app19## Download the Codex app

14 20 

15Download the Codex app from the21Download the [Codex app](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi) for Windows.

16[Microsoft Store](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi).

17 22 

18Then follow the [quickstart](https://developers.openai.com/codex/quickstart?setup=app) to get started.23Then follow the [quickstart](https://developers.openai.com/codex/quickstart?setup=app) to get started.

19 24 

20To update the app, open the Microsoft Store, go to **Downloads**, and click

21**Check for updates**. The Store installs the latest version afterward.

22 

23For enterprises, administrators can deploy the app with Microsoft Store app25For enterprises, administrators can deploy the app with Microsoft Store app

24distribution through enterprise management tools.26distribution through enterprise management tools.

25 27 

26If you prefer a command-line install path, or need an alternative to opening28If you prefer a command-line install path, or need an alternative to opening

27the Microsoft Store UI, run:29the Microsoft Store UI, run:

28 30 

29```31```powershell

30winget install Codex -s msstore32winget install Codex -s msstore

31```33```

32 34 


35The Codex app on Windows supports a native [Windows sandbox](https://developers.openai.com/codex/windows#windows-sandbox) when the agent runs in PowerShell, and uses Linux sandboxing when you run the agent in [Windows Subsystem for Linux 2 (WSL2)](#windows-subsystem-for-linux-wsl). To apply sandbox protections in either mode, set sandbox permissions to **Default permissions** in the Composer before sending messages to Codex.37The Codex app on Windows supports a native [Windows sandbox](https://developers.openai.com/codex/windows#windows-sandbox) when the agent runs in PowerShell, and uses Linux sandboxing when you run the agent in [Windows Subsystem for Linux 2 (WSL2)](#windows-subsystem-for-linux-wsl). To apply sandbox protections in either mode, set sandbox permissions to **Default permissions** in the Composer before sending messages to Codex.

36 38 

37Running Codex in full access mode means Codex is not limited to your project39Running Codex in full access mode means Codex is not limited to your project

38directory and might perform unintentional destructive actions that can lead to40 directory and might perform unintentional destructive actions that can lead to

39data loss. Keep sandbox boundaries in place and use [rules](https://developers.openai.com/codex/rules) for41 data loss. Keep sandbox boundaries in place and use [rules](https://developers.openai.com/codex/rules) for

40targeted exceptions, or set your [approval policy to42 targeted exceptions, or set your [approval policy to

41never](https://developers.openai.com/codex/agent-approvals-security#run-without-approval-prompts) to have43 never](https://developers.openai.com/codex/agent-approvals-security#run-without-approval-prompts) to have

42Codex attempt to solve problems without asking for escalated permissions,44 Codex attempt to solve problems without asking for escalated permissions,

43based on your [approval and security setup](https://developers.openai.com/codex/agent-approvals-security).45 based on your [approval and security setup](https://developers.openai.com/codex/agent-approvals-security).

44 46 

45## Customize for your dev setup47## Customize for your dev setup

46 48 

49<section class="feature-grid">

50 

51<div>

52 

47### Preferred editor53### Preferred editor

48 54 

49Choose a default app for **Open**, such as Visual Studio, VS Code, or another55Choose a default app for **Open**, such as Visual Studio, VS Code, or another


51different app from the **Open** menu for a project, that project-specific57different app from the **Open** menu for a project, that project-specific

52choice takes precedence.58choice takes precedence.

53 59 

54![Codex app settings showing the default Open In app on Windows](/images/codex/windows/open-in-windows-light.webp)60</div>

61 

62<CodexScreenshot

63 alt="Codex app settings showing the default Open In app on Windows"

64 lightSrc="/images/codex/windows/open-in-windows-light.webp"

65 darkSrc="/images/codex/windows/open-in-windows-dark.webp"

66 maxHeight={520}

67 maxWidth={784}

68/>

69 

70</section>

71 

72<section class="feature-grid inverse">

73 

74<div>

55 75 

56### Integrated terminal76### Integrated terminal

57 77 


67integrated terminal open, restart the app or start a new thread before87integrated terminal open, restart the app or start a new thread before

68expecting the new default terminal to appear.88expecting the new default terminal to appear.

69 89 

70![Codex app settings showing the integrated terminal selection on Windows](/images/codex/windows/integrated-shell-light.webp)90</div>

91 

92<CodexScreenshot

93 alt="Codex app settings showing the integrated terminal selection on Windows"

94 lightSrc="/images/codex/windows/integrated-shell-light.webp"

95 darkSrc="/images/codex/windows/integrated-shell-dark.webp"

96 maxHeight={520}

97 maxWidth={788}

98/>

99 

100</section>

71 101 

72## Windows Subsystem for Linux (WSL)102## Windows Subsystem for Linux (WSL)

73 103 


76Windows Subsystem for Linux 2 (WSL2) by using the `wsl` CLI when needed.106Windows Subsystem for Linux 2 (WSL2) by using the `wsl` CLI when needed.

77 107 

78If you want to add a project from the WSL filesystem, click **Add new project**108If you want to add a project from the WSL filesystem, click **Add new project**

79or press `Ctrl`+`O`, then type `\\wsl$\` into the File109or press <kbd>Ctrl</kbd>+<kbd>O</kbd>, then type `\\wsl$\` into the File

80Explorer window. From there, choose your Linux distribution and the folder you110Explorer window. From there, choose your Linux distribution and the folder you

81want to open.111want to open.

82 112 


87 117 

88If you want the agent itself to run in WSL2, open **[Settings](codex://settings)**,118If you want the agent itself to run in WSL2, open **[Settings](codex://settings)**,

89switch the agent from Windows native to WSL, and **restart the app**. The119switch the agent from Windows native to WSL, and **restart the app**. The

90change doesnt take effect until you restart. Your projects should remain in120change doesn't take effect until you restart. Your projects should remain in

91place after restart.121place after restart.

92 122 

93WSL1 was supported through Codex `0.114`. Starting in Codex `0.115`, the Linux123WSL1 was supported through Codex `0.114`. Starting in Codex `0.115`, the Linux

94sandbox moved to `bubblewrap`, so WSL1 is no longer supported.124sandbox moved to `bubblewrap`, so WSL1 is no longer supported.

95 125 

96![Codex app settings showing the agent selector with Windows native and WSL options](/images/codex/windows/wsl-select-light.webp)126<CodexScreenshot

127 alt="Codex app settings showing the agent selector with Windows native and WSL options"

128 lightSrc="/images/codex/windows/wsl-select-light.webp"

129 darkSrc="/images/codex/windows/wsl-select-dark.webp"

130 maxHeight={520}

131 maxWidth={786}

132 class="mb-8"

133/>

97 134 

98You configure the integrated terminal independently from the agent. See135You configure the integrated terminal independently from the agent. See

99[Customize for your dev setup](#customize-for-your-dev-setup) for the136[Customize for your dev setup](#customize-for-your-dev-setup) for the


117into the [integrated terminal](https://developers.openai.com/codex/app/features#integrated-terminal) or154into the [integrated terminal](https://developers.openai.com/codex/app/features#integrated-terminal) or

118asking Codex to install them:155asking Codex to install them:

119 156 

120```157```powershell

121winget install --id Git.Git158winget install --id Git.Git

122winget install --id OpenJS.NodeJS.LTS159winget install --id OpenJS.NodeJS.LTS

123winget install --id Python.Python.3.14160winget install --id Python.Python.3.14


151 188 

152An error may look something like this:189An error may look something like this:

153 190 

154```191```text

155npm.ps1 cannot be loaded because running scripts is disabled on this system.192npm.ps1 cannot be loaded because running scripts is disabled on this system.

156```193```

157 194 

158A common fix is to set the execution policy to `RemoteSigned`:195A common fix is to set the execution policy to `RemoteSigned`:

159 196 

160```197```powershell

161Set-ExecutionPolicy -ExecutionPolicy RemoteSigned198Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

162```199```

163 200 

164For details and other options, check Microsofts201For details and other options, check Microsoft's

165[execution policy guide](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies)202[execution policy guide](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies)

166before changing the policy.203before changing the policy.

167 204 


186`%USERPROFILE%\.codex`.223`%USERPROFILE%\.codex`.

187 224 

188If you also run the Codex CLI inside WSL, the CLI uses the Linux home225If you also run the Codex CLI inside WSL, the CLI uses the Linux home

189directory by default, so it doesnt automatically share configuration, cached226directory by default, so it doesn't automatically share configuration, cached

190auth, or session history with the Windows app.227auth, or session history with the Windows app.

191 228 

192To share them, use one of these approaches:229To share them, use one of these approaches:


194- Sync WSL `~/.codex` with `%USERPROFILE%\.codex` on your file system.231- Sync WSL `~/.codex` with `%USERPROFILE%\.codex` on your file system.

195- Point WSL at the Windows Codex home directory by setting `CODEX_HOME`:232- Point WSL at the Windows Codex home directory by setting `CODEX_HOME`:

196 233 

197```234```bash

198export CODEX_HOME=/mnt/c/Users/<windows-user>/.codex235export CODEX_HOME=/mnt/c/Users/<windows-user>/.codex

199```236```

200 237 


203 240 

204### Git features are unavailable241### Git features are unavailable

205 242 

206If you dont have Git installed natively on Windows, the app cant use some243If you don't have Git installed natively on Windows, the app can't use some

207features. Install it with `winget install Git.Git` from PowerShell or `cmd.exe`.244features. Install it with `winget install Git.Git` from PowerShell or `cmd.exe`.

208 245 

209### Git isnt detected for projects opened from `\\wsl$`246### Git isn't detected for projects opened from `\\wsl$`

210 247 

211For now, if you want to use the Windows-native agent with a project also248For now, if you want to use the Windows-native agent with a project also

212accessible from WSL, the most reliable workaround is to store the project249accessible from WSL, the most reliable workaround is to store the project

213on the native Windows drive and access it in WSL through `/mnt/<drive>/...`.250on the native Windows drive and access it in WSL through `/mnt/<drive>/...`.

214 251 

215### `Cmder` isnt listed in the open dialog252### `Cmder` isn't listed in the open dialog

216 253 

217If `Cmder` is installed but doesnt show in Codexs open dialog, add it to the254If `Cmder` is installed but doesn't show in Codex's open dialog, add it to the

218Windows Start Menu: right-click `Cmder` and choose **Add to Start**, then255Windows Start Menu: right-click `Cmder` and choose **Add to Start**, then

219restart Codex or reboot.256restart Codex or reboot.

220 

appshots.md +6 −6

Details

1# Appshots – Codex1# Appshots

2 2 

3Appshots let you send the frontmost app window to a Codex thread. Use them when3Appshots let you send the frontmost app window to a Codex thread. Use them when

4youre actively working in another app on your computer and want to provide4you're actively working in another app on your computer and want to provide

5Codex with your current context so it can help you with the task.5Codex with your current context so it can help you with the task.

6 6 

7Appshots are available in the Codex app on macOS. Press both Command keys, or7Appshots are available in the Codex app on macOS. Press both Command keys, or

8your custom Appshots hotkey, to take one.8 your custom Appshots hotkey, to take one.

9 9 

10## What appshots capture10## What appshots capture

11 11 


29- Share an email or calendar view and ask Codex to draft the next step.29- Share an email or calendar view and ask Codex to draft the next step.

30- Share an image editor, design, or preview window and ask Codex to revise the30- Share an image editor, design, or preview window and ask Codex to revise the

31 related assets or code.31 related assets or code.

32- Share an error, settings panel, or app state thats easier to show than32- Share an error, settings panel, or app state that's easier to show than

33 describe.33 describe.

34 34 

35## Take an appshot35## Take an appshot


66 66 

67Appshots are a Codex app feature. Create them from the Codex app on macOS. If67Appshots are a Codex app feature. Create them from the Codex app on macOS. If

68you resume a thread in the CLI that already contains an appshot, the attachment68you resume a thread in the CLI that already contains an appshot, the attachment

69is part of the thread history, but the CLI cant create a new appshot.69is part of the thread history, but the CLI can't create a new appshot.

70 70 

71For some apps and websites, including Google Docs, Gmail, Google Sheets, and71For some apps and websites, including Google Docs, Gmail, Google Sheets, and

72Google Slides, Codex may receive only the visible screenshot and may not receive72Google Slides, Codex may receive only the visible screenshot and may not receive


74Codex can use that plugin to access the relevant app content and help with your74Codex can use that plugin to access the relevant app content and help with your

75request.75request.

76 76 

77If appshots dont work:77If appshots don't work:

78 78 

791. Open **System Settings > Privacy & Security**.791. Open **System Settings > Privacy & Security**.

802. Check **Screen & System Audio Recording** and **Accessibility** for Codex802. Check **Screen & System Audio Recording** and **Accessibility** for Codex

auth.md +24 −25

Details

1# Authentication – Codex1# Authentication

2 2 

3## OpenAI authentication3## OpenAI authentication

4 4 


12Your sign-in method also determines which admin controls and data-handling policies apply.12Your sign-in method also determines which admin controls and data-handling policies apply.

13 13 

14- With sign in with ChatGPT, Codex usage follows your ChatGPT workspace permissions, RBAC, and ChatGPT Enterprise retention and residency settings14- With sign in with ChatGPT, Codex usage follows your ChatGPT workspace permissions, RBAC, and ChatGPT Enterprise retention and residency settings

15- With an API key, usage follows your API organizations retention and data-sharing settings instead15- With an API key, usage follows your API organization's retention and data-sharing settings instead

16 16 

17For the CLI, Sign in with ChatGPT is the default authentication path when no valid session is available.17For the CLI, Sign in with ChatGPT is the default authentication path when no valid session is available.

18 18 


23If your environment already provides a ChatGPT access token, the CLI can read23If your environment already provides a ChatGPT access token, the CLI can read

24it from stdin:24it from stdin:

25 25 

26```26```shell

27printenv CODEX_ACCESS_TOKEN | codex login --with-access-token27printenv CODEX_ACCESS_TOKEN | codex login --with-access-token

28```28```

29 29 


42included ChatGPT plan credits.42included ChatGPT plan credits.

43 43 

44We recommend API key authentication for programmatic Codex CLI workflows, such44We recommend API key authentication for programmatic Codex CLI workflows, such

45as CI/CD jobs. Dont expose Codex execution in untrusted or public environments.45as CI/CD jobs. Don't expose Codex execution in untrusted or public environments.

46 46 

47### Use Codex access tokens for enterprise automation47### Use Codex access tokens for enterprise automation

48 48 


61 61 

62Codex cloud interacts directly with your codebase, so it needs stronger security than many other ChatGPT features. Enable multi-factor authentication (MFA).62Codex cloud interacts directly with your codebase, so it needs stronger security than many other ChatGPT features. Enable multi-factor authentication (MFA).

63 63 

64If you use a social login provider (Google, Microsoft, Apple), you arent required to enable MFA on your ChatGPT account, but you can set it up with your social login provider.64If you use a social login provider (Google, Microsoft, Apple), you aren't required to enable MFA on your ChatGPT account, but you can set it up with your social login provider.

65 65 

66For setup instructions, see:66For setup instructions, see:

67 67 


69- [Microsoft](https://support.microsoft.com/en-us/topic/what-is-multifactor-authentication-e5e39437-121c-be60-d123-eda06bddf661)69- [Microsoft](https://support.microsoft.com/en-us/topic/what-is-multifactor-authentication-e5e39437-121c-be60-d123-eda06bddf661)

70- [Apple](https://support.apple.com/en-us/102660)70- [Apple](https://support.apple.com/en-us/102660)

71 71 

72If you access ChatGPT through single sign-on (SSO), your organizations SSO administrator should enforce MFA for all users.72If you access ChatGPT through single sign-on (SSO), your organization's SSO administrator should enforce MFA for all users.

73 73 

74If you log in using an email and password, you must set up MFA on your account before accessing Codex cloud.74If you log in using an email and password, you must set up MFA on your account before accessing Codex cloud.

75 75 


77 77 

78## Login caching78## Login caching

79 79 

80When you sign in to the Codex app, CLI, or IDE Extension using either ChatGPT or an API key, Codex caches your login details and reuses them the next time you start the CLI or extension. The CLI and extension share the same cached login details. If you log out from either one, youll need to sign in again the next time you start the CLI or extension.80When you sign in to the Codex app, CLI, or IDE Extension using either ChatGPT or an API key, Codex caches your login details and reuses them the next time you start the CLI or extension. The CLI and extension share the same cached login details. If you log out from either one, you'll need to sign in again the next time you start the CLI or extension.

81 81 

82Codex caches login details locally in a plaintext file at `~/.codex/auth.json` or in your OS-specific credential store.82Codex caches login details locally in a plaintext file at `~/.codex/auth.json` or in your OS-specific credential store.

83 83 


87 87 

88Use `cli_auth_credentials_store` to control where the Codex CLI stores cached credentials:88Use `cli_auth_credentials_store` to control where the Codex CLI stores cached credentials:

89 89 

90```90```toml

91# file | keyring | auto91# file | keyring | auto

92cli_auth_credentials_store = "keyring"92cli_auth_credentials_store = "keyring"

93```93```


97- `auto` uses the OS credential store when available, otherwise falls back to `auth.json`.97- `auto` uses the OS credential store when available, otherwise falls back to `auth.json`.

98 98 

99If you use file-based storage, treat `~/.codex/auth.json` like a password: it99If you use file-based storage, treat `~/.codex/auth.json` like a password: it

100contains access tokens. Dont commit it, paste it into tickets, or share it in100 contains access tokens. Don't commit it, paste it into tickets, or share it in

101chat.101 chat.

102 102 

103## Enforce a login method or workspace103## Enforce a login method or workspace

104 104 

105In managed environments, admins may restrict how users are allowed to authenticate:105In managed environments, admins may restrict how users are allowed to authenticate:

106 106 

107```107```toml

108# Only allow ChatGPT login or only allow API key login.108# Only allow ChatGPT login or only allow API key login.

109forced_login_method = "chatgpt" # or "api"109forced_login_method = "chatgpt" # or "api"

110 110 


112forced_chatgpt_workspace_id = "00000000-0000-0000-0000-000000000000"112forced_chatgpt_workspace_id = "00000000-0000-0000-0000-000000000000"

113```113```

114 114 

115If the active credentials dont match the configured restrictions, Codex logs the user out and exits.115If the active credentials don't match the configured restrictions, Codex logs the user out and exits.

116 116 

117These settings are commonly applied via managed configuration rather than per-user setup. See [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).117These settings are commonly applied via managed configuration rather than per-user setup. See [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).

118 118 


130custom CA settings apply to login, normal HTTPS requests, and secure WebSocket130custom CA settings apply to login, normal HTTPS requests, and secure WebSocket

131connections.131connections.

132 132 

133```133```shell

134export CODEX_CA_CERTIFICATE=/path/to/corporate-root-ca.pem134export CODEX_CA_CERTIFICATE=/path/to/corporate-root-ca.pem

135codex login135codex login

136```136```


139 139 

140If you are signing in to ChatGPT with the Codex CLI, there are some situations where the browser-based login UI may not work:140If you are signing in to ChatGPT with the Codex CLI, there are some situations where the browser-based login UI may not work:

141 141 

142- Youre running the CLI in a remote or headless environment.142- You're running the CLI in a remote or headless environment.

143- Your local networking configuration blocks the localhost callback Codex uses to return the OAuth token to the CLI after you sign in.143- Your local networking configuration blocks the localhost callback Codex uses to return the OAuth token to the CLI after you sign in.

144 144 

145In these situations, prefer device code authentication (beta). In the interactive login UI, choose **Sign in with Device Code**, or run `codex login --device-auth` directly. If device code authentication doesnt work in your environment, use one of the fallback methods.145In these situations, prefer device code authentication (beta). In the interactive login UI, choose **Sign in with Device Code**, or run `codex login --device-auth` directly. If device code authentication doesn't work in your environment, use one of the fallback methods.

146 146 

147### Preferred: Device code authentication (beta)147### Preferred: Device code authentication (beta)

148 148 

1491. Enable device code login in your ChatGPT security settings (personal account) or ChatGPT workspace permissions (workspace admin).1491. Enable device code login in your ChatGPT security settings (personal account) or ChatGPT workspace permissions (workspace admin).

1502. In the terminal where youre running Codex, choose one of these options:1502. In the terminal where you're running Codex, choose one of these options:

151 - In the interactive login UI, select **Sign in with Device Code**.151 - In the interactive login UI, select **Sign in with Device Code**.

152 - Run `codex login --device-auth`.152 - Run `codex login --device-auth`.

1533. Open the link in your browser, sign in, then enter the one-time code.1533. Open the link in your browser, sign in, then enter the one-time code.

154 154 

155If device code login isnt enabled by the server, Codex falls back to the standard browser-based login flow.155If device code login isn't enabled by the server, Codex falls back to the standard browser-based login flow.

156 156 

157### Fallback: Authenticate locally and copy your auth cache157### Fallback: Authenticate locally and copy your auth cache

158 158 


1622. Confirm the login cache exists at `~/.codex/auth.json`.1622. Confirm the login cache exists at `~/.codex/auth.json`.

1633. Copy `~/.codex/auth.json` to `~/.codex/auth.json` on the headless machine.1633. Copy `~/.codex/auth.json` to `~/.codex/auth.json` on the headless machine.

164 164 

165Treat `~/.codex/auth.json` like a password: it contains access tokens. Dont commit it, paste it into tickets, or share it in chat.165Treat `~/.codex/auth.json` like a password: it contains access tokens. Don't commit it, paste it into tickets, or share it in chat.

166 166 

167If your OS stores credentials in a credential store instead of `~/.codex/auth.json`, this method may not apply. See167If your OS stores credentials in a credential store instead of `~/.codex/auth.json`, this method may not apply. See

168[Credential storage](#credential-storage) for how to configure file-based storage.168[Credential storage](#credential-storage) for how to configure file-based storage.

169 169 

170Copy to a remote machine over SSH:170Copy to a remote machine over SSH:

171 171 

172```172```shell

173ssh user@remote 'mkdir -p ~/.codex'173ssh user@remote 'mkdir -p ~/.codex'

174scp ~/.codex/auth.json user@remote:~/.codex/auth.json174scp ~/.codex/auth.json user@remote:~/.codex/auth.json

175```175```

176 176 

177Or use a one-liner that avoids `scp`:177Or use a one-liner that avoids `scp`:

178 178 

179```179```shell

180ssh user@remote 'mkdir -p ~/.codex && cat > ~/.codex/auth.json' < ~/.codex/auth.json180ssh user@remote 'mkdir -p ~/.codex && cat > ~/.codex/auth.json' < ~/.codex/auth.json

181```181```

182 182 

183Copy into a Docker container:183Copy into a Docker container:

184 184 

185```185```shell

186# Replace MY_CONTAINER with the name or ID of your container.186# Replace MY_CONTAINER with the name or ID of your container.

187CONTAINER_HOME=$(docker exec MY_CONTAINER printenv HOME)187CONTAINER_HOME=$(docker exec MY_CONTAINER printenv HOME)

188docker exec MY_CONTAINER mkdir -p "$CONTAINER_HOME/.codex"188docker exec MY_CONTAINER mkdir -p "$CONTAINER_HOME/.codex"


197 197 

198### Fallback: Forward the localhost callback over SSH198### Fallback: Forward the localhost callback over SSH

199 199 

200If you can forward ports between your local machine and the remote host, you can use the standard browser-based flow by tunneling Codexs local callback server (default `localhost:1455`).200If you can forward ports between your local machine and the remote host, you can use the standard browser-based flow by tunneling Codex's local callback server (default `localhost:1455`).

201 201 

2021. From your local machine, start port forwarding:2021. From your local machine, start port forwarding:

203 203 

204```204```shell

205ssh -L 1455:localhost:1455 user@remote205ssh -L 1455:localhost:1455 user@remote

206```206```

207 207 


213 213 

214- **OpenAI authentication**: Set `requires_openai_auth = true` to use OpenAI authentication. You can then sign in with ChatGPT or an API key. This is useful when you access OpenAI models through an LLM proxy server. When `requires_openai_auth = true`, Codex ignores `env_key`.214- **OpenAI authentication**: Set `requires_openai_auth = true` to use OpenAI authentication. You can then sign in with ChatGPT or an API key. This is useful when you access OpenAI models through an LLM proxy server. When `requires_openai_auth = true`, Codex ignores `env_key`.

215- **Environment variable authentication**: Set `env_key = "<ENV_VARIABLE_NAME>"` to use a provider-specific API key from the local environment variable named `<ENV_VARIABLE_NAME>`.215- **Environment variable authentication**: Set `env_key = "<ENV_VARIABLE_NAME>"` to use a provider-specific API key from the local environment variable named `<ENV_VARIABLE_NAME>`.

216- **No authentication**: If you dont set `requires_openai_auth` (or set it to `false`) and you dont set `env_key`, Codex assumes the provider doesnt require authentication. This is useful for local models.216- **No authentication**: If you don't set `requires_openai_auth` (or set it to `false`) and you don't set `env_key`, Codex assumes the provider doesn't require authentication. This is useful for local models.

217 

cli.md +73 −44

Details

1# CLI – Codex1# Codex CLI

2 2 

3Codex CLI is OpenAIs coding agent that you can run locally from your terminal. It can read, change, and run code on your machine in the selected directory.3Codex CLI is OpenAI's coding agent that you can run locally from your terminal. It can read, change, and run code on your machine in the selected directory.

4Its [open source](https://github.com/openai/codex) and built in Rust for speed and efficiency.4It's [open source](https://github.com/openai/codex) and built in Rust for speed and efficiency.

5 5 

6ChatGPT Plus, Pro, Business, Edu, and Enterprise plans include Codex. Learn more about [whats included](https://developers.openai.com/codex/pricing).6ChatGPT Plus, Pro, Business, Edu, and Enterprise plans include Codex. Learn more about [what's included](https://developers.openai.com/codex/pricing).

7 

8<YouTubeEmbed

9 title="Codex CLI overview"

10 videoId="iqNzfK4_meQ"

11 class="max-w-md"

12/>

13<br />

7 14 

8## CLI setup15## CLI setup

9 16 

10Choose your install option17<CliSetupSteps client:load />

18 

19The Codex CLI is available on macOS, Windows, and Linux. On Windows, run Codex

20 natively in PowerShell with the Windows sandbox, or use WSL2 when you need a

21 Linux-native environment. For setup details, see the

22 <a href="/codex/windows">Windows setup guide</a>.

11 23 

12macOS/LinuxWindowsnpmHomebrew24If you're new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).

13 25 

141. 126---

15 27 

16 ### Install28## Work with the Codex CLI

17 29 

18 Install the Codex CLI with the standalone installer for macOS and Linux.30<BentoContainer>

31 <BentoContent href="/codex/cli/features#running-in-interactive-mode">

19 32 

20 macOS/Linux install command33### Run Codex interactively

21 34 

22 curl -fsSL https://chatgpt.com/codex/install.sh | shCopy35Run `codex` to start an interactive terminal UI (TUI) session.

23 36 

24 For unattended installs, set `CODEX_NON_INTERACTIVE=1` on the shell that runs the downloaded installer. See [Environment variables](https://developers.openai.com/codex/environment-variables#installer-variables) for details.37 </BentoContent>

38 <BentoContent href="/codex/cli/features#models-and-reasoning">

25 39 

26 macOS/Linux unattended install command40### Control model and reasoning

27 41 

28 curl -fsSL https://chatgpt.com/codex/install.sh | CODEX\_NON\_INTERACTIVE=1 shCopy42Use `/model` to switch between GPT-5.4, GPT-5.3-Codex, and other available models, or adjust reasoning levels.

292. 2

30 43 

31 ### Run44 </BentoContent>

45 <BentoContent href="/codex/cli/features#image-inputs">

32 46 

33 Run Codex in a terminal. It can inspect your repository, edit files, and run commands.47### Image inputs

34 48 

35 Run Codex command49Attach screenshots or design specs so Codex reads them alongside your prompt.

36 50 

37 codexCopy51 </BentoContent>

52 <BentoContent href="/codex/cli/features#image-generation">

38 53 

39 The first time you run Codex, you'll be prompted to sign in. Authenticate with your ChatGPT account or an API key.54### Image generation

40 55 

41 See the [pricing page](https://developers.openai.com/codex/pricing) if you're not sure which plans include Codex access.56Generate or edit images directly in the CLI, and attach references when you want Codex to iterate on an existing asset.

423. 3

43 57 

44 ### Upgrade58 </BentoContent>

45 59 

46 New versions of the Codex CLI are released regularly. See the [changelog](https://developers.openai.com/codex/changelog) for release notes. To upgrade a standalone install, rerun the installer:60 <BentoContent href="/codex/cli/features#running-local-code-review">

47 61 

48 macOS/Linux upgrade command62### Run local code review

49 63 

50 curl -fsSL https://chatgpt.com/codex/install.sh | shCopy64Get your code reviewed by a separate Codex agent before you commit or push your changes.

51 65 

52The Codex CLI is available on macOS, Windows, and Linux. On Windows, run Codex66 </BentoContent>

53natively in PowerShell with the Windows sandbox, or use WSL2 when you need a

54Linux-native environment. For setup details, see the

55[Windows setup guide](https://developers.openai.com/codex/windows).

56 67 

57If you’re new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).68 <BentoContent href="/codex/subagents">

58 69 

70### Use subagents

59 71 

60## Work with the Codex CLI72Use subagents to parallelize complex tasks.

73 

74 </BentoContent>

75 

76 <BentoContent href="/codex/cli/features#web-search">

77 

78### Web search

79 

80Use Codex to search the web and get up-to-date information for your task.

81 

82 </BentoContent>

83 

84 <BentoContent href="/codex/cli/features#working-with-codex-cloud">

85 

86### Codex Cloud tasks

61 87 

62[### Run Codex interactively88Launch a Codex Cloud task, choose environments, and apply the resulting diffs without leaving your terminal.

63 89 

64Run `codex` to start an interactive terminal UI (TUI) session.](https://developers.openai.com/codex/cli/features#running-in-interactive-mode)[### Control model and reasoning90 </BentoContent>

65 91 

66Use `/model` to switch between GPT-5.4, GPT-5.3-Codex, and other available models, or adjust reasoning levels.](https://developers.openai.com/codex/cli/features#models-reasoning)[### Image inputs92 <BentoContent href="/codex/noninteractive">

67 93 

68Attach screenshots or design specs so Codex reads them alongside your prompt.](https://developers.openai.com/codex/cli/features#image-inputs)[### Image generation94### Scripting Codex

69 95 

70Generate or edit images directly in the CLI, and attach references when you want Codex to iterate on an existing asset.](https://developers.openai.com/codex/cli/features#image-generation)[### Run local code review96Automate repeatable workflows by scripting Codex with the `exec` command.

71 97 

72Get your code reviewed by a separate Codex agent before you commit or push your changes.](https://developers.openai.com/codex/cli/features#running-local-code-review)[### Use subagents98 </BentoContent>

99 <BentoContent href="/codex/mcp">

73 100 

74Use subagents to parallelize complex tasks.](https://developers.openai.com/codex/subagents)[### Web search101### Model Context Protocol

75 102 

76Use Codex to search the web and get up-to-date information for your task.](https://developers.openai.com/codex/cli/features#web-search)[### Codex Cloud tasks103Give Codex access to additional third-party tools and context with Model Context Protocol (MCP).

77 104 

78Launch a Codex Cloud task, choose environments, and apply the resulting diffs without leaving your terminal.](https://developers.openai.com/codex/cli/features#working-with-codex-cloud)[### Scripting Codex105 </BentoContent>

79 106

80Automate repeatable workflows by scripting Codex with the `exec` command.](https://developers.openai.com/codex/noninteractive)[### Model Context Protocol107 <BentoContent href="/codex/cli/features#approval-modes">

81 108 

82Give Codex access to additional third-party tools and context with Model Context Protocol (MCP).](https://developers.openai.com/codex/mcp)[### Approval modes109### Approval modes

83 110 

84Choose the approval mode that matches your comfort level before Codex edits or runs commands.](https://developers.openai.com/codex/cli/features#approval-modes)111Choose the approval mode that matches your comfort level before Codex edits or runs commands.

85 112 

113 </BentoContent>

114</BentoContainer>

cli/features.md +42 −43

Details

1# Features – Codex CLI1# Codex CLI features

2 2 

3Codex supports workflows beyond chat. Use this guide to learn what each one unlocks and when to use it.3Codex supports workflows beyond chat. Use this guide to learn what each one unlocks and when to use it.

4 4 

5## Running in interactive mode5## Running in interactive mode

6 6 

7Codex launches into a full-screen terminal UI that can read your repository, make edits, and run commands as you iterate together. Use it whenever you want a conversational workflow where you can review Codexs actions in real time.7Codex launches into a full-screen terminal UI that can read your repository, make edits, and run commands as you iterate together. Use it whenever you want a conversational workflow where you can review Codex's actions in real time.

8 8 

9```9```bash

10codex10codex

11```11```

12 12 

13You can also specify an initial prompt on the command line.13You can also specify an initial prompt on the command line.

14 14 

15```15```bash

16codex "Explain this codebase to me"16codex "Explain this codebase to me"

17```17```

18 18 


21- Send prompts, code snippets, or screenshots (see [image inputs](#image-inputs)) directly into the composer.21- Send prompts, code snippets, or screenshots (see [image inputs](#image-inputs)) directly into the composer.

22- Watch Codex explain its plan before making a change, and approve or reject steps inline.22- Watch Codex explain its plan before making a change, and approve or reject steps inline.

23- Read syntax-highlighted markdown code blocks and diffs in the TUI, then use `/theme` to preview and save a preferred theme.23- Read syntax-highlighted markdown code blocks and diffs in the TUI, then use `/theme` to preview and save a preferred theme.

24- Use `/clear` to wipe the terminal and start a fresh chat, or press `Ctrl`+`L` to clear the screen without starting a new conversation.24- Use `/clear` to wipe the terminal and start a fresh chat, or press <kbd>Ctrl</kbd>+<kbd>L</kbd> to clear the screen without starting a new conversation.

25- Use `/copy` or press `Ctrl`+`O` to copy the latest completed Codex output. If a turn is still running, Codex copies the most recent finished output instead of in-progress text.25- Use `/copy` or press <kbd>Ctrl</kbd>+<kbd>O</kbd> to copy the latest completed Codex output. If a turn is still running, Codex copies the most recent finished output instead of in-progress text.

26- Press `Tab` while Codex is running to queue follow-up text, slash commands, or `!` shell commands for the next turn.26- Press <kbd>Tab</kbd> while Codex is running to queue follow-up text, slash commands, or `!` shell commands for the next turn.

27- Navigate draft history in the composer with `Up`/`Down`; Codex restores prior draft text and image placeholders.27- Navigate draft history in the composer with <kbd>Up</kbd>/<kbd>Down</kbd>; Codex restores prior draft text and image placeholders.

28- Press `Ctrl`+`R` to search prompt history from the composer, then press `Enter` to accept a match or `Esc` to cancel.28- Press <kbd>Ctrl</kbd>+<kbd>R</kbd> to search prompt history from the composer, then press <kbd>Enter</kbd> to accept a match or <kbd>Esc</kbd> to cancel.

29- Press `Ctrl`+`C` or use `/exit` to close the interactive session when youre done.29- Press <kbd>Ctrl</kbd>+<kbd>C</kbd> or use `/exit` to close the interactive session when you're done.

30 30 

31## Resuming conversations31## Resuming conversations

32 32 

33Codex stores your transcripts locally so you can pick up where you left off instead of repeating context. Use the `resume` subcommand when you want to reopen an earlier thread with the same repository state and instructions.33Codex stores your transcripts locally so you can pick up where you left off instead of repeating context. Use the `resume` subcommand when you want to reopen an earlier thread with the same repository state and instructions.

34 34 

35- `codex resume` launches a picker of recent interactive sessions. Highlight a run to see its summary and press `Enter` to reopen it.35- `codex resume` launches a picker of recent interactive sessions. Highlight a run to see its summary and press <kbd>Enter</kbd> to reopen it.

36- `codex resume --all` shows sessions beyond the current working directory, so you can reopen any local run.36- `codex resume --all` shows sessions beyond the current working directory, so you can reopen any local run.

37- `codex resume --last` skips the picker and jumps straight to your most recent session from the current working directory (add `--all` to ignore the current working directory filter).37- `codex resume --last` skips the picker and jumps straight to your most recent session from the current working directory (add `--all` to ignore the current working directory filter).

38- `codex resume <SESSION_ID>` targets a specific run. You can copy the ID from the picker, `/status`, or the files under `~/.codex/sessions/`.38- `codex resume <SESSION_ID>` targets a specific run. You can copy the ID from the picker, `/status`, or the files under `~/.codex/sessions/`.

39 39 

40Non-interactive automation runs can resume too:40Non-interactive automation runs can resume too:

41 41 

42```42```bash

43codex exec resume --last "Fix the race conditions you found"43codex exec resume --last "Fix the race conditions you found"

44codex exec resume 7f9f9a2e-1b3c-4c7a-9b0e-.... "Implement the plan"44codex exec resume 7f9f9a2e-1b3c-4c7a-9b0e-.... "Implement the plan"

45```45```


52Codex terminal UI from another machine. Start the app server with a WebSocket52Codex terminal UI from another machine. Start the app server with a WebSocket

53listener:53listener:

54 54 

55```55```bash

56codex app-server --listen ws://127.0.0.1:450056codex app-server --listen ws://127.0.0.1:4500

57```57```

58 58 

59Then connect the TUI to that endpoint:59Then connect the TUI to that endpoint:

60 60 

61```61```bash

62codex --remote ws://127.0.0.1:450062codex --remote ws://127.0.0.1:4500

63```63```

64 64 

65For access from another machine, bind the app server to a reachable interface65For access from another machine, bind the app server to a reachable interface

66and configure WebSocket auth before remote use:66and configure WebSocket auth before remote use:

67 67 

68```68```bash

69TOKEN_FILE="$HOME/.codex/app-server-token"69TOKEN_FILE="$HOME/.codex/app-server-token"

70openssl rand -base64 32 > "$TOKEN_FILE"70openssl rand -base64 32 > "$TOKEN_FILE"

71chmod 600 "$TOKEN_FILE"71chmod 600 "$TOKEN_FILE"


73```73```

74 74 

75`--remote` accepts explicit `ws://host:port`, `wss://host:port`, `unix://`, and75`--remote` accepts explicit `ws://host:port`, `wss://host:port`, `unix://`, and

76`unix://PATH` addresses. Use `unix://` for Codexs default local Unix socket or76`unix://PATH` addresses. Use `unix://` for Codex's default local Unix socket or

77`unix://PATH` for an explicit local socket path. Plain WebSocket connections are77`unix://PATH` for an explicit local socket path. Plain WebSocket connections are

78appropriate for localhost and SSH port-forwarding workflows. For non-local78appropriate for localhost and SSH port-forwarding workflows. For non-local

79clients, use WebSocket auth and put the connection behind TLS.79clients, use WebSocket auth and put the connection behind TLS.


90during the WebSocket handshake. Codex only accepts remote auth tokens over90during the WebSocket handshake. Codex only accepts remote auth tokens over

91`wss://` URLs or local-only `ws://` URLs.91`wss://` URLs or local-only `ws://` URLs.

92 92 

93```93```bash

94export CODEX_REMOTE_TOKEN="$(cat "$TOKEN_FILE")"94export CODEX_REMOTE_TOKEN="$(cat "$TOKEN_FILE")"

95codex --remote wss://remote-host:4500 --remote-auth-token-env CODEX_REMOTE_TOKEN95codex --remote wss://remote-host:4500 --remote-auth-token-env CODEX_REMOTE_TOKEN

96```96```


102 102 

103## Models and reasoning103## Models and reasoning

104 104 

105For most tasks in Codex, `gpt-5.5` is the recommended model. Its OpenAIs newest frontier model for complex coding, computer105For most tasks in Codex, `gpt-5.5` is the recommended model. It's OpenAI's newest frontier model for complex coding, computer

106use, knowledge work, and research workflows, with stronger planning, tool use,106use, knowledge work, and research workflows, with stronger planning, tool use,

107and follow-through on multi-step tasks. For extra fast tasks, ChatGPT Pro subscribers have107and follow-through on multi-step tasks. For extra fast tasks, ChatGPT Pro subscribers have

108access to the GPT-5.3-Codex-Spark model in research preview.108access to the GPT-5.3-Codex-Spark model in research preview.

109 109 

110Switch models mid-session with the `/model` command, or specify one when launching the CLI.110Switch models mid-session with the `/model` command, or specify one when launching the CLI.

111 111 

112```112```bash

113codex --model gpt-5.5113codex --model gpt-5.5

114```114```

115 115 


117 118 

118## Feature flags119## Feature flags

119 120 

120Codex includes a small set of feature flags. Use the `features` subcommand to inspect whats available and to persist changes in your configuration.121Codex includes a small set of feature flags. Use the `features` subcommand to inspect what's available and to persist changes in your configuration.

121 122 

122```123```bash

123codex features list124codex features list

124codex features enable unified_exec125codex features enable unified_exec

125codex features disable shell_snapshot126codex features disable shell_snapshot

126```127```

127 128 

128`codex features enable <feature>` and `codex features disable <feature>` write129`codex features enable <feature>` and `codex features disable <feature>` write

129to `$CODEX_HOME/config.toml`. The `features` subcommand doesnt accept130to `$CODEX_HOME/config.toml`. The `features` subcommand doesn't accept

130`--profile`.131`--profile`.

131 132 

132## Subagents133## Subagents


141 142 

142Attach screenshots or design specs so Codex can read image details alongside your prompt. You can paste images into the interactive composer or provide files on the command line.143Attach screenshots or design specs so Codex can read image details alongside your prompt. You can paste images into the interactive composer or provide files on the command line.

143 144 

144```145```bash

145codex -i screenshot.png "Explain this error"146codex -i screenshot.png "Explain this error"

146```147```

147 148 

148```149```bash

149codex --image img1.png,img2.jpg "Summarize these diagrams"150codex --image img1.png,img2.jpg "Summarize these diagrams"

150```151```

151 152 


169 170 

170## Running local code review171## Running local code review

171 172 

172Type `/review` in the CLI to open Codexs review presets. The CLI launches a dedicated reviewer that reads the diff you select and reports prioritized, actionable findings without touching your working tree. By default it uses the current session model; set `review_model` in `config.toml` to override.173Type `/review` in the CLI to open Codex's review presets. The CLI launches a dedicated reviewer that reads the diff you select and reports prioritized, actionable findings without touching your working tree. By default it uses the current session model; set `review_model` in `config.toml` to override.

173 174 

174- **Review against a base branch** lets you pick a local branch; Codex finds the merge base against its upstream, diffs your work, and highlights the biggest risks before you open a pull request.175- **Review against a base branch** lets you pick a local branch; Codex finds the merge base against its upstream, diffs your work, and highlights the biggest risks before you open a pull request.

175- **Review uncommitted changes** inspects everything thats staged, not staged, or not tracked so you can address issues before committing.176- **Review uncommitted changes** inspects everything that's staged, not staged, or not tracked so you can address issues before committing.

176- **Review a commit** lists recent commits and has Codex read the exact change set for the SHA you choose.177- **Review a commit** lists recent commits and has Codex read the exact change set for the SHA you choose.

177- **Custom review instructions** accepts your own wording (for example, Focus on accessibility regressions) and runs the same reviewer with that prompt.178- **Custom review instructions** accepts your own wording (for example, "Focus on accessibility regressions") and runs the same reviewer with that prompt.

178 179 

179Each run shows up as its own turn in the transcript, so you can rerun reviews as the code evolves and compare the feedback.180Each run shows up as its own turn in the transcript, so you can rerun reviews as the code evolves and compare the feedback.

180 181 


182 183 

183Codex ships with a first-party web search tool. For local tasks in the Codex CLI, Codex enables web search by default and serves results from a web search cache. The cache is an OpenAI-maintained index of web results, so cached mode returns pre-indexed results instead of fetching live pages. This reduces exposure to prompt injection from arbitrary live content, but you should still treat web results as untrusted. If you are using `--yolo` or another [full access sandbox setting](https://developers.openai.com/codex/agent-approvals-security), web search defaults to live results. To fetch the most recent data, pass `--search` for a single run or set `web_search = "live"` in [Config basics](https://developers.openai.com/codex/config-basic). You can also set `web_search = "disabled"` to turn the tool off.184Codex ships with a first-party web search tool. For local tasks in the Codex CLI, Codex enables web search by default and serves results from a web search cache. The cache is an OpenAI-maintained index of web results, so cached mode returns pre-indexed results instead of fetching live pages. This reduces exposure to prompt injection from arbitrary live content, but you should still treat web results as untrusted. If you are using `--yolo` or another [full access sandbox setting](https://developers.openai.com/codex/agent-approvals-security), web search defaults to live results. To fetch the most recent data, pass `--search` for a single run or set `web_search = "live"` in [Config basics](https://developers.openai.com/codex/config-basic). You can also set `web_search = "disabled"` to turn the tool off.

184 185 

185Youll see `web_search` items in the transcript or `codex exec --json` output whenever Codex looks something up.186You'll see `web_search` items in the transcript or `codex exec --json` output whenever Codex looks something up.

186 187 

187## Running with an input prompt188## Running with an input prompt

188 189 

189When you just need a quick answer, run Codex with a single prompt and skip the interactive UI.190When you just need a quick answer, run Codex with a single prompt and skip the interactive UI.

190 191 

191```192```bash

192codex "explain this codebase"193codex "explain this codebase"

193```194```

194 195 


198 199 

199Speed up everyday usage by installing the generated completion scripts for your shell:200Speed up everyday usage by installing the generated completion scripts for your shell:

200 201 

201```202```bash

202codex completion bash203codex completion bash

203codex completion zsh204codex completion zsh

204codex completion fish205codex completion fish


206 207 

207Run the completion script in your shell configuration file to set up completions for new sessions. For example, if you use `zsh`, you can add the following to the end of your `~/.zshrc` file:208Run the completion script in your shell configuration file to set up completions for new sessions. For example, if you use `zsh`, you can add the following to the end of your `~/.zshrc` file:

208 209 

209```210```bash

210# ~/.zshrc211# ~/.zshrc

211eval "$(codex completion zsh)"212eval "$(codex completion zsh)"

212```213```

213 214 

214Start a new session, type `codex`, and press `Tab` to see the completions. If you see a `command not found: compdef` error, add `autoload -Uz compinit && compinit` to your `~/.zshrc` file before the `eval "$(codex completion zsh)"` line, then restart your shell.215Start a new session, type `codex`, and press <kbd>Tab</kbd> to see the completions. If you see a `command not found: compdef` error, add `autoload -Uz compinit && compinit` to your `~/.zshrc` file before the `eval "$(codex completion zsh)"` line, then restart your shell.

215 216 

216## Approval modes217## Approval modes

217 218 

218Approval modes define how much Codex can do without stopping for confirmation. Use `/permissions` inside an interactive session to switch modes as your comfort level changes.219Approval modes define how much Codex can do without stopping for confirmation. Use `/permissions` inside an interactive session to switch modes as your comfort level changes.

219 220 

220- **Auto** (default) lets Codex read files, edit, and run commands within the working directory. It still asks before touching anything outside that scope or using the network.221- **Auto** (default) lets Codex read files, edit, and run commands within the working directory. It still asks before touching anything outside that scope or using the network.

221- **Read-only** keeps Codex in a consultative mode. It can browse files but wont make changes or run commands until you approve a plan.222- **Read-only** keeps Codex in a consultative mode. It can browse files but won't make changes or run commands until you approve a plan.

222- **Full Access** grants Codex the ability to work across your machine, including network access, without asking. Use it sparingly and only when you trust the repository and task.223- **Full Access** grants Codex the ability to work across your machine, including network access, without asking. Use it sparingly and only when you trust the repository and task.

223 224 

224Codex always surfaces a transcript of its actions, so you can review or roll back changes with your usual git workflow.225Codex always surfaces a transcript of its actions, so you can review or roll back changes with your usual git workflow.


227 228 

228Automate workflows or wire Codex into your existing scripts with the `exec` subcommand. This runs Codex non-interactively, piping the final plan and results back to `stdout`.229Automate workflows or wire Codex into your existing scripts with the `exec` subcommand. This runs Codex non-interactively, piping the final plan and results back to `stdout`.

229 230 

230```231```bash

231codex exec "fix the CI failure"232codex exec "fix the CI failure"

232```233```

233 234 


239 240 

240You can also start a task directly from the terminal:241You can also start a task directly from the terminal:

241 242 

242```243```bash

243codex cloud exec --env ENV_ID "Summarize open bugs"244codex cloud exec --env ENV_ID "Summarize open bugs"

244```245```

245 246 

246Add `--attempts` (1–4) to request best-of-N runs when you want Codex cloud to generate more than one solution. For example, `codex cloud exec --env ENV_ID --attempts 3 "Summarize open bugs"`.247Add `--attempts` (1–4) to request best-of-N runs when you want Codex cloud to generate more than one solution. For example, `codex cloud exec --env ENV_ID --attempts 3 "Summarize open bugs"`.

247 248 

248Environment IDs come from your Codex cloud configuration—use `codex cloud` and press `Ctrl`+`O` to choose an environment or the web dashboard to confirm the exact value. Authentication follows your existing CLI login, and the command exits non-zero if submission fails so you can wire it into scripts or CI.249Environment IDs come from your Codex cloud configuration—use `codex cloud` and press <kbd>Ctrl</kbd>+<kbd>O</kbd> to choose an environment or the web dashboard to confirm the exact value. Authentication follows your existing CLI login, and the command exits non-zero if submission fails so you can wire it into scripts or CI.

249 250 

250## Slash commands251## Slash commands

251 252 


255 256 

256## Prompt editor257## Prompt editor

257 258 

258When youre drafting a longer prompt, it can be easier to switch to a full editor and then send the result back to the composer.259When you're drafting a longer prompt, it can be easier to switch to a full editor and then send the result back to the composer.

259 260 

260In the prompt input, press `Ctrl`+`G` to open the editor defined by the `VISUAL` environment variable (or `EDITOR` if `VISUAL` isnt set).261In the prompt input, press <kbd>Ctrl</kbd>+<kbd>G</kbd> to open the editor defined by the `VISUAL` environment variable (or `EDITOR` if `VISUAL` isn't set).

261 262 

262## Model Context Protocol (MCP)263## Model Context Protocol (MCP)

263 264 


267 268 

268## Tips and shortcuts269## Tips and shortcuts

269 270 

270- Type `@` in the composer to open a fuzzy file search over the workspace root; press `Tab` or `Enter` to drop the highlighted path into your message.271- Type `@` in the composer to open a fuzzy file search over the workspace root; press <kbd>Tab</kbd> or <kbd>Enter</kbd> to drop the highlighted path into your message.

271- Press `Enter` while Codex is running to inject new instructions into the current turn, or press `Tab` to queue follow-up input for the next turn. Queued input can be a normal prompt, a slash command such as `/review`, or a `!` shell command. Codex parses queued slash commands when they run.272- Press <kbd>Enter</kbd> while Codex is running to inject new instructions into the current turn, or press <kbd>Tab</kbd> to queue follow-up input for the next turn. Queued input can be a normal prompt, a slash command such as `/review`, or a `!` shell command. Codex parses queued slash commands when they run.

272- Prefix a line with `!` to run a local shell command (for example, `!ls`). Codex treats the output like a user-provided command result and still applies your approval and sandbox settings.273- Prefix a line with `!` to run a local shell command (for example, `!ls`). Codex treats the output like a user-provided command result and still applies your approval and sandbox settings.

273- Tap `Esc` twice while the composer is empty to edit your previous user message. Continue pressing `Esc` to walk further back in the transcript, then hit `Enter` to fork from that point.274- Tap <kbd>Esc</kbd> twice while the composer is empty to edit your previous user message. Continue pressing <kbd>Esc</kbd> to walk further back in the transcript, then hit <kbd>Enter</kbd> to fork from that point.

274- Launch Codex from any directory using `codex --cd <path>` to set the working root without running `cd` first. The active path appears in the TUI header.275- Launch Codex from any directory using `codex --cd <path>` to set the working root without running `cd` first. The active path appears in the TUI header.

275- Expose more writable roots with `--add-dir` (for example, `codex --cd apps/frontend --add-dir ../backend --add-dir ../shared`) when you need to coordinate changes across more than one project.276- Expose more writable roots with `--add-dir` (for example, `codex --cd apps/frontend --add-dir ../backend --add-dir ../shared`) when you need to coordinate changes across more than one project.

276- Make sure your environment is already set up before launching Codex so it doesnt spend tokens probing what to activate. For example, source your Python virtual environment (or other language environments), start any required daemons, and export the environment variables you expect to use ahead of time.277- Make sure your environment is already set up before launching Codex so it doesn't spend tokens probing what to activate. For example, source your Python virtual environment (or other language environments), start any required daemons, and export the environment variables you expect to use ahead of time.

277 

cli/reference.md +1171 −2154

Details

1# Command line options – Codex CLI1# Command line options

2 

3export const globalFlagOptions = [

4 {

5 key: "PROMPT",

6 type: "string",

7 description:

8 "Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message.",

9 },

10 {

11 key: "--image, -i",

12 type: "path[,path...]",

13 description:

14 "Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag.",

15 },

16 {

17 key: "--model, -m",

18 type: "string",

19 description:

20 "Override the model set in configuration (for example `gpt-5.4`).",

21 },

22 {

23 key: "--oss",

24 type: "boolean",

25 defaultValue: "false",

26 description:

27 'Use the local open source model provider (equivalent to `-c model_provider="oss"`). Validates that Ollama is running.',

28 },

29 {

30 key: "--profile, -p",

31 type: "string",

32 description:

33 "Layer `$CODEX_HOME/profile-name.config.toml` on top of the base user config.",

34 },

35 {

36 key: "--sandbox, -s",

37 type: "read-only | workspace-write | danger-full-access",

38 description:

39 "Select the sandbox policy for model-generated shell commands.",

40 },

41 {

42 key: "--ask-for-approval, -a",

43 type: "untrusted | on-request | never",

44 description:

45 "Control when Codex pauses for human approval before running a command. `on-failure` is deprecated; prefer `on-request` for interactive runs or `never` for non-interactive runs.",

46 },

47 {

48 key: "--dangerously-bypass-approvals-and-sandbox, --yolo",

49 type: "boolean",

50 defaultValue: "false",

51 description:

52 "Run every command without approvals or sandboxing. Only use inside an externally hardened environment.",

53 },

54 {

55 key: "--dangerously-bypass-hook-trust",

56 type: "boolean",

57 defaultValue: "false",

58 description:

59 "Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.",

60 },

61 {

62 key: "--cd, -C",

63 type: "path",

64 description:

65 "Set the working directory for the agent before it starts processing your request.",

66 },

67 {

68 key: "--search",

69 type: "boolean",

70 defaultValue: "false",

71 description:

72 'Enable live web search (sets `web_search = "live"` instead of the default `"cached"`).',

73 },

74 {

75 key: "--add-dir",

76 type: "path",

77 description:

78 "Grant additional directories write access alongside the main workspace. Repeat for multiple paths.",

79 },

80 {

81 key: "--no-alt-screen",

82 type: "boolean",

83 defaultValue: "false",

84 description:

85 "Disable alternate screen mode for the TUI (overrides `tui.alternate_screen` for this run).",

86 },

87 {

88 key: "--remote",

89 type: "ws://host:port | wss://host:port | unix:// | unix://PATH",

90 description:

91 "Connect the interactive TUI to a remote app-server endpoint over WebSocket or a Unix socket. Supported for `codex`, `codex resume`, and `codex fork`; other subcommands reject remote mode.",

92 },

93 {

94 key: "--remote-auth-token-env",

95 type: "ENV_VAR",

96 description:

97 "Read a bearer token from this environment variable and send it when connecting with `--remote`. Requires `--remote`; tokens are only sent over `wss://` URLs or local-only `ws://` URLs.",

98 },

99 {

100 key: "--strict-config",

101 type: "boolean",

102 defaultValue: "false",

103 description:

104 "Error when `config.toml` contains fields this Codex version does not recognize. Supported by runtime commands such as `codex`, `exec`, `review`, `resume`, `fork`, `app-server`, `mcp-server`, and `exec-server`.",

105 },

106 {

107 key: "--enable",

108 type: "feature",

109 description:

110 "Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable.",

111 },

112 {

113 key: "--disable",

114 type: "feature",

115 description:

116 "Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable.",

117 },

118 {

119 key: "--config, -c",

120 type: "key=value",

121 description:

122 "Override configuration values. Values parse as TOML if possible; otherwise the literal string is used.",

123 },

124];

125 

126export const commandOverview = [

127 {

128 key: "codex",

129 href: "/codex/cli/reference#codex-interactive",

130 type: "stable",

131 description:

132 "Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments.",

133 },

134 {

135 key: "codex app-server",

136 href: "/codex/cli/reference#codex-app-server",

137 type: "experimental",

138 description:

139 "Launch the Codex app server for local development or debugging over stdio, WebSocket, or a Unix socket.",

140 },

141 {

142 key: "codex remote-control",

143 href: "/codex/cli/reference#codex-remote-control",

144 type: "experimental",

145 description:

146 "Ensure the local app-server daemon is running with remote-control support enabled.",

147 },

148 {

149 key: "codex app",

150 href: "/codex/cli/reference#codex-app",

151 type: "stable",

152 description:

153 "Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open.",

154 },

155 {

156 key: "codex debug app-server send-message-v2",

157 href: "/codex/cli/reference#codex-debug-app-server-send-message-v2",

158 type: "experimental",

159 description:

160 "Debug app-server by sending a single V2 message through the built-in test client.",

161 },

162 {

163 key: "codex debug models",

164 href: "/codex/cli/reference#codex-debug-models",

165 type: "experimental",

166 description:

167 "Print the raw model catalog Codex sees, including an option to inspect only the bundled catalog.",

168 },

169 {

170 key: "codex apply",

171 href: "/codex/cli/reference#codex-apply",

172 type: "stable",

173 description:

174 "Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`.",

175 },

176 {

177 key: "codex archive",

178 href: "/codex/cli/reference#codex-archive-and-codex-unarchive",

179 type: "stable",

180 description:

181 "Archive a saved interactive session by session ID or session name.",

182 },

183 {

184 key: "codex cloud",

185 href: "/codex/cli/reference#codex-cloud",

186 type: "experimental",

187 description:

188 "Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`.",

189 },

190 {

191 key: "codex completion",

192 href: "/codex/cli/reference#codex-completion",

193 type: "stable",

194 description:

195 "Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell.",

196 },

197 {

198 key: "codex doctor",

199 href: "/codex/cli/reference#codex-doctor",

200 type: "stable",

201 description:

202 "Generate a diagnostic report for local installation, config, auth, runtime, Git, terminal, app-server, and thread inventory issues.",

203 },

204 {

205 key: "codex features",

206 href: "/codex/cli/reference#codex-features",

207 type: "stable",

208 description:

209 "List feature flags and persistently enable or disable them in `config.toml`.",

210 },

211 {

212 key: "codex exec",

213 href: "/codex/cli/reference#codex-exec",

214 type: "stable",

215 description:

216 "Run Codex non-interactively. Alias: `codex e`. Stream results to stdout or JSONL and optionally resume previous sessions.",

217 },

218 {

219 key: "codex execpolicy",

220 href: "/codex/cli/reference#codex-execpolicy",

221 type: "experimental",

222 description:

223 "Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked.",

224 },

225 {

226 key: "codex login",

227 href: "/codex/cli/reference#codex-login",

228 type: "stable",

229 description:

230 "Authenticate Codex using ChatGPT OAuth, device auth, an API key, or an access token piped over stdin.",

231 },

232 {

233 key: "codex logout",

234 href: "/codex/cli/reference#codex-logout",

235 type: "stable",

236 description: "Remove stored authentication credentials.",

237 },

238 {

239 key: "codex mcp",

240 href: "/codex/cli/reference#codex-mcp",

241 type: "experimental",

242 description:

243 "Manage Model Context Protocol servers (list, add, remove, authenticate).",

244 },

245 {

246 key: "codex plugin marketplace",

247 href: "/codex/cli/reference#codex-plugin-marketplace",

248 type: "experimental",

249 description:

250 "Add, list, upgrade, or remove plugin marketplaces from Git or local sources.",

251 },

252 {

253 key: "codex plugin",

254 href: "/codex/cli/reference#codex-plugin",

255 type: "experimental",

256 description:

257 "Install, list, and remove plugins from configured marketplace sources.",

258 },

259 {

260 key: "codex mcp-server",

261 href: "/codex/cli/reference#codex-mcp-server",

262 type: "experimental",

263 description:

264 "Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex.",

265 },

266 {

267 key: "codex resume",

268 href: "/codex/cli/reference#codex-resume",

269 type: "stable",

270 description:

271 "Continue a previous interactive session by ID or resume the most recent conversation.",

272 },

273 {

274 key: "codex fork",

275 href: "/codex/cli/reference#codex-fork",

276 type: "stable",

277 description:

278 "Fork a previous interactive session into a new thread, preserving the original transcript.",

279 },

280 {

281 key: "codex sandbox",

282 href: "/codex/cli/reference#codex-sandbox",

283 type: "experimental",

284 description:

285 "Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes.",

286 },

287 {

288 key: "codex update",

289 href: "/codex/cli/reference#codex-update",

290 type: "stable",

291 description:

292 "Check for and apply a Codex CLI update when the installed release supports self-update.",

293 },

294 {

295 key: "codex unarchive",

296 href: "/codex/cli/reference#codex-archive-and-codex-unarchive",

297 type: "stable",

298 description:

299 "Restore an archived interactive session by session ID or session name.",

300 },

301];

302 

303export const execOptions = [

304 {

305 key: "PROMPT",

306 type: "string | - (read stdin)",

307 description:

308 "Initial instruction for the task. Use `-` to pipe the prompt from stdin.",

309 },

310 {

311 key: "--image, -i",

312 type: "path[,path...]",

313 description:

314 "Attach images to the first message. Repeatable; supports comma-separated lists.",

315 },

316 {

317 key: "--model, -m",

318 type: "string",

319 description: "Override the configured model for this run.",

320 },

321 {

322 key: "--oss",

323 type: "boolean",

324 defaultValue: "false",

325 description:

326 "Use the local open source provider (requires a running Ollama instance).",

327 },

328 {

329 key: "--sandbox, -s",

330 type: "read-only | workspace-write | danger-full-access",

331 description:

332 "Sandbox policy for model-generated commands. Defaults to configuration.",

333 },

334 {

335 key: "--profile, -p",

336 type: "string",

337 description:

338 "Layer `$CODEX_HOME/profile-name.config.toml` on top of the base user config.",

339 },

340 {

341 key: "--full-auto",

342 type: "boolean",

343 defaultValue: "false",

344 description:

345 "Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used.",

346 },

347 {

348 key: "--dangerously-bypass-approvals-and-sandbox, --yolo",

349 type: "boolean",

350 defaultValue: "false",

351 description:

352 "Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner.",

353 },

354 {

355 key: "--dangerously-bypass-hook-trust",

356 type: "boolean",

357 defaultValue: "false",

358 description:

359 "Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.",

360 },

361 {

362 key: "--cd, -C",

363 type: "path",

364 description: "Set the workspace root before executing the task.",

365 },

366 {

367 key: "--skip-git-repo-check",

368 type: "boolean",

369 defaultValue: "false",

370 description:

371 "Allow running outside a Git repository (useful for one-off directories).",

372 },

373 {

374 key: "--ephemeral",

375 type: "boolean",

376 defaultValue: "false",

377 description: "Run without persisting session rollout files to disk.",

378 },

379 {

380 key: "--ignore-user-config",

381 type: "boolean",

382 defaultValue: "false",

383 description:

384 "Do not load `$CODEX_HOME/config.toml`. Authentication still uses `CODEX_HOME`.",

385 },

386 {

387 key: "--ignore-rules",

388 type: "boolean",

389 defaultValue: "false",

390 description:

391 "Do not load user or project execpolicy `.rules` files for this run.",

392 },

393 {

394 key: "--output-schema",

395 type: "path",

396 description:

397 "JSON Schema file describing the expected final response shape. Codex validates tool output against it.",

398 },

399 {

400 key: "--color",

401 type: "always | never | auto",

402 defaultValue: "auto",

403 description: "Control ANSI color in stdout.",

404 },

405 {

406 key: "--json, --experimental-json",

407 type: "boolean",

408 defaultValue: "false",

409 description:

410 "Print newline-delimited JSON events instead of formatted text.",

411 },

412 {

413 key: "--output-last-message, -o",

414 type: "path",

415 description:

416 "Write the assistant’s final message to a file. Useful for downstream scripting.",

417 },

418 {

419 key: "Resume subcommand",

420 type: "codex exec resume [SESSION_ID]",

421 description:

422 "Resume an exec session by ID or add `--last` to continue the most recent session from the current working directory. Add `--all` to consider sessions from any directory. Accepts an optional follow-up prompt.",

423 },

424 {

425 key: "-c, --config",

426 type: "key=value",

427 description:

428 "Inline configuration override for the non-interactive run (repeatable).",

429 },

430];

431 

432export const appServerOptions = [

433 {

434 key: "--stdio",

435 type: "boolean",

436 defaultValue: "false",

437 description:

438 "Use stdio transport. Equivalent to `--listen stdio://` and mutually exclusive with `--listen`.",

439 },

440 {

441 key: "--listen",

442 type: "stdio:// | ws://IP:PORT | unix:// | unix://PATH | off",

443 defaultValue: "stdio://",

444 description:

445 "Transport listener URL. Use `stdio://` for JSONL, `ws://IP:PORT` for a TCP WebSocket endpoint, `unix://` for the default Unix socket, `unix://PATH` for a custom Unix socket, or `off` to disable the local transport.",

446 },

447 {

448 key: "--ws-auth",

449 type: "capability-token | signed-bearer-token",

450 description:

451 "Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup.",

452 },

453 {

454 key: "--ws-token-file",

455 type: "absolute path",

456 description:

457 "File containing the shared capability token. Use with `--ws-auth capability-token` unless you provide `--ws-token-sha256` instead.",

458 },

459 {

460 key: "--ws-token-sha256",

461 type: "hexadecimal SHA-256 digest",

462 description:

463 "Expected SHA-256 digest for capability-token authentication. Use instead of `--ws-token-file` when the client token comes from another source.",

464 },

465 {

466 key: "--ws-shared-secret-file",

467 type: "absolute path",

468 description:

469 "File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with `--ws-auth signed-bearer-token`.",

470 },

471 {

472 key: "--ws-issuer",

473 type: "string",

474 description:

475 "Expected `iss` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`.",

476 },

477 {

478 key: "--ws-audience",

479 type: "string",

480 description:

481 "Expected `aud` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`.",

482 },

483 {

484 key: "--ws-max-clock-skew-seconds",

485 type: "number",

486 defaultValue: "30",

487 description:

488 "Clock skew allowance when validating signed bearer token `exp` and `nbf` claims. Requires `--ws-auth signed-bearer-token`.",

489 },

490 {

491 key: "--analytics-default-enabled",

492 type: "boolean",

493 defaultValue: "false",

494 description:

495 "Defaults analytics to enabled for first-party app-server clients unless the user opts out in config.",

496 },

497];

498 

499export const appOptions = [

500 {

501 key: "PATH",

502 type: "path",

503 defaultValue: ".",

504 description:

505 "Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path.",

506 },

507 {

508 key: "--download-url",

509 type: "url",

510 description:

511 "Advanced override for the Codex desktop installer URL used during install.",

512 },

513];

514 

515export const debugAppServerSendMessageV2Options = [

516 {

517 key: "USER_MESSAGE",

518 type: "string",

519 description:

520 "Message text sent to app-server through the built-in V2 test-client flow.",

521 },

522];

523 

524export const debugModelsOptions = [

525 {

526 key: "--bundled",

527 type: "boolean",

528 defaultValue: "false",

529 description:

530 "Skip refresh and print only the model catalog bundled with the current Codex binary.",

531 },

532];

533 

534export const doctorOptions = [

535 {

536 key: "--json",

537 type: "boolean",

538 defaultValue: "false",

539 description: "Emit a redacted machine-readable support report.",

540 },

541 {

542 key: "--summary",

543 type: "boolean",

544 defaultValue: "false",

545 description: "Show grouped check rows and the final count summary only.",

546 },

547 {

548 key: "--all",

549 type: "boolean",

550 defaultValue: "false",

551 description: "Expand long lists in the detailed human-readable report.",

552 },

553 {

554 key: "--no-color",

555 type: "boolean",

556 defaultValue: "false",

557 description: "Disable ANSI color in human-readable output.",

558 },

559 {

560 key: "--ascii",

561 type: "boolean",

562 defaultValue: "false",

563 description:

564 "Use ASCII status labels and separators in human-readable output.",

565 },

566];

567 

568export const resumeOptions = [

569 {

570 key: "SESSION_ID",

571 type: "uuid",

572 description:

573 "Resume the specified session. Omit and use `--last` to continue the most recent session.",

574 },

575 {

576 key: "--last",

577 type: "boolean",

578 defaultValue: "false",

579 description:

580 "Skip the picker and resume the most recent conversation from the current working directory.",

581 },

582 {

583 key: "--all",

584 type: "boolean",

585 defaultValue: "false",

586 description:

587 "Include sessions outside the current working directory when selecting the most recent session.",

588 },

589];

590 

591export const featuresOptions = [

592 {

593 key: "List subcommand",

594 type: "codex features list",

595 description:

596 "Show known feature flags, their maturity stage, and their effective state.",

597 },

598 {

599 key: "Enable subcommand",

600 type: "codex features enable <feature>",

601 description:

602 "Persistently enable a feature flag in `$CODEX_HOME/config.toml`.",

603 },

604 {

605 key: "Disable subcommand",

606 type: "codex features disable <feature>",

607 description:

608 "Persistently disable a feature flag in `$CODEX_HOME/config.toml`.",

609 },

610];

611 

612export const execResumeOptions = [

613 {

614 key: "SESSION_ID",

615 type: "uuid",

616 description:

617 "Resume the specified session. Omit and use `--last` to continue the most recent session.",

618 },

619 {

620 key: "--last",

621 type: "boolean",

622 defaultValue: "false",

623 description:

624 "Resume the most recent conversation from the current working directory.",

625 },

626 {

627 key: "--all",

628 type: "boolean",

629 defaultValue: "false",

630 description:

631 "Include sessions outside the current working directory when selecting the most recent session.",

632 },

633 {

634 key: "--image, -i",

635 type: "path[,path...]",

636 description:

637 "Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag.",

638 },

639 {

640 key: "PROMPT",

641 type: "string | - (read stdin)",

642 description:

643 "Optional follow-up instruction sent immediately after resuming.",

644 },

645];

646 

647export const forkOptions = [

648 {

649 key: "SESSION_ID",

650 type: "uuid",

651 description:

652 "Fork the specified session. Omit and use `--last` to fork the most recent session.",

653 },

654 {

655 key: "--last",

656 type: "boolean",

657 defaultValue: "false",

658 description:

659 "Skip the picker and fork the most recent conversation automatically.",

660 },

661 {

662 key: "--all",

663 type: "boolean",

664 defaultValue: "false",

665 description:

666 "Show sessions beyond the current working directory in the picker.",

667 },

668];

669 

670export const execpolicyOptions = [

671 {

672 key: "--rules, -r",

673 type: "path (repeatable)",

674 description:

675 "Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files.",

676 },

677 {

678 key: "--pretty",

679 type: "boolean",

680 defaultValue: "false",

681 description: "Pretty-print the JSON result.",

682 },

683 {

684 key: "COMMAND...",

685 type: "var-args",

686 description: "Command to be checked against the specified policies.",

687 },

688];

689 

690export const loginOptions = [

691 {

692 key: "--with-api-key",

693 type: "boolean",

694 description:

695 "Read an API key from stdin (for example `printenv OPENAI_API_KEY | codex login --with-api-key`).",

696 },

697 {

698 key: "--with-access-token",

699 type: "boolean",

700 description:

701 "Read an access token from stdin (for example `printenv CODEX_ACCESS_TOKEN | codex login --with-access-token`).",

702 },

703 {

704 key: "--device-auth",

705 type: "boolean",

706 description:

707 "Use OAuth device code flow instead of launching a browser window.",

708 },

709 {

710 key: "status subcommand",

711 type: "codex login status",

712 description:

713 "Print the active authentication mode and exit with 0 when logged in.",

714 },

715];

716 

717export const applyOptions = [

718 {

719 key: "TASK_ID",

720 type: "string",

721 description:

722 "Identifier of the Codex Cloud task whose diff should be applied.",

723 },

724];

725 

726export const sandboxMacOptions = [

727 {

728 key: "--profile, -p",

729 type: "NAME",

730 description:

731 "Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config.",

732 },

733 {

734 key: "--permissions-profile, -P",

735 type: "NAME",

736 description:

737 "Apply a named permissions profile from the active configuration stack.",

738 },

739 {

740 key: "--cd, -C",

741 type: "DIR",

742 description:

743 "Working directory used for profile resolution and command execution. Requires `--permissions-profile`.",

744 },

745 {

746 key: "--include-managed-config",

747 type: "boolean",

748 defaultValue: "false",

749 description:

750 "Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.",

751 },

752 {

753 key: "--allow-unix-socket",

754 type: "path",

755 description:

756 "Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths.",

757 },

758 {

759 key: "--log-denials",

760 type: "boolean",

761 defaultValue: "false",

762 description:

763 "Capture macOS sandbox denials with `log stream` while the command runs and print them after exit.",

764 },

765 {

766 key: "--config, -c",

767 type: "key=value",

768 description:

769 "Pass configuration overrides into the sandboxed run (repeatable).",

770 },

771 {

772 key: "COMMAND...",

773 type: "var-args",

774 description:

775 "Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded.",

776 },

777];

778 

779export const sandboxLinuxOptions = [

780 {

781 key: "--profile, -p",

782 type: "NAME",

783 description:

784 "Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config.",

785 },

786 {

787 key: "--permissions-profile, -P",

788 type: "NAME",

789 description:

790 "Apply a named permissions profile from the active configuration stack.",

791 },

792 {

793 key: "--cd, -C",

794 type: "DIR",

795 description:

796 "Working directory used for profile resolution and command execution. Requires `--permissions-profile`.",

797 },

798 {

799 key: "--include-managed-config",

800 type: "boolean",

801 defaultValue: "false",

802 description:

803 "Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.",

804 },

805 {

806 key: "--config, -c",

807 type: "key=value",

808 description:

809 "Configuration overrides applied before launching the sandbox (repeatable).",

810 },

811 {

812 key: "COMMAND...",

813 type: "var-args",

814 description:

815 "Command to execute under Landlock + seccomp. Provide the executable after `--`.",

816 },

817];

818 

819export const sandboxWindowsOptions = [

820 {

821 key: "--profile, -p",

822 type: "NAME",

823 description:

824 "Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config.",

825 },

826 {

827 key: "--permissions-profile, -P",

828 type: "NAME",

829 description:

830 "Apply a named permissions profile from the active configuration stack.",

831 },

832 {

833 key: "--cd, -C",

834 type: "DIR",

835 description:

836 "Working directory used for profile resolution and command execution. Requires `--permissions-profile`.",

837 },

838 {

839 key: "--include-managed-config",

840 type: "boolean",

841 defaultValue: "false",

842 description:

843 "Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.",

844 },

845 {

846 key: "--config, -c",

847 type: "key=value",

848 description:

849 "Configuration overrides applied before launching the sandbox (repeatable).",

850 },

851 {

852 key: "COMMAND...",

853 type: "var-args",

854 description:

855 "Command to execute under the native Windows sandbox. Provide the executable after `--`.",

856 },

857];

858 

859export const completionOptions = [

860 {

861 key: "SHELL",

862 type: "bash | zsh | fish | power-shell | elvish",

863 defaultValue: "bash",

864 description: "Shell to generate completions for. Output prints to stdout.",

865 },

866];

867 

868export const cloudExecOptions = [

869 {

870 key: "QUERY",

871 type: "string",

872 description:

873 "Task prompt. If omitted, Codex prompts interactively for details.",

874 },

875 {

876 key: "--env",

877 type: "ENV_ID",

878 description:

879 "Target Codex Cloud environment identifier (required). Use `codex cloud` to list options.",

880 },

881 {

882 key: "--attempts",

883 type: "1-4",

884 defaultValue: "1",

885 description:

886 "Number of assistant attempts (best-of-N) Codex Cloud should run.",

887 },

888];

889 

890export const cloudListOptions = [

891 {

892 key: "--env",

893 type: "ENV_ID",

894 description: "Filter tasks by environment identifier.",

895 },

896 {

897 key: "--limit",

898 type: "1-20",

899 defaultValue: "20",

900 description: "Maximum number of tasks to return.",

901 },

902 {

903 key: "--cursor",

904 type: "string",

905 description: "Pagination cursor returned by a previous request.",

906 },

907 {

908 key: "--json",

909 type: "boolean",

910 defaultValue: "false",

911 description: "Emit machine-readable JSON instead of plain text.",

912 },

913];

914 

915export const mcpCommands = [

916 {

917 key: "list",

918 type: "--json",

919 description:

920 "List configured MCP servers. Add `--json` for machine-readable output.",

921 },

922 {

923 key: "get <name>",

924 type: "--json",

925 description:

926 "Show a specific server configuration. `--json` prints the raw config entry.",

927 },

928 {

929 key: "add <name>",

930 type: "-- <command...> | --url <value>",

931 description:

932 "Register a server using a stdio launcher command or a streamable HTTP URL. Supports `--env KEY=VALUE` for stdio transports.",

933 },

934 {

935 key: "remove <name>",

936 description: "Delete a stored MCP server definition.",

937 },

938 {

939 key: "login <name>",

940 type: "--scopes scope1,scope2",

941 description:

942 "Start an OAuth login for a streamable HTTP server (servers that support OAuth only).",

943 },

944 {

945 key: "logout <name>",

946 description:

947 "Remove stored OAuth credentials for a streamable HTTP server.",

948 },

949];

950 

951export const mcpAddOptions = [

952 {

953 key: "COMMAND...",

954 type: "stdio transport",

955 description:

956 "Executable plus arguments to launch the MCP server. Provide after `--`.",

957 },

958 {

959 key: "--env KEY=VALUE",

960 type: "repeatable",

961 description:

962 "Environment variable assignments applied when launching a stdio server.",

963 },

964 {

965 key: "--url",

966 type: "https://…",

967 description:

968 "Register a streamable HTTP server instead of stdio. Mutually exclusive with `COMMAND...`.",

969 },

970 {

971 key: "--bearer-token-env-var",

972 type: "ENV_VAR",

973 description:

974 "Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server.",

975 },

976 {

977 key: "--oauth-client-id",

978 type: "CLIENT_ID",

979 description:

980 "OAuth client identifier for a streamable HTTP MCP server. Requires `--url`.",

981 },

982 {

983 key: "--oauth-resource",

984 type: "RESOURCE",

985 description:

986 "OAuth resource parameter to include during login for a streamable HTTP MCP server. Requires `--url`.",

987 },

988];

989 

990export const marketplaceCommands = [

991 {

992 key: "add <source>",

993 type: "[--ref REF] [--sparse PATH] [--json]",

994 description:

995 "Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated.",

996 },

997 {

998 key: "list",

999 type: "[--json]",

1000 description:

1001 "Show plugin marketplaces Codex is currently considering and the root path for each marketplace.",

1002 },

1003 {

1004 key: "upgrade [marketplace-name]",

1005 type: "[--json]",

1006 description:

1007 "Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided.",

1008 },

1009 {

1010 key: "remove <marketplace-name>",

1011 type: "[--json]",

1012 description: "Remove a configured plugin marketplace.",

1013 },

1014];

1015 

1016export const pluginCommands = [

1017 {

1018 key: "add <plugin[@marketplace]>",

1019 type: "[--marketplace, -m NAME] [--json]",

1020 description:

1021 "Install a plugin from a configured marketplace. Use `--marketplace` or `-m` when the plugin argument omits `@marketplace`.",

1022 },

1023 {

1024 key: "list",

1025 type: "[--marketplace, -m NAME] [--available --json] [--json]",

1026 description:

1027 "List installed plugins. With `--json`, output has `installed` and `available` arrays; `--available` includes uninstalled marketplace plugins and requires `--json`.",

1028 },

1029 {

1030 key: "remove <plugin[@marketplace]>",

1031 type: "[--marketplace, -m NAME] [--json]",

1032 description:

1033 "Remove an installed plugin from local config and cache. Use `--json` for automation-friendly output.",

1034 },

1035 {

1036 key: "marketplace",

1037 description:

1038 "Manage configured marketplace sources. See `codex plugin marketplace` below.",

1039 },

1040];

1041 

1042export const archiveOptions = [

1043 {

1044 key: "SESSION",

1045 type: "session ID | session name",

1046 description:

1047 "Saved session to archive or restore. Session IDs take precedence over session names.",

1048 },

1049 {

1050 key: "--remote",

1051 type: "ws://host:port | wss://host:port | unix:// | unix://PATH",

1052 description:

1053 "Connect to a remote app-server endpoint before changing archive state.",

1054 },

1055 {

1056 key: "--remote-auth-token-env",

1057 type: "ENV_VAR",

1058 description:

1059 "Read a bearer token from this environment variable when `--remote` requires authentication.",

1060 },

1061];

2 1062 

3## How to read this reference1063## How to read this reference

4 1064 

5This page catalogs every documented Codex CLI command and flag. Use the interactive tables to search by key or description. Each section indicates whether the option is stable or experimental and calls out risky combinations.1065This page catalogs every documented Codex CLI command and flag. Use the interactive tables to search by key or description. Each section indicates whether the option is stable or experimental and calls out risky combinations.

6 1066 

7The CLI inherits most defaults from `~/.codex/config.toml`. Any1067The CLI inherits most defaults from <code>~/.codex/config.toml</code>. Any

8`-c key=value` overrides you pass at the command line take1068 <code>-c key=value</code> overrides you pass at the command line take

9precedence for that invocation. See [Config1069 precedence for that invocation. See [Config

10basics](https://developers.openai.com/codex/config-basic#configuration-precedence) for more information.1070 basics](https://developers.openai.com/codex/config-basic#configuration-precedence) for more information.

11 1071 

12## Global flags1072## Global flags

13 1073 

14| Key | Type / Values | Details |1074<ConfigTable client:load options={globalFlagOptions} />

15| --- | --- | --- |

16| `--add-dir` | `path` | Grant additional directories write access alongside the main workspace. Repeat for multiple paths. |

17| `--ask-for-approval, -a` | `untrusted | on-request | never` | Control when Codex pauses for human approval before running a command. `on-failure` is deprecated; prefer `on-request` for interactive runs or `never` for non-interactive runs. |

18| `--cd, -C` | `path` | Set the working directory for the agent before it starts processing your request. |

19| `--config, -c` | `key=value` | Override configuration values. Values parse as TOML if possible; otherwise the literal string is used. |

20| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Run every command without approvals or sandboxing. Only use inside an externally hardened environment. |

21| `--dangerously-bypass-hook-trust` | `boolean` | Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources. |

22| `--disable` | `feature` | Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable. |

23| `--enable` | `feature` | Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable. |

24| `--image, -i` | `path[,path...]` | Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag. |

25| `--model, -m` | `string` | Override the model set in configuration (for example `gpt-5.4`). |

26| `--no-alt-screen` | `boolean` | Disable alternate screen mode for the TUI (overrides `tui.alternate_screen` for this run). |

27| `--oss` | `boolean` | Use the local open source model provider (equivalent to `-c model_provider="oss"`). Validates that Ollama is running. |

28| `--profile, -p` | `string` | Layer `$CODEX_HOME/profile-name.config.toml` on top of the base user config. |

29| `--remote` | `ws://host:port | wss://host:port | unix:// | unix://PATH` | Connect the interactive TUI to a remote app-server endpoint over WebSocket or a Unix socket. Supported for `codex`, `codex resume`, and `codex fork`; other subcommands reject remote mode. |

30| `--remote-auth-token-env` | `ENV_VAR` | Read a bearer token from this environment variable and send it when connecting with `--remote`. Requires `--remote`; tokens are only sent over `wss://` URLs or local-only `ws://` URLs. |

31| `--sandbox, -s` | `read-only | workspace-write | danger-full-access` | Select the sandbox policy for model-generated shell commands. |

32| `--search` | `boolean` | Enable live web search (sets `web_search = "live"` instead of the default `"cached"`). |

33| `--strict-config` | `boolean` | Error when `config.toml` contains fields this Codex version does not recognize. Supported by runtime commands such as `codex`, `exec`, `review`, `resume`, `fork`, `app-server`, `mcp-server`, and `exec-server`. |

34| `PROMPT` | `string` | Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message. |

35 1075 

36Key1076These options apply to the base `codex` command. Most propagate to commands;

37 1077see the notes above or the relevant command help for exceptions. For propagated

38`--add-dir`1078flags, follow the relevant command help. For example, `codex exec --oss ...`

39 1079applies `--oss` to `exec`.

40Type / Values

41 

42`path`

43 

44Details

45 

46Grant additional directories write access alongside the main workspace. Repeat for multiple paths.

47 

48Key

49 

50`--ask-for-approval, -a`

51 

52Type / Values

53 

54`untrusted | on-request | never`

55 

56Details

57 

58Control when Codex pauses for human approval before running a command. `on-failure` is deprecated; prefer `on-request` for interactive runs or `never` for non-interactive runs.

59 

60Key

61 

62`--cd, -C`

63 

64Type / Values

65 

66`path`

67 

68Details

69 

70Set the working directory for the agent before it starts processing your request.

71 

72Key

73 

74`--config, -c`

75 

76Type / Values

77 

78`key=value`

79 

80Details

81 

82Override configuration values. Values parse as TOML if possible; otherwise the literal string is used.

83 

84Key

85 

86`--dangerously-bypass-approvals-and-sandbox, --yolo`

87 

88Type / Values

89 

90`boolean`

91 

92Details

93 

94Run every command without approvals or sandboxing. Only use inside an externally hardened environment.

95 

96Key

97 

98`--dangerously-bypass-hook-trust`

99 

100Type / Values

101 

102`boolean`

103 

104Details

105 

106Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.

107 

108Key

109 

110`--disable`

111 

112Type / Values

113 

114`feature`

115 

116Details

117 

118Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable.

119 

120Key

121 

122`--enable`

123 

124Type / Values

125 

126`feature`

127 

128Details

129 

130Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable.

131 

132Key

133 

134`--image, -i`

135 

136Type / Values

137 

138`path[,path...]`

139 

140Details

141 

142Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag.

143 

144Key

145 

146`--model, -m`

147 

148Type / Values

149 

150`string`

151 

152Details

153 

154Override the model set in configuration (for example `gpt-5.4`).

155 

156Key

157 

158`--no-alt-screen`

159 

160Type / Values

161 

162`boolean`

163 

164Details

165 

166Disable alternate screen mode for the TUI (overrides `tui.alternate_screen` for this run).

167 

168Key

169 

170`--oss`

171 

172Type / Values

173 

174`boolean`

175 

176Details

177 

178Use the local open source model provider (equivalent to `-c model_provider="oss"`). Validates that Ollama is running.

179 

180Key

181 

182`--profile, -p`

183 

184Type / Values

185 

186`string`

187 

188Details

189 

190Layer `$CODEX_HOME/profile-name.config.toml` on top of the base user config.

191 

192Key

193 

194`--remote`

195 

196Type / Values

197 

198`ws://host:port | wss://host:port | unix:// | unix://PATH`

199 

200Details

201 

202Connect the interactive TUI to a remote app-server endpoint over WebSocket or a Unix socket. Supported for `codex`, `codex resume`, and `codex fork`; other subcommands reject remote mode.

203 

204Key

205 

206`--remote-auth-token-env`

207 

208Type / Values

209 

210`ENV_VAR`

211 

212Details

213 

214Read a bearer token from this environment variable and send it when connecting with `--remote`. Requires `--remote`; tokens are only sent over `wss://` URLs or local-only `ws://` URLs.

215 

216Key

217 

218`--sandbox, -s`

219 

220Type / Values

221 

222`read-only | workspace-write | danger-full-access`

223 

224Details

225 

226Select the sandbox policy for model-generated shell commands.

227 

228Key

229 

230`--search`

231 

232Type / Values

233 

234`boolean`

235 

236Details

237 

238Enable live web search (sets `web_search = "live"` instead of the default `"cached"`).

239 

240Key

241 

242`--strict-config`

243 

244Type / Values

245 

246`boolean`

247 

248Details

249 

250Error when `config.toml` contains fields this Codex version does not recognize. Supported by runtime commands such as `codex`, `exec`, `review`, `resume`, `fork`, `app-server`, `mcp-server`, and `exec-server`.

251 

252Key

253 

254`PROMPT`

255 

256Type / Values

257 

258`string`

259 

260Details

261 

262Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message.

263 

264Expand to view all

265 

266These options apply to the base `codex` command. Most propagate to commands;

267see the notes above or the relevant command help for exceptions. For propagated

268flags, follow the relevant command help. For example, `codex exec --oss ...`

269applies `--oss` to `exec`.

270 

271## Command overview

272 

273The Maturity column uses feature maturity labels such as Experimental, Beta,

274and Stable. See [Feature Maturity](https://developers.openai.com/codex/feature-maturity) for how to

275interpret these labels.

276 

277| Key | Maturity | Details |

278| --- | --- | --- |

279| [`codex`](https://developers.openai.com/codex/cli/reference#codex-interactive) | Stable | Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments. |

280| [`codex app`](https://developers.openai.com/codex/cli/reference#codex-app) | Stable | Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open. |

281| [`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server) | Experimental | Launch the Codex app server for local development or debugging over stdio, WebSocket, or a Unix socket. |

282| [`codex apply`](https://developers.openai.com/codex/cli/reference#codex-apply) | Stable | Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`. |

283| [`codex archive`](https://developers.openai.com/codex/cli/reference#codex-archive-and-codex-unarchive) | Stable | Archive a saved interactive session by session ID or session name. |

284| [`codex cloud`](https://developers.openai.com/codex/cli/reference#codex-cloud) | Experimental | Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`. |

285| [`codex completion`](https://developers.openai.com/codex/cli/reference#codex-completion) | Stable | Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell. |

286| [`codex debug app-server send-message-v2`](https://developers.openai.com/codex/cli/reference#codex-debug-app-server-send-message-v2) | Experimental | Debug app-server by sending a single V2 message through the built-in test client. |

287| [`codex debug models`](https://developers.openai.com/codex/cli/reference#codex-debug-models) | Experimental | Print the raw model catalog Codex sees, including an option to inspect only the bundled catalog. |

288| [`codex doctor`](https://developers.openai.com/codex/cli/reference#codex-doctor) | Stable | Generate a diagnostic report for local installation, config, auth, runtime, Git, terminal, app-server, and thread inventory issues. |

289| [`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec) | Stable | Run Codex non-interactively. Alias: `codex e`. Stream results to stdout or JSONL and optionally resume previous sessions. |

290| [`codex execpolicy`](https://developers.openai.com/codex/cli/reference#codex-execpolicy) | Experimental | Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked. |

291| [`codex features`](https://developers.openai.com/codex/cli/reference#codex-features) | Stable | List feature flags and persistently enable or disable them in `config.toml`. |

292| [`codex fork`](https://developers.openai.com/codex/cli/reference#codex-fork) | Stable | Fork a previous interactive session into a new thread, preserving the original transcript. |

293| [`codex login`](https://developers.openai.com/codex/cli/reference#codex-login) | Stable | Authenticate Codex using ChatGPT OAuth, device auth, an API key, or an access token piped over stdin. |

294| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. |

295| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). |

296| [`codex mcp-server`](https://developers.openai.com/codex/cli/reference#codex-mcp-server) | Experimental | Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex. |

297| [`codex plugin`](https://developers.openai.com/codex/cli/reference#codex-plugin) | Experimental | Install, list, and remove plugins from configured marketplace sources. |

298| [`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace) | Experimental | Add, list, upgrade, or remove plugin marketplaces from Git or local sources. |

299| [`codex remote-control`](https://developers.openai.com/codex/cli/reference#codex-remote-control) | Experimental | Ensure the local app-server daemon is running with remote-control support enabled. |

300| [`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume) | Stable | Continue a previous interactive session by ID or resume the most recent conversation. |

301| [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes. |

302| [`codex unarchive`](https://developers.openai.com/codex/cli/reference#codex-archive-and-codex-unarchive) | Stable | Restore an archived interactive session by session ID or session name. |

303| [`codex update`](https://developers.openai.com/codex/cli/reference#codex-update) | Stable | Check for and apply a Codex CLI update when the installed release supports self-update. |

304 

305Key

306 

307[`codex`](https://developers.openai.com/codex/cli/reference#codex-interactive)

308 

309Maturity

310 

311Stable

312 

313Details

314 

315Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments.

316 

317Key

318 

319[`codex app`](https://developers.openai.com/codex/cli/reference#codex-app)

320 

321Maturity

322 

323Stable

324 

325Details

326 

327Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open.

328 

329Key

330 

331[`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server)

332 

333Maturity

334 

335Experimental

336 

337Details

338 

339Launch the Codex app server for local development or debugging over stdio, WebSocket, or a Unix socket.

340 

341Key

342 

343[`codex apply`](https://developers.openai.com/codex/cli/reference#codex-apply)

344 

345Maturity

346 

347Stable

348 

349Details

350 

351Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`.

352 

353Key

354 

355[`codex archive`](https://developers.openai.com/codex/cli/reference#codex-archive-and-codex-unarchive)

356 

357Maturity

358 

359Stable

360 

361Details

362 

363Archive a saved interactive session by session ID or session name.

364 

365Key

366 

367[`codex cloud`](https://developers.openai.com/codex/cli/reference#codex-cloud)

368 

369Maturity

370 

371Experimental

372 

373Details

374 

375Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`.

376 

377Key

378 

379[`codex completion`](https://developers.openai.com/codex/cli/reference#codex-completion)

380 

381Maturity

382 

383Stable

384 

385Details

386 

387Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell.

388 

389Key

390 

391[`codex debug app-server send-message-v2`](https://developers.openai.com/codex/cli/reference#codex-debug-app-server-send-message-v2)

392 

393Maturity

394 

395Experimental

396 

397Details

398 

399Debug app-server by sending a single V2 message through the built-in test client.

400 

401Key

402 

403[`codex debug models`](https://developers.openai.com/codex/cli/reference#codex-debug-models)

404 

405Maturity

406 

407Experimental

408 

409Details

410 

411Print the raw model catalog Codex sees, including an option to inspect only the bundled catalog.

412 

413Key

414 

415[`codex doctor`](https://developers.openai.com/codex/cli/reference#codex-doctor)

416 

417Maturity

418 

419Stable

420 

421Details

422 

423Generate a diagnostic report for local installation, config, auth, runtime, Git, terminal, app-server, and thread inventory issues.

424 

425Key

426 

427[`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec)

428 

429Maturity

430 

431Stable

432 

433Details

434 

435Run Codex non-interactively. Alias: `codex e`. Stream results to stdout or JSONL and optionally resume previous sessions.

436 

437Key

438 

439[`codex execpolicy`](https://developers.openai.com/codex/cli/reference#codex-execpolicy)

440 

441Maturity

442 

443Experimental

444 

445Details

446 

447Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked.

448 

449Key

450 

451[`codex features`](https://developers.openai.com/codex/cli/reference#codex-features)

452 

453Maturity

454 

455Stable

456 

457Details

458 

459List feature flags and persistently enable or disable them in `config.toml`.

460 

461Key

462 

463[`codex fork`](https://developers.openai.com/codex/cli/reference#codex-fork)

464 

465Maturity

466 

467Stable

468 

469Details

470 

471Fork a previous interactive session into a new thread, preserving the original transcript.

472 

473Key

474 

475[`codex login`](https://developers.openai.com/codex/cli/reference#codex-login)

476 

477Maturity

478 

479Stable

480 

481Details

482 

483Authenticate Codex using ChatGPT OAuth, device auth, an API key, or an access token piped over stdin.

484 

485Key

486 

487[`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout)

488 

489Maturity

490 

491Stable

492 

493Details

494 

495Remove stored authentication credentials.

496 

497Key

498 

499[`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp)

500 

501Maturity

502 

503Experimental

504 

505Details

506 

507Manage Model Context Protocol servers (list, add, remove, authenticate).

508 

509Key

510 

511[`codex mcp-server`](https://developers.openai.com/codex/cli/reference#codex-mcp-server)

512 

513Maturity

514 

515Experimental

516 

517Details

518 

519Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex.

520 

521Key

522 

523[`codex plugin`](https://developers.openai.com/codex/cli/reference#codex-plugin)

524 

525Maturity

526 

527Experimental

528 

529Details

530 

531Install, list, and remove plugins from configured marketplace sources.

532 

533Key

534 

535[`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace)

536 

537Maturity

538 

539Experimental

540 

541Details

542 

543Add, list, upgrade, or remove plugin marketplaces from Git or local sources.

544 

545Key

546 

547[`codex remote-control`](https://developers.openai.com/codex/cli/reference#codex-remote-control)

548 

549Maturity

550 

551Experimental

552 

553Details

554 

555Ensure the local app-server daemon is running with remote-control support enabled.

556 

557Key

558 

559[`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume)

560 

561Maturity

562 

563Stable

564 

565Details

566 

567Continue a previous interactive session by ID or resume the most recent conversation.

568 

569Key

570 

571[`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox)

572 

573Maturity

574 

575Experimental

576 

577Details

578 

579Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes.

580 

581Key

582 

583[`codex unarchive`](https://developers.openai.com/codex/cli/reference#codex-archive-and-codex-unarchive)

584 

585Maturity

586 

587Stable

588 

589Details

590 

591Restore an archived interactive session by session ID or session name.

592 

593Key

594 

595[`codex update`](https://developers.openai.com/codex/cli/reference#codex-update)

596 

597Maturity

598 

599Stable

600 

601Details

602 

603Check for and apply a Codex CLI update when the installed release supports self-update.

604 

605Expand to view all

606 

607## Command details

608 

609### `codex` (interactive)

610 

611Running `codex` with no subcommand launches the interactive terminal UI (TUI). The agent accepts the global flags above plus image attachments. Web search defaults to cached mode; use `--search` to switch to live browsing. For low-friction local work, use `--sandbox workspace-write --ask-for-approval on-request`.

612 

613Use `--remote ws://host:port` or `--remote wss://host:port` to connect the TUI to an app server started with `codex app-server --listen ws://IP:PORT`. For a local Unix socket, use `--remote unix://` for the default socket or `--remote unix://PATH` for an explicit path. Add `--remote-auth-token-env <ENV_VAR>` when the server requires a bearer token for WebSocket authentication.

614 

615### `codex app-server`

616 

617Launch the Codex app server locally. This is primarily for development and debugging and may change without notice.

618 

619| Key | Type / Values | Details |

620| --- | --- | --- |

621| `--analytics-default-enabled` | `boolean` | Defaults analytics to enabled for first-party app-server clients unless the user opts out in config. |

622| `--listen` | `stdio:// | ws://IP:PORT | unix:// | unix://PATH | off` | Transport listener URL. Use `stdio://` for JSONL, `ws://IP:PORT` for a TCP WebSocket endpoint, `unix://` for the default Unix socket, `unix://PATH` for a custom Unix socket, or `off` to disable the local transport. |

623| `--stdio` | `boolean` | Use stdio transport. Equivalent to `--listen stdio://` and mutually exclusive with `--listen`. |

624| `--ws-audience` | `string` | Expected `aud` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`. |

625| `--ws-auth` | `capability-token | signed-bearer-token` | Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup. |

626| `--ws-issuer` | `string` | Expected `iss` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`. |

627| `--ws-max-clock-skew-seconds` | `number` | Clock skew allowance when validating signed bearer token `exp` and `nbf` claims. Requires `--ws-auth signed-bearer-token`. |

628| `--ws-shared-secret-file` | `absolute path` | File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with `--ws-auth signed-bearer-token`. |

629| `--ws-token-file` | `absolute path` | File containing the shared capability token. Use with `--ws-auth capability-token` unless you provide `--ws-token-sha256` instead. |

630| `--ws-token-sha256` | `hexadecimal SHA-256 digest` | Expected SHA-256 digest for capability-token authentication. Use instead of `--ws-token-file` when the client token comes from another source. |

631 

632Key

633 

634`--analytics-default-enabled`

635 

636Type / Values

637 

638`boolean`

639 

640Details

641 

642Defaults analytics to enabled for first-party app-server clients unless the user opts out in config.

643 

644Key

645 

646`--listen`

647 

648Type / Values

649 

650`stdio:// | ws://IP:PORT | unix:// | unix://PATH | off`

651 

652Details

653 

654Transport listener URL. Use `stdio://` for JSONL, `ws://IP:PORT` for a TCP WebSocket endpoint, `unix://` for the default Unix socket, `unix://PATH` for a custom Unix socket, or `off` to disable the local transport.

655 

656Key

657 

658`--stdio`

659 

660Type / Values

661 

662`boolean`

663 

664Details

665 

666Use stdio transport. Equivalent to `--listen stdio://` and mutually exclusive with `--listen`.

667 

668Key

669 

670`--ws-audience`

671 

672Type / Values

673 

674`string`

675 

676Details

677 

678Expected `aud` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`.

679 

680Key

681 

682`--ws-auth`

683 

684Type / Values

685 

686`capability-token | signed-bearer-token`

687 

688Details

689 

690Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup.

691 

692Key

693 

694`--ws-issuer`

695 

696Type / Values

697 

698`string`

699 

700Details

701 

702Expected `iss` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`.

703 

704Key

705 

706`--ws-max-clock-skew-seconds`

707 

708Type / Values

709 

710`number`

711 

712Details

713 

714Clock skew allowance when validating signed bearer token `exp` and `nbf` claims. Requires `--ws-auth signed-bearer-token`.

715 

716Key

717 

718`--ws-shared-secret-file`

719 

720Type / Values

721 

722`absolute path`

723 

724Details

725 

726File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with `--ws-auth signed-bearer-token`.

727 

728Key

729 

730`--ws-token-file`

731 

732Type / Values

733 

734`absolute path`

735 

736Details

737 

738File containing the shared capability token. Use with `--ws-auth capability-token` unless you provide `--ws-token-sha256` instead.

739 

740Key

741 

742`--ws-token-sha256`

743 

744Type / Values

745 

746`hexadecimal SHA-256 digest`

747 

748Details

749 

750Expected SHA-256 digest for capability-token authentication. Use instead of `--ws-token-file` when the client token comes from another source.

751 

752`codex app-server --listen stdio://` keeps the default JSONL-over-stdio behavior, and `codex app-server --stdio` is an alias for that transport. `--listen ws://IP:PORT` enables WebSocket transport for app-server clients. The server accepts `ws://` listen URLs; use TLS termination or a secure proxy when clients connect with `wss://`. Use `--listen unix://` to accept WebSocket handshakes on Codex’s default Unix socket, or `--listen unix:///absolute/path.sock` to choose a socket path. If you generate schemas for client bindings, add `--experimental` to include gated fields and methods.

753 

754### `codex remote-control`

755 

756Ensure the app-server daemon is running with remote-control support enabled.

757Managed remote-control clients and SSH remote workflows use this command; it’s

758not a replacement for `codex app-server --listen` when you are building a local

759protocol client.

760 

761### `codex app`

762 

763Launch Codex Desktop from the terminal on macOS or Windows. On macOS, Codex can open a specific workspace path; on Windows, Codex prints the path to open.

764 

765| Key | Type / Values | Details |

766| --- | --- | --- |

767| `--download-url` | `url` | Advanced override for the Codex desktop installer URL used during install. |

768| `PATH` | `path` | Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path. |

769 

770Key

771 

772`--download-url`

773 

774Type / Values

775 

776`url`

777 

778Details

779 

780Advanced override for the Codex desktop installer URL used during install.

781 

782Key

783 

784`PATH`

785 

786Type / Values

787 

788`path`

789 

790Details

791 

792Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path.

793 

794`codex app` opens an installed Codex Desktop app, or starts the installer when

795the app is missing. On macOS, Codex opens the provided workspace path; on

796Windows, it prints the path to open after installation.

797 

798### `codex debug app-server send-message-v2`

799 

800Send one message through app-server’s V2 thread/turn flow using the built-in app-server test client.

801 

802| Key | Type / Values | Details |

803| --- | --- | --- |

804| `USER_MESSAGE` | `string` | Message text sent to app-server through the built-in V2 test-client flow. |

805 

806Key

807 

808`USER_MESSAGE`

809 

810Type / Values

811 

812`string`

813 

814Details

815 

816Message text sent to app-server through the built-in V2 test-client flow.

817 

818This debug flow initializes with `experimentalApi: true`, starts a thread, sends a turn, and streams server notifications. Use it to reproduce and inspect app-server protocol behavior locally.

819 

820### `codex debug models`

821 

822Print the raw model catalog Codex sees as JSON.

823 

824| Key | Type / Values | Details |

825| --- | --- | --- |

826| `--bundled` | `boolean` | Skip refresh and print only the model catalog bundled with the current Codex binary. |

827 

828Key

829 

830`--bundled`

831 

832Type / Values

833 

834`boolean`

835 

836Details

837 

838Skip refresh and print only the model catalog bundled with the current Codex binary.

839 

840Use `--bundled` when you want to inspect only the catalog bundled with the current binary, without refreshing from the remote models endpoint.

841 

842### `codex apply`

843 

844Apply the most recent diff from a Codex cloud task to your local repository. You must authenticate and have access to the task.

845 

846| Key | Type / Values | Details |

847| --- | --- | --- |

848| `TASK_ID` | `string` | Identifier of the Codex Cloud task whose diff should be applied. |

849 

850Key

851 

852`TASK_ID`

853 

854Type / Values

855 

856`string`

857 

858Details

859 

860Identifier of the Codex Cloud task whose diff should be applied.

861 

862Codex prints the patched files and exits non-zero if `git apply` fails (for example, due to conflicts).

863 

864### `codex archive` and `codex unarchive`

865 

866Archive or restore a saved interactive session by session ID or session name.

867Use these commands when you want to clean up the session picker without deleting

868the transcript. Session IDs take precedence over session names.

869 

870```

871codex archive <SESSION>

872codex unarchive <SESSION>

873```

874 

875| Key | Type / Values | Details |

876| --- | --- | --- |

877| `--remote` | `ws://host:port | wss://host:port | unix:// | unix://PATH` | Connect to a remote app-server endpoint before changing archive state. |

878| `--remote-auth-token-env` | `ENV_VAR` | Read a bearer token from this environment variable when `--remote` requires authentication. |

879| `SESSION` | `session ID | session name` | Saved session to archive or restore. Session IDs take precedence over session names. |

880 

881Key

882 

883`--remote`

884 

885Type / Values

886 

887`ws://host:port | wss://host:port | unix:// | unix://PATH`

888 

889Details

890 

891Connect to a remote app-server endpoint before changing archive state.

892 

893Key

894 

895`--remote-auth-token-env`

896 

897Type / Values

898 

899`ENV_VAR`

900 

901Details

902 

903Read a bearer token from this environment variable when `--remote` requires authentication.

904 

905Key

906 

907`SESSION`

908 

909Type / Values

910 

911`session ID | session name`

912 

913Details

914 

915Saved session to archive or restore. Session IDs take precedence over session names.

916 

917### `codex cloud`

918 

919Interact with Codex cloud tasks from the terminal. The default command opens an interactive picker; `codex cloud exec` submits a task directly, and `codex cloud list` returns recent tasks for scripting or quick inspection.

920 

921| Key | Type / Values | Details |

922| --- | --- | --- |

923| `--attempts` | `1-4` | Number of assistant attempts (best-of-N) Codex Cloud should run. |

924| `--env` | `ENV_ID` | Target Codex Cloud environment identifier (required). Use `codex cloud` to list options. |

925| `QUERY` | `string` | Task prompt. If omitted, Codex prompts interactively for details. |

926 

927Key

928 

929`--attempts`

930 

931Type / Values

932 

933`1-4`

934 

935Details

936 

937Number of assistant attempts (best-of-N) Codex Cloud should run.

938 

939Key

940 

941`--env`

942 

943Type / Values

944 

945`ENV_ID`

946 

947Details

948 

949Target Codex Cloud environment identifier (required). Use `codex cloud` to list options.

950 

951Key

952 

953`QUERY`

954 

955Type / Values

956 

957`string`

958 

959Details

960 

961Task prompt. If omitted, Codex prompts interactively for details.

962 

963Authentication follows the same credentials as the main CLI. Codex exits non-zero if the task submission fails.

964 

965#### `codex cloud list`

966 

967List recent cloud tasks with optional filtering and pagination.

968 

969| Key | Type / Values | Details |

970| --- | --- | --- |

971| `--cursor` | `string` | Pagination cursor returned by a previous request. |

972| `--env` | `ENV_ID` | Filter tasks by environment identifier. |

973| `--json` | `boolean` | Emit machine-readable JSON instead of plain text. |

974| `--limit` | `1-20` | Maximum number of tasks to return. |

975 

976Key

977 

978`--cursor`

979 

980Type / Values

981 

982`string`

983 

984Details

985 

986Pagination cursor returned by a previous request.

987 

988Key

989 

990`--env`

991 

992Type / Values

993 

994`ENV_ID`

995 

996Details

997 

998Filter tasks by environment identifier.

999 

1000Key

1001 

1002`--json`

1003 

1004Type / Values

1005 

1006`boolean`

1007 

1008Details

1009 

1010Emit machine-readable JSON instead of plain text.

1011 

1012Key

1013 

1014`--limit`

1015 

1016Type / Values

1017 

1018`1-20`

1019 

1020Details

1021 

1022Maximum number of tasks to return.

1023 

1024Plain-text output prints a task URL followed by status details. Use `--json` for automation. The JSON payload contains a `tasks` array plus an optional `cursor` value. Each task includes `id`, `url`, `title`, `status`, `updated_at`, `environment_id`, `environment_label`, `summary`, `is_review`, and `attempt_total`.

1025 

1026### `codex completion`

1027 

1028Generate shell completion scripts and redirect the output to the appropriate location, for example `codex completion zsh > "${fpath[1]}/_codex"`.

1029 

1030| Key | Type / Values | Details |

1031| --- | --- | --- |

1032| `SHELL` | `bash | zsh | fish | power-shell | elvish` | Shell to generate completions for. Output prints to stdout. |

1033 

1034Key

1035 

1036`SHELL`

1037 

1038Type / Values

1039 

1040`bash | zsh | fish | power-shell | elvish`

1041 

1042Details

1043 

1044Shell to generate completions for. Output prints to stdout.

1045 

1046### `codex doctor`

1047 

1048Generate a local diagnostic report before filing a support issue or

1049while investigating a broken Codex installation. The report checks installation,

1050configuration, authentication, runtime, Git, terminal, app-server, and thread

1051inventory health.

1052 

1053| Key | Type / Values | Details |

1054| --- | --- | --- |

1055| `--all` | `boolean` | Expand long lists in the detailed human-readable report. |

1056| `--ascii` | `boolean` | Use ASCII status labels and separators in human-readable output. |

1057| `--json` | `boolean` | Emit a redacted machine-readable support report. |

1058| `--no-color` | `boolean` | Disable ANSI color in human-readable output. |

1059| `--summary` | `boolean` | Show grouped check rows and the final count summary only. |

1060 

1061Key

1062 

1063`--all`

1064 

1065Type / Values

1066 

1067`boolean`

1068 

1069Details

1070 

1071Expand long lists in the detailed human-readable report.

1072 

1073Key

1074 

1075`--ascii`

1076 

1077Type / Values

1078 

1079`boolean`

1080 

1081Details

1082 

1083Use ASCII status labels and separators in human-readable output.

1084 

1085Key

1086 

1087`--json`

1088 

1089Type / Values

1090 

1091`boolean`

1092 

1093Details

1094 

1095Emit a redacted machine-readable support report.

1096 

1097Key

1098 

1099`--no-color`

1100 

1101Type / Values

1102 

1103`boolean`

1104 

1105Details

1106 

1107Disable ANSI color in human-readable output.

1108 

1109Key

1110 

1111`--summary`

1112 

1113Type / Values

1114 

1115`boolean`

1116 

1117Details

1118 

1119Show grouped check rows and the final count summary only.

1120 

1121### `codex features`

1122 

1123Manage feature flags stored in `$CODEX_HOME/config.toml`. The `enable` and

1124`disable` commands persist changes so they apply to future sessions. The

1125`features` subcommand doesn’t accept `--profile`.

1126 

1127| Key | Type / Values | Details |

1128| --- | --- | --- |

1129| `Disable subcommand` | `codex features disable <feature>` | Persistently disable a feature flag in `$CODEX_HOME/config.toml`. |

1130| `Enable subcommand` | `codex features enable <feature>` | Persistently enable a feature flag in `$CODEX_HOME/config.toml`. |

1131| `List subcommand` | `codex features list` | Show known feature flags, their maturity stage, and their effective state. |

1132 

1133Key

1134 

1135`Disable subcommand`

1136 

1137Type / Values

1138 

1139`codex features disable <feature>`

1140 

1141Details

1142 

1143Persistently disable a feature flag in `$CODEX_HOME/config.toml`.

1144 

1145Key

1146 

1147`Enable subcommand`

1148 

1149Type / Values

1150 

1151`codex features enable <feature>`

1152 

1153Details

1154 

1155Persistently enable a feature flag in `$CODEX_HOME/config.toml`.

1156 

1157Key

1158 

1159`List subcommand`

1160 

1161Type / Values

1162 

1163`codex features list`

1164 

1165Details

1166 

1167Show known feature flags, their maturity stage, and their effective state.

1168 

1169### `codex exec`

1170 

1171Use `codex exec` (or the short form `codex e`) for scripted or CI-style runs that should finish without human interaction.

1172 

1173| Key | Type / Values | Details |

1174| --- | --- | --- |

1175| `--cd, -C` | `path` | Set the workspace root before executing the task. |

1176| `--color` | `always | never | auto` | Control ANSI color in stdout. |

1177| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner. |

1178| `--dangerously-bypass-hook-trust` | `boolean` | Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources. |

1179| `--ephemeral` | `boolean` | Run without persisting session rollout files to disk. |

1180| `--full-auto` | `boolean` | Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used. |

1181| `--ignore-rules` | `boolean` | Do not load user or project execpolicy `.rules` files for this run. |

1182| `--ignore-user-config` | `boolean` | Do not load `$CODEX_HOME/config.toml`. Authentication still uses `CODEX_HOME`. |

1183| `--image, -i` | `path[,path...]` | Attach images to the first message. Repeatable; supports comma-separated lists. |

1184| `--json, --experimental-json` | `boolean` | Print newline-delimited JSON events instead of formatted text. |

1185| `--model, -m` | `string` | Override the configured model for this run. |

1186| `--oss` | `boolean` | Use the local open source provider (requires a running Ollama instance). |

1187| `--output-last-message, -o` | `path` | Write the assistant’s final message to a file. Useful for downstream scripting. |

1188| `--output-schema` | `path` | JSON Schema file describing the expected final response shape. Codex validates tool output against it. |

1189| `--profile, -p` | `string` | Layer `$CODEX_HOME/profile-name.config.toml` on top of the base user config. |

1190| `--sandbox, -s` | `read-only | workspace-write | danger-full-access` | Sandbox policy for model-generated commands. Defaults to configuration. |

1191| `--skip-git-repo-check` | `boolean` | Allow running outside a Git repository (useful for one-off directories). |

1192| `-c, --config` | `key=value` | Inline configuration override for the non-interactive run (repeatable). |

1193| `PROMPT` | `string | - (read stdin)` | Initial instruction for the task. Use `-` to pipe the prompt from stdin. |

1194| `Resume subcommand` | `codex exec resume [SESSION_ID]` | Resume an exec session by ID or add `--last` to continue the most recent session from the current working directory. Add `--all` to consider sessions from any directory. Accepts an optional follow-up prompt. |

1195 

1196Key

1197 

1198`--cd, -C`

1199 

1200Type / Values

1201 

1202`path`

1203 

1204Details

1205 

1206Set the workspace root before executing the task.

1207 

1208Key

1209 

1210`--color`

1211 

1212Type / Values

1213 

1214`always | never | auto`

1215 

1216Details

1217 

1218Control ANSI color in stdout.

1219 

1220Key

1221 

1222`--dangerously-bypass-approvals-and-sandbox, --yolo`

1223 

1224Type / Values

1225 

1226`boolean`

1227 

1228Details

1229 

1230Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner.

1231 

1232Key

1233 

1234`--dangerously-bypass-hook-trust`

1235 

1236Type / Values

1237 

1238`boolean`

1239 

1240Details

1241 

1242Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.

1243 

1244Key

1245 

1246`--ephemeral`

1247 

1248Type / Values

1249 

1250`boolean`

1251 

1252Details

1253 

1254Run without persisting session rollout files to disk.

1255 

1256Key

1257 

1258`--full-auto`

1259 

1260Type / Values

1261 

1262`boolean`

1263 

1264Details

1265 

1266Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used.

1267 

1268Key

1269 

1270`--ignore-rules`

1271 

1272Type / Values

1273 

1274`boolean`

1275 

1276Details

1277 

1278Do not load user or project execpolicy `.rules` files for this run.

1279 

1280Key

1281 

1282`--ignore-user-config`

1283 

1284Type / Values

1285 

1286`boolean`

1287 

1288Details

1289 

1290Do not load `$CODEX_HOME/config.toml`. Authentication still uses `CODEX_HOME`.

1291 

1292Key

1293 

1294`--image, -i`

1295 

1296Type / Values

1297 

1298`path[,path...]`

1299 

1300Details

1301 

1302Attach images to the first message. Repeatable; supports comma-separated lists.

1303 

1304Key

1305 

1306`--json, --experimental-json`

1307 

1308Type / Values

1309 

1310`boolean`

1311 

1312Details

1313 

1314Print newline-delimited JSON events instead of formatted text.

1315 

1316Key

1317 

1318`--model, -m`

1319 

1320Type / Values

1321 

1322`string`

1323 

1324Details

1325 

1326Override the configured model for this run.

1327 

1328Key

1329 

1330`--oss`

1331 

1332Type / Values

1333 

1334`boolean`

1335 

1336Details

1337 

1338Use the local open source provider (requires a running Ollama instance).

1339 

1340Key

1341 

1342`--output-last-message, -o`

1343 

1344Type / Values

1345 

1346`path`

1347 

1348Details

1349 

1350Write the assistant’s final message to a file. Useful for downstream scripting.

1351 

1352Key

1353 

1354`--output-schema`

1355 

1356Type / Values

1357 

1358`path`

1359 

1360Details

1361 

1362JSON Schema file describing the expected final response shape. Codex validates tool output against it.

1363 

1364Key

1365 

1366`--profile, -p`

1367 

1368Type / Values

1369 

1370`string`

1371 

1372Details

1373 

1374Layer `$CODEX_HOME/profile-name.config.toml` on top of the base user config.

1375 

1376Key

1377 

1378`--sandbox, -s`

1379 

1380Type / Values

1381 

1382`read-only | workspace-write | danger-full-access`

1383 

1384Details

1385 

1386Sandbox policy for model-generated commands. Defaults to configuration.

1387 

1388Key

1389 

1390`--skip-git-repo-check`

1391 

1392Type / Values

1393 

1394`boolean`

1395 

1396Details

1397 

1398Allow running outside a Git repository (useful for one-off directories).

1399 

1400Key

1401 

1402`-c, --config`

1403 

1404Type / Values

1405 

1406`key=value`

1407 

1408Details

1409 

1410Inline configuration override for the non-interactive run (repeatable).

1411 

1412Key

1413 

1414`PROMPT`

1415 

1416Type / Values

1417 

1418`string | - (read stdin)`

1419 

1420Details

1421 

1422Initial instruction for the task. Use `-` to pipe the prompt from stdin.

1423 

1424Key

1425 

1426`Resume subcommand`

1427 

1428Type / Values

1429 

1430`codex exec resume [SESSION_ID]`

1431 

1432Details

1433 

1434Resume an exec session by ID or add `--last` to continue the most recent session from the current working directory. Add `--all` to consider sessions from any directory. Accepts an optional follow-up prompt.

1435 

1436Expand to view all

1437 

1438Codex writes formatted output by default. Add `--json` to receive newline-delimited JSON events (one per state change). The optional `resume` subcommand lets you continue non-interactive tasks. Use `--last` to pick the most recent session from the current working directory, or add `--all` to search across all sessions:

1439 

1440| Key | Type / Values | Details |

1441| --- | --- | --- |

1442| `--all` | `boolean` | Include sessions outside the current working directory when selecting the most recent session. |

1443| `--image, -i` | `path[,path...]` | Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag. |

1444| `--last` | `boolean` | Resume the most recent conversation from the current working directory. |

1445| `PROMPT` | `string | - (read stdin)` | Optional follow-up instruction sent immediately after resuming. |

1446| `SESSION_ID` | `uuid` | Resume the specified session. Omit and use `--last` to continue the most recent session. |

1447 

1448Key

1449 

1450`--all`

1451 

1452Type / Values

1453 

1454`boolean`

1455 

1456Details

1457 

1458Include sessions outside the current working directory when selecting the most recent session.

1459 

1460Key

1461 

1462`--image, -i`

1463 

1464Type / Values

1465 

1466`path[,path...]`

1467 

1468Details

1469 

1470Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag.

1471 

1472Key

1473 

1474`--last`

1475 

1476Type / Values

1477 

1478`boolean`

1479 

1480Details

1481 

1482Resume the most recent conversation from the current working directory.

1483 

1484Key

1485 

1486`PROMPT`

1487 

1488Type / Values

1489 

1490`string | - (read stdin)`

1491 

1492Details

1493 

1494Optional follow-up instruction sent immediately after resuming.

1495 

1496Key

1497 

1498`SESSION_ID`

1499 

1500Type / Values

1501 

1502`uuid`

1503 

1504Details

1505 

1506Resume the specified session. Omit and use `--last` to continue the most recent session.

1507 

1508### `codex execpolicy`

1509 

1510Check `execpolicy` rule files before you save them. `codex execpolicy check` accepts one or more `--rules` flags (for example, files under `~/.codex/rules`) and emits JSON showing the strictest decision and any matching rules. Add `--pretty` to format the output. The `execpolicy` command is currently in preview.

1511 

1512| Key | Type / Values | Details |

1513| --- | --- | --- |

1514| `--pretty` | `boolean` | Pretty-print the JSON result. |

1515| `--rules, -r` | `path (repeatable)` | Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files. |

1516| `COMMAND...` | `var-args` | Command to be checked against the specified policies. |

1517 

1518Key

1519 

1520`--pretty`

1521 

1522Type / Values

1523 

1524`boolean`

1525 

1526Details

1527 

1528Pretty-print the JSON result.

1529 

1530Key

1531 

1532`--rules, -r`

1533 

1534Type / Values

1535 

1536`path (repeatable)`

1537 

1538Details

1539 

1540Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files.

1541 

1542Key

1543 

1544`COMMAND...`

1545 

1546Type / Values

1547 

1548`var-args`

1549 

1550Details

1551 

1552Command to be checked against the specified policies.

1553 

1554### `codex login`

1555 

1556Authenticate the CLI with a ChatGPT account, API key, or access token. With no flags, Codex opens a browser for the ChatGPT OAuth flow.

1557 

1558| Key | Type / Values | Details |

1559| --- | --- | --- |

1560| `--device-auth` | `boolean` | Use OAuth device code flow instead of launching a browser window. |

1561| `--with-access-token` | `boolean` | Read an access token from stdin (for example `printenv CODEX_ACCESS_TOKEN | codex login --with-access-token`). |

1562| `--with-api-key` | `boolean` | Read an API key from stdin (for example `printenv OPENAI_API_KEY | codex login --with-api-key`). |

1563| `status subcommand` | `codex login status` | Print the active authentication mode and exit with 0 when logged in. |

1564 

1565Key

1566 

1567`--device-auth`

1568 

1569Type / Values

1570 

1571`boolean`

1572 

1573Details

1574 

1575Use OAuth device code flow instead of launching a browser window.

1576 

1577Key

1578 

1579`--with-access-token`

1580 

1581Type / Values

1582 

1583`boolean`

1584 

1585Details

1586 

1587Read an access token from stdin (for example `printenv CODEX_ACCESS_TOKEN | codex login --with-access-token`).

1588 

1589Key

1590 

1591`--with-api-key`

1592 

1593Type / Values

1594 

1595`boolean`

1596 

1597Details

1598 

1599Read an API key from stdin (for example `printenv OPENAI_API_KEY | codex login --with-api-key`).

1600 

1601Key

1602 

1603`status subcommand`

1604 

1605Type / Values

1606 

1607`codex login status`

1608 

1609Details

1610 

1611Print the active authentication mode and exit with 0 when logged in.

1612 

1613`codex login status` exits with `0` when credentials are present, which is helpful in automation scripts.

1614 

1615### `codex logout`

1616 

1617Remove saved credentials for both API key and ChatGPT authentication. This command has no flags.

1618 

1619### `codex mcp`

1620 

1621Manage Model Context Protocol server entries stored in `~/.codex/config.toml`.

1622 

1623| Key | Type / Values | Details |

1624| --- | --- | --- |

1625| `add <name>` | `-- <command...> | --url <value>` | Register a server using a stdio launcher command or a streamable HTTP URL. Supports `--env KEY=VALUE` for stdio transports. |

1626| `get <name>` | `--json` | Show a specific server configuration. `--json` prints the raw config entry. |

1627| `list` | `--json` | List configured MCP servers. Add `--json` for machine-readable output. |

1628| `login <name>` | `--scopes scope1,scope2` | Start an OAuth login for a streamable HTTP server (servers that support OAuth only). |

1629| `logout <name>` | | Remove stored OAuth credentials for a streamable HTTP server. |

1630| `remove <name>` | | Delete a stored MCP server definition. |

1631 

1632Key

1633 

1634`add <name>`

1635 

1636Type / Values

1637 

1638`-- <command...> | --url <value>`

1639 

1640Details

1641 

1642Register a server using a stdio launcher command or a streamable HTTP URL. Supports `--env KEY=VALUE` for stdio transports.

1643 

1644Key

1645 

1646`get <name>`

1647 

1648Type / Values

1649 

1650`--json`

1651 

1652Details

1653 

1654Show a specific server configuration. `--json` prints the raw config entry.

1655 

1656Key

1657 

1658`list`

1659 

1660Type / Values

1661 

1662`--json`

1663 

1664Details

1665 

1666List configured MCP servers. Add `--json` for machine-readable output.

1667 

1668Key

1669 

1670`login <name>`

1671 

1672Type / Values

1673 

1674`--scopes scope1,scope2`

1675 

1676Details

1677 1080 

1678Start an OAuth login for a streamable HTTP server (servers that support OAuth only).1081## Command overview

1679 1082 

1680Key1083The Maturity column uses feature maturity labels such as Experimental, Beta,

1084 and Stable. See [Feature Maturity](https://developers.openai.com/codex/feature-maturity) for how to

1085 interpret these labels.

1681 1086 

1682`logout <name>`1087<ConfigTable

1088 client:load

1089 options={commandOverview}

1090 secondColumnTitle="Maturity"

1091 secondColumnVariant="maturity"

1092/>

1683 1093 

1684Details1094## Command details

1685 1095 

1686Remove stored OAuth credentials for a streamable HTTP server.1096### `codex` (interactive)

1687 1097 

1688Key1098Running `codex` with no subcommand launches the interactive terminal UI (TUI). The agent accepts the global flags above plus image attachments. Web search defaults to cached mode; use `--search` to switch to live browsing. For low-friction local work, use `--sandbox workspace-write --ask-for-approval on-request`.

1689 1099 

1690`remove <name>`1100Use `--remote ws://host:port` or `--remote wss://host:port` to connect the TUI to an app server started with `codex app-server --listen ws://IP:PORT`. For a local Unix socket, use `--remote unix://` for the default socket or `--remote unix://PATH` for an explicit path. Add `--remote-auth-token-env <ENV_VAR>` when the server requires a bearer token for WebSocket authentication.

1691 1101 

1692Details1102### `codex app-server`

1693 1103 

1694Delete a stored MCP server definition.1104Launch the Codex app server locally. This is primarily for development and debugging and may change without notice.

1695 1105 

1696The `add` subcommand supports both stdio and streamable HTTP transports:1106<ConfigTable client:load options={appServerOptions} />

1697 1107 

1698| Key | Type / Values | Details |1108`codex app-server --listen stdio://` keeps the default JSONL-over-stdio behavior, and `codex app-server --stdio` is an alias for that transport. `--listen ws://IP:PORT` enables WebSocket transport for app-server clients. The server accepts `ws://` listen URLs; use TLS termination or a secure proxy when clients connect with `wss://`. Use `--listen unix://` to accept WebSocket handshakes on Codex's default Unix socket, or `--listen unix:///absolute/path.sock` to choose a socket path. If you generate schemas for client bindings, add `--experimental` to include gated fields and methods.

1699| --- | --- | --- |

1700| `--bearer-token-env-var` | `ENV_VAR` | Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server. |

1701| `--env KEY=VALUE` | `repeatable` | Environment variable assignments applied when launching a stdio server. |

1702| `--oauth-client-id` | `CLIENT_ID` | OAuth client identifier for a streamable HTTP MCP server. Requires `--url`. |

1703| `--oauth-resource` | `RESOURCE` | OAuth resource parameter to include during login for a streamable HTTP MCP server. Requires `--url`. |

1704| `--url` | `https://…` | Register a streamable HTTP server instead of stdio. Mutually exclusive with `COMMAND...`. |

1705| `COMMAND...` | `stdio transport` | Executable plus arguments to launch the MCP server. Provide after `--`. |

1706 1109 

1707Key1110### `codex remote-control`

1708 1111 

1709`--bearer-token-env-var`1112Ensure the app-server daemon is running with remote-control support enabled.

1113Managed remote-control clients and SSH remote workflows use this command; it's

1114not a replacement for `codex app-server --listen` when you are building a local

1115protocol client.

1710 1116 

1711Type / Values1117### `codex app`

1712 1118 

1713`ENV_VAR`1119Launch Codex Desktop from the terminal on macOS or Windows. On macOS, Codex can open a specific workspace path; on Windows, Codex prints the path to open.

1714 1120 

1715Details1121<ConfigTable client:load options={appOptions} />

1716 1122 

1717Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server.1123`codex app` opens an installed Codex Desktop app, or starts the installer when

1124the app is missing. On macOS, Codex opens the provided workspace path; on

1125Windows, it prints the path to open after installation.

1718 1126 

1719Key1127### `codex debug app-server send-message-v2`

1720 1128 

1721`--env KEY=VALUE`1129Send one message through app-server's V2 thread/turn flow using the built-in app-server test client.

1722 1130 

1723Type / Values1131<ConfigTable client:load options={debugAppServerSendMessageV2Options} />

1724 1132 

1725`repeatable`1133This debug flow initializes with `experimentalApi: true`, starts a thread, sends a turn, and streams server notifications. Use it to reproduce and inspect app-server protocol behavior locally.

1726 1134 

1727Details1135### `codex debug models`

1728 1136 

1729Environment variable assignments applied when launching a stdio server.1137Print the raw model catalog Codex sees as JSON.

1730 1138 

1731Key1139<ConfigTable client:load options={debugModelsOptions} />

1732 1140 

1733`--oauth-client-id`1141Use `--bundled` when you want to inspect only the catalog bundled with the current binary, without refreshing from the remote models endpoint.

1734 1142 

1735Type / Values1143### `codex apply`

1736 1144 

1737`CLIENT_ID`1145Apply the most recent diff from a Codex cloud task to your local repository. You must authenticate and have access to the task.

1738 1146 

1739Details1147<ConfigTable client:load options={applyOptions} />

1740 1148 

1741OAuth client identifier for a streamable HTTP MCP server. Requires `--url`.1149Codex prints the patched files and exits non-zero if `git apply` fails (for example, due to conflicts).

1742 1150 

1743Key1151### `codex archive` and `codex unarchive`

1744 1152 

1745`--oauth-resource`1153Archive or restore a saved interactive session by session ID or session name.

1154Use these commands when you want to clean up the session picker without deleting

1155the transcript. Session IDs take precedence over session names.

1746 1156 

1747Type / Values1157```bash

1158codex archive <SESSION>

1159codex unarchive <SESSION>

1160```

1748 1161 

1749`RESOURCE`1162<ConfigTable client:load options={archiveOptions} />

1750 1163 

1751Details1164### `codex cloud`

1752 1165 

1753OAuth resource parameter to include during login for a streamable HTTP MCP server. Requires `--url`.1166Interact with Codex cloud tasks from the terminal. The default command opens an interactive picker; `codex cloud exec` submits a task directly, and `codex cloud list` returns recent tasks for scripting or quick inspection.

1754 1167 

1755Key1168<ConfigTable client:load options={cloudExecOptions} />

1756 1169 

1757`--url`1170Authentication follows the same credentials as the main CLI. Codex exits non-zero if the task submission fails.

1758 1171 

1759Type / Values1172#### `codex cloud list`

1760 1173 

1761`https://…`1174List recent cloud tasks with optional filtering and pagination.

1762 1175 

1763Details1176<ConfigTable client:load options={cloudListOptions} />

1764 1177 

1765Register a streamable HTTP server instead of stdio. Mutually exclusive with `COMMAND...`.1178Plain-text output prints a task URL followed by status details. Use `--json` for automation. The JSON payload contains a `tasks` array plus an optional `cursor` value. Each task includes `id`, `url`, `title`, `status`, `updated_at`, `environment_id`, `environment_label`, `summary`, `is_review`, and `attempt_total`.

1766 1179 

1767Key1180### `codex completion`

1768 1181 

1769`COMMAND...`1182Generate shell completion scripts and redirect the output to the appropriate location, for example `codex completion zsh > "${fpath[1]}/_codex"`.

1770 1183 

1771Type / Values1184<ConfigTable client:load options={completionOptions} />

1772 1185 

1773`stdio transport`1186### `codex doctor`

1774 1187 

1775Details1188Generate a local diagnostic report before filing a support issue or

1189while investigating a broken Codex installation. The report checks installation,

1190configuration, authentication, runtime, Git, terminal, app-server, and thread

1191inventory health.

1776 1192 

1777Executable plus arguments to launch the MCP server. Provide after `--`.1193<ConfigTable client:load options={doctorOptions} />

1778 1194 

1779OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).1195### `codex features`

1780 1196 

1781### `codex plugin`1197Manage feature flags stored in `$CODEX_HOME/config.toml`. The `enable` and

1198`disable` commands persist changes so they apply to future sessions. The

1199`features` subcommand doesn't accept `--profile`.

1782 1200 

1783Install, list, and remove plugins from configured marketplaces.1201<ConfigTable client:load options={featuresOptions} />

1784 1202 

1785| Key | Type / Values | Details |1203### `codex exec`

1786| --- | --- | --- |

1787| `add <plugin[@marketplace]>` | `[--marketplace, -m NAME] [--json]` | Install a plugin from a configured marketplace. Use `--marketplace` or `-m` when the plugin argument omits `@marketplace`. |

1788| `list` | `[--marketplace, -m NAME] [--available --json] [--json]` | List installed plugins. With `--json`, output has `installed` and `available` arrays; `--available` includes uninstalled marketplace plugins and requires `--json`. |

1789| `marketplace` | | Manage configured marketplace sources. See `codex plugin marketplace` below. |

1790| `remove <plugin[@marketplace]>` | `[--marketplace, -m NAME] [--json]` | Remove an installed plugin from local config and cache. Use `--json` for automation-friendly output. |

1791 1204 

1792Key1205Use `codex exec` (or the short form `codex e`) for scripted or CI-style runs that should finish without human interaction.

1793 1206 

1794`add <plugin[@marketplace]>`1207<ConfigTable client:load options={execOptions} />

1795 1208 

1796Type / Values1209Codex writes formatted output by default. Add `--json` to receive newline-delimited JSON events (one per state change). The optional `resume` subcommand lets you continue non-interactive tasks. Use `--last` to pick the most recent session from the current working directory, or add `--all` to search across all sessions:

1797 1210 

1798`[--marketplace, -m NAME] [--json]`1211<ConfigTable client:load options={execResumeOptions} />

1799 1212 

1800Details1213### `codex execpolicy`

1801 1214 

1802Install a plugin from a configured marketplace. Use `--marketplace` or `-m` when the plugin argument omits `@marketplace`.1215Check `execpolicy` rule files before you save them. `codex execpolicy check` accepts one or more `--rules` flags (for example, files under `~/.codex/rules`) and emits JSON showing the strictest decision and any matching rules. Add `--pretty` to format the output. The `execpolicy` command is currently in preview.

1803 1216 

1804Key1217<ConfigTable client:load options={execpolicyOptions} />

1805 1218 

1806`list`1219### `codex login`

1807 1220 

1808Type / Values1221Authenticate the CLI with a ChatGPT account, API key, or access token. With no flags, Codex opens a browser for the ChatGPT OAuth flow.

1809 1222 

1810`[--marketplace, -m NAME] [--available --json] [--json]`1223<ConfigTable client:load options={loginOptions} />

1811 1224 

1812Details1225`codex login status` exits with `0` when credentials are present, which is helpful in automation scripts.

1813 1226 

1814List installed plugins. With `--json`, output has `installed` and `available` arrays; `--available` includes uninstalled marketplace plugins and requires `--json`.1227### `codex logout`

1815 1228 

1816Key1229Remove saved credentials for both API key and ChatGPT authentication. This command has no flags.

1817 1230 

1818`marketplace`1231### `codex mcp`

1819 1232 

1820Details1233Manage Model Context Protocol server entries stored in `~/.codex/config.toml`.

1821 1234 

1822Manage configured marketplace sources. See `codex plugin marketplace` below.1235<ConfigTable client:load options={mcpCommands} />

1823 1236 

1824Key1237The `add` subcommand supports both stdio and streamable HTTP transports:

1825 1238 

1826`remove <plugin[@marketplace]>`1239<ConfigTable client:load options={mcpAddOptions} />

1827 1240 

1828Type / Values1241OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).

1829 1242 

1830`[--marketplace, -m NAME] [--json]`1243### `codex plugin`

1831 1244 

1832Details1245Install, list, and remove plugins from configured marketplaces.

1833 1246 

1834Remove an installed plugin from local config and cache. Use `--json` for automation-friendly output.1247<ConfigTable client:load options={pluginCommands} />

1835 1248 

1836`codex plugin add --json` prints `pluginId`, `name`, `marketplaceName`,1249`codex plugin add --json` prints `pluginId`, `name`, `marketplaceName`,

1837`version`, `installedPath`, and `authPolicy`. `codex plugin list --json` prints1250`version`, `installedPath`, and `authPolicy`. `codex plugin list --json` prints


1845 1258 

1846Manage plugin marketplace sources that Codex can browse and install from.1259Manage plugin marketplace sources that Codex can browse and install from.

1847 1260 

1848| Key | Type / Values | Details |1261<ConfigTable client:load options={marketplaceCommands} />

1849| --- | --- | --- |

1850| `add <source>` | `[--ref REF] [--sparse PATH] [--json]` | Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated. |

1851| `list` | `[--json]` | Show plugin marketplaces Codex is currently considering and the root path for each marketplace. |

1852| `remove <marketplace-name>` | `[--json]` | Remove a configured plugin marketplace. |

1853| `upgrade [marketplace-name]` | `[--json]` | Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided. |

1854 

1855Key

1856 

1857`add <source>`

1858 

1859Type / Values

1860 

1861`[--ref REF] [--sparse PATH] [--json]`

1862 

1863Details

1864 

1865Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated.

1866 

1867Key

1868 

1869`list`

1870 

1871Type / Values

1872 

1873`[--json]`

1874 

1875Details

1876 

1877Show plugin marketplaces Codex is currently considering and the root path for each marketplace.

1878 

1879Key

1880 

1881`remove <marketplace-name>`

1882 

1883Type / Values

1884 

1885`[--json]`

1886 

1887Details

1888 

1889Remove a configured plugin marketplace.

1890 

1891Key

1892 

1893`upgrade [marketplace-name]`

1894 

1895Type / Values

1896 

1897`[--json]`

1898 

1899Details

1900 

1901Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided.

1902 1262 

1903`codex plugin marketplace add` accepts GitHub shorthand such as `owner/repo` or1263`codex plugin marketplace add` accepts GitHub shorthand such as `owner/repo` or

1904`owner/repo@ref`, HTTP or HTTPS Git URLs, SSH Git URLs, and local marketplace1264`owner/repo@ref`, HTTP or HTTPS Git URLs, SSH Git URLs, and local marketplace


1924 1284 

1925Continue an interactive session by ID or resume the most recent conversation. `codex resume` scopes `--last` to the current working directory unless you pass `--all`. It accepts the same global flags as `codex`, including model and sandbox overrides.1285Continue an interactive session by ID or resume the most recent conversation. `codex resume` scopes `--last` to the current working directory unless you pass `--all`. It accepts the same global flags as `codex`, including model and sandbox overrides.

1926 1286 

1927| Key | Type / Values | Details |1287<ConfigTable client:load options={resumeOptions} />

1928| --- | --- | --- |

1929| `--all` | `boolean` | Include sessions outside the current working directory when selecting the most recent session. |

1930| `--last` | `boolean` | Skip the picker and resume the most recent conversation from the current working directory. |

1931| `SESSION_ID` | `uuid` | Resume the specified session. Omit and use `--last` to continue the most recent session. |

1932 

1933Key

1934 

1935`--all`

1936 

1937Type / Values

1938 

1939`boolean`

1940 

1941Details

1942 

1943Include sessions outside the current working directory when selecting the most recent session.

1944 

1945Key

1946 

1947`--last`

1948 

1949Type / Values

1950 

1951`boolean`

1952 

1953Details

1954 

1955Skip the picker and resume the most recent conversation from the current working directory.

1956 

1957Key

1958 

1959`SESSION_ID`

1960 

1961Type / Values

1962 

1963`uuid`

1964 

1965Details

1966 

1967Resume the specified session. Omit and use `--last` to continue the most recent session.

1968 1288 

1969### `codex fork`1289### `codex fork`

1970 1290 

1971Fork a previous interactive session into a new thread. By default, `codex fork` opens the session picker; add `--last` to fork your most recent session instead.1291Fork a previous interactive session into a new thread. By default, `codex fork` opens the session picker; add `--last` to fork your most recent session instead.

1972 1292 

1973| Key | Type / Values | Details |1293<ConfigTable client:load options={forkOptions} />

1974| --- | --- | --- |

1975| `--all` | `boolean` | Show sessions beyond the current working directory in the picker. |

1976| `--last` | `boolean` | Skip the picker and fork the most recent conversation automatically. |

1977| `SESSION_ID` | `uuid` | Fork the specified session. Omit and use `--last` to fork the most recent session. |

1978 

1979Key

1980 

1981`--all`

1982 

1983Type / Values

1984 

1985`boolean`

1986 

1987Details

1988 

1989Show sessions beyond the current working directory in the picker.

1990 

1991Key

1992 

1993`--last`

1994 

1995Type / Values

1996 

1997`boolean`

1998 

1999Details

2000 

2001Skip the picker and fork the most recent conversation automatically.

2002 

2003Key

2004 

2005`SESSION_ID`

2006 

2007Type / Values

2008 

2009`uuid`

2010 

2011Details

2012 

2013Fork the specified session. Omit and use `--last` to fork the most recent session.

2014 1294 

2015### `codex sandbox`1295### `codex sandbox`

2016 1296 


2018 1298 

2019#### macOS seatbelt1299#### macOS seatbelt

2020 1300 

2021| Key | Type / Values | Details |1301<ConfigTable client:load options={sandboxMacOptions} />

2022| --- | --- | --- |

2023| `--allow-unix-socket` | `path` | Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths. |

2024| `--cd, -C` | `DIR` | Working directory used for profile resolution and command execution. Requires `--permissions-profile`. |

2025| `--config, -c` | `key=value` | Pass configuration overrides into the sandboxed run (repeatable). |

2026| `--include-managed-config` | `boolean` | Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`. |

2027| `--log-denials` | `boolean` | Capture macOS sandbox denials with `log stream` while the command runs and print them after exit. |

2028| `--permissions-profile, -P` | `NAME` | Apply a named permissions profile from the active configuration stack. |

2029| `--profile, -p` | `NAME` | Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config. |

2030| `COMMAND...` | `var-args` | Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded. |

2031 

2032Key

2033 

2034`--allow-unix-socket`

2035 

2036Type / Values

2037 

2038`path`

2039 

2040Details

2041 

2042Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths.

2043 

2044Key

2045 

2046`--cd, -C`

2047 

2048Type / Values

2049 

2050`DIR`

2051 

2052Details

2053 

2054Working directory used for profile resolution and command execution. Requires `--permissions-profile`.

2055 

2056Key

2057 

2058`--config, -c`

2059 

2060Type / Values

2061 

2062`key=value`

2063 

2064Details

2065 

2066Pass configuration overrides into the sandboxed run (repeatable).

2067 

2068Key

2069 

2070`--include-managed-config`

2071 

2072Type / Values

2073 

2074`boolean`

2075 

2076Details

2077 

2078Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.

2079 

2080Key

2081 

2082`--log-denials`

2083 

2084Type / Values

2085 

2086`boolean`

2087 

2088Details

2089 

2090Capture macOS sandbox denials with `log stream` while the command runs and print them after exit.

2091 

2092Key

2093 

2094`--permissions-profile, -P`

2095 

2096Type / Values

2097 

2098`NAME`

2099 

2100Details

2101 

2102Apply a named permissions profile from the active configuration stack.

2103 

2104Key

2105 

2106`--profile, -p`

2107 

2108Type / Values

2109 

2110`NAME`

2111 

2112Details

2113 

2114Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config.

2115 

2116Key

2117 

2118`COMMAND...`

2119 

2120Type / Values

2121 

2122`var-args`

2123 

2124Details

2125 

2126Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded.

2127 1302 

2128#### Linux Landlock1303#### Linux Landlock

2129 1304 

2130| Key | Type / Values | Details |1305<ConfigTable client:load options={sandboxLinuxOptions} />

2131| --- | --- | --- |

2132| `--cd, -C` | `DIR` | Working directory used for profile resolution and command execution. Requires `--permissions-profile`. |

2133| `--config, -c` | `key=value` | Configuration overrides applied before launching the sandbox (repeatable). |

2134| `--include-managed-config` | `boolean` | Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`. |

2135| `--permissions-profile, -P` | `NAME` | Apply a named permissions profile from the active configuration stack. |

2136| `--profile, -p` | `NAME` | Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config. |

2137| `COMMAND...` | `var-args` | Command to execute under Landlock + seccomp. Provide the executable after `--`. |

2138 

2139Key

2140 

2141`--cd, -C`

2142 

2143Type / Values

2144 

2145`DIR`

2146 

2147Details

2148 

2149Working directory used for profile resolution and command execution. Requires `--permissions-profile`.

2150 

2151Key

2152 

2153`--config, -c`

2154 

2155Type / Values

2156 

2157`key=value`

2158 

2159Details

2160 

2161Configuration overrides applied before launching the sandbox (repeatable).

2162 

2163Key

2164 

2165`--include-managed-config`

2166 

2167Type / Values

2168 

2169`boolean`

2170 

2171Details

2172 

2173Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.

2174 

2175Key

2176 

2177`--permissions-profile, -P`

2178 

2179Type / Values

2180 

2181`NAME`

2182 

2183Details

2184 

2185Apply a named permissions profile from the active configuration stack.

2186 

2187Key

2188 

2189`--profile, -p`

2190 

2191Type / Values

2192 

2193`NAME`

2194 

2195Details

2196 

2197Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config.

2198 

2199Key

2200 

2201`COMMAND...`

2202 

2203Type / Values

2204 

2205`var-args`

2206 

2207Details

2208 

2209Command to execute under Landlock + seccomp. Provide the executable after `--`.

2210 1306 

2211#### Windows1307#### Windows

2212 1308 

2213| Key | Type / Values | Details |1309<ConfigTable client:load options={sandboxWindowsOptions} />

2214| --- | --- | --- |

2215| `--cd, -C` | `DIR` | Working directory used for profile resolution and command execution. Requires `--permissions-profile`. |

2216| `--config, -c` | `key=value` | Configuration overrides applied before launching the sandbox (repeatable). |

2217| `--include-managed-config` | `boolean` | Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`. |

2218| `--permissions-profile, -P` | `NAME` | Apply a named permissions profile from the active configuration stack. |

2219| `--profile, -p` | `NAME` | Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config. |

2220| `COMMAND...` | `var-args` | Command to execute under the native Windows sandbox. Provide the executable after `--`. |

2221 

2222Key

2223 

2224`--cd, -C`

2225 

2226Type / Values

2227 

2228`DIR`

2229 

2230Details

2231 

2232Working directory used for profile resolution and command execution. Requires `--permissions-profile`.

2233 

2234Key

2235 

2236`--config, -c`

2237 

2238Type / Values

2239 

2240`key=value`

2241 

2242Details

2243 

2244Configuration overrides applied before launching the sandbox (repeatable).

2245 

2246Key

2247 

2248`--include-managed-config`

2249 

2250Type / Values

2251 

2252`boolean`

2253 

2254Details

2255 

2256Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.

2257 

2258Key

2259 

2260`--permissions-profile, -P`

2261 

2262Type / Values

2263 

2264`NAME`

2265 

2266Details

2267 

2268Apply a named permissions profile from the active configuration stack.

2269 

2270Key

2271 

2272`--profile, -p`

2273 

2274Type / Values

2275 

2276`NAME`

2277 

2278Details

2279 

2280Layer `$CODEX_HOME/NAME.config.toml` on top of the base user config.

2281 

2282Key

2283 

2284`COMMAND...`

2285 

2286Type / Values

2287 

2288`var-args`

2289 

2290Details

2291 

2292Command to execute under the native Windows sandbox. Provide the executable after `--`.

2293 1310 

2294### `codex update`1311### `codex update`

2295 1312 

Details

22completion still works before you queue the command.22completion still works before you queue the command.

23 23 

24| Command | Purpose | When to use it |24| Command | Purpose | When to use it |

25| --- | --- | --- |25| ------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |

26| [`/permissions`](#update-permissions-with-permissions) | Set what Codex can do without asking first. | Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only. |26| [`/permissions`](#update-permissions-with-permissions) | Set what Codex can do without asking first. | Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only. |

27| [`/ide`](#include-ide-context-with-ide) | Include open files, current selection, and other IDE context. | Pull editor context into the next prompt without re-explaining whats open in your IDE. |27| [`/ide`](#include-ide-context-with-ide) | Include open files, current selection, and other IDE context. | Pull editor context into the next prompt without re-explaining what's open in your IDE. |

28| [`/keymap`](#remap-tui-shortcuts-with-keymap) | Remap TUI keyboard shortcuts. | Inspect and persist custom shortcut bindings in `config.toml`. |28| [`/keymap`](#remap-tui-shortcuts-with-keymap) | Remap TUI keyboard shortcuts. | Inspect and persist custom shortcut bindings in `config.toml`. |

29| [`/vim`](#toggle-vim-mode-with-vim) | Toggle Vim mode for the composer. | Switch between Vim normal/insert behavior and the default composer editing mode. |29| [`/vim`](#toggle-vim-mode-with-vim) | Toggle Vim mode for the composer. | Switch between Vim normal/insert behavior and the default composer editing mode. |

30| [`/sandbox-add-read-dir`](#grant-sandbox-read-access-with-sandbox-add-read-dir) | Grant sandbox read access to an extra directory (Windows only). | Unblock commands that need to read an absolute directory path outside the current readable roots. |30| [`/sandbox-add-read-dir`](#grant-sandbox-read-access-with-sandbox-add-read-dir) | Grant sandbox read access to an extra directory (Windows only). | Unblock commands that need to read an absolute directory path outside the current readable roots. |


36| [`/archive`](#archive-the-current-session-with-archive) | Archive the current session and exit Codex. | Remove the current session from active session lists without deleting its transcript. |36| [`/archive`](#archive-the-current-session-with-archive) | Archive the current session and exit Codex. | Remove the current session from active session lists without deleting its transcript. |

37| [`/compact`](#keep-transcripts-lean-with-compact) | Summarize the visible conversation to free tokens. | Use after long runs so Codex retains key points without blowing the context window. |37| [`/compact`](#keep-transcripts-lean-with-compact) | Summarize the visible conversation to free tokens. | Use after long runs so Codex retains key points without blowing the context window. |

38| [`/copy`](#copy-the-latest-response-with-copy) | Copy the latest completed Codex output. | Grab the latest finished response or plan text without manually selecting it. You can also press `Ctrl+O`. |38| [`/copy`](#copy-the-latest-response-with-copy) | Copy the latest completed Codex output. | Grab the latest finished response or plan text without manually selecting it. You can also press `Ctrl+O`. |

39| [`/diff`](#review-changes-with-diff) | Show the Git diff, including files Git isnt tracking yet. | Review Codexs edits before you commit or run tests. |39| [`/diff`](#review-changes-with-diff) | Show the Git diff, including files Git isn't tracking yet. | Review Codex's edits before you commit or run tests. |

40| [`/exit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI (same as `/quit`). | Alternative spelling; both commands exit the session. |40| [`/exit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI (same as `/quit`). | Alternative spelling; both commands exit the session. |

41| [`/experimental`](#toggle-experimental-features-with-experimental) | Toggle experimental features. | Enable optional features such as subagents from the CLI. |41| [`/experimental`](#toggle-experimental-features-with-experimental) | Toggle experimental features. | Enable optional features such as subagents from the CLI. |

42| [`/approve`](#approve-an-auto-review-denial-with-approve) | Approve one retry of a recent auto review denial. | Retry a command or action that the auto reviewer denied. |42| [`/approve`](#approve-an-auto-review-denial-with-approve) | Approve one retry of a recent auto review denial. | Retry a command or action that the auto reviewer denied. |


44| [`/skills`](#use-skills-with-skills) | Browse and use skills. | Improve task-specific behavior by selecting a relevant local skill. |44| [`/skills`](#use-skills-with-skills) | Browse and use skills. | Improve task-specific behavior by selecting a relevant local skill. |

45| [`/hooks`](#view-lifecycle-hooks-with-hooks) | View and manage lifecycle hooks. | Inspect hook configuration loaded into the current session. |45| [`/hooks`](#view-lifecycle-hooks-with-hooks) | View and manage lifecycle hooks. | Inspect hook configuration loaded into the current session. |

46| [`/feedback`](#send-feedback-with-feedback) | Send logs to the Codex maintainers. | Report issues or share diagnostics with support. |46| [`/feedback`](#send-feedback-with-feedback) | Send logs to the Codex maintainers. | Report issues or share diagnostics with support. |

47| [`/init`](#generate-agentsmd-with-init) | Generate an `AGENTS.md` scaffold in the current directory. | Capture persistent instructions for the repository or subdirectory youre working in. |47| [`/init`](#generate-agentsmd-with-init) | Generate an `AGENTS.md` scaffold in the current directory. | Capture persistent instructions for the repository or subdirectory you're working in. |

48| [`/logout`](#sign-out-with-logout) | Sign out of Codex. | Clear local credentials when using a shared machine. |48| [`/logout`](#sign-out-with-logout) | Sign out of Codex. | Clear local credentials when using a shared machine. |

49| [`/mcp`](#list-mcp-tools-with-mcp) | List configured Model Context Protocol (MCP) tools. | Check which external tools Codex can call during the session; add `verbose` for server details. |49| [`/mcp`](#list-mcp-tools-with-mcp) | List configured Model Context Protocol (MCP) tools. | Check which external tools Codex can call during the session; add `verbose` for server details. |

50| [`/mention`](#highlight-files-with-mention) | Attach a file to the conversation. | Point Codex at specific files or folders you want it to inspect next. |50| [`/mention`](#highlight-files-with-mention) | Attach a file to the conversation. | Point Codex at specific files or folders you want it to inspect next. |

51| [`/model`](#set-the-active-model-with-model) | Choose the active model (and reasoning effort, when available). | Switch between general-purpose models (`gpt-4.1-mini`) and deeper reasoning models before running a task. |51| [`/model`](#set-the-active-model-with-model) | Choose the active model (and reasoning effort, when available). | Switch between general-purpose models (`gpt-4.1-mini`) and deeper reasoning models before running a task. |

52| [`/fast`](#toggle-fast-mode-with-fast) | Toggle a Fast service tier when the model catalog exposes one. | Turn the current models Fast tier on or off, or check whether the thread is using it. |52| [`/fast`](#toggle-fast-mode-with-fast) | Toggle a Fast service tier when the model catalog exposes one. | Turn the current model's Fast tier on or off, or check whether the thread is using it. |

53| [`/plan`](#switch-to-plan-mode-with-plan) | Switch to plan mode and optionally send a prompt. | Ask Codex to propose an execution plan before implementation work starts. |53| [`/plan`](#switch-to-plan-mode-with-plan) | Switch to plan mode and optionally send a prompt. | Ask Codex to propose an execution plan before implementation work starts. |

54| [`/goal`](#set-or-view-a-task-goal-with-goal) | Set, pause, resume, view, or clear a task goal. | Give Codex a persistent target to track while a larger task runs. |54| [`/goal`](#set-or-view-a-task-goal-with-goal) | Set, pause, resume, view, or clear a task goal. | Give Codex a persistent target to track while a larger task runs. |

55| [`/personality`](#set-a-communication-style-with-personality) | Choose a communication style for responses. | Make Codex more concise, more explanatory, or more collaborative without changing your instructions. |55| [`/personality`](#set-a-communication-style-with-personality) | Choose a communication style for responses. | Make Codex more concise, more explanatory, or more collaborative without changing your instructions. |

56| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |56| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |

57| [`/stop`](#stop-background-terminals-with-stop) | Stop all background terminals. | Cancel background terminal work started by the current session. |57| [`/stop`](#stop-background-terminals-with-stop) | Stop all background terminals. | Cancel background terminal work started by the current session. |

58| [`/fork`](#fork-the-current-conversation-with-fork) | Fork the current conversation into a new thread. | Branch the active session to explore a new approach without losing the current transcript. |58| [`/fork`](#fork-the-current-conversation-with-fork) | Fork the current conversation into a new thread. | Branch the active session to explore a new approach without losing the current transcript. |

59| [`/side`, `/btw`](#start-a-side-conversation-with-side) | Start an ephemeral side conversation. | Ask a focused follow-up without disrupting the main threads transcript. |59| [`/side`, `/btw`](#start-a-side-conversation-with-side) | Start an ephemeral side conversation. | Ask a focused follow-up without disrupting the main thread's transcript. |

60| [`/raw`](#toggle-raw-scrollback-with-raw) | Toggle raw scrollback mode. | Make terminal selection and copying less formatted while reviewing long output. |60| [`/raw`](#toggle-raw-scrollback-with-raw) | Toggle raw scrollback mode. | Make terminal selection and copying less formatted while reviewing long output. |

61| [`/resume`](#resume-a-saved-conversation-with-resume) | Resume a saved conversation from your session list. | Continue work from a previous CLI session without starting over. |61| [`/resume`](#resume-a-saved-conversation-with-resume) | Resume a saved conversation from your session list. | Continue work from a previous CLI session without starting over. |

62| [`/new`](#start-a-new-conversation-with-new) | Start a new conversation inside the same CLI session. | Reset the chat context without leaving the CLI when you want a fresh prompt in the same repo. |62| [`/new`](#start-a-new-conversation-with-new) | Start a new conversation inside the same CLI session. | Reset the chat context without leaving the CLI when you want a fresh prompt in the same repo. |


921. Type `/fast on`, `/fast off`, or `/fast status`.921. Type `/fast on`, `/fast off`, or `/fast status`.

932. If you want the setting to persist, confirm the update when Codex offers to save it.932. If you want the setting to persist, confirm the update when Codex offers to save it.

94 94 

95Expected: Codex reports whether the current models Fast service tier is on or95Expected: Codex reports whether the current model's Fast service tier is on or

96off for the current thread. In the TUI footer, you can also show a Fast mode96off for the current thread. In the TUI footer, you can also show a Fast mode

97status-line item with `/statusline`.97status-line item with `/statusline`.

98 98 

99Fast tier commands are catalog-driven. If the current model doesnt advertise a99Fast tier commands are catalog-driven. If the current model doesn't advertise a

100Fast tier, Codex wont show `/fast`.100Fast tier, Codex won't show `/fast`.

101 101 

102### Set a communication style with `/personality`102### Set a communication style with `/personality`

103 103 


112Codex supports `friendly`, `pragmatic`, and `none` personalities. Use `none`112Codex supports `friendly`, `pragmatic`, and `none` personalities. Use `none`

113to disable personality instructions.113to disable personality instructions.

114 114 

115If the active model doesnt support personality-specific instructions, Codex hides this command.115If the active model doesn't support personality-specific instructions, Codex hides this command.

116 116 

117### Switch to plan mode with `/plan`117### Switch to plan mode with `/plan`

118 118 

1191. Type `/plan` and press Enter to switch the active conversation into plan1191. Type `/plan` and press Enter to switch the active conversation into plan

120 mode.120 mode.

1212. Optional: provide inline prompt text (for example, `/plan Propose a migration plan for this service`).1212. Optional: provide inline prompt text (for example, `/plan Propose a

122migration plan for this service`).

1223. You can paste content or attach images while using inline `/plan` arguments.1233. You can paste content or attach images while using inline `/plan` arguments.

123 124 

124Expected: Codex enters plan mode and uses your optional inline prompt as the first planning request.125Expected: Codex enters plan mode and uses your optional inline prompt as the first planning request.


1682. Pick the skill you want Codex to apply.1692. Pick the skill you want Codex to apply.

169 170 

170Expected: Codex inserts the selected skill context so the next request follows171Expected: Codex inserts the selected skill context so the next request follows

171that skills instructions.172that skill's instructions.

172 173 

173### View lifecycle hooks with `/hooks`174### View lifecycle hooks with `/hooks`

174 175 


184Expected: Codex clears the terminal, resets the visible transcript, and starts185Expected: Codex clears the terminal, resets the visible transcript, and starts

185a fresh chat in the same CLI session.186a fresh chat in the same CLI session.

186 187 

187Unlike `Ctrl`+`L`, `/clear` starts a new conversation.188Unlike <kbd>Ctrl</kbd>+<kbd>L</kbd>, `/clear` starts a new conversation.

188 189 

189`Ctrl`+`L` only clears the terminal view and keeps the current190<kbd>Ctrl</kbd>+<kbd>L</kbd> only clears the terminal view and keeps the current

190chat. Codex disables both actions while a task is in progress.191chat. Codex disables both actions while a task is in progress.

191 192 

192### Archive the current session with `/archive`193### Archive the current session with `/archive`


238the in-progress response. The command is unavailable before the first completed239the in-progress response. The command is unavailable before the first completed

239Codex output and immediately after a rollback.240Codex output and immediately after a rollback.

240 241 

241You can also press `Ctrl`+`O` from the main TUI to copy the242You can also press <kbd>Ctrl</kbd>+<kbd>O</kbd> from the main TUI to copy the

242latest completed response without opening the slash command menu.243latest completed response without opening the slash command menu.

243 244 

244### Toggle raw scrollback with `/raw`245### Toggle raw scrollback with `/raw`


2461. Type `/raw`, `/raw on`, or `/raw off`.2471. Type `/raw`, `/raw on`, or `/raw off`.

247 248 

248Expected: Codex toggles raw scrollback mode, which makes terminal selection and249Expected: Codex toggles raw scrollback mode, which makes terminal selection and

249copying more direct. You can also use the default `Alt`+`R`250copying more direct. You can also use the default <kbd>Alt</kbd>+<kbd>R</kbd>

250binding or persist the default with `tui.raw_output_mode = true`.251binding or persist the default with `tui.raw_output_mode = true`.

251 252 

252### Grant sandbox read access with `/sandbox-add-read-dir`253### Grant sandbox read access with `/sandbox-add-read-dir`


266 current token usage. When the TUI connects remotely, the output also267 current token usage. When the TUI connects remotely, the output also

267 shows the remote address and the server version.268 shows the remote address and the server version.

268 269 

269Expected: Codex prints a summary confirming that its operating where you270Expected: Codex prints a summary confirming that it's operating where you

270expect.271expect.

271 272 

272### Inspect config layers with `/debug-config`273### Inspect config layers with `/debug-config`


3291. Type `/ps`.3301. Type `/ps`.

3302. Review the list of background terminals and their status.3312. Review the list of background terminals and their status.

331 332 

332Expected: Codex shows each background terminals command plus up to three333Expected: Codex shows each background terminal's command plus up to three

333recent, non-empty output lines so you can gauge progress at a glance.334recent, non-empty output lines so you can gauge progress at a glance.

334 335 

335Background terminals appear when `unified_exec` is in use; otherwise, the list may be empty.336Background terminals appear when `unified_exec` is in use; otherwise, the list may be empty.


3551. Type `/diff` to inspect the Git diff.3561. Type `/diff` to inspect the Git diff.

3562. Scroll through the output inside the CLI to review edits and added files.3572. Scroll through the output inside the CLI to review edits and added files.

357 358 

358Expected: Codex shows changes youve staged, changes you havent staged yet,359Expected: Codex shows changes you've staged, changes you haven't staged yet,

359and files Git hasnt started tracking, so you can decide what to keep.360and files Git hasn't started tracking, so you can decide what to keep.

360 361 

361### Highlight files with `/mention`362### Highlight files with `/mention`

362 363 


372Expected: Codex starts a fresh conversation in the same CLI session, so you373Expected: Codex starts a fresh conversation in the same CLI session, so you

373can switch tasks without leaving your terminal.374can switch tasks without leaving your terminal.

374 375 

375Unlike `/clear`, `/new` doesnt clear the current terminal view first.376Unlike `/clear`, `/new` doesn't clear the current terminal view first.

376 377 

377### Resume a saved conversation with `/resume`378### Resume a saved conversation with `/resume`

378 379 

3791. Type `/resume` and press Enter.3801. Type `/resume` and press Enter.

3802. Choose the session you want from the saved-session picker.3812. Choose the session you want from the saved-session picker.

381 382 

382Expected: Codex reloads the selected conversations transcript so you can pick383Expected: Codex reloads the selected conversation's transcript so you can pick

383up where you left off, keeping the original history intact.384up where you left off, keeping the original history intact.

384 385 

385### Fork the current conversation with `/fork`386### Fork the current conversation with `/fork`


446 447 

447Expected: Codex opens the plugin browser so you can review installed plugins,448Expected: Codex opens the plugin browser so you can review installed plugins,

448discoverable plugins that your configuration allows, and installed plugin state.449discoverable plugins that your configuration allows, and installed plugin state.

449Press `Space` on an installed plugin to toggle its enabled state.450Press <kbd>Space</kbd> on an installed plugin to toggle its enabled state.

450 451 

451### Review hooks with `/hooks`452### Review hooks with `/hooks`

452 453 


4553. Trust, disable, or re-enable non-managed hooks as needed.4563. Trust, disable, or re-enable non-managed hooks as needed.

456 457 

457Expected: Codex opens the hook browser so you can review configured lifecycle458Expected: Codex opens the hook browser so you can review configured lifecycle

458hooks. Managed hooks appear as managed and cant be disabled from the user hook459hooks. Managed hooks appear as managed and can't be disabled from the user hook

459browser.460browser.

460 461 

461### Switch agent threads with `/agent`462### Switch agent threads with `/agent`


4642. Select the thread you want from the picker.4652. Select the thread you want from the picker.

465 466 

466Expected: Codex switches the active thread so you can inspect or continue that467Expected: Codex switches the active thread so you can inspect or continue that

467agents work.468agent's work.

468 469 

469### Send feedback with `/feedback`470### Send feedback with `/feedback`

470 471 

Details

1# Sandbox – Codex1# Sandbox

2 2 

3The sandbox is the boundary that lets Codex act autonomously without giving it3The sandbox is the boundary that lets Codex act autonomously without giving it

4unrestricted access to your machine. When Codex runs local commands in the4unrestricted access to your machine. When Codex runs local commands in the


11it needs to go beyond them, Codex falls back to the approval flow.11it needs to go beyond them, Codex falls back to the approval flow.

12 12 

13Sandboxing and approvals are different controls that work together. The13Sandboxing and approvals are different controls that work together. The

14sandbox defines technical boundaries. The approval policy decides when Codex14 sandbox defines technical boundaries. The approval policy decides when Codex

15must stop and ask before crossing them.15 must stop and ask before crossing them.

16 16 

17## What the sandbox does17## What the sandbox does

18 18 

19The sandbox applies to spawned commands, not just to Codexs built-in file19The sandbox applies to spawned commands, not just to Codex's built-in file

20operations. If Codex runs tools like `git`, package managers, or test runners,20operations. If Codex runs tools like `git`, package managers, or test runners,

21those commands inherit the same sandbox boundaries.21those commands inherit the same sandbox boundaries.

22 22 


31low-risk command, Codex can read files, make edits, and run routine project31low-risk command, Codex can read files, make edits, and run routine project

32commands within the boundary you already approved.32commands within the boundary you already approved.

33 33 

34It also gives you a clearer trust model for agentic work. You arent just34It also gives you a clearer trust model for agentic work. You aren't just

35trusting the agents intentions; you are trusting that the agent is operating35trusting the agent's intentions; you are trusting that the agent is operating

36inside enforced limits. That makes it easier to let Codex work independently36inside enforced limits. That makes it easier to let Codex work independently

37while still knowing when it will stop and ask for help.37while still knowing when it will stop and ask for help.

38 38 


52 52 

53On **Linux and WSL2**, install `bubblewrap` with your package manager first:53On **Linux and WSL2**, install `bubblewrap` with your package manager first:

54 54 

55```55<Tabs

56 id="codex-sandboxing-prerequisites"

57 param="sandbox-os"

58 tabs={[

59 { id: "ubuntu-debian", label: "Ubuntu/Debian" },

60 { id: "fedora", label: "Fedora" },

61 ]}

62>

63 <div slot="ubuntu-debian">

64 

65```bash

56sudo apt install bubblewrap66sudo apt install bubblewrap

57```67```

58 68 

59```69 </div>

70 

71 <div slot="fedora">

72 

73```bash

60sudo dnf install bubblewrap74sudo dnf install bubblewrap

61```75```

62 76 

77 </div>

78</Tabs>

79 

63Codex uses the first `bwrap` executable it finds on `PATH`. If no `bwrap`80Codex uses the first `bwrap` executable it finds on `PATH`. If no `bwrap`

64executable is available, Codex falls back to a bundled helper, but that helper81executable is available, Codex falls back to a bundled helper, but that helper

65requires support for unprivileged user namespace creation. Installing the82requires support for unprivileged user namespace creation. Installing the

66distribution package that provides `bwrap` keeps this setup reliable.83distribution package that provides `bwrap` keeps this setup reliable.

67 84 

68Codex surfaces a startup warning when `bwrap` is missing or when the helper85Codex surfaces a startup warning when `bwrap` is missing or when the helper

69cant create the needed user namespace. On distributions that restrict this86can't create the needed user namespace. On distributions that restrict this

70AppArmor setting, prefer loading the `bwrap` AppArmor profile so `bwrap` can87AppArmor setting, prefer loading the `bwrap` AppArmor profile so `bwrap` can

71keep working without disabling the restriction globally.88keep working without disabling the restriction globally.

72 89 

73**Ubuntu AppArmor note:** On Ubuntu 25.04, installing `bubblewrap` from90**Ubuntu AppArmor note:** On Ubuntu 25.04, installing `bubblewrap` from

74Ubuntus package repository should work without extra AppArmor setup. The91 Ubuntu's package repository should work without extra AppArmor setup. The

75`bwrap-userns-restrict` profile ships in the `apparmor` package at92 `bwrap-userns-restrict` profile ships in the `apparmor` package at

76`/etc/apparmor.d/bwrap-userns-restrict`.93 `/etc/apparmor.d/bwrap-userns-restrict`.

77 94 

78On Ubuntu 24.04, Codex may still warn that it cant create the needed user95On Ubuntu 24.04, Codex may still warn that it can't create the needed user

79namespace after `bubblewrap` is installed. Copy and load the extra profile:96namespace after `bubblewrap` is installed. Copy and load the extra profile:

80 97 

81```98```bash

82sudo apt update99sudo apt update

83sudo apt install apparmor-profiles apparmor-utils100sudo apt install apparmor-profiles apparmor-utils

84sudo install -m 0644 \101sudo install -m 0644 \


90`apparmor_parser -r` loads the profile into the kernel without a reboot. You107`apparmor_parser -r` loads the profile into the kernel without a reboot. You

91can also reload all AppArmor profiles:108can also reload all AppArmor profiles:

92 109 

93```110```bash

94sudo systemctl reload apparmor.service111sudo systemctl reload apparmor.service

95```112```

96 113 

97If that profile is unavailable or does not resolve the issue, you can disable114If that profile is unavailable or does not resolve the issue, you can disable

98the AppArmor unprivileged user namespace restriction with:115the AppArmor unprivileged user namespace restriction with:

99 116 

100```117```bash

101sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0118sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

102```119```

103 120 


106Most people start with the permissions controls in the product.123Most people start with the permissions controls in the product.

107 124 

108In the Codex app and IDE, you choose a mode from the permissions selector under125In the Codex app and IDE, you choose a mode from the permissions selector under

109the composer or chat input. That selector lets you rely on Codexs default126the composer or chat input. That selector lets you rely on Codex's default

110permissions, switch to full access, or use your custom configuration.127permissions, switch to full access, or use your custom configuration.

111 128 

112Ask Codex anything.129<PermissionModeSelectorDemo client:load />

113 

114Default permissions

115 

1165.5High

117 

118#### Default permissions

119 

120Codex can read and edit files in the current workspace and run routine local commands. It asks before using the internet or going beyond the workspace boundary.

121 

122Sandbox

123: `workspace-write`

124 

125Approvals policy

126: `on-request`

127 

128Reviewer

129: `user`

130 130 

131In the CLI, use [`/permissions`](https://developers.openai.com/codex/cli/slash-commands#update-permissions-with-permissions)131In the CLI, use [`/permissions`](https://developers.openai.com/codex/cli/slash-commands#update-permissions-with-permissions)

132to switch modes during a session.132to switch modes during a session.


144 144 

145At a high level, the common sandbox modes are:145At a high level, the common sandbox modes are:

146 146 

147- `read-only`: Codex can inspect files, but it cant edit files or run147- `read-only`: Codex can inspect files, but it can't edit files or run

148 commands without approval.148 commands without approval.

149- `workspace-write`: Codex can read files, edit within the workspace, and run149- `workspace-write`: Codex can read files, edit within the workspace, and run

150 routine local commands inside that boundary. This is the default low-friction150 routine local commands inside that boundary. This is the default low-friction


155 155 

156The common approval policies are:156The common approval policies are:

157 157 

158- `untrusted`: Codex asks before running commands that arent in its trusted158- `untrusted`: Codex asks before running commands that aren't in its trusted

159 set.159 set.

160- `on-request`: Codex works inside the sandbox by default and asks when it160- `on-request`: Codex works inside the sandbox by default and asks when it

161 needs to go beyond that boundary.161 needs to go beyond that boundary.

162- `never`: Codex doesnt stop for approval prompts.162- `never`: Codex doesn't stop for approval prompts.

163 163 

164When approvals are interactive, you can also choose who reviews them with164When approvals are interactive, you can also choose who reviews them with

165`approvals_reviewer`:165`approvals_reviewer`:

Details

1# Subagents – Codex1# Subagents

2 2 

3Codex can run subagent workflows by spawning specialized agents in parallel so3Codex can run subagent workflows by spawning specialized agents in parallel so

4they can explore, tackle, or analyze work concurrently.4they can explore, tackle, or analyze work concurrently.


7 7 

8## Why subagent workflows help8## Why subagent workflows help

9 9 

10Even with large context windows, models have limits. If you flood the main conversation (where youre defining requirements, constraints, and decisions) with noisy intermediate output such as exploration notes, test logs, stack traces, and command output, the session can become less reliable over time.10Even with large context windows, models have limits. If you flood the main conversation (where you're defining requirements, constraints, and decisions) with noisy intermediate output such as exploration notes, test logs, stack traces, and command output, the session can become less reliable over time.

11 11 

12This is often described as:12This is often described as:

13 13 


43 43 

44## Triggering subagent workflows44## Triggering subagent workflows

45 45 

46Codex doesnt spawn subagents automatically, and it should only use subagents when you46Codex doesn't spawn subagents automatically, and it should only use subagents when you

47explicitly ask for subagents or parallel agent work.47explicitly ask for subagents or parallel agent work.

48 48 

49In practice, manual triggering means using direct instructions such as49In practice, manual triggering means using direct instructions such as

50spawn two agents, delegate this work in parallel, or use one agent per50"spawn two agents," "delegate this work in parallel," or "use one agent per

51point. Subagent workflows consume more tokens than comparable single-agent runs51point." Subagent workflows consume more tokens than comparable single-agent runs

52because each subagent does its own model and tool work.52because each subagent does its own model and tool work.

53 53 

54A good subagent prompt should explain how to divide the work, whether Codex54A good subagent prompt should explain how to divide the work, whether Codex

55should wait for all agents before continuing, and what summary or output to55should wait for all agents before continuing, and what summary or output to

56return.56return.

57 57 

58```58```text

59Review this branch with parallel subagents. Spawn one subagent for security risks, one for test gaps, and one for maintainability. Wait for all three, then summarize the findings by category with file references.59Review this branch with parallel subagents. Spawn one subagent for security risks, one for test gaps, and one for maintainability. Wait for all three, then summarize the findings by category with file references.

60```60```

61 61 


63 63 

64Different agents need different model and reasoning settings.64Different agents need different model and reasoning settings.

65 65 

66If you dont pin a model or `model_reasoning_effort`, Codex can choose a setup66If you don't pin a model or `model_reasoning_effort`, Codex can choose a setup

67that balances intelligence, speed, and price for the task. It may favor `gpt-5.4-mini` for fast scans or a higher-effort `gpt-5.5` configuration for more demanding reasoning. When you want finer control, steer that choice in your prompt or set `model` and `model_reasoning_effort` directly in the agent file.67that balances intelligence, speed, and price for the task. It may favor `gpt-5.4-mini` for fast scans or a higher-effort `gpt-5.5` configuration for more demanding reasoning. When you want finer control, steer that choice in your prompt or set `model` and `model_reasoning_effort` directly in the agent file.

68 68 

69For most tasks in Codex, start with 69For most tasks in Codex, start with

70`gpt-5.5`. Use70 `gpt-5.5`. Use

71`gpt-5.4-mini` when you want71 `gpt-5.4-mini` when you want

72a faster, lower-cost option for lighter subagent work. If you have ChatGPT Pro72 a faster, lower-cost option for lighter subagent work. If you have ChatGPT Pro

73and want near-instant text-only iteration, `gpt-5.3-codex-spark` remains73 and want near-instant text-only iteration, `gpt-5.3-codex-spark` remains

74available in research preview.74 available in research preview.

75 75 

76### Model choice76### Model choice

77 77 

config-advanced.md +55 −54

Details

1# Advanced Configuration – Codex1# Advanced Configuration

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 


12Profile names can contain letters, numbers, hyphens, and underscores.12Profile names can contain letters, numbers, hyphens, and underscores.

13 13 

14Create a separate TOML file for each profile. Use top-level config keys in the14Create a separate TOML file for each profile. Use top-level config keys in the

15profile file; dont nest them under `[profiles.profile-name]`.15profile file; don't nest them under `[profiles.profile-name]`.

16 16 

17```17```toml

18# ~/.codex/deep-review.config.toml18# ~/.codex/deep-review.config.toml

19model = "gpt-5.5"19model = "gpt-5.5"

20model_reasoning_effort = "xhigh"20model_reasoning_effort = "xhigh"


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

23```23```

24 24 

25```25```shell

26codex --profile deep-review26codex --profile deep-review

27codex exec --profile deep-review "review this change"27codex exec --profile deep-review "review this change"

28```28```


48 48 

49Examples:49Examples:

50 50 

51```51```shell

52# Dedicated flag52# Dedicated flag

53codex --model gpt-5.453codex --model gpt-5.4

54 54 


61Notes:61Notes:

62 62 

63- Keys can use dot notation to set nested values (for example, `mcp_servers.context7.enabled=false`).63- Keys can use dot notation to set nested values (for example, `mcp_servers.context7.enabled=false`).

64- `--config` values are parsed as TOML. When in doubt, quote the value so your shell doesnt split it on spaces.64- `--config` values are parsed as TOML. When in doubt, quote the value so your shell doesn't split it on spaces.

65- If the value cant be parsed as TOML, Codex treats it as a string.65- If the value can't be parsed as TOML, Codex treats it as a string.

66 66 

67## Config and state locations67## Config and state locations

68 68 


81 81 

82If 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.82If 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.

83 83 

84```84```toml

85openai_base_url = "https://us.api.openai.com/v1"85openai_base_url = "https://us.api.openai.com/v1"

86```86```

87 87 


93 93 

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

95 95 

96Project config files cant override settings that redirect credentials, alter96Project config files can't override settings that redirect credentials, alter

97host-owned app request metadata, change provider auth, select config profiles,97host-owned app request metadata, change provider auth, select config profiles,

98or run machine-local notification/telemetry commands. Codex ignores the98or run machine-local notification/telemetry commands. Codex ignores the

99following keys in project-local `.codex/config.toml` and prints a startup99following keys in project-local `.codex/config.toml` and prints a startup


121 121 

122Inline TOML hooks use the same event structure as `hooks.json`:122Inline TOML hooks use the same event structure as `hooks.json`:

123 123 

124```124```toml

125[[hooks.PreToolUse]]125[[hooks.PreToolUse]]

126matcher = "^Bash$"126matcher = "^Bash$"

127 127 


148 148 

149By default, Codex treats a directory containing `.git` as the project root. To customize this behavior, set `project_root_markers` in `config.toml`:149By default, Codex treats a directory containing `.git` as the project root. To customize this behavior, set `project_root_markers` in `config.toml`:

150 150 

151```151```toml

152# Treat a directory as the project root when it contains any of these markers.152# Treat a directory as the project root when it contains any of these markers.

153project_root_markers = [".git", ".hg", ".sl"]153project_root_markers = [".git", ".hg", ".sl"]

154```154```


157 157 

158## Custom model providers158## Custom model providers

159 159 

160A model provider defines how Codex connects to a model (base URL, wire API, authentication, and optional HTTP headers). Custom providers cant reuse the reserved built-in provider IDs: `openai`, `ollama`, and `lmstudio`.160A 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`.

161 161 

162Define additional providers and point `model_provider` at them:162Define additional providers and point `model_provider` at them:

163 163 

164```164```toml

165model = "gpt-5.4"165model = "gpt-5.4"

166model_provider = "proxy"166model_provider = "proxy"

167 167 


182 182 

183Add request headers when needed:183Add request headers when needed:

184 184 

185```185```toml

186[model_providers.example]186[model_providers.example]

187http_headers = { "X-Example-Header" = "example-value" }187http_headers = { "X-Example-Header" = "example-value" }

188env_http_headers = { "X-Example-Features" = "EXAMPLE_FEATURES" }188env_http_headers = { "X-Example-Features" = "EXAMPLE_FEATURES" }


190 190 

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

192 192 

193```193```toml

194[model_providers.proxy]194[model_providers.proxy]

195name = "OpenAI using LLM proxy"195name = "OpenAI using LLM proxy"

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


203refresh_interval_ms = 300000203refresh_interval_ms = 300000

204```204```

205 205 

206The 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. Dont combine `[model_providers.<id>.auth]` with `env_key`, `experimental_bearer_token`, or `requires_openai_auth`.206The 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`.

207 207 

208### Amazon Bedrock provider208### Amazon Bedrock provider

209 209 


211`model_provider`; unlike custom providers, this built-in provider supports only211`model_provider`; unlike custom providers, this built-in provider supports only

212the nested AWS profile and region overrides.212the nested AWS profile and region overrides.

213 213 

214```214```toml

215model_provider = "amazon-bedrock"215model_provider = "amazon-bedrock"

216model = "<bedrock-model-id>"216model = "<bedrock-model-id>"

217 217 


228 228 

229## OSS mode (local providers)229## OSS mode (local providers)

230 230 

231Codex 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.231Codex 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.

232 232 

233```233```toml

234# Default local provider used with `--oss`234# Default local provider used with `--oss`

235oss_provider = "ollama" # or "lmstudio"235oss_provider = "ollama" # or "lmstudio"

236```236```

237 237 

238## Azure provider and per-provider tuning238## Azure provider and per-provider tuning

239 239 

240```240```toml

241[model_providers.azure]241[model_providers.azure]

242name = "Azure"242name = "Azure"

243base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"243base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"


249stream_idle_timeout_ms = 300000249stream_idle_timeout_ms = 300000

250```250```

251 251 

252To change the base URL for the built-in OpenAI provider, use `openai_base_url`; dont create `[model_providers.openai]`, because you cant override built-in provider IDs.252To 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.

253 253 

254## ChatGPT customers using data residency254## ChatGPT customers using data residency

255 255 

256Projects 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).256Projects 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).

257 257 

258```258```toml

259model_provider = "openaidr"259model_provider = "openaidr"

260[model_providers.openaidr]260[model_providers.openaidr]

261name = "OpenAI Data Residency"261name = "OpenAI Data Residency"


264 264 

265## Model reasoning, verbosity, and limits265## Model reasoning, verbosity, and limits

266 266 

267```267```toml

268model_reasoning_summary = "none" # Disable summaries268model_reasoning_summary = "none" # Disable summaries

269model_verbosity = "low" # Shorten responses269model_verbosity = "low" # Shorten responses

270model_supports_reasoning_summaries = true # Force reasoning270model_supports_reasoning_summaries = true # Force reasoning


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

291`guardian_policy_config` takes precedence.291`guardian_policy_config` takes precedence.

292 292 

293```293```toml

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

295approvals_reviewer = "user" # Or "auto_review" for automatic review295approvals_reviewer = "user" # Or "auto_review" for automatic review

296sandbox_mode = "workspace-write"296sandbox_mode = "workspace-write"


327[Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).327[Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).

328 328 

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

330read-only even when the rest of the workspace is writable. This is why330 read-only even when the rest of the workspace is writable. This is why

331commands like `git commit` may still require approval to run outside the331 commands like `git commit` may still require approval to run outside the

332sandbox. If you want Codex to skip specific commands (for example, block `git commit` outside the sandbox), use332 sandbox. If you want Codex to skip specific commands (for example, block `git

333[rules](https://developers.openai.com/codex/rules).333 commit` outside the sandbox), use

334 <a href="/codex/rules">rules</a>.

334 335 

335Disable sandboxing entirely (use only if your environment already isolates processes):336Disable sandboxing entirely (use only if your environment already isolates processes):

336 337 

337```338```toml

338sandbox_mode = "danger-full-access"339sandbox_mode = "danger-full-access"

339```340```

340 341 


342 343 

343`shell_environment_policy` controls which environment variables Codex passes to any subprocess it launches (for example, when running a tool-command the model proposes). Start from a clean start (`inherit = "none"`) or a trimmed set (`inherit = "core"`), then layer on excludes, includes, and overrides to avoid leaking secrets while still providing the paths, keys, or flags your tasks need.344`shell_environment_policy` controls which environment variables Codex passes to any subprocess it launches (for example, when running a tool-command the model proposes). Start from a clean start (`inherit = "none"`) or a trimmed set (`inherit = "core"`), then layer on excludes, includes, and overrides to avoid leaking secrets while still providing the paths, keys, or flags your tasks need.

344 345 

345```346```toml

346[shell_environment_policy]347[shell_environment_policy]

347inherit = "none"348inherit = "none"

348set = { PATH = "/usr/bin", MY_FLAG = "1" }349set = { PATH = "/usr/bin", MY_FLAG = "1" }


361 362 

362Enable OpenTelemetry (OTel) log export to track Codex runs (API requests, SSE/events, prompts, tool approvals/results). Disabled by default; opt in via `[otel]`:363Enable OpenTelemetry (OTel) log export to track Codex runs (API requests, SSE/events, prompts, tool approvals/results). Disabled by default; opt in via `[otel]`:

363 364 

364```365```toml

365[otel]366[otel]

366environment = "staging" # defaults to "dev"367environment = "staging" # defaults to "dev"

367exporter = "none" # set to otlp-http or otlp-grpc to send events368exporter = "none" # set to otlp-http or otlp-grpc to send events


370 371 

371Choose an exporter:372Choose an exporter:

372 373 

373```374```toml

374[otel]375[otel]

375exporter = { otlp-http = {376exporter = { otlp-http = {

376 endpoint = "https://otel.example.com/v1/logs",377 endpoint = "https://otel.example.com/v1/logs",


379}}380}}

380```381```

381 382 

382```383```toml

383[otel]384[otel]

384exporter = { otlp-grpc = {385exporter = { otlp-grpc = {

385 endpoint = "https://otel.example.com:4317",386 endpoint = "https://otel.example.com:4317",


408Each metric below also includes default metadata tags: `auth_mode`, `originator`, `session_source`, `model`, and `app.version`.409Each metric below also includes default metadata tags: `auth_mode`, `originator`, `session_source`, `model`, and `app.version`.

409 410 

410| Metric | Type | Fields | Description |411| Metric | Type | Fields | Description |

411| --- | --- | --- | --- |412| ------------------------------------- | --------- | ------------------- | ----------------------------------------------------------------- |

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

413| `codex.api_request.duration_ms` | histogram | `status`, `success` | API request duration in milliseconds. |414| `codex.api_request.duration_ms` | histogram | `status`, `success` | API request duration in milliseconds. |

414| `codex.sse_event` | counter | `kind`, `success` | SSE event count by event kind and success/failure. |415| `codex.sse_event` | counter | `kind`, `success` | SSE event count by event kind and success/failure. |


424 425 

425### Metrics426### Metrics

426 427 

427By default, Codex periodically sends a small amount of anonymous usage and health data back to OpenAI. This helps detect when Codex isnt working correctly and shows what features and configuration options are being used, so the Codex team can focus on what matters most. These metrics dont contain any personally identifiable information (PII). Metrics collection is independent of OTel log/trace export.428By default, Codex periodically sends a small amount of anonymous usage and health data back to OpenAI. This helps detect when Codex isn't working correctly and shows what features and configuration options are being used, so the Codex team can focus on what matters most. These metrics don't contain any personally identifiable information (PII). Metrics collection is independent of OTel log/trace export.

428 429 

429If you want to disable metrics collection entirely across Codex surfaces on a machine, set the analytics flag in your config:430If you want to disable metrics collection entirely across Codex surfaces on a machine, set the analytics flag in your config:

430 431 

431```432```toml

432[analytics]433[analytics]

433enabled = false434enabled = false

434```435```


445 446 

446Each metric includes the required fields plus the default context fields above. Metric names below omit the `codex.` prefix.447Each metric includes the required fields plus the default context fields above. Metric names below omit the `codex.` prefix.

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

448If a metric includes the `tool` field, it reflects the internal tool used (for example, `apply_patch` or `shell`) and doesnt contain the actual shell command or patch `codex` is trying to apply.449If 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.

449 450 

450#### Runtime and model transport451#### Runtime and model transport

451 452 

452| Metric | Type | Fields | Description |453| Metric | Type | Fields | Description |

453| --- | --- | --- | --- |454| ----------------------------------------------- | --------- | -------------------- | ------------------------------------------------------------ |

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

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

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


480#### Turn and tool activity481#### Turn and tool activity

481 482 

482| Metric | Type | Fields | Description |483| Metric | Type | Fields | Description |

483| --- | --- | --- | --- |484| -------------------------------------- | --------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |

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

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

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


505#### Threads, tasks, and features506#### Threads, tasks, and features

506 507 

507| Metric | Type | Fields | Description |508| Metric | Type | Fields | Description |

508| --- | --- | --- | --- |509| --------------------------------- | --------- | --------------------- | -------------------------------------------------------------------------------- |

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

510| `status_line` | counter | | Session started with a configured status line. |511| `status_line` | counter | | Session started with a configured status line. |

511| `model_warning` | counter | | Warning sent to the model. |512| `model_warning` | counter | | Warning sent to the model. |


535#### Memory and local state536#### Memory and local state

536 537 

537| Metric | Type | Fields | Description |538| Metric | Type | Fields | Description |

538| --- | --- | --- | --- |539| ------------------------------ | --------- | ------------------------- | --------------------------------------------------------- |

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

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

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


556#### Windows sandbox557#### Windows sandbox

557 558 

558| Metric | Type | Fields | Description |559| Metric | Type | Fields | Description |

559| --- | --- | --- | --- |560| ------------------------------------------------ | --------- | ----------------------------------------- | ----------------------------------------------------- |

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

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

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


582 583 

583By default, Codex lets users send feedback from `/feedback`. To disable feedback collection across Codex surfaces on a machine, update your config:584By default, Codex lets users send feedback from `/feedback`. To disable feedback collection across Codex surfaces on a machine, update your config:

584 585 

585```586```toml

586[feedback]587[feedback]

587enabled = false588enabled = false

588```589```


591 592 

592### Hide or surface reasoning events593### Hide or surface reasoning events

593 594 

594If you want to reduce noisy reasoning output (for example in CI logs), you can suppress it:595If you want to reduce noisy "reasoning" output (for example in CI logs), you can suppress it:

595 596 

596```597```toml

597hide_agent_reasoning = true598hide_agent_reasoning = true

598```599```

599 600 

600If you want to surface raw reasoning content when a model emits it:601If you want to surface raw reasoning content when a model emits it:

601 602 

602```603```toml

603show_raw_agent_reasoning = true604show_raw_agent_reasoning = true

604```605```

605 606 

606Enable raw reasoning only if its acceptable for your workflow. Some models/providers (like `gpt-oss`) dont emit raw reasoning; in that case, this setting has no visible effect.607Enable raw reasoning only if it's acceptable for your workflow. Some models/providers (like `gpt-oss`) don't emit raw reasoning; in that case, this setting has no visible effect.

607 608 

608## Notifications609## Notifications

609 610 

610Use `notify` to trigger an external program whenever Codex emits supported events (currently only `agent-turn-complete`). This is handy for desktop toasts, chat webhooks, CI updates, or any side-channel alerting that the built-in TUI notifications dont cover.611Use `notify` to trigger an external program whenever Codex emits supported events (currently only `agent-turn-complete`). This is handy for desktop toasts, chat webhooks, CI updates, or any side-channel alerting that the built-in TUI notifications don't cover.

611 612 

612```613```toml

613notify = ["python3", "/path/to/notify.py"]614notify = ["python3", "/path/to/notify.py"]

614```615```

615 616 

616Example `notify.py` (truncated) that reacts to `agent-turn-complete`:617Example `notify.py` (truncated) that reacts to `agent-turn-complete`:

617 618 

618```619```python

619#!/usr/bin/env python3620#!/usr/bin/env python3

620import json, subprocess, sys621import json, subprocess, sys

621 622 


665 666 

666By default, Codex saves local session transcripts under `CODEX_HOME` (for example, `~/.codex/history.jsonl`). To disable local history persistence:667By default, Codex saves local session transcripts under `CODEX_HOME` (for example, `~/.codex/history.jsonl`). To disable local history persistence:

667 668 

668```669```toml

669[history]670[history]

670persistence = "none"671persistence = "none"

671```672```

672 673 

673To cap the history file size, set `history.max_bytes`. When the file exceeds the cap, Codex drops the oldest entries and compacts the file while keeping the newest records.674To cap the history file size, set `history.max_bytes`. When the file exceeds the cap, Codex drops the oldest entries and compacts the file while keeping the newest records.

674 675 

675```676```toml

676[history]677[history]

677max_bytes = 104857600 # 100 MiB678max_bytes = 104857600 # 100 MiB

678```679```


681 682 

682If you use a terminal/editor integration that supports it, Codex can render file citations as clickable links. Configure `file_opener` to pick the URI scheme Codex uses:683If you use a terminal/editor integration that supports it, Codex can render file citations as clickable links. Configure `file_opener` to pick the URI scheme Codex uses:

683 684 

684```685```toml

685file_opener = "vscode" # or cursor, windsurf, vscode-insiders, none686file_opener = "vscode" # or cursor, windsurf, vscode-insiders, none

686```687```

687 688 

config-basic.md +21 −21

Details

1# Config basics – Codex1# Config basics

2 2 

3Codex reads configuration details from more than one location. Your personal defaults live in `~/.codex/config.toml`, and you can add project overrides with `.codex/config.toml` files. For security, Codex loads project `.codex/` layers only when you trust the project.3Codex reads configuration details from more than one location. Your personal defaults live in `~/.codex/config.toml`, and you can add project overrides with `.codex/config.toml` files. For security, Codex loads project `.codex/` layers only when you trust the project.

4 4 


32For one-off overrides via `-c`/`--config` (including TOML quoting rules), see [Advanced Config](https://developers.openai.com/codex/config-advanced#one-off-overrides-from-the-cli).32For one-off overrides via `-c`/`--config` (including TOML quoting rules), see [Advanced Config](https://developers.openai.com/codex/config-advanced#one-off-overrides-from-the-cli).

33 33 

34On managed machines, your organization may also enforce constraints via34On managed machines, your organization may also enforce constraints via

35`requirements.toml` (for example, disallowing `approval_policy = "never"` or35 `requirements.toml` (for example, disallowing `approval_policy = "never"` or

36`sandbox_mode = "danger-full-access"`). See [Managed36 `sandbox_mode = "danger-full-access"`). See [Managed

37configuration](https://developers.openai.com/codex/enterprise/managed-configuration) and [Admin-enforced37 configuration](https://developers.openai.com/codex/enterprise/managed-configuration) and [Admin-enforced

38requirements](https://developers.openai.com/codex/enterprise/managed-configuration#admin-enforced-requirements-requirementstoml).38 requirements](https://developers.openai.com/codex/enterprise/managed-configuration#admin-enforced-requirements-requirementstoml).

39 39 

40## Common configuration options40## Common configuration options

41 41 


45 45 

46Choose the model Codex uses by default in the CLI and IDE.46Choose the model Codex uses by default in the CLI and IDE.

47 47 

48```48```toml

49model = "gpt-5.5"49model = "gpt-5.5"

50```50```

51 51 


53 54 

54Control when Codex pauses to ask before running generated commands.55Control when Codex pauses to ask before running generated commands.

55 56 

56```57```toml

57approval_policy = "on-request"58approval_policy = "on-request"

58```59```

59 60 


63 64 

64Adjust how much filesystem and network access Codex has while executing commands.65Adjust how much filesystem and network access Codex has while executing commands.

65 66 

66```67```toml

67sandbox_mode = "workspace-write"68sandbox_mode = "workspace-write"

68```69```

69 70 


78 79 

79#### Windows sandbox mode80#### Windows sandbox mode

80 81 

81When running Codex natively on Windows, set the native sandbox mode to `elevated` in the `windows` table. Use `unelevated` only if you dont have administrator permissions or if elevated setup fails.82When running Codex natively on Windows, set the native sandbox mode to `elevated` in the `windows` table. Use `unelevated` only if you don't have administrator permissions or if elevated setup fails.

82 83 

83```84```toml

84[windows]85[windows]

85sandbox = "elevated" # Recommended86sandbox = "elevated" # Recommended

86# sandbox = "unelevated" # Fallback if admin permissions/setup are unavailable87# sandbox = "unelevated" # Fallback if admin permissions/setup are unavailable


94- `"live"` fetches the most recent data from the web (same as `--search`).95- `"live"` fetches the most recent data from the web (same as `--search`).

95- `"disabled"` turns off the web search tool.96- `"disabled"` turns off the web search tool.

96 97 

97```98```toml

98web_search = "cached" # default; serves results from the web search cache99web_search = "cached" # default; serves results from the web search cache

99# web_search = "live" # fetch the most recent data from the web (same as --search)100# web_search = "live" # fetch the most recent data from the web (same as --search)

100# web_search = "disabled"101# web_search = "disabled"


104 105 

105Tune how much reasoning effort the model applies when supported.106Tune how much reasoning effort the model applies when supported.

106 107 

107```108```toml

108model_reasoning_effort = "high"109model_reasoning_effort = "high"

109```110```

110 111 


112 113 

113Set a default communication style for supported models.114Set a default communication style for supported models.

114 115 

115```116```toml

116personality = "friendly" # or "pragmatic" or "none"117personality = "friendly" # or "pragmatic" or "none"

117```118```

118 119 


122 123 

123Customize terminal shortcuts under `tui.keymap`. Selected composer actions fall back to matching `tui.keymap.global` bindings; context-specific bindings take precedence when supported. An empty list unbinds the action.124Customize terminal shortcuts under `tui.keymap`. Selected composer actions fall back to matching `tui.keymap.global` bindings; context-specific bindings take precedence when supported. An empty list unbinds the action.

124 125 

125```126```toml

126[tui.keymap.global]127[tui.keymap.global]

127open_transcript = "ctrl-t"128open_transcript = "ctrl-t"

128 129 


137 138 

138Control which environment variables Codex forwards to spawned commands.139Control which environment variables Codex forwards to spawned commands.

139 140 

140```141```toml

141[shell_environment_policy]142[shell_environment_policy]

142include_only = ["PATH", "HOME"]143include_only = ["PATH", "HOME"]

143```144```


147Override where Codex writes local log files. Setting `log_dir` explicitly also148Override where Codex writes local log files. Setting `log_dir` explicitly also

148enables the opt-in plaintext TUI log, `codex-tui.log`, in that directory.149enables the opt-in plaintext TUI log, `codex-tui.log`, in that directory.

149 150 

150```151```toml

151log_dir = "/absolute/path/to/codex-logs"152log_dir = "/absolute/path/to/codex-logs"

152```153```

153 154 

154For one-off runs, you can also set it from the CLI:155For one-off runs, you can also set it from the CLI:

155 156 

156```157```bash

157codex -c log_dir=./.codex-log158codex -c log_dir=./.codex-log

158```159```

159 160 


161 162 

162Use the `[features]` table in `config.toml` to toggle optional and experimental capabilities.163Use the `[features]` table in `config.toml` to toggle optional and experimental capabilities.

163 164 

164```165```toml

165[features]166[features]

166shell_snapshot = true # Speed up repeated commands167shell_snapshot = true # Speed up repeated commands

167```168```


169### Supported features170### Supported features

170 171 

171| Key | Default | Maturity | Description |172| Key | Default | Maturity | Description |

172| --- | --- | --- | --- |173| -------------------- | :-------------------: | ------------ | ---------------------------------------------------------------------------------------- |

173| `apps` | false | Experimental | Enable ChatGPT Apps/connectors support |174| `apps` | false | Experimental | Enable ChatGPT Apps/connectors support |

174| `codex_git_commit` | false | Experimental | Enable Codex-generated git commits and commit attribution trailers |175| `codex_git_commit` | false | Experimental | Enable Codex-generated git commits and commit attribution trailers |

175| `hooks` | true | Stable | Enable lifecycle hooks from `hooks.json` or inline `[hooks]`. See [Hooks](https://developers.openai.com/codex/hooks). |176| `hooks` | true | Stable | Enable lifecycle hooks from `hooks.json` or inline `[hooks]`. See [Hooks](https://developers.openai.com/codex/hooks). |


186| `web_search_request` | false | Deprecated | Legacy toggle that maps to `web_search = "live"` when unset |187| `web_search_request` | false | Deprecated | Legacy toggle that maps to `web_search = "live"` when unset |

187 188 

188The Maturity column uses feature maturity labels such as Experimental, Beta,189The Maturity column uses feature maturity labels such as Experimental, Beta,

189and Stable. See [Feature Maturity](https://developers.openai.com/codex/feature-maturity) for how to190 and Stable. See [Feature Maturity](https://developers.openai.com/codex/feature-maturity) for how to

190interpret these labels.191 interpret these labels.

191 192 

192Omit feature keys to keep their defaults.193Omit feature keys to keep their defaults.

193 194 

config-sample.md +7 −1084

Details

1# Sample Configuration – Codex1# Sample Configuration

2 2 

3Use this example configuration as a starting point. It includes most keys Codex reads from `config.toml`, along with default behaviors, recommended values where helpful, and short notes.3Use this example configuration as a starting point. It includes most keys Codex reads from `config.toml`, along with default behaviors, recommended values where helpful, and short notes.

4 4 


12 12 

13Use the snippet below as a reference. Copy only the keys and sections you need into `~/.codex/config.toml` (or into a project-scoped `.codex/config.toml`), then adjust values for your setup.13Use the snippet below as a reference. Copy only the keys and sections you need into `~/.codex/config.toml` (or into a project-scoped `.codex/config.toml`), then adjust values for your setup.

14 14 

15```15```toml

161

172

183

194

205

216

227

238

249

2510

2611

2712

2813

2914

3015

3116

3217

3318

3419

3520

3621

3722

3823

3924

4025

4126

4227

4328

4429

4530

4631

4732

4833

4934

5035

5136

5237

5338

5439

5540

5641

5742

5843

5944

6045

6146

6247

6348

6449

6550

6651

6752

6853

6954

7055

7156

7257

7358

7459

7560

7661

7762

7863

7964

8065

8166

8267

8368

8469

8570

8671

8772

8873

8974

9075

9176

9277

9378

9479

9580

9681

9782

9883

9984

10085

10186

10287

10388

10489

10590

10691

10792

10893

10994

11095

11196

11297

11398

11499

115100

116101

117102

118103

119104

120105

121106

122107

123108

124109

125110

126111

127112

128113

129114

130115

131116

132117

133118

134119

135120

136121

137122

138123

139124

140125

141126

142127

143128

144129

145130

146131

147132

148133

149134

150135

151136

152137

153138

154139

155140

156141

157142

158143

159144

160145

161146

162147

163148

164149

165150

166151

167152

168153

169154

170155

171156

172157

173158

174159

175160

176161

177162

178163

179164

180165

181166

182167

183168

184169

185170

186171

187172

188173

189174

190175

191176

192177

193178

194179

195180

196181

197182

198183

199184

200185

201186

202187

203188

204189

205190

206191

207192

208193

209194

210195

211196

212197

213198

214199

215200

216201

217202

218203

219204

220205

221206

222207

223208

224209

225210

226211

227212

228213

229214

230215

231216

232217

233218

234219

235220

236221

237222

238223

239224

240225

241226

242227

243228

244229

245230

246231

247232

248233

249234

250235

251236

252237

253238

254239

255240

256241

257242

258243

259244

260245

261246

262247

263248

264249

265250

266251

267252

268253

269254

270255

271256

272257

273258

274259

275260

276261

277262

278263

279264

280265

281266

282267

283268

284269

285270

286271

287272

288273

289274

290275

291276

292277

293278

294279

295280

296281

297282

298283

299284

300285

301286

302287

303288

304289

305290

306291

307292

308293

309294

310295

311296

312297

313298

314299

315300

316301

317302

318303

319304

320305

321306

322307

323308

324309

325310

326311

327312

328313

329314

330315

331316

332317

333318

334319

335320

336321

337322

338323

339324

340325

341326

342327

343328

344329

345330

346331

347332

348333

349334

350335

351336

352337

353338

354339

355340

356341

357342

358343

359344

360345

361346

362347

363348

364349

365350

366351

367352

368353

369354

370355

371356

372357

373358

374359

375360

376361

377362

378363

379364

380365

381366

382367

383368

384369

385370

386371

387372

388373

389374

390375

391376

392377

393378

394379

395380

396381

397382

398383

399384

400385

401386

402387

403388

404389

405390

406391

407392

408393

409394

410395

411396

412397

413398

414399

415400

416401

417402

418403

419404

420405

421406

422407

423408

424409

425410

426411

427412

428413

429414

430415

431416

432417

433418

434419

435420

436421

437422

438423

439424

440425

441426

442427

443428

444429

445430

446431

447432

448433

449434

450435

451436

452437

453438

454439

455440

456441

457442

458443

459444

460445

461446

462447

463448

464449

465450

466451

467452

468453

469454

470455

471456

472457

473458

474459

475460

476461

477462

478463

479464

480465

481466

482467

483468

484469

485470

486471

487472

488473

489474

490475

491476

492477

493478

494479

495480

496481

497482

498483

499484

500485

501486

502487

503488

504489

505490

506491

507492

508493

509494

510495

511496

512497

513498

514499

515500

516501

517502

518503

519504

520505

521506

522507

523508

524509

525510

526511

527512

528513

529514

530515

531516

532517

533518

534519

535520

536521

537522

538523

539524

540525

541526

542527

543528

544529

545530

546531

547532

548533

549534

550535

551536

552537

553538

554539

555540

556541

557542

558543

559544

560545

561546

562547

563548

564549

565550

566551

567552

568553

569554

570555

571556

572557

573558

574559

575560

576561

577562

578563

579564

580565

581566

582567

583568

584569

585570

586571

587572

588573

589574

590575

591576

592577

593578

594579

595580

596581

597582

598583

599584

600585

601586

602587

603588

604589

605590

606591

607592

608593

609594

610595

611596

612597

613598

614599

615600

616601

617602

618603

619604

620605

621606

622607

623608

624609

625610

626611

627612

628613

629614

630615

631616

632617

633618

634619

635620

636621

637622

638623

639624

640625

641626

642627

643628

644629

645630

646631

647632

648633

649634

650635

651636

652637

653638

654639

655640

656641

657642

658643

659644

660645

661646

662647

663648

664649

665650

666651

667652

668653

669654

670655

671656

672657

673658

674659

675660

676661

677662

678663

679664

680665

681666

682667

683668

684669

685670

686671

687672

688673

689674

690675

691676

692677

693678

694679

695680

696681

697682

698683

699684

700685

701686

702687

703688

704689

705690

706691

707692

708693

709694

710695

711696

712697

713698

714699

715700

716701

717702

718703

719704

720705

721706

722707

723708

724709

725710

726711

727712

728713

729714

730715

731716

732717

733718

734719

735720

736721

737722

738723

739724

740725

741726

742727

743728

744729

745730

746731

747732

748733

749734

750735

751736

752737

753738

754739

755740

756741

757742

758743

759744

760745

761746

762747

763748

764749

765750

766751

767752

768753

769754

770755

771756

772757

773758

774759

775760

776761

777762

778763

779764

780765

781766

782767

783768

784769

785770

786771

787772

788773

789774

790775

791776

792777

793778

794779

795780

796781

797782

798783

799784

800785

801786

802787

803788

804789

805790

806791

807792

808793

809794

810795

811796

812797

813798

814799

815800

816801

817802

818803

819804

820805

821806

822807

823808

824809

825810

826811

827812

828813

829814

830815

831816

832817

833818

834819

835820

836821

837822

838823

839824

840825

841826

842827

843828

844829

845830

846831

847832

848833

849834

850835

851836

852837

853838

854839

855840

856841

857842

858843

859844

860845

861846

862847

863848

864849

865850

866851

867852

868853

869854

870855

871856

872857

873858

874859

875860

876861

877862

878863

879864

880865

881866

882867

883868

884869

885870

886871

887872

888873

889874

890875

891876

892877

893878

894879

895880

896881

897882

898883

899884

900885

901886

902887

903888

904889

905890

906891

907892

908893

909894

910895

911896

912897

913898

914899

915900

916901

917902

918903

919904

920905

921906

922907

923908

924909

925910

926911

927912

928913

929914

930915

931916

932917

933918

934919

935920

936921

937922

938923

939924

940925

941926

942927

943928

944929

945930

946931

947932

948933

949934

950935

951936

952937

953938

954939

955940

956941

957942

958943

959944

960945

961946

962947

963948

964949

965950

966951

967952

968953

969954

970955

971956

972957

973958

974959

975960

976961

977962

978963

979964

980965

981966

982967

983968

984969

985970

986971

987972

988973

989974

990975

991976

992977

993978

994979

995980

996981

997982

998983

999984

1000985

1001986

1002987

1003988

1004989

1005990

1006991

1007992

1008993

1009994

1010995

1011996

1012997

1013998

1014999

10151000

10161001

10171002

10181003

10191004

10201005

10211006

10221007

10231008

10241009

10251010

10261011

10271012

10281013

10291014

10301015

10311016

10321017

10331018

10341019

10351020

10361021

10371022

10381023

10391024

10401025

10411026

10421027

10431028

10441029

10451030

10461031

10471032

10481033

10491034

10501035

10511036

10521037

10531038

10541039

10551040

10561041

10571042

10581043

10591044

10601045

10611046

10621047

10631048

10641049

10651050

10661051

10671052

10681053

10691054

10701055

10711056

10721057

10731058

10741059

10751060

10761061

10771062

10781063

10791064

10801065

10811066

10821067

10831068

10841069

10851070

10861071

10871072

10881073

10891074

10901075

10911076

10921077

1093# Codex example configuration (config.toml)16# Codex example configuration (config.toml)

1094#17#

1095# This file lists the main keys Codex reads from config.toml, along with default18# This file lists the main keys Codex reads from config.toml, along with default


1478 401 

1479ignore_default_excludes = false402ignore_default_excludes = false

1480 403 

1481# Case-insensitive glob patterns to remove (e.g., "AWS**", "AZURE**"). Default: []404# Case-insensitive glob patterns to remove (e.g., "AWS*\*", "AZURE*\*"). Default: []

1482 405 

1483exclude = []406exclude = []

1484 407 


1512 435 

1513# Exact hosts match only themselves.436# Exact hosts match only themselves.

1514 437 

1515# "*.example.com" matches subdomains only; "**.example.com" matches the apex plus subdomains.438# "\*.example.com" matches subdomains only; "\*\*.example.com" matches the apex plus subdomains.

1516 439 

1517# "*" allows any public host that is not denied, so prefer scoped rules when possible.440# "\*" allows any public host that is not denied, so prefer scoped rules when possible.

1518 441 

1519# `allow_local_binding = false` blocks loopback and private destinations by default.442# `allow_local_binding = false` blocks loopback and private destinations by default.

1520 443 


1540 463 

1541# glob patterns. On platforms that need pre-expanded glob matches, set464# glob patterns. On platforms that need pre-expanded glob matches, set

1542 465 

1543# glob_scan_max_depth when using unbounded patterns such as `**`.466# glob_scan_max_depth when using unbounded patterns such as `\*\*`.

1544 467 

1545# [permissions.workspace.filesystem]468# [permissions.workspace.filesystem]

1546 469 

1547# glob_scan_max_depth = 3470# glob_scan_max_depth = 3

1548 471 

1549# ":workspace_roots" = { "." = "write", "**/*.env" = "deny" }472# ":workspace_roots" = { "." = "write", "\*\*/\*.env" = "deny" }

1550 473 

1551# "/absolute/path/to/secrets" = "deny"474# "/absolute/path/to/secrets" = "deny"

1552 475 

Details

1# Access tokens – Codex1# Access tokens

2 2 

3Codex access tokens let trusted automation run Codex local with a ChatGPT workspace identity. Use them when a script, scheduled job, or CI runner needs repeatable, non-interactive Codex access.3Codex access tokens let trusted automation run Codex local with a ChatGPT workspace identity. Use them when a script, scheduled job, or CI runner needs repeatable, non-interactive Codex access.

4 4 

5Codex access tokens are currently supported for ChatGPT Business and5Codex access tokens are currently supported for ChatGPT Business and

6Enterprise workspaces.6 Enterprise workspaces.

7 7 

8Access tokens are created in the ChatGPT admin console at [Access tokens](https://chatgpt.com/admin/access-tokens). They are tied to the ChatGPT user and workspace that create them, and Codex uses them as agent identities for programmatic local workflows.8Access tokens are created in the ChatGPT admin console at [Access tokens](https://chatgpt.com/admin/access-tokens). They are tied to the ChatGPT user and workspace that create them, and Codex uses them as agent identities for programmatic local workflows.

9 9 

10If a Platform API key works for your automation, keep using API key auth. Use10If a Platform API key works for your automation, keep using API key auth. Use

11Codex access tokens when the workflow specifically needs ChatGPT workspace11 Codex access tokens when the workflow specifically needs ChatGPT workspace

12access, ChatGPT-managed Codex entitlements, or enterprise workspace controls.12 access, ChatGPT-managed Codex entitlements, or enterprise workspace controls.

13 13 

14## How access tokens work14## How access tokens work

15 15 

16Use an access token when Codex needs to run without a user completing a browser sign-in. The token represents the ChatGPT workspace user who created it, so runs can use that users Codex access and appear in workspace governance data.16Use an access token when Codex needs to run without a user completing a browser sign-in. The token represents the ChatGPT workspace user who created it, so runs can use that user's Codex access and appear in workspace governance data.

17 17 

18Codex checks the token when a run starts and ties the run to that workspace identity. Treat the token like any other automation secret: store it in a secret manager, keep it out of logs, and rotate it regularly.18Codex checks the token when a run starts and ties the run to that workspace identity. Treat the token like any other automation secret: store it in a secret manager, keep it out of logs, and rotate it regularly.

19 19 


27 27 

28- **Leaked secrets:** anyone with the token can start Codex runs as the token creator. Store tokens in a secret manager, keep them out of logs, and rotate them regularly.28- **Leaked secrets:** anyone with the token can start Codex runs as the token creator. Store tokens in a secret manager, keep them out of logs, and rotate them regularly.

29- **Untrusted runners:** public CI, forked pull requests, or shared machines can expose tokens to people outside your workspace. Use access tokens only on trusted runners.29- **Untrusted runners:** public CI, forked pull requests, or shared machines can expose tokens to people outside your workspace. Use access tokens only on trusted runners.

30- **Shared identities:** one persons token reused across unrelated teams makes ownership and audit trails harder to interpret. Create tokens for a specific workflow owner.30- **Shared identities:** one person's token reused across unrelated teams makes ownership and audit trails harder to interpret. Create tokens for a specific workflow owner.

31- **Stale credentials:** long-lived tokens can remain active after the workflow changes. Prefer finite expirations and revoke tokens that are no longer used.31- **Stale credentials:** long-lived tokens can remain active after the workflow changes. Prefer finite expirations and revoke tokens that are no longer used.

32- **Wrong credential type:** access tokens are for Codex local workflows. Use Platform API keys for general OpenAI API calls.32- **Wrong credential type:** access tokens are for Codex local workflows. Use Platform API keys for general OpenAI API calls.

33 33 


35 35 

36Use the Codex Local controls in workspace settings to turn on access token creation for allowed members.36Use the Codex Local controls in workspace settings to turn on access token creation for allowed members.

37 37 

38![Access token access permission in ChatGPT workspace RBAC settings](/images/codex/enterprise/rbac_access_token_access_permission.png)38<CodexScreenshot

39 alt="Access token access permission in ChatGPT workspace RBAC settings"

40 lightSrc="/images/codex/enterprise/rbac_access_token_access_permission.png"

41 darkSrc="/images/codex/enterprise/rbac_access_token_access_permission_dark.png"

42 maxWidth={847}

43 variant="no-wallpaper"

44/>

39 45 

401. Go to [Workspace Settings > Permissions & roles](https://chatgpt.com/admin/settings).461. Go to [Workspace Settings > Permissions & roles](https://chatgpt.com/admin/settings).

412. In the Codex Local section, make sure **Allow members to use Codex Local** is turned on.472. In the Codex Local section, make sure **Allow members to use Codex Local** is turned on.


48 54 

49Workspace owners and admins can set the longest expiration that members can choose when they create a Codex access token. Go to [Workspace Settings > Permissions & roles](https://chatgpt.com/admin/settings), then set **Access token expiration limit** in the Codex Local section.55Workspace owners and admins can set the longest expiration that members can choose when they create a Codex access token. Go to [Workspace Settings > Permissions & roles](https://chatgpt.com/admin/settings), then set **Access token expiration limit** in the Codex Local section.

50 56 

51![Access token expiration limit in ChatGPT workspace permissions settings](/images/codex/enterprise/access_token_expiration_limit.png)57<CodexScreenshot

58 alt="Access token expiration limit in ChatGPT workspace permissions settings"

59 lightSrc="/images/codex/enterprise/access_token_expiration_limit.png"

60 darkSrc="/images/codex/enterprise/access_token_expiration_limit_dark.png"

61 maxWidth={847}

62 variant="no-wallpaper"

63/>

52 64 

53The limit applies to new access tokens. Existing tokens keep their current expiration.65The limit applies to new access tokens. Existing tokens keep their current expiration.

54 66 


591. Go to [Access tokens](https://chatgpt.com/admin/access-tokens).711. Go to [Access tokens](https://chatgpt.com/admin/access-tokens).

602. Select **Create**.722. Select **Create**.

61 73 

62![Access tokens page with the Create button](/images/codex/enterprise/access_token_create_header.png)74<CodexScreenshot

75 alt="Access tokens page with the Create button"

76 lightSrc="/images/codex/enterprise/access_token_create_header.png"

77 darkSrc="/images/codex/enterprise/access_token_create_header_dark.png"

78 maxWidth={942}

79 variant="no-wallpaper"

80/>

63 81 

643. Enter a descriptive name, such as `release-ci` or `nightly-docs-check`.823. Enter a descriptive name, such as `release-ci` or `nightly-docs-check`.

65 83 

66![Create access token modal with fields for name and expiration](/images/codex/enterprise/access_token_creation_modal.png)84<CodexScreenshot

85 alt="Create access token modal with fields for name and expiration"

86 lightSrc="/images/codex/enterprise/access_token_creation_modal.png"

87 darkSrc="/images/codex/enterprise/access_token_creation_modal_dark.png"

88 maxWidth={544}

89 variant="no-wallpaper"

90/>

67 91 

684. Choose an expiration. Prefer a finite expiration such as 7, 30, 60, or 90 days. If you choose **No expiration**, rotate the token on a regular schedule.924. Choose an expiration. Prefer a finite expiration such as 7, 30, 60, or 90 days. If you choose **No expiration**, rotate the token on a regular schedule.

695. Select **Create**.935. Select **Create**.


76 100 

77For ephemeral automation, store the token in `CODEX_ACCESS_TOKEN` and run Codex normally:101For ephemeral automation, store the token in `CODEX_ACCESS_TOKEN` and run Codex normally:

78 102 

79```103```bash

80export CODEX_ACCESS_TOKEN="<access-token>"104export CODEX_ACCESS_TOKEN="<access-token>"

81codex exec --json "review this repository and summarize the top risks"105codex exec --json "review this repository and summarize the top risks"

82```106```

83 107 

84For a persistent local login, pipe the token to `codex login --with-access-token`:108For a persistent local login, pipe the token to `codex login --with-access-token`:

85 109 

86```110```bash

87printf '%s' "$CODEX_ACCESS_TOKEN" | codex login --with-access-token111printf '%s' "$CODEX_ACCESS_TOKEN" | codex login --with-access-token

88codex exec "summarize the last release diff"112codex exec "summarize the last release diff"

89```113```


106Access token permissions are separate from the general Codex local permission. A member can have access to the Codex app, CLI, or IDE extension without being allowed to create access tokens.130Access token permissions are separate from the general Codex local permission. A member can have access to the Codex app, CLI, or IDE extension without being allowed to create access tokens.

107 131 

108| Capability | Workspace owners and admins | Member with access token permission | Member without access token permission |132| Capability | Workspace owners and admins | Member with access token permission | Member without access token permission |

109| --- | --- | --- | --- |133| ------------------------------------------------------------- | ---------------------------------------------------- | --------------------------------------------- | -------------------------------------- |

110| Open [Access tokens](https://chatgpt.com/admin/access-tokens) | Yes | Yes | No |134| Open [Access tokens](https://chatgpt.com/admin/access-tokens) | Yes | Yes | No |

111| Create access tokens | Yes, for their own ChatGPT workspace identity | Yes, for their own ChatGPT workspace identity | No |135| Create access tokens | Yes, for their own ChatGPT workspace identity | Yes, for their own ChatGPT workspace identity | No |

112| List access tokens | Workspace list, including who created each token | Only tokens they created | No |136| List access tokens | Workspace list, including who created each token | Only tokens they created | No |


114| Grant or remove access token permission | Yes | No | No |138| Grant or remove access token permission | Yes | No | No |

115| Manage other Codex enterprise settings | Yes, based on admin role and Codex admin permissions | No, unless separately granted | No |139| Manage other Codex enterprise settings | Yes, based on admin role and Codex admin permissions | No, unless separately granted | No |

116 140 

117In short: workspace owners and admins manage access at the workspace level. Members need the access token permission to create and manage their own tokens, but the permission does not grant admin rights or access to other members tokens.141In short: workspace owners and admins manage access at the workspace level. Members need the access token permission to create and manage their own tokens, but the permission does not grant admin rights or access to other members' tokens.

118 142 

119## Troubleshooting143## Troubleshooting

120 144 

Details

1# Admin Setup – Codex1# Admin Setup

2 

3<div class="max-w-1xl mx-auto">

4 <img src="https://developers.openai.com/images/codex/codex_enterprise_admin.png"

5 alt="Codex enterprise admin toggle"

6 class="block w-full mx-auto rounded-lg"

7 />

8</div>

9 

2 10 

3![Codex enterprise admin toggle](/images/codex/codex_enterprise_admin.png)

4 11 

5This guide is for ChatGPT Enterprise admins who want to set up Codex for their workspace.12This guide is for ChatGPT Enterprise admins who want to set up Codex for their workspace.

6 13 


30 37 

31Decide which Codex surfaces you will use:38Decide which Codex surfaces you will use:

32 39 

33- **Codex local:** includes the Codex app, CLI, and IDE extension. The agent runs on the developers computer in a sandbox.40- **Codex local:** includes the Codex app, CLI, and IDE extension. The agent runs on the developer's computer in a sandbox.

34- **Codex cloud:** includes hosted Codex features (including Codex cloud, iOS, Code Review, and tasks created by the [Slack integration](https://developers.openai.com/codex/integrations/slack) or [Linear integration](https://developers.openai.com/codex/integrations/linear)). The agent runs remotely in a hosted container with your codebase.41- **Codex cloud:** includes hosted Codex features (including Codex cloud, iOS, Code Review, and tasks created by the [Slack integration](https://developers.openai.com/codex/integrations/slack) or [Linear integration](https://developers.openai.com/codex/integrations/linear)). The agent runs remotely in a hosted container with your codebase.

35- **Both:** use local + cloud together.42- **Both:** use local + cloud together.

36 43 


45### Codex local52### Codex local

46 53 

47Codex local is enabled by default for new ChatGPT Enterprise workspaces. If54Codex local is enabled by default for new ChatGPT Enterprise workspaces. If

48you are not a ChatGPT workspace owner, you can test whether you have access by55 you are not a ChatGPT workspace owner, you can test whether you have access by

49[installing Codex](https://developers.openai.com/codex/quickstart) and logging in with your work email.56 [installing Codex](https://developers.openai.com/codex/quickstart) and logging in with your work email.

50 57 

51Turn on **Allow members to use Codex Local**.58Turn on **Allow members to use Codex Local**.

52 59 


60 67 

61Allow developers to sign in with a device code when using Codex CLI in a non-interactive environment (for example, a remote development box). More details are in [authentication](https://developers.openai.com/codex/auth/).68Allow developers to sign in with a device code when using Codex CLI in a non-interactive environment (for example, a remote development box). More details are in [authentication](https://developers.openai.com/codex/auth/).

62 69 

63![Codex local toggle](/images/codex/enterprise/local-toggle-config.png)70<div class="max-w-1xl mx-auto py-1">

71 <img src="https://developers.openai.com/images/codex/enterprise/local-toggle-config.png"

72 alt="Codex local toggle"

73 class="block w-full mx-auto rounded-lg"

74 />

75</div>

64 76 

65### Codex cloud77### Codex cloud

66 78 


69Codex cloud requires **GitHub (cloud-hosted) repositories**. If your codebase is on-premises or not on GitHub, you can use the Codex SDK to build similar workflows on your own infrastructure.81Codex cloud requires **GitHub (cloud-hosted) repositories**. If your codebase is on-premises or not on GitHub, you can use the Codex SDK to build similar workflows on your own infrastructure.

70 82 

71To set up Codex as an admin, you must have GitHub access to the repositories83To set up Codex as an admin, you must have GitHub access to the repositories

72commonly used across your organization. If you dont have the necessary84 commonly used across your organization. If you don't have the necessary

73access, work with someone on your engineering team who does.85 access, work with someone on your engineering team who does.

74 86 

75### Enable Codex cloud in workspace settings87### Enable Codex cloud in workspace settings

76 88 


94 106 

95For security implications of internet access and runtime controls, see [Agent approvals & security](https://developers.openai.com/codex/agent-approvals-security).107For security implications of internet access and runtime controls, see [Agent approvals & security](https://developers.openai.com/codex/agent-approvals-security).

96 108 

97![Codex cloud toggle](/images/codex/enterprise/cloud-toggle-config.png)109<div class="max-w-1xl mx-auto py-1">

110 <img src="https://developers.openai.com/images/codex/enterprise/cloud-toggle-config.png"

111 alt="Codex cloud toggle"

112 class="block w-full mx-auto rounded-lg"

113 />

114</div>

98 115 

99## Step 2: Set up custom roles (RBAC)116## Step 2: Set up custom roles (RBAC)

100 117 

101Use RBAC to control granular permissions for access Codex local and Codex cloud.118Use RBAC to control granular permissions for access Codex local and Codex cloud.

102 119 

103![Codex cloud toggle](/images/codex/enterprise/rbac_custom_roles.png)120<div class="max-w-1xl mx-auto">

121 <img src="https://developers.openai.com/images/codex/enterprise/rbac_custom_roles.png"

122 alt="Codex cloud toggle"

123 class="block w-full mx-auto rounded-lg"

124 />

125</div>

104 126 

105### What RBAC lets you do127### What RBAC lets you do

106 128 

107Workspace Owners can use RBAC in ChatGPT admin settings to:129Workspace Owners can use RBAC in ChatGPT admin settings to:

108 130 

109- Set a default role for users who arent assigned any custom role131- Set a default role for users who aren't assigned any custom role

110- Create custom roles with granular permissions132- Create custom roles with granular permissions

111- Assign one or more custom roles to Groups133- Assign one or more custom roles to Groups

112- Automatically sync users into Groups via SCIM134- Automatically sync users into Groups via SCIM


116 138 

117### Create a Codex Admin group139### Create a Codex Admin group

118 140 

119Set up a dedicated Codex Admin group rather than granting Codex administration to a broad audience.141Set up a dedicated "Codex Admin" group rather than granting Codex administration to a broad audience.

120 142 

121The **Allow members to administer Codex** toggle grants the Codex Admin role. Codex Admins can:143The **Allow members to administer Codex** toggle grants the Codex Admin role. Codex Admins can:

122 144 


125- Assign those managed policies to user groups or configure a default fallback policy147- Assign those managed policies to user groups or configure a default fallback policy

126- Manage Codex cloud environments, including editing and deleting environments148- Manage Codex cloud environments, including editing and deleting environments

127 149 

128Use this role for the small set of admins who own Codex rollout, policy management, and governance. Its not required for general Codex users. You dont need Codex cloud to enable this toggle.150Use this role for the small set of admins who own Codex rollout, policy management, and governance. It's not required for general Codex users. You don't need Codex cloud to enable this toggle.

129 151 

130Recommended rollout pattern:152Recommended rollout pattern:

131 153 

132- Create a Codex Users group for people who should use Codex154- Create a "Codex Users" group for people who should use Codex

133- Create a separate Codex Admin group for the smaller set of people who should manage Codex settings and policies155- Create a separate "Codex Admin" group for the smaller set of people who should manage Codex settings and policies

134- Assign the custom role with **Allow members to administer Codex** enabled only to the Codex Admin group156- Assign the custom role with **Allow members to administer Codex** enabled only to the "Codex Admin" group

135- Keep membership in the Codex Admin group limited to workspace owners or designated platform, IT, and governance operators157- Keep membership in the "Codex Admin" group limited to workspace owners or designated platform, IT, and governance operators

136- If you use SCIM, back the Codex Admin group with your identity provider so membership changes are auditable and centrally managed158- If you use SCIM, back the "Codex Admin" group with your identity provider so membership changes are auditable and centrally managed

137 159 

138This separation makes it easier to roll out Codex while keeping analytics, environment management, and policy deployment limited to trusted admins. For RBAC setup details and the full permission model, see the [OpenAI RBAC Help Center article](https://help.openai.com/en/articles/11750701-rbac).160This separation makes it easier to roll out Codex while keeping analytics, environment management, and policy deployment limited to trusted admins. For RBAC setup details and the full permission model, see the [OpenAI RBAC Help Center article](https://help.openai.com/en/articles/11750701-rbac).

139 161 


143 165 

144Use this page when you want to apply different local Codex constraints to different groups without distributing device-level files first. The managed policy uses the same `requirements.toml` format described in [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration), so you can define allowed approval policies, sandbox modes, web search behavior, network access requirements, MCP server allowlists, feature pins, and restrictive command rules. To disable Browser Use, the in-app browser, or Computer Use, see [Pin feature flags](https://developers.openai.com/codex/enterprise/managed-configuration#pin-feature-flags).166Use this page when you want to apply different local Codex constraints to different groups without distributing device-level files first. The managed policy uses the same `requirements.toml` format described in [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration), so you can define allowed approval policies, sandbox modes, web search behavior, network access requirements, MCP server allowlists, feature pins, and restrictive command rules. To disable Browser Use, the in-app browser, or Computer Use, see [Pin feature flags](https://developers.openai.com/codex/enterprise/managed-configuration#pin-feature-flags).

145 167 

146![Codex policies and configurations page](/images/codex/enterprise/policies_and_configurations_page.png)168<div class="max-w-1xl mx-auto py-1">

169 <img src="https://developers.openai.com/images/codex/enterprise/policies_and_configurations_page.png"

170 alt="Codex policies and configurations page"

171 class="block w-full mx-auto rounded-lg"

172 />

173</div>

147 174 

148Recommended setup:175Recommended setup:

149 176 

1501. Create a baseline policy for most users, then create stricter or more permissive variants only where needed.1771. Create a baseline policy for most users, then create stricter or more permissive variants only where needed.

1512. Assign each managed policy to a specific user group, and configure a default fallback policy for everyone else.1782. Assign each managed policy to a specific user group, and configure a default fallback policy for everyone else.

1523. Order group rules with care. If a user matches more than one group-specific rule, the first matching rule applies.1793. Order group rules with care. If a user matches more than one group-specific rule, the first matching rule applies.

1534. Treat each policy as a complete profile for that group. Codex doesnt fill missing fields from later matching group rules.1804. Treat each policy as a complete profile for that group. Codex doesn't fill missing fields from later matching group rules.

154 181 

155These cloud-managed policies apply across Codex local surfaces when users sign in with ChatGPT, including the Codex app, CLI, and IDE extension.182These cloud-managed policies apply across Codex local surfaces when users sign in with ChatGPT, including the Codex app, CLI, and IDE extension.

156 183 


162`default_permissions`. Use `allowed_sandbox_modes` only for legacy deployments189`default_permissions`. Use `allowed_sandbox_modes` only for legacy deployments

163that still configure `sandbox_mode`.190that still configure `sandbox_mode`.

164 191 

165![Example managed requirements policy](/images/codex/enterprise/example_policy.png)192<div class="max-w-1xl mx-auto py-1">

193 <img src="https://developers.openai.com/images/codex/enterprise/example_policy.png"

194 alt="Example managed requirements policy"

195 class="block w-full mx-auto rounded-lg"

196 />

197</div>

166 198 

167Example: limit web search, sandbox mode, and approvals for a standard local rollout:199Example: limit web search, sandbox mode, and approvals for a standard local rollout:

168 200 

169```201```toml

170allowed_web_search_modes = ["disabled", "cached"]202allowed_web_search_modes = ["disabled", "cached"]

171allowed_sandbox_modes = ["workspace-write"]203allowed_sandbox_modes = ["workspace-write"]

172allowed_approval_policies = ["on-request"]204allowed_approval_policies = ["on-request"]


175Example: allow the standard permission profiles for an upgraded fleet:207Example: allow the standard permission profiles for an upgraded fleet:

176 208 

177Permission-profile allowlists require Codex 0.138.0 or later. Use this example209Permission-profile allowlists require Codex 0.138.0 or later. Use this example

178only after every managed client runs a supporting release.210 only after every managed client runs a supporting release.

179 211 

180```212```toml

181default_permissions = ":workspace"213default_permissions = ":workspace"

182 214 

183[allowed_permission_profiles]215[allowed_permission_profiles]


187 219 

188Example: disable Browser Use, the in-app browser, and Computer Use:220Example: disable Browser Use, the in-app browser, and Computer Use:

189 221 

190```222```toml

191[features]223[features]

192browser_use = false224browser_use = false

193in_app_browser = false225in_app_browser = false


196 228 

197Example: define administrator-owned network requirements:229Example: define administrator-owned network requirements:

198 230 

199```231```toml

200experimental_network.enabled = true232experimental_network.enabled = true

201experimental_network.dangerously_allow_all_unix_sockets = true233experimental_network.dangerously_allow_all_unix_sockets = true

202experimental_network.allow_local_binding = true234experimental_network.allow_local_binding = true


212 244 

213Example: add a restrictive command rule when you want admins to block or gate specific commands:245Example: add a restrictive command rule when you want admins to block or gate specific commands:

214 246 

215```247```toml

216[rules]248[rules]

217prefix_rules = [249prefix_rules = [

218 { pattern = [{ token = "git" }, { any_of = ["push", "commit"] }], decision = "prompt", justification = "Require review before mutating remote history." },250 { pattern = [{ token = "git" }, { any_of = ["push", "commit"] }], decision = "prompt", justification = "Require review before mutating remote history." },


225 257 

226Use the policy lookup tools at the end of the workflow to confirm which managed policy applies to a user. You can check policy assignment by group or by entering a user email.258Use the policy lookup tools at the end of the workflow to confirm which managed policy applies to a user. You can check policy assignment by group or by entering a user email.

227 259 

228![Policy lookup by group or user email](/images/codex/enterprise/policy_lookup.png)260<div class="max-w-1xl mx-auto py-1">

261 <img src="https://developers.openai.com/images/codex/enterprise/policy_lookup.png"

262 alt="Policy lookup by group or user email"

263 class="block w-full mx-auto rounded-lg"

264 />

265</div>

229 266 

230If you plan to restrict login method or workspace for local clients, see the admin-managed authentication restrictions in [Authentication](https://developers.openai.com/codex/auth).267If you plan to restrict login method or workspace for local clients, see the admin-managed authentication restrictions in [Authentication](https://developers.openai.com/codex/auth).

231 268 


238Start with Team Config for your highest-traffic repositories so teams get consistent behavior in the places they use Codex most.275Start with Team Config for your highest-traffic repositories so teams get consistent behavior in the places they use Codex most.

239 276 

240| Type | Path | Use it to |277| Type | Path | Use it to |

241| --- | --- | --- |278| ------------------------------------ | ------------- | ---------------------------------------------------------------------------- |

242| [Config basics](https://developers.openai.com/codex/config-basic) | `config.toml` | Set defaults for sandbox mode, approvals, model, reasoning effort, and more. |279| [Config basics](https://developers.openai.com/codex/config-basic) | `config.toml` | Set defaults for sandbox mode, approvals, model, reasoning effort, and more. |

243| [Rules](https://developers.openai.com/codex/rules) | `rules/` | Control which commands Codex can run outside the sandbox. |280| [Rules](https://developers.openai.com/codex/rules) | `rules/` | Control which commands Codex can run outside the sandbox. |

244| [Skills](https://developers.openai.com/codex/skills) | `skills/` | Make shared skills available to your team. |281| [Skills](https://developers.openai.com/codex/skills) | `skills/` | Make shared skills available to your team. |


252### Connect Codex cloud to repositories289### Connect Codex cloud to repositories

253 290 

2541. Navigate to [Codex](https://chatgpt.com/codex) and select **Get started**2911. Navigate to [Codex](https://chatgpt.com/codex) and select **Get started**

2552. Select **Connect to GitHub** to install the ChatGPT GitHub Connector if you havent already connected GitHub to ChatGPT2922. Select **Connect to GitHub** to install the ChatGPT GitHub Connector if you haven't already connected GitHub to ChatGPT

2563. Install or connect the ChatGPT GitHub Connector2933. Install or connect the ChatGPT GitHub Connector

2574. Choose an installation target for the ChatGPT Connector (typically your main organization)2944. Choose an installation target for the ChatGPT Connector (typically your main organization)

2585. Allow the repositories you want to connect to Codex2955. Allow the repositories you want to connect to Codex

259 296 

260For GitHub Enterprise Managed Users (EMU), an organization owner must install297For GitHub Enterprise Managed Users (EMU), an organization owner must install

261the Codex GitHub App for the organization before users can connect298 the Codex GitHub App for the organization before users can connect

262repositories in Codex cloud.299 repositories in Codex cloud.

263 300 

264For more, see [Cloud environments](https://developers.openai.com/codex/cloud/environments).301For more, see [Cloud environments](https://developers.openai.com/codex/cloud/environments).

265 302 

266Codex uses short-lived, least-privilege GitHub App installation tokens for each operation and respects the users existing GitHub repository permissions and branch protection rules.303Codex uses short-lived, least-privilege GitHub App installation tokens for each operation and respects the user's existing GitHub repository permissions and branch protection rules.

267 304 

268### Configure IP addresses305### Configure IP addresses

269 306 


279 316 

280Use the overview page to confirm your workspace has code review turned on and to see the available review controls.317Use the overview page to confirm your workspace has code review turned on and to see the available review controls.

281 318 

282![Code review settings overview](/images/codex/enterprise/code_review_settings_overview.png)319<div class="max-w-1xl mx-auto py-1">

283 320 <img src="https://developers.openai.com/images/codex/enterprise/code_review_settings_overview.png"

284Use the auto review settings to decide whether Codex should review pull321 alt="Code review settings overview"

285requests automatically for connected repositories.322 class="block w-full mx-auto rounded-lg"

286 323 />

287![Automatic code review settings](/images/codex/enterprise/auto_code_review_settings.png)324</div>

288 325 

289Use review triggers to control which pull request events should start a326<div class="grid grid-cols-1 gap-4 py-1 md:grid-cols-2">

290Codex review.327 <div class="max-w-1xl mx-auto">

291 328 <p>

292![Code review trigger settings](/images/codex/enterprise/review_triggers.png)329 Use the auto review settings to decide whether Codex should review pull

330 requests automatically for connected repositories.

331 </p>

332 <img src="https://developers.openai.com/images/codex/enterprise/auto_code_review_settings.png"

333 alt="Automatic code review settings"

334 class="block w-full mx-auto rounded-lg"

335 />

336 </div>

337 <div class="max-w-1xl mx-auto">

338 <p>

339 Use review triggers to control which pull request events should start a

340 Codex review.

341 </p>

342 <img src="https://developers.openai.com/images/codex/enterprise/review_triggers.png"

343 alt="Code review trigger settings"

344 class="block w-full mx-auto rounded-lg"

345 />

346 </div>

347</div>

293 348 

294### Configure Codex security349### Configure Codex security

295 350 


3334. Select the appropriate project for your organization. If you only have one project, the default project is fine.3884. Select the appropriate project for your organization. If you only have one project, the default project is fine.

3345. Set the key permissions to Read only, since this API only retrieves analytics data.3895. Set the key permissions to Read only, since this API only retrieves analytics data.

3356. Copy the key value and store it securely, because you can only view it once.3906. Copy the key value and store it securely, because you can only view it once.

3367. Email [support@openai.com](mailto:support@openai.com) to have that key scoped to `codex.enterprise.analytics.read` only. Wait for OpenAI to confirm your API key has Codex Analytics API access.3917. Email support@openai.com to have that key scoped to `codex.enterprise.analytics.read` only. Wait for OpenAI to confirm your API key has Codex Analytics API access.

337 392 

338![Codex analytics key creation](/images/codex/codex_analytics_key.png)393<div class="not-prose max-w-md mx-auto py-1">

394 <img src="https://developers.openai.com/images/codex/codex_analytics_key.png"

395 alt="Codex analytics key creation"

396 class="block w-full mx-auto rounded-lg"

397 />

398</div>

339 399 

340To use the Analytics API key:400To use the Analytics API key:

341 401 


3443. Choose the endpoint you want to query:4043. Choose the endpoint you want to query:

345 405 

346- /workspaces/`{workspace_id}`/usage406- /workspaces/`{workspace_id}`/usage

347- /workspaces/`{workspace_id}`/code\_reviews407- /workspaces/`{workspace_id}`/code_reviews

348- /workspaces/`{workspace_id}`/code\_review\_responses408- /workspaces/`{workspace_id}`/code_review_responses

349 409 

3504. Set a reporting date range with `start_time` and `end_time` if needed.4104. Set a reporting date range with `start_time` and `end_time` if needed.

3515. Retrieve the next page of results with `next_page` if the response spans more than one page.4115. Retrieve the next page of results with `next_page` if the response spans more than one page.

352 412 

353Example curl command to retrieve workspace usage:413Example curl command to retrieve workspace usage:

354 414 

355```415```bash

356curl -H "Authorization: Bearer YOUR_PLATFORM_API_KEY" \416curl -H "Authorization: Bearer YOUR_PLATFORM_API_KEY" \

357 "https://api.chatgpt.com/v1/analytics/codex/workspaces/WORKSPACE_ID/usage"417 "https://api.chatgpt.com/v1/analytics/codex/workspaces/WORKSPACE_ID/usage"

358```418```


3683. Create a new secret key dedicated to Compliance API and select the appropriate project for your organization. If you only have one project, the default project is fine.4283. Create a new secret key dedicated to Compliance API and select the appropriate project for your organization. If you only have one project, the default project is fine.

3694. Choose All permissions.4294. Choose All permissions.

3705. Copy the key value and store it securely, because you can only view it once.4305. Copy the key value and store it securely, because you can only view it once.

3716. Send an email to [support@openai.com](mailto:support@openai.com) with:4316. Send an email to support@openai.com with:

372 432 

373- the last 4 digits of the API key433- the last 4 digits of the API key

374- the key name434- the key name


386 446 

387- /compliance/workspaces/`{workspace_id}`/logs447- /compliance/workspaces/`{workspace_id}`/logs

388- /compliance/workspaces/`{workspace_id}`/logs/`{log_file_id}`448- /compliance/workspaces/`{workspace_id}`/logs/`{log_file_id}`

389- /compliance/workspaces/`{workspace_id}`/codex\_tasks449- /compliance/workspaces/`{workspace_id}`/codex_tasks

390- /compliance/workspaces/`{workspace_id}`/codex\_environments450- /compliance/workspaces/`{workspace_id}`/codex_environments

391 451 

3925. For most Codex compliance integrations, start with the logs endpoint and request Codex event types such as CODEX\_LOG or CODEX\_SECURITY\_LOG.4525. For most Codex compliance integrations, start with the logs endpoint and request Codex event types such as CODEX_LOG or CODEX_SECURITY_LOG.

3936. Use /logs to list available Codex compliance log files, then /logs/`{log_file_id}` to download a specific file.4536. Use /logs to list available Codex compliance log files, then /logs/`{log_file_id}` to download a specific file.

394 454 

395Example curl command to list compliance log files:455Example curl command to list compliance log files:

396 456 

397```457```bash

398curl -L -H "Authorization: Bearer YOUR_COMPLIANCE_API_KEY" \458curl -L -H "Authorization: Bearer YOUR_COMPLIANCE_API_KEY" \

399 "https://api.chatgpt.com/v1/compliance/workspaces/WORKSPACE_ID/logs?event_type=CODEX_LOG&after=2026-03-01T00:00:00Z"459 "https://api.chatgpt.com/v1/compliance/workspaces/WORKSPACE_ID/logs?event_type=CODEX_LOG&after=2026-03-01T00:00:00Z"

400```460```

401 461 

402Example curl command to list Codex tasks:462Example curl command to list Codex tasks:

403 463 

404```464```bash

405curl -H "Authorization: Bearer YOUR_COMPLIANCE_API_KEY" \465curl -H "Authorization: Bearer YOUR_COMPLIANCE_API_KEY" \

406 "https://api.chatgpt.com/v1/compliance/workspaces/WORKSPACE_ID/codex_tasks"466 "https://api.chatgpt.com/v1/compliance/workspaces/WORKSPACE_ID/codex_tasks"

407```467```

Details

1# Governance – Codex1# Governance

2 2 

3# Governance and Observability3# Governance and Observability

4 4 


14 14 

15## Analytics Dashboard15## Analytics Dashboard

16 16 

17![Codex analytics dashboard showing credit and token usage by model](/images/codex/enterprise/analytics-dashboard.png)17<div class="max-w-1xl mx-auto">

18 <img src="https://developers.openai.com/images/codex/enterprise/analytics-dashboard.png"

19 alt="Codex analytics dashboard showing credit and token usage by model"

20 class="block w-full mx-auto rounded-lg !border-0"

21 />

22</div>

18 23 

19### Dashboard views24### Dashboard views

20 25 

21The [analytics dashboard](https://admin.openai.com/analytics/codex) allows ChatGPT workspace administrators and analytics viewers to track Codex adoption, usage, and Code Review feedback. Usage data can lag by up to 12 hours.26The <a href="https://admin.openai.com/analytics/codex" target="_blank" rel="noopener noreferrer">analytics dashboard</a> allows ChatGPT workspace administrators and analytics viewers to track Codex adoption, usage, and Code Review feedback. Usage data can lag by up to 12 hours.

22 27 

23Codex provides date-range controls for daily and weekly views. Key charts include:28Codex provides date-range controls for daily and weekly views. Key charts include:

24 29 

Details

1# Managed configuration – Codex1# Managed configuration

2 2 

3Enterprise admins can control local Codex behavior in two ways:3Enterprise admins can control local Codex behavior in two ways:

4 4 

5- **Requirements**: admin-enforced constraints that users cant override.5- **Requirements**: admin-enforced constraints that users can't override.

6- **Managed defaults**: starting values applied when Codex launches. Users can still change settings during a session; Codex reapplies managed defaults the next time it starts.6- **Managed defaults**: starting values applied when Codex launches. Users can still change settings during a session; Codex reapplies managed defaults the next time it starts.

7 7 

8## Admin-enforced requirements (requirements.toml)8## Admin-enforced requirements (requirements.toml)

9 9 

10Requirements constrain security-sensitive settings (approval policy, approvals reviewer, automatic review policy, sandbox mode, permission profiles, web search mode, managed hooks, and optionally which MCP servers users can enable). When resolving configuration (for example from `config.toml`, [profile files](https://developers.openai.com/codex/config-advanced#profiles), or CLI config overrides), if a value conflicts with an enforced rule, Codex falls back to a compatible value and notifies the user. If you configure an `mcp_servers` allowlist, Codex enables an MCP server only when both its name and identity match an approved entry; otherwise, Codex disables it.10Requirements constrain security-sensitive settings (approval policy, approvals reviewer, automatic review policy, sandbox mode, permission profiles, web search mode, managed hooks, and optionally which MCP servers users can enable). When resolving configuration (for example from `config.toml`, [profile files](https://developers.openai.com/codex/config-advanced#profiles), or CLI config overrides), if a value conflicts with an enforced rule, Codex falls back to a compatible value and notifies the user. If you configure an `mcp_servers` allowlist, Codex enables an MCP server only when both its name and identity match an approved entry; otherwise, Codex disables it.

11 11 

12Requirements can also constrain [feature flags](https://developers.openai.com/codex/config-basic/#feature-flags) via the `[features]` table in `requirements.toml`. Note that features arent always security-sensitive, but enterprises can pin values if desired. Omitted keys remain unconstrained.12Requirements can also constrain [feature flags](https://developers.openai.com/codex/config-basic/#feature-flags) via the `[features]` table in `requirements.toml`. Note that features aren't always security-sensitive, but enterprises can pin values if desired. Omitted keys remain unconstrained.

13 13 

14For Codex 0.138.0 or later, prefer [permission profiles](https://developers.openai.com/codex/permissions)14For Codex 0.138.0 or later, prefer [permission profiles](https://developers.openai.com/codex/permissions)

15with `allowed_permission_profiles` and managed `default_permissions`. Use15with `allowed_permission_profiles` and managed `default_permissions`. Use


32that earlier sources leave unset.32that earlier sources leave unset.

33 33 

34Tables combine one entry at a time. For `allowed_permission_profiles`, a later34Tables combine one entry at a time. For `allowed_permission_profiles`, a later

35source can add profile names that earlier sources dont mention. If two sources35source can add profile names that earlier sources don't mention. If two sources

36set the same profile name, the earlier source wins.36set the same profile name, the earlier source wins.

37 37 

38For backwards compatibility, Codex also interprets legacy `managed_config.toml` fields `approval_policy` and `sandbox_mode` as requirements (allowing only that single value).38For backwards compatibility, Codex also interprets legacy `managed_config.toml` fields `approval_policy` and `sandbox_mode` as requirements (allowing only that single value).


47 47 

48Create a new managed requirements file using the same format and keys as `requirements.toml`.48Create a new managed requirements file using the same format and keys as `requirements.toml`.

49 49 

50```50```toml

51enforce_residency = "us"51enforce_residency = "us"

52allowed_approval_policies = ["on-request"]52allowed_approval_policies = ["on-request"]

53allowed_sandbox_modes = ["read-only", "workspace-write"]53allowed_sandbox_modes = ["read-only", "workspace-write"]


65 65 

66Admins can configure different managed requirements for different user groups, and also set a default fallback requirements policy.66Admins can configure different managed requirements for different user groups, and also set a default fallback requirements policy.

67 67 

68If a user matches more than one group-specific rule, the first matching rule applies. Codex doesnt fill unset fields from later matching group rules.68If a user matches more than one group-specific rule, the first matching rule applies. Codex doesn't fill unset fields from later matching group rules.

69 69 

70For example, if the first matching group rule sets only `allowed_sandbox_modes = ["read-only"]` and a later matching group rule sets `allowed_approval_policies = ["on-request"]`, Codex applies only the first matching group rule and doesnt fill `allowed_approval_policies` from the later rule.70For example, if the first matching group rule sets only `allowed_sandbox_modes = ["read-only"]` and a later matching group rule sets `allowed_approval_policies = ["on-request"]`, Codex applies only the first matching group rule and doesn't fill `allowed_approval_policies` from the later rule.

71 71 

72#### How Codex applies cloud-managed requirements locally72#### How Codex applies cloud-managed requirements locally

73 73 

74When a user starts Codex and signs in with ChatGPT on a Business or Enterprise plan, Codex applies managed requirements on a best-effort basis. Codex first checks for a valid, unexpired local managed requirements cache entry and uses it if available. If the cache is missing, expired, corrupted, or doesnt match the current auth identity, Codex attempts to fetch managed requirements from the service (with retries) and writes a new signed cache entry on success. If no valid cached entry is available and the fetch fails or times out, Codex continues without the managed requirements layer.74When a user starts Codex and signs in with ChatGPT on a Business or Enterprise plan, Codex applies managed requirements on a best-effort basis. Codex first checks for a valid, unexpired local managed requirements cache entry and uses it if available. If the cache is missing, expired, corrupted, or doesn't match the current auth identity, Codex attempts to fetch managed requirements from the service (with retries) and writes a new signed cache entry on success. If no valid cached entry is available and the fetch fails or times out, Codex continues without the managed requirements layer.

75 75 

76After cache resolution, Codex enforces managed requirements as part of the normal requirements layering described above.76After cache resolution, Codex enforces managed requirements as part of the normal requirements layering described above.

77 77 


79 79 

80This example blocks `--ask-for-approval never` and `--sandbox danger-full-access` (including `--yolo`):80This example blocks `--ask-for-approval never` and `--sandbox danger-full-access` (including `--yolo`):

81 81 

82```82```toml

83allowed_approval_policies = ["untrusted", "on-request"]83allowed_approval_policies = ["untrusted", "on-request"]

84allowed_sandbox_modes = ["read-only", "workspace-write"]84allowed_sandbox_modes = ["read-only", "workspace-write"]

85```85```

86 86 

87### Disable AppShots

88 

89To disable AppShots for managed users, set the top-level `allow_appshots` requirement:

90 

91```toml

92allow_appshots = false

93```

94 

95Codex treats only `allow_appshots = false` as disabling AppShots. If the key is omitted, AppShots remains unconstrained by requirements and uses normal product availability checks. App-server clients that read effective requirements through `configRequirements/read` receive the same restriction as `allowAppshots`; an omitted or `null` `allowAppshots` value does not disable AppShots.

96 

87### Control available permission profiles97### Control available permission profiles

88 98 

89Use `allowed_permission_profiles` to control which built-in and custom99Use `allowed_permission_profiles` to control which built-in and custom


96`default_permissions`.106`default_permissions`.

97 107 

98Use the permission-profile examples below only after every managed client runs a108Use the permission-profile examples below only after every managed client runs a

99supporting release. Dont deploy managed custom profiles until the fleet upgrade109supporting release. Don't deploy managed custom profiles until the fleet upgrade

100is complete.110is complete.

101 111 

102When the table is present, it is the complete list of allowed profiles. Profiles112When the table is present, it is the complete list of allowed profiles. Profiles


107 117 

108This policy allows read-only and workspace access, but not full access:118This policy allows read-only and workspace access, but not full access:

109 119 

110```120```toml

111default_permissions = ":workspace"121default_permissions = ":workspace"

112 122 

113[allowed_permission_profiles]123[allowed_permission_profiles]


119#### Add a managed least-privilege default129#### Add a managed least-privilege default

120 130 

121Admins can define a custom profile in the same requirements source. Use131Admins can define a custom profile in the same requirements source. Use

122organization-specific profile names that wont collide with names in users132organization-specific profile names that won't collide with names in users'

123loaded config. Custom names cant start with `:` or use the reserved `filesystem`133loaded config. Custom names can't start with `:` or use the reserved `filesystem`

124name.134name.

125 135 

126Dont deploy managed custom profiles to clients running Codex 0.137.0 or136Don't deploy managed custom profiles to clients running Codex 0.137.0 or

127earlier. Those clients recognize the profile table but not the managed default137earlier. Those clients recognize the profile table but not the managed default

128that selects it.138that selects it.

129 139 

130For example:140For example:

131 141 

132```142```toml

133default_permissions = "acme_review_only"143default_permissions = "acme_review_only"

134 144 

135[allowed_permission_profiles]145[allowed_permission_profiles]


147 157 

148Omit all built-ins when users should select only admin-defined profiles:158Omit all built-ins when users should select only admin-defined profiles:

149 159 

150```160```toml

151default_permissions = "acme_workspace"161default_permissions = "acme_workspace"

152 162 

153[allowed_permission_profiles]163[allowed_permission_profiles]


164"**/*.env" = "deny"174"**/*.env" = "deny"

165```175```

166 176 

167The custom profile can extend `:workspace` even though users cant select the177The custom profile can extend `:workspace` even though users can't select the

168built-in `:workspace` profile directly.178built-in `:workspace` profile directly.

169 179 

170#### Turn off a profile allowed by another source180#### Turn off a profile allowed by another source


175 185 

176Cloud requirements:186Cloud requirements:

177 187 

178```188```toml

179default_permissions = ":read-only"189default_permissions = ":read-only"

180 190 

181[allowed_permission_profiles]191[allowed_permission_profiles]


185 195 

186System requirements:196System requirements:

187 197 

188```198```toml

189[allowed_permission_profiles]199[allowed_permission_profiles]

190":read-only" = true200":read-only" = true

191":workspace" = true # Not honored because cloud requirements set this to false.201":workspace" = true # Not honored because cloud requirements set this to false.


194Set `default_permissions` explicitly to an allowed profile. If it is omitted,204Set `default_permissions` explicitly to an allowed profile. If it is omitted,

195Codex defaults to `:workspace` only when both `:workspace` and `:read-only` are205Codex defaults to `:workspace` only when both `:workspace` and `:read-only` are

196explicitly allowed. When `allowed_permission_profiles` is absent, managed206explicitly allowed. When `allowed_permission_profiles` is absent, managed

197requirements dont restrict which profile names users can select. Every entry207requirements don't restrict which profile names users can select. Every entry

198must name a built-in profile or a custom profile defined in a loaded config or208must name a built-in profile or a custom profile defined in a loaded config or

199requirements source. Define custom profiles in managed requirements when their209requirements source. Define custom profiles in managed requirements when their

200behavior should be controlled centrally.210behavior should be controlled centrally.


206default for laptops while allowing workspace writes on matching dev boxes or CI216default for laptops while allowing workspace writes on matching dev boxes or CI

207runners. Host-specific entries currently override `allowed_sandbox_modes` only:217runners. Host-specific entries currently override `allowed_sandbox_modes` only:

208 218 

209```219```toml

210allowed_sandbox_modes = ["read-only"]220allowed_sandbox_modes = ["read-only"]

211 221 

212[[remote_sandbox_config]]222[[remote_sandbox_config]]


221 231 

222The first matching `[[remote_sandbox_config]]` entry wins within the same232The first matching `[[remote_sandbox_config]]` entry wins within the same

223requirements source. If no entry matches, Codex keeps the top-level233requirements source. If no entry matches, Codex keeps the top-level

224`allowed_sandbox_modes`. Host name matching is for policy selection only; dont234`allowed_sandbox_modes`. Host name matching is for policy selection only; don't

225treat it as authenticated device proof.235treat it as authenticated device proof.

226 236 

227You can also constrain web search mode:237You can also constrain web search mode:

228 238 

229```239```toml

230allowed_web_search_modes = ["cached"] # "disabled" remains implicitly allowed240allowed_web_search_modes = ["cached"] # "disabled" remains implicitly allowed

231```241```

232 242 


241networking without that feature flag, but they do not grant command network251networking without that feature flag, but they do not grant command network

242access when the active sandbox keeps networking off.252access when the active sandbox keeps networking off.

243 253 

244```254```toml

245experimental_network.enabled = true255experimental_network.enabled = true

246experimental_network.dangerously_allow_all_unix_sockets = true256experimental_network.dangerously_allow_all_unix_sockets = true

247experimental_network.allow_local_binding = true257experimental_network.allow_local_binding = true


269You can also pin [feature flags](https://developers.openai.com/codex/config-basic/#feature-flags) for users279You can also pin [feature flags](https://developers.openai.com/codex/config-basic/#feature-flags) for users

270receiving a managed `requirements.toml`:280receiving a managed `requirements.toml`:

271 281 

272```282```toml

273[features]283[features]

274personality = true284personality = true

275unified_exec = false285unified_exec = false


280computer_use = false290computer_use = false

281```291```

282 292 

283Use the canonical feature keys from `config.toml`s `[features]` table. Codex normalizes the resulting feature set to meet these pins and rejects conflicting writes to `config.toml` or profile file feature settings.293Use the canonical feature keys from `config.toml`'s `[features]` table. Codex normalizes the resulting feature set to meet these pins and rejects conflicting writes to `config.toml` or profile file feature settings.

294 

295<a id="disable-codex-feature-surfaces"></a>

284 296 

285- `in_app_browser = false` disables the in-app browser pane.297- `in_app_browser = false` disables the in-app browser pane.

286- `browser_use = false` disables Browser Use and Browser Agent availability.298- `browser_use = false` disables Browser Use and Browser Agent availability.


301output contract. Managed `guardian_policy_config` takes precedence over local313output contract. Managed `guardian_policy_config` takes precedence over local

302`[auto_review].policy`.314`[auto_review].policy`.

303 315 

304```316```toml

305allowed_approval_policies = ["on-request"]317allowed_approval_policies = ["on-request"]

306allowed_approvals_reviewers = ["auto_review"]318allowed_approvals_reviewers = ["auto_review"]

307 319 


320### Enforce deny-read requirements332### Enforce deny-read requirements

321 333 

322Admins can deny reads for exact paths or glob patterns with334Admins can deny reads for exact paths or glob patterns with

323`[permissions.filesystem]`. Users cant weaken these requirements with local335`[permissions.filesystem]`. Users can't weaken these requirements with local

324configuration.336configuration.

325 337 

326```338```toml

327[permissions.filesystem]339[permissions.filesystem]

328deny_read = [340deny_read = [

329 # values can be absolute paths...341 # values can be absolute paths...


337When deny-read requirements are present, Codex rejects full-access permissions349When deny-read requirements are present, Codex rejects full-access permissions

338and keeps local execution in a read-only or workspace sandbox so it can enforce350and keeps local execution in a read-only or workspace sandbox so it can enforce

339them. On native Windows, managed `deny_read` applies to direct file tools; shell351them. On native Windows, managed `deny_read` applies to direct file tools; shell

340subprocess reads dont use this sandbox rule.352subprocess reads don't use this sandbox rule.

341 353 

342### Enforce managed hooks from requirements354### Enforce managed hooks from requirements

343 355 


351and plugin hooks while still allowing managed hooks, set363and plugin hooks while still allowing managed hooks, set

352`allow_managed_hooks_only = true`.364`allow_managed_hooks_only = true`.

353 365 

354```366```toml

355allow_managed_hooks_only = true367allow_managed_hooks_only = true

356 368 

357[features]369[features]


392Unlike `.rules`, requirements rules must specify `decision`, and that decision404Unlike `.rules`, requirements rules must specify `decision`, and that decision

393must be `"prompt"` or `"forbidden"` (not `"allow"`).405must be `"prompt"` or `"forbidden"` (not `"allow"`).

394 406 

395```407```toml

396[rules]408[rules]

397prefix_rules = [409prefix_rules = [

398 { pattern = [{ token = "rm" }], decision = "forbidden", justification = "Use git clean -fd instead." },410 { pattern = [{ token = "rm" }], decision = "forbidden", justification = "Use git clean -fd instead." },


402 414 

403To restrict which MCP servers Codex can enable, add an `mcp_servers` approved list. For stdio servers, match on `command`; for streamable HTTP servers, match on `url`:415To restrict which MCP servers Codex can enable, add an `mcp_servers` approved list. For stdio servers, match on `command`; for streamable HTTP servers, match on `url`:

404 416 

405```417```toml

406[mcp_servers.docs]418[mcp_servers.docs]

407identity = { command = "codex-mcp" }419identity = { command = "codex-mcp" }

408 420 


414 426 

415## Managed defaults (`managed_config.toml`)427## Managed defaults (`managed_config.toml`)

416 428 

417Managed defaults merge on top of a users local `config.toml` and take precedence over any CLI `--config` overrides, setting the starting values when Codex launches. Users can still change those settings during a session; Codex reapplies managed defaults the next time it starts.429Managed defaults merge on top of a user's local `config.toml` and take precedence over any CLI `--config` overrides, setting the starting values when Codex launches. Users can still change those settings during a session; Codex reapplies managed defaults the next time it starts.

418 430 

419Make sure your managed defaults meet your requirements; Codex rejects disallowed values.431Make sure your managed defaults meet your requirements; Codex rejects disallowed values.

420 432 


424 436 

425- Managed preferences (macOS MDM; highest precedence)437- Managed preferences (macOS MDM; highest precedence)

426- `managed_config.toml` (system/managed file)438- `managed_config.toml` (system/managed file)

427- `config.toml` (users base configuration)439- `config.toml` (user's base configuration)

428 440 

429CLI `--config key=value` overrides apply to the base, but managed layers override them. This means each run starts from the managed defaults even if you provide local flags.441CLI `--config key=value` overrides apply to the base, but managed layers override them. This means each run starts from the managed defaults even if you provide local flags.

430 442 


446 - `config_toml_base64` (managed defaults)458 - `config_toml_base64` (managed defaults)

447 - `requirements_toml_base64` (requirements)459 - `requirements_toml_base64` (requirements)

448 460 

449Codex parses these managed preferences payloads as TOML. For managed defaults (`config_toml_base64`), managed preferences have the highest precedence. For requirements (`requirements_toml_base64`), precedence follows the cloud-managed requirements order described above. The same requirements-side `[features]` table works in `requirements_toml_base64`; use canonical feature keys there as well.461Codex parses these "managed preferences" payloads as TOML. For managed defaults (`config_toml_base64`), managed preferences have the highest precedence. For requirements (`requirements_toml_base64`), precedence follows the cloud-managed requirements order described above. The same requirements-side `[features]` table works in `requirements_toml_base64`; use canonical feature keys there as well.

450 462 

451### MDM setup workflow463### MDM setup workflow

452 464 


459 471 

460Avoid embedding secrets or high-churn dynamic values in the payload. Treat the managed TOML like any other MDM setting under change control.472Avoid embedding secrets or high-churn dynamic values in the payload. Treat the managed TOML like any other MDM setting under change control.

461 473 

462### Example managed\_config.toml474### Example managed_config.toml

463 475 

464```476```toml

465# Set conservative defaults477# Set conservative defaults

466approval_policy = "on-request"478approval_policy = "on-request"

467sandbox_mode = "workspace-write"479sandbox_mode = "workspace-write"

Details

1# Environment variables – Codex1# Environment variables

2 2 

3Codex uses `config.toml` for durable settings. Use environment variables for3Codex uses `config.toml` for durable settings. Use environment variables for

4shell-scoped overrides, automation secrets, installer behavior, or diagnostics.4shell-scoped overrides, automation secrets, installer behavior, or diagnostics.


11## Core locations11## Core locations

12 12 

13| Variable | Used by | Default | Description |13| Variable | Used by | Default | Description |

14| --- | --- | --- | --- |14| ------------------- | ------------------------------------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |

15| `CODEX_HOME` | CLI, IDE extension, app-server, installers | `~/.codex` | Sets the root for Codex state, including config, auth, logs, sessions, skills, and standalone package metadata. If you set it, the directory must already exist. |15| `CODEX_HOME` | CLI, IDE extension, app-server, installers | `~/.codex` | Sets the root for Codex state, including config, auth, logs, sessions, skills, and standalone package metadata. If you set it, the directory must already exist. |

16| `CODEX_SQLITE_HOME` | CLI and app-server state | `CODEX_HOME` | Sets where SQLite-backed state is stored. The `sqlite_home` config option takes precedence. Relative paths resolve from the current working directory. |16| `CODEX_SQLITE_HOME` | CLI and app-server state | `CODEX_HOME` | Sets where SQLite-backed state is stored. The `sqlite_home` config option takes precedence. Relative paths resolve from the current working directory. |

17 17 


25`https://chatgpt.com/codex/install.ps1`.25`https://chatgpt.com/codex/install.ps1`.

26 26 

27| Variable | Default | Description |27| Variable | Default | Description |

28| --- | --- | --- |28| ----------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |

29| `CODEX_NON_INTERACTIVE` | `false` | Set to `1`, `true`, or `yes` to skip installer prompts. Prompts use their default response, so use this for scripted installs and updates, not first-run setup. |29| `CODEX_NON_INTERACTIVE` | `false` | Set to `1`, `true`, or `yes` to skip installer prompts. Prompts use their default response, so use this for scripted installs and updates, not first-run setup. |

30| `CODEX_INSTALL_DIR` | `~/.local/bin` on macOS/Linux; `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin` on Windows | Changes where the visible `codex` command is installed. The standalone package cache still lives under `CODEX_HOME/packages/standalone`. |30| `CODEX_INSTALL_DIR` | `~/.local/bin` on macOS/Linux; `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin` on Windows | Changes where the visible `codex` command is installed. The standalone package cache still lives under `CODEX_HOME/packages/standalone`. |

31 31 

32For unattended installs, set `CODEX_NON_INTERACTIVE=1` on the shell that runs32For unattended installs, set `CODEX_NON_INTERACTIVE=1` on the shell that runs

33the downloaded installer:33the downloaded installer:

34 34 

35```35```bash

36curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh36curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh

37```37```

38 38 

39```39```powershell

40$env:CODEX_NON_INTERACTIVE=1; irm https://chatgpt.com/codex/install.ps1 | iex40$env:CODEX_NON_INTERACTIVE=1; irm https://chatgpt.com/codex/install.ps1 | iex

41```41```

42 42 

43## Authentication and network43## Authentication and network

44 44 

45| Variable | Used by | Description |45| Variable | Used by | Description |

46| --- | --- | --- |46| ---------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

47| `CODEX_API_KEY` | `codex exec` | Provides an API key for a single non-interactive run. This is only supported in `codex exec`; set it inline rather than job-wide when running repository-controlled code. |47| `CODEX_API_KEY` | `codex exec` | Provides an API key for a single non-interactive run. This is only supported in `codex exec`; set it inline rather than job-wide when running repository-controlled code. |

48| `CODEX_ACCESS_TOKEN` | CLI, app-server, trusted automation | Provides a ChatGPT or Codex access token for trusted automation. For persisted login, pipe it to `codex login --with-access-token`. |48| `CODEX_ACCESS_TOKEN` | CLI, app-server, trusted automation | Provides a ChatGPT or Codex access token for trusted automation. For persisted login, pipe it to `codex login --with-access-token`. |

49| `CODEX_CA_CERTIFICATE` | HTTPS, login, and WebSocket clients | Points to a PEM CA bundle for environments with corporate TLS interception or private root CAs. Takes precedence over `SSL_CERT_FILE`. |49| `CODEX_CA_CERTIFICATE` | HTTPS, login, and WebSocket clients | Points to a PEM CA bundle for environments with corporate TLS interception or private root CAs. Takes precedence over `SSL_CERT_FILE`. |


61## Diagnostics61## Diagnostics

62 62 

63| Variable | Used by | Description |63| Variable | Used by | Description |

64| --- | --- | --- |64| ---------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------- |

65| `RUST_LOG` | CLI and app-server | Controls Rust log filtering and verbosity. `codex exec` defaults to `error` output unless you set a more verbose value. |65| `RUST_LOG` | CLI and app-server | Controls Rust log filtering and verbosity. `codex exec` defaults to `error` output unless you set a more verbose value. |

66 66 

67`RUST_LOG` accepts values such as `error`, `warn`, `info`, `debug`, and67`RUST_LOG` accepts values such as `error`, `warn`, `info`, `debug`, and


72the plaintext `codex-tui.log` file is opt-in. Set `log_dir` explicitly when you72the plaintext `codex-tui.log` file is opt-in. Set `log_dir` explicitly when you

73need a plaintext log for troubleshooting:73need a plaintext log for troubleshooting:

74 74 

75```75```bash

76RUST_LOG=debug codex -c log_dir=./.codex-log76RUST_LOG=debug codex -c log_dir=./.codex-log

77tail -F ./.codex-log/codex-tui.log77tail -F ./.codex-log/codex-tui.log

78```78```

Details

1# GitHub Action – Codex1# Codex GitHub Action

2 2 

3Use the Codex GitHub Action (`openai/codex-action@v1`) to run Codex in CI/CD jobs, apply patches, or post reviews from a GitHub Actions workflow.3Use the Codex GitHub Action (`openai/codex-action@v1`) to run Codex in CI/CD jobs, apply patches, or post reviews from a GitHub Actions workflow.

4The action installs the Codex CLI, starts the Responses API proxy when you provide an API key, and runs `codex exec` under the permissions you specify.4The action installs the Codex CLI, starts the Responses API proxy when you provide an API key, and runs `codex exec` under the permissions you specify.


20 20 

21## Example workflow21## Example workflow

22 22 

23The sample workflow below reviews new pull requests, captures Codexs response, and posts it back on the PR.23The sample workflow below reviews new pull requests, captures Codex's response, and posts it back on the PR.

24 24 

25```25```yaml

26name: Codex pull request review26name: Codex pull request review

27on:27on:

28 pull_request:28 pull_request:


101 101 

102- `safety-strategy` (default `drop-sudo`) removes `sudo` before running Codex. This is irreversible for the job and protects secrets in memory. On Windows you must set `safety-strategy: unsafe`.102- `safety-strategy` (default `drop-sudo`) removes `sudo` before running Codex. This is irreversible for the job and protects secrets in memory. On Windows you must set `safety-strategy: unsafe`.

103- `unprivileged-user` pairs `safety-strategy: unprivileged-user` with `codex-user` to run Codex as a specific account. Ensure the user can read and write the repository checkout (see the [`unprivileged-user` example](https://github.com/openai/codex-action/blob/main/examples/unprivileged-user.yml) for an ownership fix).103- `unprivileged-user` pairs `safety-strategy: unprivileged-user` with `codex-user` to run Codex as a specific account. Ensure the user can read and write the repository checkout (see the [`unprivileged-user` example](https://github.com/openai/codex-action/blob/main/examples/unprivileged-user.yml) for an ownership fix).

104- `read-only` keeps Codex from changing files or using the network, but it still runs with elevated privileges. Dont rely on `read-only` alone to protect secrets.104- `read-only` keeps Codex from changing files or using the network, but it still runs with elevated privileges. Don't rely on `read-only` alone to protect secrets.

105- `sandbox` limits filesystem and network access within Codex itself. Choose the narrowest option that still lets the task complete.105- `sandbox` limits filesystem and network access within Codex itself. Choose the narrowest option that still lets the task complete.

106- `allow-users` and `allow-bots` restrict who can trigger the workflow. By default only users with write access can run the action; list extra trusted accounts explicitly or leave the field empty for the default behavior.106- `allow-users` and `allow-bots` restrict who can trigger the workflow. By default only users with write access can run the action; list extra trusted accounts explicitly or leave the field empty for the default behavior.

107 107 


114- Limit who can start the workflow. Prefer trusted events or explicit approvals instead of allowing everyone to run Codex against your repository.114- Limit who can start the workflow. Prefer trusted events or explicit approvals instead of allowing everyone to run Codex against your repository.

115- Sanitize prompt inputs from pull requests, commit messages, or issue bodies to avoid prompt injection. Review HTML comments or hidden text before feeding it to Codex.115- Sanitize prompt inputs from pull requests, commit messages, or issue bodies to avoid prompt injection. Review HTML comments or hidden text before feeding it to Codex.

116- Protect your `OPENAI_API_KEY` by keeping `safety-strategy` on `drop-sudo` or moving Codex to an unprivileged user. Never leave the action in `unsafe` mode on multi-tenant runners.116- Protect your `OPENAI_API_KEY` by keeping `safety-strategy` on `drop-sudo` or moving Codex to an unprivileged user. Never leave the action in `unsafe` mode on multi-tenant runners.

117- Run Codex as the last step in a job so later steps dont inherit any unexpected state changes.117- Run Codex as the last step in a job so later steps don't inherit any unexpected state changes.

118- Rotate keys immediately if you suspect the proxy logs or action output exposed secret material.118- Rotate keys immediately if you suspect the proxy logs or action output exposed secret material.

119 119 

120## Troubleshooting120## Troubleshooting

121 121 

122- **You set both prompt and prompt-file**: Remove the duplicate input so you provide exactly one source.122- **You set both prompt and prompt-file**: Remove the duplicate input so you provide exactly one source.

123- **responses-api-proxy didnt write server info**: Confirm the API key is present and valid; the proxy starts only when you provide `openai-api-key`.123- **responses-api-proxy didn't write server info**: Confirm the API key is present and valid; the proxy starts only when you provide `openai-api-key`.

124- **Expected `sudo` removal, but `sudo` succeeded**: Ensure no earlier step restored `sudo` and that the runner OS is Linux or macOS. Re-run with a fresh job.124- **Expected `sudo` removal, but `sudo` succeeded**: Ensure no earlier step restored `sudo` and that the runner OS is Linux or macOS. Re-run with a fresh job.

125- **Permission errors after `drop-sudo`**: Grant write access before the action runs (for example with `chmod -R g+rwX "$GITHUB_WORKSPACE"` or by using the unprivileged-user pattern).125- **Permission errors after `drop-sudo`**: Grant write access before the action runs (for example with `chmod -R g+rwX "$GITHUB_WORKSPACE"` or by using the unprivileged-user pattern).

126- **Unauthorized trigger blocked**: Adjust `allow-users` or `allow-bots` inputs if you need to permit service accounts beyond the default write collaborators.126- **Unauthorized trigger blocked**: Adjust `allow-users` or `allow-bots` inputs if you need to permit service accounts beyond the default write collaborators.

glossary.md +767 −1488

Details

1# Glossary – Codex1# Glossary

2 2 

3Use this glossary as a quick reference for Codex terms across the app, CLI, IDE extension, cloud, SDK, and related integrations.3Use this glossary as a quick reference for Codex terms across the app, CLI, IDE extension, cloud, SDK, and related integrations.

4 4 

5| Term | Definition | Applies to |5<GlossaryTable

6| --- | --- | --- |6 client:load

7| [Agent](/codex) | The Codex worker that reasons over context, uses tools, and completes a task. | App, CLI, IDE extension, Cloud |7 searchPlaceholder="Filter by term, definition, or surface"

8| [AGENTS.md](https://developers.openai.com/codex/guides/agents-md) | Repository or user guidance file that gives Codex persistent instructions. | App, CLI, IDE extension, Cloud |8 searchLabel="Search glossary terms"

9| [Analytics dashboard](https://developers.openai.com/codex/enterprise/governance#analytics-dashboard) | Admin view for Codex usage, adoption, and code review metrics. | Enterprise |9 emptyStateMessage="No glossary terms match your search."

10| [API key sign-in](https://developers.openai.com/codex/auth#sign-in-with-an-api-key) | Authentication using an OpenAI API key. | App, CLI, IDE extension |10 maxVisibleEntries={100}

11| [Approval policy](https://developers.openai.com/codex/agent-approvals-security#sandbox-and-approvals) | Rules for when Codex must ask before taking an action. | App, CLI, IDE extension |11 options={[

12| [Approval request](https://developers.openai.com/codex/agent-approvals-security#automatic-approval-reviews) | Codex asking to allow a restricted action. | App, CLI, IDE extension |12 {

13| [Apps (connectors)](https://developers.openai.com/codex/plugins) | Integration that lets Codex access external services. Available through plugins; also called connectors. | App, CLI, IDE extension |13 key: "Agent",

14| [Appshot](https://developers.openai.com/codex/appshots) | Snapshot of the frontmost app window sent to a Codex thread. | App |14 href: "/codex",

15| [Auth cache](https://developers.openai.com/codex/auth#login-caching) | Locally stored login credentials reused by Codex. | App, CLI, IDE extension |15 appliesTo: "App, CLI, IDE extension, Cloud",

16| [Automatic approval review](https://developers.openai.com/codex/agent-approvals-security#automatic-approval-reviews) | Model-based review of eligible approval requests before they proceed. | App, CLI, IDE extension |16 description:

17| [Automation](https://developers.openai.com/codex/app/automations) | A scheduled or recurring Codex task. | App |17 "The Codex worker that reasons over context, uses tools, and completes a task.",

18| [Automation run](https://developers.openai.com/codex/app/automations#managing-tasks) | One execution of a scheduled automation that may report findings or archive itself. | App |18 },

19| [Browser use](https://developers.openai.com/codex/app/browser#browser-use) | App capability that lets Codex operate the in-app browser directly. | App |19 {

20| [Chat](https://developers.openai.com/codex/app/features#chats) | A Codex conversation not tied to a project. | App |20 key: "AGENTS.md",

21| [ChatGPT sign-in](https://developers.openai.com/codex/auth#sign-in-with-chatgpt) | Authentication using a ChatGPT account and workspace permissions. | App, CLI, IDE extension, Cloud |21 href: "/codex/guides/agents-md",

22| [Chronicle](https://developers.openai.com/codex/memories/chronicle) | Opt-in feature that builds memories from recent screen context. | App |22 appliesTo: "App, CLI, IDE extension, Cloud",

23| [Cloud](https://developers.openai.com/codex/cloud) | Mode where Codex works remotely in an OpenAI-managed environment. | App, IDE extension, Web |23 description:

24| [Cloud environment](https://developers.openai.com/codex/cloud/environments) | Configured container setup used for Codex cloud tasks. | Cloud |24 "Repository or user guidance file that gives Codex persistent instructions.",

25| [Cloud task](https://developers.openai.com/codex/cloud/environments#how-codex-cloud-tasks-run) | A remotely executed Codex task that runs in a cloud environment. | Cloud |25 },

26| [Cloud thread](https://developers.openai.com/codex/prompting#threads) | A thread that runs in a Codex cloud environment. | Cloud |26 {

27| [Codex](/codex) | OpenAI's coding agent for software development tasks. | App, CLI, IDE extension, Web, Cloud, SDK |27 key: "Analytics dashboard",

28| [Codex app](https://developers.openai.com/codex/app) | Desktop app for running Codex threads in parallel, with built-in worktree support, automations, and Git functionality. | Desktop |28 href: "/codex/enterprise/governance#analytics-dashboard",

29| [Codex app-server](https://developers.openai.com/codex/app-server) | Local JSON-RPC server for embedding Codex threads, turns, approvals, history, and streamed events in custom clients. | App, IDE extension, SDK |29 appliesTo: "Enterprise",

30| [Codex CLI](https://developers.openai.com/codex/cli) | Terminal client for running Codex interactively or in scripts. | Terminal |30 description:

31| [Codex cloud](https://developers.openai.com/codex/cloud) | OpenAI-managed execution environment where Codex can work on repository tasks remotely. | Web, App, IDE extension |31 "Admin view for Codex usage, adoption, and code review metrics.",

32| [codex exec](https://developers.openai.com/codex/noninteractive) | CLI command for running Codex non-interactively from scripts or CI. | CLI |32 },

33| [Codex IDE extension](https://developers.openai.com/codex/ide) | Editor integration for using Codex inside IDEs like VS Code, JetBrains IDEs, Cursor, and Windsurf. | IDE |33 {

34| [Codex SDK](https://developers.openai.com/codex/sdk) | Programmatic interface for building Codex-powered workflows or integrations. | SDK |34 key: "API key sign-in",

35| [Codex web](https://developers.openai.com/codex/cloud) | Browser-based Codex surface for delegating cloud tasks. | Browser |35 href: "/codex/auth#sign-in-with-an-api-key",

36| [Codex-managed worktree](https://developers.openai.com/codex/app/worktrees#codex-managed-and-permanent-worktrees) | A temporary worktree Codex creates and manages for a thread. | App |36 appliesTo: "App, CLI, IDE extension",

37| [Compaction](https://developers.openai.com/codex/prompting#context) | Summarizing older context so long-running work can continue. | App, CLI, IDE extension, Cloud |37 description: "Authentication using an OpenAI API key.",

38| [Compliance API](https://developers.openai.com/codex/enterprise/governance#compliance-api) | API for exporting Codex activity and audit metadata. | Enterprise |38 },

39| [Computer use](https://developers.openai.com/codex/app/computer-use) | App capability that lets Codex interact with desktop applications through the UI. | App |39 {

40| [config.toml](https://developers.openai.com/codex/config-reference#configtoml) | Local Codex configuration files. | App, CLI, IDE extension |40 key: "Approval policy",

41| [Connected host](https://developers.openai.com/codex/remote-connections#what-comes-from-the-connected-host) | Computer or development environment that provides files, tools, and shell access for remote Codex work. | App, Mobile |41 href: "/codex/agent-approvals-security#sandbox-and-approvals",

42| [Connector](https://developers.openai.com/codex/plugins) | App integration that lets Codex access external services. Available through plugins; also called apps. | App, Cloud |42 appliesTo: "App, CLI, IDE extension",

43| [Container cache](https://developers.openai.com/codex/cloud/environments#container-caching) | Saved cloud container state reused to speed up future tasks. | Cloud |43 description: "Rules for when Codex must ask before taking an action.",

44| [Context](https://developers.openai.com/codex/prompting#context) | Information Codex can use while working, such as files, prior messages, tool output, and instructions. | App, CLI, IDE extension, Cloud, SDK |44 },

45| [Context window](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window) | The maximum amount of information the model can consider at once. | App, CLI, IDE extension, Cloud, SDK |45 {

46| [Custom agent](https://developers.openai.com/codex/subagents#custom-agents) | User-defined agent role with its own instructions and settings. | App, CLI |46 key: "Approval request",

47| [Deny-read rule](https://developers.openai.com/codex/permissions#deny-reads-with-exact-paths-or-globs) | Filesystem permission rule that prevents Codex from reading sensitive paths or glob matches. | App, CLI, IDE extension, Enterprise |47 href: "/codex/agent-approvals-security#automatic-approval-reviews",

48| [Diff](https://developers.openai.com/codex/app/review#what-changes-it-shows) | Set of Git file changes shown for inspection, comments, staging, or reverting. | App, Git, Review |48 appliesTo: "App, CLI, IDE extension",

49| [Domain allowlist](https://developers.openai.com/codex/cloud/internet-access#domain-allowlist) | Set of domains Codex cloud can reach when agent internet access is enabled. | Cloud |49 description: "Codex asking to allow a restricted action.",

50| [Environment (local)](https://developers.openai.com/codex/app/local-environments) | App configuration to tell Codex how to set up worktrees for a project. | App, Worktree |50 },

51| [Environment variable](https://developers.openai.com/codex/cloud/environments#environment-variables-and-secrets) | Runtime configuration value available during task execution. | Cloud, CLI, IDE extension |51 {

52| [Ephemeral session](https://developers.openai.com/codex/noninteractive#basic-usage) | Non-interactive run that skips saving session state after it completes. | CLI |52 key: "Apps (connectors)",

53| [Fast mode](https://developers.openai.com/codex/speed#fast-mode) | Speed setting that makes supported models respond faster at a higher credit cost. | CLI, IDE extension |53 href: "/codex/plugins",

54| [Filesystem permission](https://developers.openai.com/codex/permissions#filesystem-permissions) | Permission profile rule that grants or denies read and write access to paths. | App, CLI, IDE extension |54 appliesTo: "App, CLI, IDE extension",

55| [Finding](https://developers.openai.com/codex/app/automations#managing-tasks) | A notable result or issue surfaced by an automation. | App |55 description:

56| [Full access](https://developers.openai.com/codex/concepts/sandboxing#configure-defaults) | Mode where Codex runs without normal sandbox restrictions. | App, CLI, IDE extension |56 "Integration that lets Codex access external services. Available through plugins; also called connectors.",

57| [Git worktree](https://developers.openai.com/codex/app/worktrees#whats-a-worktree) | A second checkout of the same repository for parallel branch work. | App, Git |57 },

58| [Handoff](https://developers.openai.com/codex/app/worktrees#working-between-local-and-worktree) | Moving a thread and its work between Local and Worktree. | App |58 {

59| [Heartbeat](https://developers.openai.com/codex/app/automations#thread-automations) | A recurring thread wake-up that returns Codex to the same conversation on a schedule. Also called a thread automation. | App |59 key: "Appshot",

60| [Hook](https://developers.openai.com/codex/hooks) | A lifecycle handler that runs when a Codex event matches, such as tool use, permission requests, or when a turn stops. | App, CLI, IDE extension |60 href: "/codex/appshots",

61| [Hook event](https://developers.openai.com/codex/hooks#config-shape) | Lifecycle point where configured hook handlers can run. | App, CLI, IDE extension |61 appliesTo: "App",

62| [Hunk](https://developers.openai.com/codex/app/review#staging-and-reverting-files) | Contiguous section of a diff that can be staged, unstaged, or reverted independently. | App, Git, Review |62 description:

63| [Inline comment](https://developers.openai.com/codex/app/review#inline-comments-for-feedback) | Line-specific feedback attached to a diff. | App |63 "Snapshot of the frontmost app window sent to a Codex thread.",

64| [Live web search](https://developers.openai.com/codex/config-basic#web-search-mode) | Real-time web lookup for current information. | App, CLI, IDE extension |64 },

65| [Local](https://developers.openai.com/codex/app/worktrees#working-between-local-and-worktree) | Mode where Codex works on the user's computer. | App, CLI, IDE extension |65 {

66| [Local thread](https://developers.openai.com/codex/prompting#threads) | A thread that runs on the user's machine. | App, CLI, IDE extension |66 key: "Auth cache",

67| [Maintenance script](https://developers.openai.com/codex/cloud/environments#container-caching) | Optional script run when a cached cloud container resumes. | Cloud |67 href: "/codex/auth#login-caching",

68| [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration) | Organization-controlled Codex defaults and restrictions. | Enterprise |68 appliesTo: "App, CLI, IDE extension",

69| [MCP](https://developers.openai.com/codex/mcp) | Model Context Protocol, a standard for connecting Codex to external tools and context. | App, CLI, IDE extension |69 description: "Locally stored login credentials reused by Codex.",

70| [MCP resource](https://developers.openai.com/codex/mcp#supported-mcp-features) | Readable context exposed by an MCP server for Codex to inspect. | App, CLI, IDE extension |70 },

71| [MCP server](https://developers.openai.com/codex/mcp#supported-mcp-features) | External tool or context provider exposed through MCP. | App, CLI, IDE extension |71 {

72| [MCP tool](https://developers.openai.com/codex/mcp#supported-mcp-features) | Action exposed by an MCP server that Codex can call during a task. | App, CLI, IDE extension |72 key: "Automatic approval review",

73| [MDM](https://developers.openai.com/codex/enterprise/managed-configuration#macos-managed-preferences-mdm) | Mobile device management tooling for distributing device profiles and managed Codex settings. | Enterprise |73 href: "/codex/agent-approvals-security#automatic-approval-reviews",

74| [Memories](https://developers.openai.com/codex/memories) | Locally stored context Codex can reuse across sessions. | App, CLI, IDE extension |74 appliesTo: "App, CLI, IDE extension",

75| [Model](https://developers.openai.com/codex/models) | The AI model Codex uses for reasoning and tool work. | App, CLI, IDE extension, Cloud, SDK |75 description:

76| [Network access](https://developers.openai.com/codex/agent-approvals-security#network-access-) | Permission for commands or environments to reach the internet. | App, CLI, IDE extension, Cloud |76 "Model-based review of eligible approval requests before they proceed.",

77| [Network policy](https://developers.openai.com/codex/agent-approvals-security#network-policy) | Domain-based allow and deny rules that constrain sandboxed outbound network traffic. | App, CLI, IDE extension |77 },

78| [Non-interactive mode](https://developers.openai.com/codex/noninteractive) | CLI mode for running Codex from scripts or CI. | CLI |78 {

79| [Output schema](https://developers.openai.com/codex/noninteractive#create-structured-outputs-with-a-schema) | JSON Schema passed to `codex exec` to constrain the final response. | CLI |79 key: "Automation",

80| [Permanent worktree](https://developers.openai.com/codex/app/worktrees#codex-managed-and-permanent-worktrees) | A long-lived worktree kept as its own project. | App |80 href: "/codex/app/automations",

81| [Permission profile](https://developers.openai.com/codex/permissions#define-and-select-a-profile) | Named least-privilege policy that combines filesystem and network rules for local command execution. | App, CLI, IDE extension |81 appliesTo: "App",

82| [Plan](https://developers.openai.com/codex/learn/best-practices#plan-first-for-difficult-tasks) | Codex's proposed or tracked steps for completing a task. | App, CLI, IDE extension, Cloud |82 description: "A scheduled or recurring Codex task.",

83| [Plugin](https://developers.openai.com/codex/plugins) | Installable bundle that can distribute skills, tools, and integrations. | App, CLI, IDE extension |83 },

84| [Plugin manifest](https://developers.openai.com/codex/plugins/build#plugin-structure) | Plugin metadata file that identifies a plugin and points to bundled skills, apps, MCP servers, hooks, and metadata. | App, CLI, IDE extension, Plugins |84 {

85| [Prefix rule](https://developers.openai.com/codex/rules#understand-the-rules-language) | Command-rule pattern that allows, prompts for, or forbids matching command prefixes. | App, CLI, IDE extension, Enterprise |85 key: "Automation run",

86| [Profile](https://developers.openai.com/codex/config-advanced#profiles) | Named configuration preset for Codex. | CLI, IDE extension |86 href: "/codex/app/automations#managing-tasks",

87| [Progressive disclosure](https://developers.openai.com/codex/skills) | Loading skill details only when needed to preserve context. | App, CLI, IDE extension |87 appliesTo: "App",

88| [Project](https://developers.openai.com/codex/app/features#multitask-across-projects) | A selected codebase or folder Codex works in. | App |88 description:

89| [Prompt](https://developers.openai.com/codex/prompting) | The user instruction or request sent to Codex. | App, CLI, IDE extension, Cloud, SDK |89 "One execution of a scheduled automation that may report findings or archive itself.",

90| [Pull request review](https://developers.openai.com/codex/app/review#pull-request-reviews) | Codex review of changes or feedback on a pull request. | App, CLI, GitHub |90 },

91| [RBAC](https://developers.openai.com/codex/enterprise/admin-setup#step-2-set-up-custom-roles-rbac) | Role-based access control for workspace permissions. | Enterprise |91 {

92| [Read-only mode](https://developers.openai.com/codex/concepts/sandboxing) | Mode where Codex can inspect but not modify without approval. | App, CLI, IDE extension |92 key: "Browser use",

93| [Reasoning effort](https://developers.openai.com/codex/config-basic#reasoning-effort) | Setting that controls how much reasoning budget a model uses. | App, CLI, IDE extension, SDK |93 href: "/codex/app/browser#browser-use",

94| [Remote connection](https://developers.openai.com/codex/remote-connections) | Connection that lets Codex work from another device using a connected host. | App, Mobile |94 appliesTo: "App",

95| [requirements.toml](https://developers.openai.com/codex/config-reference#requirementstoml) | Admin-enforced requirements file for managed Codex setups. | Enterprise |95 description:

96| [Review pane](https://developers.openai.com/codex/app/review) | App view for inspecting diffs, comments, and Git changes. | App |96 "App capability that lets Codex operate the in-app browser directly.",

97| [Rules](https://developers.openai.com/codex/rules) | Policies that allow, prompt for, or deny command prefixes or permission exceptions. | App, CLI, IDE extension |97 },

98| [Sandbox](https://developers.openai.com/codex/concepts/sandboxing) | Enforced boundary limiting what Codex commands can access or modify. | App, CLI, IDE extension |98 {

99| [Sandbox mode](https://developers.openai.com/codex/config-basic#sandbox-level) | Configuration that defines Codex's filesystem and network limits. | App, CLI, IDE extension |99 key: "Chat",

100| [Sandbox preset](https://developers.openai.com/codex/sdk#sandbox-presets) | SDK shorthand for common sandbox policies such as read-only, workspace-write, or full access. | SDK |100 href: "/codex/app/features#chats",

101| [Schedule](https://developers.openai.com/codex/app/automations) | The timing rule for an automation. | App |101 appliesTo: "App",

102| [Secret](https://developers.openai.com/codex/cloud/environments#environment-variables-and-secrets) | Encrypted value available to setup scripts but removed before the agent phase. | Cloud |102 description: "A Codex conversation not tied to a project.",

103| [Setup script](https://developers.openai.com/codex/app/local-environments#setup-scripts) | Script run before the agent starts to install dependencies or prepare tools. | App worktrees |103 },

104| [Skill](https://developers.openai.com/codex/skills) | Reusable workflow package with instructions and optional scripts or references. | App, CLI, IDE extension |104 {

105| [Skill invocation](https://developers.openai.com/codex/skills#how-codex-uses-skills) | Explicit or implicit activation of a skill. | App, CLI, IDE extension |105 key: "ChatGPT sign-in",

106| [Slash command](https://developers.openai.com/codex/cli/slash-commands) | Command entered with a leading slash to control or inspect a Codex CLI session. | CLI |106 href: "/codex/auth#sign-in-with-chatgpt",

107| [Standalone automation](https://developers.openai.com/codex/app/automations) | Independent scheduled run that reports separate findings. | App |107 appliesTo: "App, CLI, IDE extension, Cloud",

108| [STDIO MCP server](https://developers.openai.com/codex/mcp#stdio-servers) | MCP server launched as a local process by a configured command and arguments. | CLI, IDE extension |108 description:

109| [Streamable HTTP MCP server](https://developers.openai.com/codex/mcp#streamable-http-servers) | MCP server reached over HTTP, optionally with bearer token or OAuth authentication. | CLI, IDE extension |109 "Authentication using a ChatGPT account and workspace permissions.",

110| [Subagent](https://developers.openai.com/codex/concepts/subagents) | Specialized child agent spawned to work on part of a task. | App, CLI |110 },

111| [Subagent workflow](https://developers.openai.com/codex/concepts/subagents#core-terms) | Workflow where Codex runs delegated agents in parallel and combines their results. | App, CLI |111 {

112| [Task](https://developers.openai.com/codex/app/automations#managing-tasks) | The unit of work Codex is asked to complete. | App, CLI, IDE extension, Cloud, SDK |112 key: "Chronicle",

113| [Thread](https://developers.openai.com/codex/prompting#threads) | A single Codex session containing prompts, model output, and tool activity. | App, CLI, IDE extension, Cloud, SDK |113 href: "/codex/memories/chronicle",

114| [Thread automation](https://developers.openai.com/codex/app/automations#thread-automations) | Recurring wake-up attached to an existing thread. Also called a heartbeat. | App |114 appliesTo: "App",

115| [Thread fork](https://developers.openai.com/codex/app-server#start-or-resume-a-thread) | New thread branched from the stored history of an existing thread. | App-server, SDK |115 description:

116| [Turn](https://developers.openai.com/codex/app-server#core-primitives) | One exchange in a thread, usually a user prompt plus Codex's response and actions. | App, CLI, IDE extension, Cloud, SDK |116 "Opt-in feature that builds memories from recent screen context.",

117| [Universal image](https://developers.openai.com/codex/cloud/environments#default-universal-image) | Default Codex cloud container image with common tools preinstalled. | Cloud |117 },

118| [Web search cache](https://developers.openai.com/codex/config-basic#web-search-mode) | Pre-indexed search results Codex can use without live browsing. | App, CLI, IDE extension |118 {

119| [Worktree](https://developers.openai.com/codex/app/worktrees) | Mode where Codex isolates changes in a separate Git worktree. | App |119 key: "Cloud",

120| [Writable roots](https://developers.openai.com/codex/agent-approvals-security#protected-paths-in-writable-roots) | Directories Codex is allowed to modify. | App, CLI, IDE extension |120 href: "/codex/cloud",

121 121 appliesTo: "App, IDE extension, Web",

122Term122 description:

123 123 "Mode where Codex works remotely in an OpenAI-managed environment.",

124[Agent](/codex)124 },

125 125 {

126Definition126 key: "Cloud environment",

127 127 href: "/codex/cloud/environments",

128The Codex worker that reasons over context, uses tools, and completes a task.128 appliesTo: "Cloud",

129 129 description: "Configured container setup used for Codex cloud tasks.",

130Applies to130 },

131 131 {

132App, CLI, IDE extension, Cloud132 key: "Cloud task",

133 133 href: "/codex/cloud/environments#how-codex-cloud-tasks-run",

134Term134 appliesTo: "Cloud",

135 135 description:

136[AGENTS.md](https://developers.openai.com/codex/guides/agents-md)136 "A remotely executed Codex task that runs in a cloud environment.",

137 137 },

138Definition138 {

139 139 key: "Cloud thread",

140Repository or user guidance file that gives Codex persistent instructions.140 href: "/codex/prompting#threads",

141 141 appliesTo: "Cloud",

142Applies to142 description: "A thread that runs in a Codex cloud environment.",

143 143 },

144App, CLI, IDE extension, Cloud144 {

145 145 key: "Codex",

146Term146 href: "/codex",

147 147 appliesTo: "App, CLI, IDE extension, Web, Cloud, SDK",

148[Analytics dashboard](https://developers.openai.com/codex/enterprise/governance#analytics-dashboard)148 description: "OpenAI's coding agent for software development tasks.",

149 149 },

150Definition150 {

151 151 key: "Codex app",

152Admin view for Codex usage, adoption, and code review metrics.152 href: "/codex/app",

153 153 appliesTo: "Desktop",

154Applies to154 description:

155 155 "Desktop app for running Codex threads in parallel, with built-in worktree support, automations, and Git functionality.",

156Enterprise156 },

157 157 {

158Term158 key: "Codex app-server",

159 159 href: "/codex/app-server",

160[API key sign-in](https://developers.openai.com/codex/auth#sign-in-with-an-api-key)160 appliesTo: "App, IDE extension, SDK",

161 161 description:

162Definition162 "Local JSON-RPC server for embedding Codex threads, turns, approvals, history, and streamed events in custom clients.",

163 163 },

164Authentication using an OpenAI API key.164 {

165 165 key: "Codex CLI",

166Applies to166 href: "/codex/cli",

167 167 appliesTo: "Terminal",

168App, CLI, IDE extension168 description:

169 169 "Terminal client for running Codex interactively or in scripts.",

170Term170 },

171 171 {

172[Approval policy](https://developers.openai.com/codex/agent-approvals-security#sandbox-and-approvals)172 key: "Codex cloud",

173 173 href: "/codex/cloud",

174Definition174 appliesTo: "Web, App, IDE extension",

175 175 description:

176Rules for when Codex must ask before taking an action.176 "OpenAI-managed execution environment where Codex can work on repository tasks remotely.",

177 177 },

178Applies to178 {

179 179 key: "codex exec",

180App, CLI, IDE extension180 href: "/codex/noninteractive",

181 181 appliesTo: "CLI",

182Term182 description:

183 183 "CLI command for running Codex non-interactively from scripts or CI.",

184[Approval request](https://developers.openai.com/codex/agent-approvals-security#automatic-approval-reviews)184 },

185 185 {

186Definition186 key: "Codex IDE extension",

187 187 href: "/codex/ide",

188Codex asking to allow a restricted action.188 appliesTo: "IDE",

189 189 description:

190Applies to190 "Editor integration for using Codex inside IDEs like VS Code, JetBrains IDEs, Cursor, and Windsurf.",

191 191 },

192App, CLI, IDE extension192 {

193 193 key: "Codex SDK",

194Term194 href: "/codex/sdk",

195 195 appliesTo: "SDK",

196[Apps (connectors)](https://developers.openai.com/codex/plugins)196 description:

197 197 "Programmatic interface for building Codex-powered workflows or integrations.",

198Definition198 },

199 199 {

200Integration that lets Codex access external services. Available through plugins; also called connectors.200 key: "Codex web",

201 201 href: "/codex/cloud",

202Applies to202 appliesTo: "Browser",

203 203 description: "Browser-based Codex surface for delegating cloud tasks.",

204App, CLI, IDE extension204 },

205 205 {

206Term206 key: "Codex-managed worktree",

207 207 href: "/codex/app/worktrees#codex-managed-and-permanent-worktrees",

208[Appshot](https://developers.openai.com/codex/appshots)208 appliesTo: "App",

209 209 description:

210Definition210 "A temporary worktree Codex creates and manages for a thread.",

211 211 },

212Snapshot of the frontmost app window sent to a Codex thread.212 {

213 213 key: "Compaction",

214Applies to214 href: "/codex/prompting#context",

215 215 appliesTo: "App, CLI, IDE extension, Cloud",

216App216 description:

217 217 "Summarizing older context so long-running work can continue.",

218Term218 },

219 219 {

220[Auth cache](https://developers.openai.com/codex/auth#login-caching)220 key: "Compliance API",

221 221 href: "/codex/enterprise/governance#compliance-api",

222Definition222 appliesTo: "Enterprise",

223 223 description: "API for exporting Codex activity and audit metadata.",

224Locally stored login credentials reused by Codex.224 },

225 225 {

226Applies to226 key: "Computer use",

227 227 href: "/codex/app/computer-use",

228App, CLI, IDE extension228 appliesTo: "App",

229 229 description:

230Term230 "App capability that lets Codex interact with desktop applications through the UI.",

231 231 },

232[Automatic approval review](https://developers.openai.com/codex/agent-approvals-security#automatic-approval-reviews)232 {

233 233 key: "config.toml",

234Definition234 href: "/codex/config-reference#configtoml",

235 235 appliesTo: "App, CLI, IDE extension",

236Model-based review of eligible approval requests before they proceed.236 description: "Local Codex configuration files.",

237 237 },

238Applies to238 {

239 239 key: "Connected host",

240App, CLI, IDE extension240 href: "/codex/remote-connections#what-comes-from-the-connected-host",

241 241 appliesTo: "App, Mobile",

242Term242 description:

243 243 "Computer or development environment that provides files, tools, and shell access for remote Codex work.",

244[Automation](https://developers.openai.com/codex/app/automations)244 },

245 245 {

246Definition246 key: "Connector",

247 247 href: "/codex/plugins",

248A scheduled or recurring Codex task.248 appliesTo: "App, Cloud",

249 249 description:

250Applies to250 "App integration that lets Codex access external services. Available through plugins; also called apps.",

251 251 },

252App252 {

253 253 key: "Container cache",

254Term254 href: "/codex/cloud/environments#container-caching",

255 255 appliesTo: "Cloud",

256[Automation run](https://developers.openai.com/codex/app/automations#managing-tasks)256 description:

257 257 "Saved cloud container state reused to speed up future tasks.",

258Definition258 },

259 259 {

260One execution of a scheduled automation that may report findings or archive itself.260 key: "Context",

261 261 href: "/codex/prompting#context",

262Applies to262 appliesTo: "App, CLI, IDE extension, Cloud, SDK",

263 263 description:

264App264 "Information Codex can use while working, such as files, prior messages, tool output, and instructions.",

265 265 },

266Term266 {

267 267 key: "Context window",

268[Browser use](https://developers.openai.com/codex/app/browser#browser-use)268 href: "/api/docs/guides/conversation-state#managing-the-context-window",

269 269 appliesTo: "App, CLI, IDE extension, Cloud, SDK",

270Definition270 description:

271 271 "The maximum amount of information the model can consider at once.",

272App capability that lets Codex operate the in-app browser directly.272 },

273 273 {

274Applies to274 key: "Custom agent",

275 275 href: "/codex/subagents#custom-agents",

276App276 appliesTo: "App, CLI",

277 277 description:

278Term278 "User-defined agent role with its own instructions and settings.",

279 279 },

280[Chat](https://developers.openai.com/codex/app/features#chats)280 {

281 281 key: "Deny-read rule",

282Definition282 href: "/codex/permissions#deny-reads-with-exact-paths-or-globs",

283 283 appliesTo: "App, CLI, IDE extension, Enterprise",

284A Codex conversation not tied to a project.284 description:

285 285 "Filesystem permission rule that prevents Codex from reading sensitive paths or glob matches.",

286Applies to286 },

287 287 {

288App288 key: "Diff",

289 289 href: "/codex/app/review#what-changes-it-shows",

290Term290 appliesTo: "App, Git, Review",

291 291 description:

292[ChatGPT sign-in](https://developers.openai.com/codex/auth#sign-in-with-chatgpt)292 "Set of Git file changes shown for inspection, comments, staging, or reverting.",

293 293 },

294Definition294 {

295 295 key: "Domain allowlist",

296Authentication using a ChatGPT account and workspace permissions.296 href: "/codex/cloud/internet-access#domain-allowlist",

297 297 appliesTo: "Cloud",

298Applies to298 description:

299 299 "Set of domains Codex cloud can reach when agent internet access is enabled.",

300App, CLI, IDE extension, Cloud300 },

301 301 {

302Term302 key: "Environment (local)",

303 303 href: "/codex/app/local-environments",

304[Chronicle](https://developers.openai.com/codex/memories/chronicle)304 appliesTo: "App, Worktree",

305 305 description:

306Definition306 "App configuration to tell Codex how to set up worktrees for a project.",

307 307 },

308Opt-in feature that builds memories from recent screen context.308 {

309 309 key: "Environment variable",

310Applies to310 href: "/codex/cloud/environments#environment-variables-and-secrets",

311 311 appliesTo: "Cloud, CLI, IDE extension",

312App312 description:

313 313 "Runtime configuration value available during task execution.",

314Term314 },

315 315 {

316[Cloud](https://developers.openai.com/codex/cloud)316 key: "Ephemeral session",

317 317 href: "/codex/noninteractive#basic-usage",

318Definition318 appliesTo: "CLI",

319 319 description:

320Mode where Codex works remotely in an OpenAI-managed environment.320 "Non-interactive run that skips saving session state after it completes.",

321 321 },

322Applies to322 {

323 323 key: "Fast mode",

324App, IDE extension, Web324 href: "/codex/speed#fast-mode",

325 325 appliesTo: "CLI, IDE extension",

326Term326 description:

327 327 "Speed setting that makes supported models respond faster at a higher credit cost.",

328[Cloud environment](https://developers.openai.com/codex/cloud/environments)328 },

329 329 {

330Definition330 key: "Filesystem permission",

331 331 href: "/codex/permissions#filesystem-permissions",

332Configured container setup used for Codex cloud tasks.332 appliesTo: "App, CLI, IDE extension",

333 333 description:

334Applies to334 "Permission profile rule that grants or denies read and write access to paths.",

335 335 },

336Cloud336 {

337 337 key: "Finding",

338Term338 href: "/codex/app/automations#managing-tasks",

339 339 appliesTo: "App",

340[Cloud task](https://developers.openai.com/codex/cloud/environments#how-codex-cloud-tasks-run)340 description: "A notable result or issue surfaced by an automation.",

341 341 },

342Definition342 {

343 343 key: "Full access",

344A remotely executed Codex task that runs in a cloud environment.344 href: "/codex/concepts/sandboxing#configure-defaults",

345 345 appliesTo: "App, CLI, IDE extension",

346Applies to346 description: "Mode where Codex runs without normal sandbox restrictions.",

347 347 },

348Cloud348 {

349 349 key: "Git worktree",

350Term350 href: "/codex/app/worktrees#whats-a-worktree",

351 351 appliesTo: "App, Git",

352[Cloud thread](https://developers.openai.com/codex/prompting#threads)352 description:

353 353 "A second checkout of the same repository for parallel branch work.",

354Definition354 },

355 355 {

356A thread that runs in a Codex cloud environment.356 key: "Handoff",

357 357 href: "/codex/app/worktrees#working-between-local-and-worktree",

358Applies to358 appliesTo: "App",

359 359 description: "Moving a thread and its work between Local and Worktree.",

360Cloud360 },

361 361 {

362Term362 key: "Heartbeat",

363 363 href: "/codex/app/automations#thread-automations",

364[Codex](/codex)364 appliesTo: "App",

365 365 description:

366Definition366 "A recurring thread wake-up that returns Codex to the same conversation on a schedule. Also called a thread automation.",

367 367 },

368OpenAI's coding agent for software development tasks.368 {

369 369 key: "Hook",

370Applies to370 href: "/codex/hooks",

371 371 appliesTo: "App, CLI, IDE extension",

372App, CLI, IDE extension, Web, Cloud, SDK372 description:

373 373 "A lifecycle handler that runs when a Codex event matches, such as tool use, permission requests, or when a turn stops.",

374Term374 },

375 375 {

376[Codex app](https://developers.openai.com/codex/app)376 key: "Hook event",

377 377 href: "/codex/hooks#config-shape",

378Definition378 appliesTo: "App, CLI, IDE extension",

379 379 description: "Lifecycle point where configured hook handlers can run.",

380Desktop app for running Codex threads in parallel, with built-in worktree support, automations, and Git functionality.380 },

381 381 {

382Applies to382 key: "Hunk",

383 383 href: "/codex/app/review#staging-and-reverting-files",

384Desktop384 appliesTo: "App, Git, Review",

385 385 description:

386Term386 "Contiguous section of a diff that can be staged, unstaged, or reverted independently.",

387 387 },

388[Codex app-server](https://developers.openai.com/codex/app-server)388 {

389 389 key: "Inline comment",

390Definition390 href: "/codex/app/review#inline-comments-for-feedback",

391 391 appliesTo: "App",

392Local JSON-RPC server for embedding Codex threads, turns, approvals, history, and streamed events in custom clients.392 description: "Line-specific feedback attached to a diff.",

393 393 },

394Applies to394 {

395 395 key: "Live web search",

396App, IDE extension, SDK396 href: "/codex/config-basic#web-search-mode",

397 397 appliesTo: "App, CLI, IDE extension",

398Term398 description: "Real-time web lookup for current information.",

399 399 },

400[Codex CLI](https://developers.openai.com/codex/cli)400 {

401 401 key: "Local",

402Definition402 href: "/codex/app/worktrees#working-between-local-and-worktree",

403 403 appliesTo: "App, CLI, IDE extension",

404Terminal client for running Codex interactively or in scripts.404 description: "Mode where Codex works on the user's computer.",

405 405 },

406Applies to406 {

407 407 key: "Local thread",

408Terminal408 href: "/codex/prompting#threads",

409 409 appliesTo: "App, CLI, IDE extension",

410Term410 description: "A thread that runs on the user's machine.",

411 411 },

412[Codex cloud](https://developers.openai.com/codex/cloud)412 {

413 413 key: "Maintenance script",

414Definition414 href: "/codex/cloud/environments#container-caching",

415 415 appliesTo: "Cloud",

416OpenAI-managed execution environment where Codex can work on repository tasks remotely.416 description: "Optional script run when a cached cloud container resumes.",

417 417 },

418Applies to418 {

419 419 key: "Managed configuration",

420Web, App, IDE extension420 href: "/codex/enterprise/managed-configuration",

421 421 appliesTo: "Enterprise",

422Term422 description: "Organization-controlled Codex defaults and restrictions.",

423 423 },

424[codex exec](https://developers.openai.com/codex/noninteractive)424 {

425 425 key: "MCP",

426Definition426 href: "/codex/mcp",

427 427 appliesTo: "App, CLI, IDE extension",

428CLI command for running Codex non-interactively from scripts or CI.428 description:

429 429 "Model Context Protocol, a standard for connecting Codex to external tools and context.",

430Applies to430 },

431 431 {

432CLI432 key: "MCP resource",

433 433 href: "/codex/mcp#supported-mcp-features",

434Term434 appliesTo: "App, CLI, IDE extension",

435 435 description:

436[Codex IDE extension](https://developers.openai.com/codex/ide)436 "Readable context exposed by an MCP server for Codex to inspect.",

437 437 },

438Definition438 {

439 439 key: "MCP server",

440Editor integration for using Codex inside IDEs like VS Code, JetBrains IDEs, Cursor, and Windsurf.440 href: "/codex/mcp#supported-mcp-features",

441 441 appliesTo: "App, CLI, IDE extension",

442Applies to442 description: "External tool or context provider exposed through MCP.",

443 443 },

444IDE444 {

445 445 key: "MCP tool",

446Term446 href: "/codex/mcp#supported-mcp-features",

447 447 appliesTo: "App, CLI, IDE extension",

448[Codex SDK](https://developers.openai.com/codex/sdk)448 description:

449 449 "Action exposed by an MCP server that Codex can call during a task.",

450Definition450 },

451 451 {

452Programmatic interface for building Codex-powered workflows or integrations.452 key: "MDM",

453 453 href: "/codex/enterprise/managed-configuration#macos-managed-preferences-mdm",

454Applies to454 appliesTo: "Enterprise",

455 455 description:

456SDK456 "Mobile device management tooling for distributing device profiles and managed Codex settings.",

457 457 },

458Term458 {

459 459 key: "Memories",

460[Codex web](https://developers.openai.com/codex/cloud)460 href: "/codex/memories",

461 461 appliesTo: "App, CLI, IDE extension",

462Definition462 description: "Locally stored context Codex can reuse across sessions.",

463 463 },

464Browser-based Codex surface for delegating cloud tasks.464 {

465 465 key: "Model",

466Applies to466 href: "/codex/models",

467 467 appliesTo: "App, CLI, IDE extension, Cloud, SDK",

468Browser468 description: "The AI model Codex uses for reasoning and tool work.",

469 469 },

470Term470 {

471 471 key: "Network access",

472[Codex-managed worktree](https://developers.openai.com/codex/app/worktrees#codex-managed-and-permanent-worktrees)472 href: "/codex/agent-approvals-security#network-access-",

473 473 appliesTo: "App, CLI, IDE extension, Cloud",

474Definition474 description:

475 475 "Permission for commands or environments to reach the internet.",

476A temporary worktree Codex creates and manages for a thread.476 },

477 477 {

478Applies to478 key: "Network policy",

479 479 href: "/codex/agent-approvals-security#network-policy",

480App480 appliesTo: "App, CLI, IDE extension",

481 481 description:

482Term482 "Domain-based allow and deny rules that constrain sandboxed outbound network traffic.",

483 483 },

484[Compaction](https://developers.openai.com/codex/prompting#context)484 {

485 485 key: "Non-interactive mode",

486Definition486 href: "/codex/noninteractive",

487 487 appliesTo: "CLI",

488Summarizing older context so long-running work can continue.488 description: "CLI mode for running Codex from scripts or CI.",

489 489 },

490Applies to490 {

491 491 key: "Output schema",

492App, CLI, IDE extension, Cloud492 href: "/codex/noninteractive#create-structured-outputs-with-a-schema",

493 493 appliesTo: "CLI",

494Term494 description:

495 495 "JSON Schema passed to `codex exec` to constrain the final response.",

496[Compliance API](https://developers.openai.com/codex/enterprise/governance#compliance-api)496 },

497 497 {

498Definition498 key: "Permanent worktree",

499 499 href: "/codex/app/worktrees#codex-managed-and-permanent-worktrees",

500API for exporting Codex activity and audit metadata.500 appliesTo: "App",

501 501 description: "A long-lived worktree kept as its own project.",

502Applies to502 },

503 503 {

504Enterprise504 key: "Permission profile",

505 505 href: "/codex/permissions#define-and-select-a-profile",

506Term506 appliesTo: "App, CLI, IDE extension",

507 507 description:

508[Computer use](https://developers.openai.com/codex/app/computer-use)508 "Named least-privilege policy that combines filesystem and network rules for local command execution.",

509 509 },

510Definition510 {

511 511 key: "Plan",

512App capability that lets Codex interact with desktop applications through the UI.512 href: "/codex/learn/best-practices#plan-first-for-difficult-tasks",

513 513 appliesTo: "App, CLI, IDE extension, Cloud",

514Applies to514 description: "Codex's proposed or tracked steps for completing a task.",

515 515 },

516App516 {

517 517 key: "Plugin",

518Term518 href: "/codex/plugins",

519 519 appliesTo: "App, CLI, IDE extension",

520[config.toml](https://developers.openai.com/codex/config-reference#configtoml)520 description:

521 521 "Installable bundle that can distribute skills, tools, and integrations.",

522Definition522 },

523 523 {

524Local Codex configuration files.524 key: "Plugin manifest",

525 525 href: "/codex/plugins/build#plugin-structure",

526Applies to526 appliesTo: "App, CLI, IDE extension, Plugins",

527 527 description:

528App, CLI, IDE extension528 "Plugin metadata file that identifies a plugin and points to bundled skills, apps, MCP servers, hooks, and metadata.",

529 529 },

530Term530 {

531 531 key: "Prefix rule",

532[Connected host](https://developers.openai.com/codex/remote-connections#what-comes-from-the-connected-host)532 href: "/codex/rules#understand-the-rules-language",

533 533 appliesTo: "App, CLI, IDE extension, Enterprise",

534Definition534 description:

535 535 "Command-rule pattern that allows, prompts for, or forbids matching command prefixes.",

536Computer or development environment that provides files, tools, and shell access for remote Codex work.536 },

537 537 {

538Applies to538 key: "Profile",

539 539 href: "/codex/config-advanced#profiles",

540App, Mobile540 appliesTo: "CLI, IDE extension",

541 541 description: "Named configuration preset for Codex.",

542Term542 },

543 543 {

544[Connector](https://developers.openai.com/codex/plugins)544 key: "Progressive disclosure",

545 545 href: "/codex/skills",

546Definition546 appliesTo: "App, CLI, IDE extension",

547 547 description:

548App integration that lets Codex access external services. Available through plugins; also called apps.548 "Loading skill details only when needed to preserve context.",

549 549 },

550Applies to550 {

551 551 key: "Project",

552App, Cloud552 href: "/codex/app/features#multitask-across-projects",

553 553 appliesTo: "App",

554Term554 description: "A selected codebase or folder Codex works in.",

555 555 },

556[Container cache](https://developers.openai.com/codex/cloud/environments#container-caching)556 {

557 557 key: "Prompt",

558Definition558 href: "/codex/prompting",

559 559 appliesTo: "App, CLI, IDE extension, Cloud, SDK",

560Saved cloud container state reused to speed up future tasks.560 description: "The user instruction or request sent to Codex.",

561 561 },

562Applies to562 {

563 563 key: "Pull request review",

564Cloud564 href: "/codex/app/review#pull-request-reviews",

565 565 appliesTo: "App, CLI, GitHub",

566Term566 description: "Codex review of changes or feedback on a pull request.",

567 567 },

568[Context](https://developers.openai.com/codex/prompting#context)568 {

569 569 key: "RBAC",

570Definition570 href: "/codex/enterprise/admin-setup#step-2-set-up-custom-roles-rbac",

571 571 appliesTo: "Enterprise",

572Information Codex can use while working, such as files, prior messages, tool output, and instructions.572 description: "Role-based access control for workspace permissions.",

573 573 },

574Applies to574 {

575 575 key: "Read-only mode",

576App, CLI, IDE extension, Cloud, SDK576 href: "/codex/concepts/sandboxing",

577 577 appliesTo: "App, CLI, IDE extension",

578Term578 description:

579 579 "Mode where Codex can inspect but not modify without approval.",

580[Context window](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window)580 },

581 581 {

582Definition582 key: "Reasoning effort",

583 583 href: "/codex/config-basic#reasoning-effort",

584The maximum amount of information the model can consider at once.584 appliesTo: "App, CLI, IDE extension, SDK",

585 585 description:

586Applies to586 "Setting that controls how much reasoning budget a model uses.",

587 587 },

588App, CLI, IDE extension, Cloud, SDK588 {

589 589 key: "Remote connection",

590Term590 href: "/codex/remote-connections",

591 591 appliesTo: "App, Mobile",

592[Custom agent](https://developers.openai.com/codex/subagents#custom-agents)592 description:

593 593 "Connection that lets Codex work from another device using a connected host.",

594Definition594 },

595 595 {

596User-defined agent role with its own instructions and settings.596 key: "requirements.toml",

597 597 href: "/codex/config-reference#requirementstoml",

598Applies to598 appliesTo: "Enterprise",

599 599 description: "Admin-enforced requirements file for managed Codex setups.",

600App, CLI600 },

601 601 {

602Term602 key: "Review pane",

603 603 href: "/codex/app/review",

604[Deny-read rule](https://developers.openai.com/codex/permissions#deny-reads-with-exact-paths-or-globs)604 appliesTo: "App",

605 605 description: "App view for inspecting diffs, comments, and Git changes.",

606Definition606 },

607 607 {

608Filesystem permission rule that prevents Codex from reading sensitive paths or glob matches.608 key: "Rules",

609 609 href: "/codex/rules",

610Applies to610 appliesTo: "App, CLI, IDE extension",

611 611 description:

612App, CLI, IDE extension, Enterprise612 "Policies that allow, prompt for, or deny command prefixes or permission exceptions.",

613 613 },

614Term614 {

615 615 key: "Sandbox",

616[Diff](https://developers.openai.com/codex/app/review#what-changes-it-shows)616 href: "/codex/concepts/sandboxing",

617 617 appliesTo: "App, CLI, IDE extension",

618Definition618 description:

619 619 "Enforced boundary limiting what Codex commands can access or modify.",

620Set of Git file changes shown for inspection, comments, staging, or reverting.620 },

621 621 {

622Applies to622 key: "Sandbox mode",

623 623 href: "/codex/config-basic#sandbox-level",

624App, Git, Review624 appliesTo: "App, CLI, IDE extension",

625 625 description:

626Term626 "Configuration that defines Codex's filesystem and network limits.",

627 627 },

628[Domain allowlist](https://developers.openai.com/codex/cloud/internet-access#domain-allowlist)628 {

629 629 key: "Sandbox preset",

630Definition630 href: "/codex/sdk#sandbox-presets",

631 631 appliesTo: "SDK",

632Set of domains Codex cloud can reach when agent internet access is enabled.632 description:

633 633 "SDK shorthand for common sandbox policies such as read-only, workspace-write, or full access.",

634Applies to634 },

635 635 {

636Cloud636 key: "Schedule",

637 637 href: "/codex/app/automations",

638Term638 appliesTo: "App",

639 639 description: "The timing rule for an automation.",

640[Environment (local)](https://developers.openai.com/codex/app/local-environments)640 },

641 641 {

642Definition642 key: "Secret",

643 643 href: "/codex/cloud/environments#environment-variables-and-secrets",

644App configuration to tell Codex how to set up worktrees for a project.644 appliesTo: "Cloud",

645 645 description:

646Applies to646 "Encrypted value available to setup scripts but removed before the agent phase.",

647 647 },

648App, Worktree648 {

649 649 key: "Setup script",

650Term650 href: "/codex/app/local-environments#setup-scripts",

651 651 appliesTo: "App worktrees",

652[Environment variable](https://developers.openai.com/codex/cloud/environments#environment-variables-and-secrets)652 description:

653 653 "Script run before the agent starts to install dependencies or prepare tools.",

654Definition654 },

655 655 {

656Runtime configuration value available during task execution.656 key: "Skill",

657 657 href: "/codex/skills",

658Applies to658 appliesTo: "App, CLI, IDE extension",

659 659 description:

660Cloud, CLI, IDE extension660 "Reusable workflow package with instructions and optional scripts or references.",

661 661 },

662Term662 {

663 663 key: "Skill invocation",

664[Ephemeral session](https://developers.openai.com/codex/noninteractive#basic-usage)664 href: "/codex/skills#how-codex-uses-skills",

665 665 appliesTo: "App, CLI, IDE extension",

666Definition666 description: "Explicit or implicit activation of a skill.",

667 667 },

668Non-interactive run that skips saving session state after it completes.668 {

669 669 key: "Slash command",

670Applies to670 href: "/codex/cli/slash-commands",

671 671 appliesTo: "CLI",

672CLI672 description:

673 673 "Command entered with a leading slash to control or inspect a Codex CLI session.",

674Term674 },

675 675 {

676[Fast mode](https://developers.openai.com/codex/speed#fast-mode)676 key: "Standalone automation",

677 677 href: "/codex/app/automations",

678Definition678 appliesTo: "App",

679 679 description: "Independent scheduled run that reports separate findings.",

680Speed setting that makes supported models respond faster at a higher credit cost.680 },

681 681 {

682Applies to682 key: "STDIO MCP server",

683 683 href: "/codex/mcp#stdio-servers",

684CLI, IDE extension684 appliesTo: "CLI, IDE extension",

685 685 description:

686Term686 "MCP server launched as a local process by a configured command and arguments.",

687 687 },

688[Filesystem permission](https://developers.openai.com/codex/permissions#filesystem-permissions)688 {

689 689 key: "Streamable HTTP MCP server",

690Definition690 href: "/codex/mcp#streamable-http-servers",

691 691 appliesTo: "CLI, IDE extension",

692Permission profile rule that grants or denies read and write access to paths.692 description:

693 693 "MCP server reached over HTTP, optionally with bearer token or OAuth authentication.",

694Applies to694 },

695 695 {

696App, CLI, IDE extension696 key: "Subagent",

697 697 href: "/codex/concepts/subagents",

698Term698 appliesTo: "App, CLI",

699 699 description: "Specialized child agent spawned to work on part of a task.",

700[Finding](https://developers.openai.com/codex/app/automations#managing-tasks)700 },

701 701 {

702Definition702 key: "Subagent workflow",

703 703 href: "/codex/concepts/subagents#core-terms",

704A notable result or issue surfaced by an automation.704 appliesTo: "App, CLI",

705 705 description:

706Applies to706 "Workflow where Codex runs delegated agents in parallel and combines their results.",

707 707 },

708App708 {

709 709 key: "Task",

710Term710 href: "/codex/app/automations#managing-tasks",

711 711 appliesTo: "App, CLI, IDE extension, Cloud, SDK",

712[Full access](https://developers.openai.com/codex/concepts/sandboxing#configure-defaults)712 description: "The unit of work Codex is asked to complete.",

713 713 },

714Definition714 {

715 715 key: "Thread",

716Mode where Codex runs without normal sandbox restrictions.716 href: "/codex/prompting#threads",

717 717 appliesTo: "App, CLI, IDE extension, Cloud, SDK",

718Applies to718 description:

719 719 "A single Codex session containing prompts, model output, and tool activity.",

720App, CLI, IDE extension720 },

721 721 {

722Term722 key: "Thread automation",

723 723 href: "/codex/app/automations#thread-automations",

724[Git worktree](https://developers.openai.com/codex/app/worktrees#whats-a-worktree)724 appliesTo: "App",

725 725 description:

726Definition726 "Recurring wake-up attached to an existing thread. Also called a heartbeat.",

727 727 },

728A second checkout of the same repository for parallel branch work.728 {

729 729 key: "Thread fork",

730Applies to730 href: "/codex/app-server#start-or-resume-a-thread",

731 731 appliesTo: "App-server, SDK",

732App, Git732 description:

733 733 "New thread branched from the stored history of an existing thread.",

734Term734 },

735 735 {

736[Handoff](https://developers.openai.com/codex/app/worktrees#working-between-local-and-worktree)736 key: "Turn",

737 737 href: "/codex/app-server#core-primitives",

738Definition738 appliesTo: "App, CLI, IDE extension, Cloud, SDK",

739 739 description:

740Moving a thread and its work between Local and Worktree.740 "One exchange in a thread, usually a user prompt plus Codex's response and actions.",

741 741 },

742Applies to742 {

743 743 key: "Universal image",

744App744 href: "/codex/cloud/environments#default-universal-image",

745 745 appliesTo: "Cloud",

746Term746 description:

747 747 "Default Codex cloud container image with common tools preinstalled.",

748[Heartbeat](https://developers.openai.com/codex/app/automations#thread-automations)748 },

749 749 {

750Definition750 key: "Web search cache",

751 751 href: "/codex/config-basic#web-search-mode",

752A recurring thread wake-up that returns Codex to the same conversation on a schedule. Also called a thread automation.752 appliesTo: "App, CLI, IDE extension",

753 753 description:

754Applies to754 "Pre-indexed search results Codex can use without live browsing.",

755 755 },

756App756 {

757 757 key: "Worktree",

758Term758 href: "/codex/app/worktrees",

759 759 appliesTo: "App",

760[Hook](https://developers.openai.com/codex/hooks)760 description:

761 761 "Mode where Codex isolates changes in a separate Git worktree.",

762Definition762 },

763 763 {

764A lifecycle handler that runs when a Codex event matches, such as tool use, permission requests, or when a turn stops.764 key: "Writable roots",

765 765 href: "/codex/agent-approvals-security#protected-paths-in-writable-roots",

766Applies to766 appliesTo: "App, CLI, IDE extension",

767 767 description: "Directories Codex is allowed to modify.",

768App, CLI, IDE extension768 },

769 769 ]}

770Term770/>

771 

772[Hook event](https://developers.openai.com/codex/hooks#config-shape)

773 

774Definition

775 

776Lifecycle point where configured hook handlers can run.

777 

778Applies to

779 

780App, CLI, IDE extension

781 

782Term

783 

784[Hunk](https://developers.openai.com/codex/app/review#staging-and-reverting-files)

785 

786Definition

787 

788Contiguous section of a diff that can be staged, unstaged, or reverted independently.

789 

790Applies to

791 

792App, Git, Review

793 

794Term

795 

796[Inline comment](https://developers.openai.com/codex/app/review#inline-comments-for-feedback)

797 

798Definition

799 

800Line-specific feedback attached to a diff.

801 

802Applies to

803 

804App

805 

806Term

807 

808[Live web search](https://developers.openai.com/codex/config-basic#web-search-mode)

809 

810Definition

811 

812Real-time web lookup for current information.

813 

814Applies to

815 

816App, CLI, IDE extension

817 

818Term

819 

820[Local](https://developers.openai.com/codex/app/worktrees#working-between-local-and-worktree)

821 

822Definition

823 

824Mode where Codex works on the user's computer.

825 

826Applies to

827 

828App, CLI, IDE extension

829 

830Term

831 

832[Local thread](https://developers.openai.com/codex/prompting#threads)

833 

834Definition

835 

836A thread that runs on the user's machine.

837 

838Applies to

839 

840App, CLI, IDE extension

841 

842Term

843 

844[Maintenance script](https://developers.openai.com/codex/cloud/environments#container-caching)

845 

846Definition

847 

848Optional script run when a cached cloud container resumes.

849 

850Applies to

851 

852Cloud

853 

854Term

855 

856[Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration)

857 

858Definition

859 

860Organization-controlled Codex defaults and restrictions.

861 

862Applies to

863 

864Enterprise

865 

866Term

867 

868[MCP](https://developers.openai.com/codex/mcp)

869 

870Definition

871 

872Model Context Protocol, a standard for connecting Codex to external tools and context.

873 

874Applies to

875 

876App, CLI, IDE extension

877 

878Term

879 

880[MCP resource](https://developers.openai.com/codex/mcp#supported-mcp-features)

881 

882Definition

883 

884Readable context exposed by an MCP server for Codex to inspect.

885 

886Applies to

887 

888App, CLI, IDE extension

889 

890Term

891 

892[MCP server](https://developers.openai.com/codex/mcp#supported-mcp-features)

893 

894Definition

895 

896External tool or context provider exposed through MCP.

897 

898Applies to

899 

900App, CLI, IDE extension

901 

902Term

903 

904[MCP tool](https://developers.openai.com/codex/mcp#supported-mcp-features)

905 

906Definition

907 

908Action exposed by an MCP server that Codex can call during a task.

909 

910Applies to

911 

912App, CLI, IDE extension

913 

914Term

915 

916[MDM](https://developers.openai.com/codex/enterprise/managed-configuration#macos-managed-preferences-mdm)

917 

918Definition

919 

920Mobile device management tooling for distributing device profiles and managed Codex settings.

921 

922Applies to

923 

924Enterprise

925 

926Term

927 

928[Memories](https://developers.openai.com/codex/memories)

929 

930Definition

931 

932Locally stored context Codex can reuse across sessions.

933 

934Applies to

935 

936App, CLI, IDE extension

937 

938Term

939 

940[Model](https://developers.openai.com/codex/models)

941 

942Definition

943 

944The AI model Codex uses for reasoning and tool work.

945 

946Applies to

947 

948App, CLI, IDE extension, Cloud, SDK

949 

950Term

951 

952[Network access](https://developers.openai.com/codex/agent-approvals-security#network-access-)

953 

954Definition

955 

956Permission for commands or environments to reach the internet.

957 

958Applies to

959 

960App, CLI, IDE extension, Cloud

961 

962Term

963 

964[Network policy](https://developers.openai.com/codex/agent-approvals-security#network-policy)

965 

966Definition

967 

968Domain-based allow and deny rules that constrain sandboxed outbound network traffic.

969 

970Applies to

971 

972App, CLI, IDE extension

973 

974Term

975 

976[Non-interactive mode](https://developers.openai.com/codex/noninteractive)

977 

978Definition

979 

980CLI mode for running Codex from scripts or CI.

981 

982Applies to

983 

984CLI

985 

986Term

987 

988[Output schema](https://developers.openai.com/codex/noninteractive#create-structured-outputs-with-a-schema)

989 

990Definition

991 

992JSON Schema passed to `codex exec` to constrain the final response.

993 

994Applies to

995 

996CLI

997 

998Term

999 

1000[Permanent worktree](https://developers.openai.com/codex/app/worktrees#codex-managed-and-permanent-worktrees)

1001 

1002Definition

1003 

1004A long-lived worktree kept as its own project.

1005 

1006Applies to

1007 

1008App

1009 

1010Term

1011 

1012[Permission profile](https://developers.openai.com/codex/permissions#define-and-select-a-profile)

1013 

1014Definition

1015 

1016Named least-privilege policy that combines filesystem and network rules for local command execution.

1017 

1018Applies to

1019 

1020App, CLI, IDE extension

1021 

1022Term

1023 

1024[Plan](https://developers.openai.com/codex/learn/best-practices#plan-first-for-difficult-tasks)

1025 

1026Definition

1027 

1028Codex's proposed or tracked steps for completing a task.

1029 

1030Applies to

1031 

1032App, CLI, IDE extension, Cloud

1033 

1034Term

1035 

1036[Plugin](https://developers.openai.com/codex/plugins)

1037 

1038Definition

1039 

1040Installable bundle that can distribute skills, tools, and integrations.

1041 

1042Applies to

1043 

1044App, CLI, IDE extension

1045 

1046Term

1047 

1048[Plugin manifest](https://developers.openai.com/codex/plugins/build#plugin-structure)

1049 

1050Definition

1051 

1052Plugin metadata file that identifies a plugin and points to bundled skills, apps, MCP servers, hooks, and metadata.

1053 

1054Applies to

1055 

1056App, CLI, IDE extension, Plugins

1057 

1058Term

1059 

1060[Prefix rule](https://developers.openai.com/codex/rules#understand-the-rules-language)

1061 

1062Definition

1063 

1064Command-rule pattern that allows, prompts for, or forbids matching command prefixes.

1065 

1066Applies to

1067 

1068App, CLI, IDE extension, Enterprise

1069 

1070Term

1071 

1072[Profile](https://developers.openai.com/codex/config-advanced#profiles)

1073 

1074Definition

1075 

1076Named configuration preset for Codex.

1077 

1078Applies to

1079 

1080CLI, IDE extension

1081 

1082Term

1083 

1084[Progressive disclosure](https://developers.openai.com/codex/skills)

1085 

1086Definition

1087 

1088Loading skill details only when needed to preserve context.

1089 

1090Applies to

1091 

1092App, CLI, IDE extension

1093 

1094Term

1095 

1096[Project](https://developers.openai.com/codex/app/features#multitask-across-projects)

1097 

1098Definition

1099 

1100A selected codebase or folder Codex works in.

1101 

1102Applies to

1103 

1104App

1105 

1106Term

1107 

1108[Prompt](https://developers.openai.com/codex/prompting)

1109 

1110Definition

1111 

1112The user instruction or request sent to Codex.

1113 

1114Applies to

1115 

1116App, CLI, IDE extension, Cloud, SDK

1117 

1118Term

1119 

1120[Pull request review](https://developers.openai.com/codex/app/review#pull-request-reviews)

1121 

1122Definition

1123 

1124Codex review of changes or feedback on a pull request.

1125 

1126Applies to

1127 

1128App, CLI, GitHub

1129 

1130Term

1131 

1132[RBAC](https://developers.openai.com/codex/enterprise/admin-setup#step-2-set-up-custom-roles-rbac)

1133 

1134Definition

1135 

1136Role-based access control for workspace permissions.

1137 

1138Applies to

1139 

1140Enterprise

1141 

1142Term

1143 

1144[Read-only mode](https://developers.openai.com/codex/concepts/sandboxing)

1145 

1146Definition

1147 

1148Mode where Codex can inspect but not modify without approval.

1149 

1150Applies to

1151 

1152App, CLI, IDE extension

1153 

1154Term

1155 

1156[Reasoning effort](https://developers.openai.com/codex/config-basic#reasoning-effort)

1157 

1158Definition

1159 

1160Setting that controls how much reasoning budget a model uses.

1161 

1162Applies to

1163 

1164App, CLI, IDE extension, SDK

1165 

1166Term

1167 

1168[Remote connection](https://developers.openai.com/codex/remote-connections)

1169 

1170Definition

1171 

1172Connection that lets Codex work from another device using a connected host.

1173 

1174Applies to

1175 

1176App, Mobile

1177 

1178Term

1179 

1180[requirements.toml](https://developers.openai.com/codex/config-reference#requirementstoml)

1181 

1182Definition

1183 

1184Admin-enforced requirements file for managed Codex setups.

1185 

1186Applies to

1187 

1188Enterprise

1189 

1190Term

1191 

1192[Review pane](https://developers.openai.com/codex/app/review)

1193 

1194Definition

1195 

1196App view for inspecting diffs, comments, and Git changes.

1197 

1198Applies to

1199 

1200App

1201 

1202Term

1203 

1204[Rules](https://developers.openai.com/codex/rules)

1205 

1206Definition

1207 

1208Policies that allow, prompt for, or deny command prefixes or permission exceptions.

1209 

1210Applies to

1211 

1212App, CLI, IDE extension

1213 

1214Term

1215 

1216[Sandbox](https://developers.openai.com/codex/concepts/sandboxing)

1217 

1218Definition

1219 

1220Enforced boundary limiting what Codex commands can access or modify.

1221 

1222Applies to

1223 

1224App, CLI, IDE extension

1225 

1226Term

1227 

1228[Sandbox mode](https://developers.openai.com/codex/config-basic#sandbox-level)

1229 

1230Definition

1231 

1232Configuration that defines Codex's filesystem and network limits.

1233 

1234Applies to

1235 

1236App, CLI, IDE extension

1237 

1238Term

1239 

1240[Sandbox preset](https://developers.openai.com/codex/sdk#sandbox-presets)

1241 

1242Definition

1243 

1244SDK shorthand for common sandbox policies such as read-only, workspace-write, or full access.

1245 

1246Applies to

1247 

1248SDK

1249 

1250Term

1251 

1252[Schedule](https://developers.openai.com/codex/app/automations)

1253 

1254Definition

1255 

1256The timing rule for an automation.

1257 

1258Applies to

1259 

1260App

1261 

1262Term

1263 

1264[Secret](https://developers.openai.com/codex/cloud/environments#environment-variables-and-secrets)

1265 

1266Definition

1267 

1268Encrypted value available to setup scripts but removed before the agent phase.

1269 

1270Applies to

1271 

1272Cloud

1273 

1274Term

1275 

1276[Setup script](https://developers.openai.com/codex/app/local-environments#setup-scripts)

1277 

1278Definition

1279 

1280Script run before the agent starts to install dependencies or prepare tools.

1281 

1282Applies to

1283 

1284App worktrees

1285 

1286Term

1287 

1288[Skill](https://developers.openai.com/codex/skills)

1289 

1290Definition

1291 

1292Reusable workflow package with instructions and optional scripts or references.

1293 

1294Applies to

1295 

1296App, CLI, IDE extension

1297 

1298Term

1299 

1300[Skill invocation](https://developers.openai.com/codex/skills#how-codex-uses-skills)

1301 

1302Definition

1303 

1304Explicit or implicit activation of a skill.

1305 

1306Applies to

1307 

1308App, CLI, IDE extension

1309 

1310Term

1311 

1312[Slash command](https://developers.openai.com/codex/cli/slash-commands)

1313 

1314Definition

1315 

1316Command entered with a leading slash to control or inspect a Codex CLI session.

1317 

1318Applies to

1319 

1320CLI

1321 

1322Term

1323 

1324[Standalone automation](https://developers.openai.com/codex/app/automations)

1325 

1326Definition

1327 

1328Independent scheduled run that reports separate findings.

1329 

1330Applies to

1331 

1332App

1333 

1334Term

1335 

1336[STDIO MCP server](https://developers.openai.com/codex/mcp#stdio-servers)

1337 

1338Definition

1339 

1340MCP server launched as a local process by a configured command and arguments.

1341 

1342Applies to

1343 

1344CLI, IDE extension

1345 

1346Term

1347 

1348[Streamable HTTP MCP server](https://developers.openai.com/codex/mcp#streamable-http-servers)

1349 

1350Definition

1351 

1352MCP server reached over HTTP, optionally with bearer token or OAuth authentication.

1353 

1354Applies to

1355 

1356CLI, IDE extension

1357 

1358Term

1359 

1360[Subagent](https://developers.openai.com/codex/concepts/subagents)

1361 

1362Definition

1363 

1364Specialized child agent spawned to work on part of a task.

1365 

1366Applies to

1367 

1368App, CLI

1369 

1370Term

1371 

1372[Subagent workflow](https://developers.openai.com/codex/concepts/subagents#core-terms)

1373 

1374Definition

1375 

1376Workflow where Codex runs delegated agents in parallel and combines their results.

1377 

1378Applies to

1379 

1380App, CLI

1381 

1382Term

1383 

1384[Task](https://developers.openai.com/codex/app/automations#managing-tasks)

1385 

1386Definition

1387 

1388The unit of work Codex is asked to complete.

1389 

1390Applies to

1391 

1392App, CLI, IDE extension, Cloud, SDK

1393 

1394Term

1395 

1396[Thread](https://developers.openai.com/codex/prompting#threads)

1397 

1398Definition

1399 

1400A single Codex session containing prompts, model output, and tool activity.

1401 

1402Applies to

1403 

1404App, CLI, IDE extension, Cloud, SDK

1405 

1406Term

1407 

1408[Thread automation](https://developers.openai.com/codex/app/automations#thread-automations)

1409 

1410Definition

1411 

1412Recurring wake-up attached to an existing thread. Also called a heartbeat.

1413 

1414Applies to

1415 

1416App

1417 

1418Term

1419 

1420[Thread fork](https://developers.openai.com/codex/app-server#start-or-resume-a-thread)

1421 

1422Definition

1423 

1424New thread branched from the stored history of an existing thread.

1425 

1426Applies to

1427 

1428App-server, SDK

1429 

1430Term

1431 

1432[Turn](https://developers.openai.com/codex/app-server#core-primitives)

1433 

1434Definition

1435 

1436One exchange in a thread, usually a user prompt plus Codex's response and actions.

1437 

1438Applies to

1439 

1440App, CLI, IDE extension, Cloud, SDK

1441 

1442Term

1443 

1444[Universal image](https://developers.openai.com/codex/cloud/environments#default-universal-image)

1445 

1446Definition

1447 

1448Default Codex cloud container image with common tools preinstalled.

1449 

1450Applies to

1451 

1452Cloud

1453 

1454Term

1455 

1456[Web search cache](https://developers.openai.com/codex/config-basic#web-search-mode)

1457 

1458Definition

1459 

1460Pre-indexed search results Codex can use without live browsing.

1461 

1462Applies to

1463 

1464App, CLI, IDE extension

1465 

1466Term

1467 

1468[Worktree](https://developers.openai.com/codex/app/worktrees)

1469 

1470Definition

1471 

1472Mode where Codex isolates changes in a separate Git worktree.

1473 

1474Applies to

1475 

1476App

1477 

1478Term

1479 

1480[Writable roots](https://developers.openai.com/codex/agent-approvals-security#protected-paths-in-writable-roots)

1481 

1482Definition

1483 

1484Directories Codex is allowed to modify.

1485 

1486Applies to

1487 

1488App, CLI, IDE extension

1489 

1490Expand to view all

1491 

Details

1# Custom instructions with AGENTS.md – Codex1# Custom instructions with AGENTS.md

2 2 

3Codex reads `AGENTS.md` files before doing any work. By layering global guidance with project-specific overrides, you can start each task with consistent expectations, no matter which repository you open.3Codex reads `AGENTS.md` files before doing any work. By layering global guidance with project-specific overrides, you can start each task with consistent expectations, no matter which repository you open.

4 4 


18 18 

191. Ensure the directory exists:191. Ensure the directory exists:

20 20 

21 ```21 ```bash

22 mkdir -p ~/.codex22 mkdir -p ~/.codex

23 ```23 ```

24 

242. Create `~/.codex/AGENTS.md` with reusable preferences:252. Create `~/.codex/AGENTS.md` with reusable preferences:

25 26 

26 ```27 ```md

27 # ~/.codex/AGENTS.md28 # ~/.codex/AGENTS.md

28 29 

29 ## Working agreements30 ## Working agreements


32 - Prefer `pnpm` when installing dependencies.33 - Prefer `pnpm` when installing dependencies.

33 - Ask for confirmation before adding new production dependencies.34 - Ask for confirmation before adding new production dependencies.

34 ```35 ```

36 

353. Run Codex anywhere to confirm it loads the file:373. Run Codex anywhere to confirm it loads the file:

36 38 

37 ```39 ```bash

38 codex --ask-for-approval never "Summarize the current instructions."40 codex --ask-for-approval never "Summarize the current instructions."

39 ```41 ```

40 42 


48 50 

491. In your repository root, add an `AGENTS.md` that covers basic setup:511. In your repository root, add an `AGENTS.md` that covers basic setup:

50 52 

51 ```53 ```md

52 # AGENTS.md54 # AGENTS.md

53 55 

54 ## Repository expectations56 ## Repository expectations


56 - Run `npm run lint` before opening a pull request.58 - Run `npm run lint` before opening a pull request.

57 - Document public utilities in `docs/` when you change behavior.59 - Document public utilities in `docs/` when you change behavior.

58 ```60 ```

61 

592. Add overrides in nested directories when specific teams need different rules. For example, inside `services/payments/` create `AGENTS.override.md`:622. Add overrides in nested directories when specific teams need different rules. For example, inside `services/payments/` create `AGENTS.override.md`:

60 63 

61 ```64 ```md

62 # services/payments/AGENTS.override.md65 # services/payments/AGENTS.override.md

63 66 

64 ## Payments service rules67 ## Payments service rules


66 - Use `make test-payments` instead of `npm test`.69 - Use `make test-payments` instead of `npm test`.

67 - Never rotate API keys without notifying the security channel.70 - Never rotate API keys without notifying the security channel.

68 ```71 ```

72 

693. Start Codex from the payments directory:733. Start Codex from the payments directory:

70 74 

71 ```75 ```bash

72 codex --cd services/payments --ask-for-approval never "List the instruction sources you loaded."76 codex --cd services/payments --ask-for-approval never "List the instruction sources you loaded."

73 ```77 ```

74 78 


78 82 

79Here is a sample repository after you add a global file and a payments-specific override:83Here is a sample repository after you add a global file and a payments-specific override:

80 84 

81- AGENTS.md Repository expectations85<FileTree

82- services/86 class="mt-4"

83 87 tree={[

84 - payments/88 {

85 89 name: "AGENTS.md",

86 - AGENTS.md Ignored because an override exists90 comment: "Repository expectations",

87 - AGENTS.override.md Payments service rules91 highlight: true,

88 - README.md92 },

89 - search/93 {

90 94 name: "services/",

91 - AGENTS.md95 open: true,

92 - 96 children: [

97 {

98 name: "payments/",

99 open: true,

100 children: [

101 {

102 name: "AGENTS.md",

103 comment: "Ignored because an override exists",

104 },

105 {

106 name: "AGENTS.override.md",

107 comment: "Payments service rules",

108 highlight: true,

109 },

110 { name: "README.md" },

111 ],

112 },

113 {

114 name: "search/",

115 children: [{ name: "AGENTS.md" }, { name: "…", placeholder: true }],

116 },

117 ],

118 },

119 ]}

120/>

93 121 

94## Customize fallback filenames122## Customize fallback filenames

95 123 


97 125 

981. Edit your Codex configuration:1261. Edit your Codex configuration:

99 127 

100 ```128 ```toml

101 # ~/.codex/config.toml129 # ~/.codex/config.toml

102 project_doc_fallback_filenames = ["TEAM_GUIDE.md", ".agents.md"]130 project_doc_fallback_filenames = ["TEAM_GUIDE.md", ".agents.md"]

103 project_doc_max_bytes = 65536131 project_doc_max_bytes = 65536


108 137 

109With the fallback list in place, Codex treats the alternate files as instructions:138With the fallback list in place, Codex treats the alternate files as instructions:

110 139 

111- TEAM\_GUIDE.md Detected via fallback list140<FileTree

112- .agents.md Fallback file in root141 class="mt-4"

113- support/142 tree={[

114 143 {

115 - AGENTS.override.md Overrides fallback guidance144 name: "TEAM_GUIDE.md",

116 - playbooks/145 comment: "Detected via fallback list",

117 146 highlight: true,

118 - …147 },

148 {

149 name: ".agents.md",

150 comment: "Fallback file in root",

151 },

152 {

153 name: "support/",

154 open: true,

155 children: [

156 {

157 name: "AGENTS.override.md",

158 comment: "Overrides fallback guidance",

159 highlight: true,

160 },

161 {

162 name: "playbooks/",

163 children: [{ name: "…", placeholder: true }],

164 },

165 ],

166 },

167 ]}

168/>

119 169 

120Set the `CODEX_HOME` environment variable when you want a different profile, such as a project-specific automation user:170Set the `CODEX_HOME` environment variable when you want a different profile, such as a project-specific automation user:

121 171 

122```172```bash

123CODEX_HOME=$(pwd)/.codex codex exec "List active instruction sources"173CODEX_HOME=$(pwd)/.codex codex exec "List active instruction sources"

124```174```

125 175 

Details

6 6 

7To start Codex as an MCP server, you can use the following command:7To start Codex as an MCP server, you can use the following command:

8 8 

9```9```bash

10codex mcp-server10codex mcp-server

11```11```

12 12 

13You can launch a Codex MCP server with the [Model Context Protocol Inspector](https://modelcontextprotocol.io/legacy/tools/inspector):13You can launch a Codex MCP server with the [Model Context Protocol Inspector](https://modelcontextprotocol.io/legacy/tools/inspector):

14 14 

15```15```bash

16npx @modelcontextprotocol/inspector codex mcp-server16npx @modelcontextprotocol/inspector codex mcp-server

17```17```

18 18 


21**`codex`**: Run a Codex session. Accepts configuration parameters that match the Codex `Config` struct. The `codex` tool takes these properties:21**`codex`**: Run a Codex session. Accepts configuration parameters that match the Codex `Config` struct. The `codex` tool takes these properties:

22 22 

23| Property | Type | Description |23| Property | Type | Description |

24| --- | --- | --- |24| ----------------------- | --------- | ---------------------------------------------------------------------------------------------------------- |

25| **`prompt`** (required) | `string` | The initial user prompt to start the Codex conversation. |25| **`prompt`** (required) | `string` | The initial user prompt to start the Codex conversation. |

26| `approval-policy` | `string` | Approval policy for shell commands generated by the model: `untrusted`, `on-request`, and `never`. |26| `approval-policy` | `string` | Approval policy for shell commands generated by the model: `untrusted`, `on-request`, and `never`. |

27| `base-instructions` | `string` | The set of instructions to use instead of the default ones. |27| `base-instructions` | `string` | The set of instructions to use instead of the default ones. |

28| `config` | `object` | Individual configuration settings that override whats in `$CODEX_HOME/config.toml`. |28| `config` | `object` | Individual configuration settings that override what's in `$CODEX_HOME/config.toml`. |

29| `cwd` | `string` | Working directory for the session. If relative, resolved against the server processs current directory. |29| `cwd` | `string` | Working directory for the session. If relative, resolved against the server process's current directory. |

30| `include-plan-tool` | `boolean` | Whether to include the plan tool in the conversation. |30| `include-plan-tool` | `boolean` | Whether to include the plan tool in the conversation. |

31| `model` | `string` | Optional override for the model name (for example, `o3`, `o4-mini`). |31| `model` | `string` | Optional override for the model name (for example, `o3`, `o4-mini`). |

32| `profile` | `string` | Configuration profile name; Codex loads `$CODEX_HOME/profile-name.config.toml` to specify default options. |32| `profile` | `string` | Configuration profile name; Codex loads `$CODEX_HOME/profile-name.config.toml` to specify default options. |


35**`codex-reply`**: Continue a Codex session by providing the thread ID and prompt. The `codex-reply` tool takes these properties:35**`codex-reply`**: Continue a Codex session by providing the thread ID and prompt. The `codex-reply` tool takes these properties:

36 36 

37| Property | Type | Description |37| Property | Type | Description |

38| --- | --- | --- |38| ----------------------------- | ------ | --------------------------------------------------------- |

39| **`prompt`** (required) | string | The next user prompt to continue the Codex conversation. |39| **`prompt`** (required) | string | The next user prompt to continue the Codex conversation. |

40| **`threadId`** (required) | string | The ID of the thread to continue. |40| **`threadId`** (required) | string | The ID of the thread to continue. |

41| `conversationId` (deprecated) | string | Deprecated alias for `threadId` (kept for compatibility). |41| `conversationId` (deprecated) | string | Deprecated alias for `threadId` (kept for compatibility). |


44 44 

45Example response payload:45Example response payload:

46 46 

47```47```json

48{48{

49 "structuredContent": {49 "structuredContent": {

50 "threadId": "019bbb20-bff6-7130-83aa-bf45ab33250e",50 "threadId": "019bbb20-bff6-7130-83aa-bf45ab33250e",


80 80 

81Create a working directory for the guide and add your API key to a `.env` file:81Create a working directory for the guide and add your API key to a `.env` file:

82 82 

83```83```bash

84mkdir codex-workflows84mkdir codex-workflows

85cd codex-workflows85cd codex-workflows

86printf "OPENAI_API_KEY=sk-..." > .env86printf "OPENAI_API_KEY=sk-..." > .env


90 90 

91The Agents SDK handles orchestration across Codex, hand-offs, and traces. Install the latest SDK packages:91The Agents SDK handles orchestration across Codex, hand-offs, and traces. Install the latest SDK packages:

92 92 

93```93```bash

94python -m venv .venv94python -m venv .venv

95source .venv/bin/activate95source .venv/bin/activate

96pip install --upgrade openai openai-agents python-dotenv96pip install --upgrade openai openai-agents python-dotenv

97```97```

98 98 

99Activating a virtual environment keeps the SDK dependencies isolated from the99Activating a virtual environment keeps the SDK dependencies isolated from the

100rest of your system.100 rest of your system.

101 101 

102## Initialize Codex CLI as an MCP server102## Initialize Codex CLI as an MCP server

103 103 


105 105 

106Create a file called `codex_mcp.py` and add the following:106Create a file called `codex_mcp.py` and add the following:

107 107 

108```108```python

109import asyncio109import asyncio

110 110 

111from agents import Agent, Runner111from agents import Agent, Runner


130 132 

131Run the script once to verify that Codex launches successfully:133Run the script once to verify that Codex launches successfully:

132 134 

133```135```bash

134python codex_mcp.py136python codex_mcp.py

135```137```

136 138 


145 147 

146Update `codex_mcp.py` with the following code. It keeps the MCP server setup from above and adds both agents.148Update `codex_mcp.py` with the following code. It keeps the MCP server setup from above and adds both agents.

147 149 

148```150```python

149import asyncio151import asyncio

150import os152import os

151 153 


194 198 

195Execute the script:199Execute the script:

196 200 

197```201```bash

198python codex_mcp.py202python codex_mcp.py

199```203```

200 204 

201Codex will read the designers brief, create an `index.html` file, and write the full game to disk. Open the generated file in a browser to play the result. Every run produces a different design with unique play-style twists and polish.205Codex will read the designer's brief, create an `index.html` file, and write the full game to disk. Open the generated file in a browser to play the result. Every run produces a different design with unique play-style twists and polish.

202 206 

203## Expand to a multi-agent workflow207## Expand to a multi-agent workflow

204 208 


209 213 

210Create a new file called `multi_agent_workflow.py`:214Create a new file called `multi_agent_workflow.py`:

211 215 

212```216```python

213import asyncio217import asyncio

214import os218import os

215 219 


389 395 

390Run the script and watch the generated files:396Run the script and watch the generated files:

391 397 

392```398```bash

393python multi_agent_workflow.py399python multi_agent_workflow.py

394ls -R400ls -R

395```401```

hooks.md +69 −69

Details

1# Hooks – Codex1# Hooks

2 2 

3Hooks are an extensibility framework for Codex. They allow3Hooks are an extensibility framework for Codex. They allow

4you to inject your own scripts into the agentic loop, enabling features such as:4you to inject your own scripts into the agentic loop, enabling features such as:

5 5 

6- Send the conversation to a custom logging/analytics engine6- Send the conversation to a custom logging/analytics engine

7- Scan your teams prompts to block accidentally pasting API keys7- Scan your team's prompts to block accidentally pasting API keys

8- Summarize conversations to create persistent memories automatically8- Summarize conversations to create persistent memories automatically

9- Run a custom validation check when a conversation turn stops, enforcing standards9- Run a custom validation check when a conversation turn stops, enforcing standards

10- Customize prompting when in a certain directory10- Customize prompting when in a certain directory


12Hooks are enabled by default. If you need to turn them off in `config.toml`,12Hooks are enabled by default. If you need to turn them off in `config.toml`,

13set:13set:

14 14 

15```15```toml

16[features]16[features]

17hooks = false17hooks = false

18```18```


43 43 

44Installed plugins can also bundle lifecycle config through their plugin44Installed plugins can also bundle lifecycle config through their plugin

45manifest or a default `hooks/hooks.json` file. See [Build45manifest or a default `hooks/hooks.json` file. See [Build

46plugins](https://developers.openai.com/codex/plugins/build#bundled-mcp-servers-and-lifecycle-config) for the46plugins](https://developers.openai.com/codex/plugins/build#bundled-mcp-servers-and-lifecycle-hooks) for the

47plugin packaging rules.47plugin packaging rules.

48 48 

49In practice, the four most useful locations are:49In practice, the four most useful locations are:


54- `<repo>/.codex/config.toml`54- `<repo>/.codex/config.toml`

55 55 

56If more than one hook source exists, Codex loads all matching hooks.56If more than one hook source exists, Codex loads all matching hooks.

57Higher-precedence config layers dont replace lower-precedence hooks.57Higher-precedence config layers don't replace lower-precedence hooks.

58If a single layer contains both `hooks.json` and inline `[hooks]`, Codex58If a single layer contains both `hooks.json` and inline `[hooks]`, Codex

59merges them and warns at startup. Prefer one representation per layer.59merges them and warns at startup. Prefer one representation per layer.

60 60 


70 70 

71Codex lists configured hooks before deciding which ones can run. Before a71Codex lists configured hooks before deciding which ones can run. Before a

72non-managed command hook can run, Codex requires you to review and trust the72non-managed command hook can run, Codex requires you to review and trust the

73exact hook definition. Codex records trust against the hooks current hash, so73exact hook definition. Codex records trust against the hook's current hash, so

74new or changed hooks are marked for review and skipped until trusted.74new or changed hooks are marked for review and skipped until trusted.

75 75 

76Use `/hooks` in the CLI to inspect hook sources, review new or changed hooks,76Use `/hooks` in the CLI to inspect hook sources, review new or changed hooks,


78startup, Codex prints a warning that tells you to open `/hooks`.78startup, Codex prints a warning that tells you to open `/hooks`.

79 79 

80Managed hooks from system, MDM, cloud, or `requirements.toml` sources are marked80Managed hooks from system, MDM, cloud, or `requirements.toml` sources are marked

81as managed, trusted by policy, and cant be disabled from the user hook browser.81as managed, trusted by policy, and can't be disabled from the user hook browser.

82 82 

83For one-off automation that already vets hook sources outside Codex, pass83For one-off automation that already vets hook sources outside Codex, pass

84`--dangerously-bypass-hook-trust` to run enabled hooks without requiring84`--dangerously-bypass-hook-trust` to run enabled hooks without requiring


93- A matcher group that decides when that event matches93- A matcher group that decides when that event matches

94- One or more hook handlers that run when the matcher group matches94- One or more hook handlers that run when the matcher group matches

95 95 

96```96```json

97{97{

98 "hooks": {98 "hooks": {

99 "SessionStart": [99 "SessionStart": [


176- `statusMessage` is optional.176- `statusMessage` is optional.

177- `commandWindows` is an optional Windows-only command override. In TOML, use177- `commandWindows` is an optional Windows-only command override. In TOML, use

178 `command_windows` or `commandWindows`.178 `command_windows` or `commandWindows`.

179- `async` is parsed, but async command hooks arent supported yet. Codex skips179- `async` is parsed, but async command hooks aren't supported yet. Codex skips

180 handlers with `async: true`.180 handlers with `async: true`.

181- Only `type: "command"` handlers run today. `prompt` and `agent` handlers are181- Only `type: "command"` handlers run today. `prompt` and `agent` handlers are

182 parsed but skipped.182 parsed but skipped.


187 187 

188Equivalent inline TOML in `config.toml`:188Equivalent inline TOML in `config.toml`:

189 189 

190```190```toml

191[[hooks.PreToolUse]]191[[hooks.PreToolUse]]

192matcher = "^Bash$"192matcher = "^Bash$"

193 193 


217user, project, session, and plugin hooks while still allowing administrator217user, project, session, and plugin hooks while still allowing administrator

218managed hooks, set `allow_managed_hooks_only = true`.218managed hooks, set `allow_managed_hooks_only = true`.

219 219 

220```220```toml

221allow_managed_hooks_only = true221allow_managed_hooks_only = true

222 222 

223[features]223[features]


242 242 

243- `managed_dir` is used on macOS and Linux.243- `managed_dir` is used on macOS and Linux.

244- `windows_managed_dir` is used on Windows.244- `windows_managed_dir` is used on Windows.

245- Codex doesnt distribute the scripts in `managed_dir`; your enterprise245- Codex doesn't distribute the scripts in `managed_dir`; your enterprise

246 tooling must install and update them separately.246 tooling must install and update them separately.

247- Managed hook commands should use absolute script paths under the configured247- Managed hook commands should use absolute script paths under the configured

248 managed directory.248 managed directory.


261array of `./`-prefixed paths, an inline hooks object, or an array of inline261array of `./`-prefixed paths, an inline hooks object, or an array of inline

262hooks objects.262hooks objects.

263 263 

264```264```json

265{265{

266 "name": "repo-policy",266 "name": "repo-policy",

267 "hooks": "./hooks/hooks.json"267 "hooks": "./hooks/hooks.json"


276 276 

277- `PLUGIN_ROOT` is a Codex-specific extension that points to the installed277- `PLUGIN_ROOT` is a Codex-specific extension that points to the installed

278 plugin root.278 plugin root.

279- `PLUGIN_DATA` is a Codex-specific extension that points to the plugins279- `PLUGIN_DATA` is a Codex-specific extension that points to the plugin's

280 writable data directory.280 writable data directory.

281- Codex also sets `CLAUDE_PLUGIN_ROOT` and `CLAUDE_PLUGIN_DATA` for281- Codex also sets `CLAUDE_PLUGIN_ROOT` and `CLAUDE_PLUGIN_DATA` for

282 compatibility with existing plugin hooks.282 compatibility with existing plugin hooks.

283 283 

284Plugin hooks use the same event schema as other hooks. Installing or enabling a284Plugin hooks use the same event schema as other hooks. Installing or enabling a

285plugin doesnt automatically trust its hooks; Codex skips plugin-bundled hooks285plugin doesn't automatically trust its hooks; Codex skips plugin-bundled hooks

286until you review and trust the current hook definition.286until you review and trust the current hook definition.

287 287 

288## Matcher patterns288## Matcher patterns


294Only some current Codex events honor `matcher`:294Only some current Codex events honor `matcher`:

295 295 

296| Event | What `matcher` filters | Notes |296| Event | What `matcher` filters | Notes |

297| --- | --- | --- |297| ------------------- | ---------------------- | ------------------------------------------------------------ |

298| `PermissionRequest` | tool name | Support includes `Bash`, `apply_patch`\*, and MCP tool names |298| `PermissionRequest` | tool name | Support includes `Bash`, `apply_patch`\*, and MCP tool names |

299| `PostToolUse` | tool name | Support includes `Bash`, `apply_patch`\*, and MCP tool names |299| `PostToolUse` | tool name | Support includes `Bash`, `apply_patch`\*, and MCP tool names |

300| `PostCompact` | compaction trigger | Values are `manual` or `auto` |300| `PostCompact` | compaction trigger | Values are `manual` or `auto` |


325These are the shared fields you will usually use:325These are the shared fields you will usually use:

326 326 

327| Field | Type | Meaning |327| Field | Type | Meaning |

328| --- | --- | --- |328| ----------------- | ---------------- | ------------------------------------------------------------------- |

329| `session_id` | `string` | Current Codex session id. Subagent hooks use the parent session id. |329| `session_id` | `string` | Current Codex session id. Subagent hooks use the parent session id. |

330| `transcript_path` | `string | null` | Path to the session transcript file, if any |330| `transcript_path` | `string \| null` | Path to the session transcript file, if any |

331| `cwd` | `string` | Working directory for the session |331| `cwd` | `string` | Working directory for the session |

332| `hook_event_name` | `string` | Current hook event name |332| `hook_event_name` | `string` | Current hook event name |

333| `model` | `string` | Codex-specific extension. Active model slug |333| `model` | `string` | Codex-specific extension. Active model slug |


350`SessionStart`, `PreCompact`, `PostCompact`, `UserPromptSubmit`,350`SessionStart`, `PreCompact`, `PostCompact`, `UserPromptSubmit`,

351`SubagentStop`, and `Stop` support these shared JSON fields. `SubagentStart`351`SubagentStop`, and `Stop` support these shared JSON fields. `SubagentStart`

352accepts the same shape for `systemMessage` and hook-specific context, but352accepts the same shape for `systemMessage` and hook-specific context, but

353`continue: false` doesnt stop the subagent:353`continue: false` doesn't stop the subagent:

354 354 

355```355```json

356{356{

357 "continue": true,357 "continue": true,

358 "stopReason": "optional",358 "stopReason": "optional",


362```362```

363 363 

364| Field | Effect |364| Field | Effect |

365| --- | --- |365| ---------------- | ----------------------------------------------- |

366| `continue` | If `false`, marks that hook run as stopped |366| `continue` | If `false`, marks that hook run as stopped |

367| `stopReason` | Recorded as the reason for stopping |367| `stopReason` | Recorded as the reason for stopping |

368| `systemMessage` | Surfaced as a warning in the UI or event stream |368| `systemMessage` | Surfaced as a warning in the UI or event stream |


371Exit `0` with no output is treated as success and Codex continues.371Exit `0` with no output is treated as success and Codex continues.

372 372 

373`PreToolUse` and `PermissionRequest` support `systemMessage`, but `continue`,373`PreToolUse` and `PermissionRequest` support `systemMessage`, but `continue`,

374`stopReason`, and `suppressOutput` arent currently supported for those events.374`stopReason`, and `suppressOutput` aren't currently supported for those events.

375If a `PreToolUse` hook returns one of those unsupported fields, Codex marks375If a `PreToolUse` hook returns one of those unsupported fields, Codex marks

376that hook run as failed, reports the error, and continues the tool call.376that hook run as failed, reports the error, and continues the tool call.

377 377 


387Fields in addition to [Common input fields](#common-input-fields):387Fields in addition to [Common input fields](#common-input-fields):

388 388 

389| Field | Type | Meaning |389| Field | Type | Meaning |

390| --- | --- | --- |390| -------- | -------- | ------------------------------------------------------------------- |

391| `source` | `string` | How the session started: `startup`, `resume`, `clear`, or `compact` |391| `source` | `string` | How the session started: `startup`, `resume`, `clear`, or `compact` |

392 392 

393Plain text on `stdout` is added as extra developer context.393Plain text on `stdout` is added as extra developer context.


395JSON on `stdout` supports [Common output fields](#common-output-fields) and this395JSON on `stdout` supports [Common output fields](#common-output-fields) and this

396hook-specific shape:396hook-specific shape:

397 397 

398```398```json

399{399{

400 "hookSpecificOutput": {400 "hookSpecificOutput": {

401 "hookEventName": "SessionStart",401 "hookEventName": "SessionStart",


413Fields in addition to [Common input fields](#common-input-fields):413Fields in addition to [Common input fields](#common-input-fields):

414 414 

415| Field | Type | Meaning |415| Field | Type | Meaning |

416| --- | --- | --- |416| ----------------- | -------- | ---------------------------------------------- |

417| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |417| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

418| `agent_id` | `string` | Identifier for the subagent |418| `agent_id` | `string` | Identifier for the subagent |

419| `agent_type` | `string` | Subagent type or profile |419| `agent_type` | `string` | Subagent type or profile |


423 423 

424JSON on `stdout` supports `systemMessage` and this hook-specific shape:424JSON on `stdout` supports `systemMessage` and this hook-specific shape:

425 425 

426```426```json

427{427{

428 "hookSpecificOutput": {428 "hookSpecificOutput": {

429 "hookEventName": "SubagentStart",429 "hookEventName": "SubagentStart",


433```433```

434 434 

435That `additionalContext` text is added as extra developer context for the435That `additionalContext` text is added as extra developer context for the

436subagent. `continue: false` is parsed for compatibility, but it doesnt stop the436subagent. `continue: false` is parsed for compatibility, but it doesn't stop the

437subagent from starting.437subagent from starting.

438 438 

439### PreToolUse439### PreToolUse

440 440 

441`PreToolUse` can intercept Bash, file edits performed through `apply_patch`,441`PreToolUse` can intercept Bash, file edits performed through `apply_patch`,

442and MCP tool calls. Its still a guardrail rather than a complete enforcement442and MCP tool calls. It's still a guardrail rather than a complete enforcement

443boundary because Codex can often perform equivalent work through another443boundary because Codex can often perform equivalent work through another

444supported tool path.444supported tool path.

445 445 

446This doesnt intercept all shell calls yet, only the simple ones. The newer446This doesn't intercept all shell calls yet, only the simple ones. The newer

447`unified_exec` mechanism allows richer streaming stdin/stdout handling of447 `unified_exec` mechanism allows richer streaming stdin/stdout handling of

448shell, but interception is incomplete. Similarly, this doesnt intercept448 shell, but interception is incomplete. Similarly, this doesn't intercept

449`WebSearch` or other non-shell, non-MCP tool calls.449 `WebSearch` or other non-shell, non-MCP tool calls.

450 450 

451`matcher` is applied to `tool_name` and matcher aliases. For file edits through451`matcher` is applied to `tool_name` and matcher aliases. For file edits through

452`apply_patch`, `matcher` values can use `apply_patch`, `Edit`, or `Write`; hook input452`apply_patch`, `matcher` values can use `apply_patch`, `Edit`, or `Write`; hook input


455Fields in addition to [Common input fields](#common-input-fields):455Fields in addition to [Common input fields](#common-input-fields):

456 456 

457| Field | Type | Meaning |457| Field | Type | Meaning |

458| --- | --- | --- |458| ------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |

459| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |459| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

460| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |460| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |

461| `tool_use_id` | `string` | Tool-call id for this invocation |461| `tool_use_id` | `string` | Tool-call id for this invocation |


466JSON on `stdout` can use `systemMessage`. To deny a supported tool call, return466JSON on `stdout` can use `systemMessage`. To deny a supported tool call, return

467this hook-specific shape:467this hook-specific shape:

468 468 

469```469```json

470{470{

471 "hookSpecificOutput": {471 "hookSpecificOutput": {

472 "hookEventName": "PreToolUse",472 "hookEventName": "PreToolUse",


478 478 

479Codex also accepts this older block shape:479Codex also accepts this older block shape:

480 480 

481```481```json

482{482{

483 "decision": "block",483 "decision": "block",

484 "reason": "Destructive command blocked by hook."484 "reason": "Destructive command blocked by hook."


490To add model-visible context without blocking, return490To add model-visible context without blocking, return

491`hookSpecificOutput.additionalContext`:491`hookSpecificOutput.additionalContext`:

492 492 

493```493```json

494{494{

495 "hookSpecificOutput": {495 "hookSpecificOutput": {

496 "hookEventName": "PreToolUse",496 "hookEventName": "PreToolUse",


502To rewrite a supported tool call without blocking, return502To rewrite a supported tool call without blocking, return

503`permissionDecision: "allow"` with `updatedInput`:503`permissionDecision: "allow"` with `updatedInput`:

504 504 

505```505```json

506{506{

507 "hookSpecificOutput": {507 "hookSpecificOutput": {

508 "hookEventName": "PreToolUse",508 "hookEventName": "PreToolUse",


528`PermissionRequest` runs when Codex is about to ask for approval, such as a528`PermissionRequest` runs when Codex is about to ask for approval, such as a

529shell escalation or managed-network approval. It can allow the request, deny529shell escalation or managed-network approval. It can allow the request, deny

530the request, or decline to decide and let the normal approval prompt continue.530the request, or decline to decide and let the normal approval prompt continue.

531It doesnt run for commands that dont need approval.531It doesn't run for commands that don't need approval.

532 532 

533`matcher` is applied to `tool_name` and matcher aliases. Current canonical533`matcher` is applied to `tool_name` and matcher aliases. Current canonical

534values include `Bash`, `apply_patch`, and MCP tool names such as534values include `Bash`, `apply_patch`, and MCP tool names such as


537Fields in addition to [Common input fields](#common-input-fields):537Fields in addition to [Common input fields](#common-input-fields):

538 538 

539| Field | Type | Meaning |539| Field | Type | Meaning |

540| --- | --- | --- |540| ------------------------ | ---------------- | --------------------------------------------------------------------------------------------------------- |

541| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |541| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

542| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |542| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |

543| `tool_input` | `JSON value` | Tool-specific input. `Bash` and `apply_patch` use `tool_input.command` while MCP tools send all the args. |543| `tool_input` | `JSON value` | Tool-specific input. `Bash` and `apply_patch` use `tool_input.command` while MCP tools send all the args. |

544| `tool_input.description` | `string | null` | Human-readable approval reason, when Codex has one |544| `tool_input.description` | `string \| null` | Human-readable approval reason, when Codex has one |

545 545 

546Plain text on `stdout` is ignored.546Plain text on `stdout` is ignored.

547 547 

548Some tool inputs may include a human-readable description, but dont rely on a548Some tool inputs may include a human-readable description, but don't rely on a

549`tool_input.description` field for every tool.549`tool_input.description` field for every tool.

550 550 

551To approve the request, return:551To approve the request, return:

552 552 

553```553```json

554{554{

555 "hookSpecificOutput": {555 "hookSpecificOutput": {

556 "hookEventName": "PermissionRequest",556 "hookEventName": "PermissionRequest",


563 563 

564To deny the request, return:564To deny the request, return:

565 565 

566```566```json

567{567{

568 "hookSpecificOutput": {568 "hookSpecificOutput": {

569 "hookEventName": "PermissionRequest",569 "hookEventName": "PermissionRequest",


579`allow` lets the request proceed without surfacing the approval prompt. If no579`allow` lets the request proceed without surfacing the approval prompt. If no

580matching hook decides, Codex uses the normal approval flow.580matching hook decides, Codex uses the normal approval flow.

581 581 

582Dont return `updatedInput`, `updatedPermissions`, or `interrupt` for582Don't return `updatedInput`, `updatedPermissions`, or `interrupt` for

583`PermissionRequest`; those fields are reserved for future behavior and fail583`PermissionRequest`; those fields are reserved for future behavior and fail

584closed today.584closed today.

585 585 


587 587 

588`PostToolUse` runs after supported tools produce output, including Bash,588`PostToolUse` runs after supported tools produce output, including Bash,

589`apply_patch`, and MCP tool calls. For Bash, it also runs after commands that589`apply_patch`, and MCP tool calls. For Bash, it also runs after commands that

590exit with a non-zero status. It cant undo side effects from the tool that590exit with a non-zero status. It can't undo side effects from the tool that

591already ran.591already ran.

592 592 

593This doesnt intercept all shell calls yet, only the simple ones. The newer593This doesn't intercept all shell calls yet, only the simple ones. The newer

594`unified_exec` mechanism allows richer streaming stdin/stdout handling of594 `unified_exec` mechanism allows richer streaming stdin/stdout handling of

595shell, but interception is incomplete. Similarly, this doesnt intercept595 shell, but interception is incomplete. Similarly, this doesn't intercept

596`WebSearch` or other non-shell, non-MCP tool calls.596 `WebSearch` or other non-shell, non-MCP tool calls.

597 597 

598`matcher` is applied to `tool_name` and matcher aliases. For file edits through598`matcher` is applied to `tool_name` and matcher aliases. For file edits through

599`apply_patch`, `matcher` values can use `apply_patch`, `Edit`, or `Write`; hook input599`apply_patch`, `matcher` values can use `apply_patch`, `Edit`, or `Write`; hook input


602Fields in addition to [Common input fields](#common-input-fields):602Fields in addition to [Common input fields](#common-input-fields):

603 603 

604| Field | Type | Meaning |604| Field | Type | Meaning |

605| --- | --- | --- |605| --------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |

606| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |606| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

607| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |607| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |

608| `tool_use_id` | `string` | Tool-call id for this invocation |608| `tool_use_id` | `string` | Tool-call id for this invocation |


613 613 

614JSON on `stdout` can use `systemMessage` and this hook-specific shape:614JSON on `stdout` can use `systemMessage` and this hook-specific shape:

615 615 

616```616```json

617{617{

618 "decision": "block",618 "decision": "block",

619 "reason": "The Bash output needs review before continuing.",619 "reason": "The Bash output needs review before continuing.",


626 626 

627That `additionalContext` text is added as extra developer context.627That `additionalContext` text is added as extra developer context.

628 628 

629For this event, `decision: "block"` doesnt undo the completed Bash command.629For this event, `decision: "block"` doesn't undo the completed Bash command.

630Instead, Codex records the feedback, replaces the tool result with that630Instead, Codex records the feedback, replaces the tool result with that

631feedback, and continues the model from the hook-provided message.631feedback, and continues the model from the hook-provided message.

632 632 


648Fields in addition to [Common input fields](#common-input-fields):648Fields in addition to [Common input fields](#common-input-fields):

649 649 

650| Field | Type | Meaning |650| Field | Type | Meaning |

651| --- | --- | --- |651| --------- | -------- | ---------------------------------------------- |

652| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |652| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

653| `trigger` | `string` | What triggered compaction: `manual` or `auto` |653| `trigger` | `string` | What triggered compaction: `manual` or `auto` |

654 654 


666Fields in addition to [Common input fields](#common-input-fields):666Fields in addition to [Common input fields](#common-input-fields):

667 667 

668| Field | Type | Meaning |668| Field | Type | Meaning |

669| --- | --- | --- |669| --------- | -------- | ---------------------------------------------- |

670| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |670| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

671| `trigger` | `string` | What triggered compaction: `manual` or `auto` |671| `trigger` | `string` | What triggered compaction: `manual` or `auto` |

672 672 


678 678 

679### UserPromptSubmit679### UserPromptSubmit

680 680 

681`matcher` isnt currently used for this event.681`matcher` isn't currently used for this event.

682 682 

683Fields in addition to [Common input fields](#common-input-fields):683Fields in addition to [Common input fields](#common-input-fields):

684 684 

685| Field | Type | Meaning |685| Field | Type | Meaning |

686| --- | --- | --- |686| --------- | -------- | ---------------------------------------------- |

687| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |687| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

688| `prompt` | `string` | User prompt thats about to be sent |688| `prompt` | `string` | User prompt that's about to be sent |

689 689 

690Plain text on `stdout` is added as extra developer context.690Plain text on `stdout` is added as extra developer context.

691 691 

692JSON on `stdout` supports [Common output fields](#common-output-fields) and692JSON on `stdout` supports [Common output fields](#common-output-fields) and

693this hook-specific shape:693this hook-specific shape:

694 694 

695```695```json

696{696{

697 "hookSpecificOutput": {697 "hookSpecificOutput": {

698 "hookEventName": "UserPromptSubmit",698 "hookEventName": "UserPromptSubmit",


705 705 

706To block the prompt, return:706To block the prompt, return:

707 707 

708```708```json

709{709{

710 "decision": "block",710 "decision": "block",

711 "reason": "Ask for confirmation before doing that."711 "reason": "Ask for confirmation before doing that."


721Fields in addition to [Common input fields](#common-input-fields):721Fields in addition to [Common input fields](#common-input-fields):

722 722 

723| Field | Type | Meaning |723| Field | Type | Meaning |

724| --- | --- | --- |724| ------------------------ | ---------------- | ----------------------------------------------- |

725| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |725| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

726| `agent_id` | `string` | Identifier for the subagent |726| `agent_id` | `string` | Identifier for the subagent |

727| `agent_type` | `string` | Subagent type or profile |727| `agent_type` | `string` | Subagent type or profile |

728| `agent_transcript_path` | `string | null` | Path to the subagent transcript file, if any |728| `agent_transcript_path` | `string \| null` | Path to the subagent transcript file, if any |

729| `stop_hook_active` | `boolean` | Whether this subagent was already continued |729| `stop_hook_active` | `boolean` | Whether this subagent was already continued |

730| `last_assistant_message` | `string | null` | Latest subagent assistant message, if available |730| `last_assistant_message` | `string \| null` | Latest subagent assistant message, if available |

731 731 

732`SubagentStop` expects JSON on `stdout` when it exits `0`. Plain text output is732`SubagentStop` expects JSON on `stdout` when it exits `0`. Plain text output is

733invalid for this event.733invalid for this event.


735JSON on `stdout` supports [Common output fields](#common-output-fields). To ask735JSON on `stdout` supports [Common output fields](#common-output-fields). To ask

736Codex to continue the subagent flow, return:736Codex to continue the subagent flow, return:

737 737 

738```738```json

739{739{

740 "decision": "block",740 "decision": "block",

741 "reason": "Run one more focused pass inside the subagent."741 "reason": "Run one more focused pass inside the subagent."


750 750 

751### Stop751### Stop

752 752 

753`matcher` isnt currently used for this event.753`matcher` isn't currently used for this event.

754 754 

755Fields in addition to [Common input fields](#common-input-fields):755Fields in addition to [Common input fields](#common-input-fields):

756 756 

757| Field | Type | Meaning |757| Field | Type | Meaning |

758| --- | --- | --- |758| ------------------------ | ---------------- | ------------------------------------------------- |

759| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |759| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

760| `stop_hook_active` | `boolean` | Whether this turn was already continued by `Stop` |760| `stop_hook_active` | `boolean` | Whether this turn was already continued by `Stop` |

761| `last_assistant_message` | `string | null` | Latest assistant message text, if available |761| `last_assistant_message` | `string \| null` | Latest assistant message text, if available |

762 762 

763`Stop` expects JSON on `stdout` when it exits `0`. Plain text output is invalid763`Stop` expects JSON on `stdout` when it exits `0`. Plain text output is invalid

764for this event.764for this event.


766JSON on `stdout` supports [Common output fields](#common-output-fields). To keep766JSON on `stdout` supports [Common output fields](#common-output-fields). To keep

767Codex going, return:767Codex going, return:

768 768 

769```769```json

770{770{

771 "decision": "block",771 "decision": "block",

772 "reason": "Run one more pass over the failing tests."772 "reason": "Run one more pass over the failing tests."


775 775 

776You can also use exit code `2` and write the continuation reason to `stderr`.776You can also use exit code `2` and write the continuation reason to `stderr`.

777 777 

778For this event, `decision: "block"` doesnt reject the turn. Instead, it tells778For this event, `decision: "block"` doesn't reject the turn. Instead, it tells

779Codex to continue and automatically creates a new continuation prompt that acts779Codex to continue and automatically creates a new continuation prompt that acts

780as a new user prompt, using your `reason` as that prompt text.780as a new user prompt, using your `reason` as that prompt text.

781 781 


785## Schemas785## Schemas

786 786 

787The linked `main` branch schemas may include hook fields that are not in the787The linked `main` branch schemas may include hook fields that are not in the

788current release. Use this page as the release behavior reference.788 current release. Use this page as the release behavior reference.

789 789 

790If you need the exact current wire format, see the generated schemas in the790If you need the exact current wire format, see the generated schemas in the

791[Codex GitHub repository](https://github.com/openai/codex/tree/main/codex-rs/hooks/schema/generated).791[Codex GitHub repository](https://github.com/openai/codex/tree/main/codex-rs/hooks/schema/generated).

Details

1# Slash commands Codex IDE1# Codex IDE extension slash commands

2 2 

3Slash commands let you control Codex without leaving the chat input. Use them to check status, switch between local and cloud mode, or send feedback.3Slash commands let you control Codex without leaving the chat input. Use them to check status, switch between local and cloud mode, or send feedback.

4 4 


11## Available slash commands11## Available slash commands

12 12 

13| Slash command | Description |13| Slash command | Description |

14| --- | --- |14| -------------------- | -------------------------------------------------------------------------------------- |

15| `/auto-context` | Turn Auto Context on or off to include recent files and IDE context automatically. |15| `/auto-context` | Turn Auto Context on or off to include recent files and IDE context automatically. |

16| `/cloud` | Switch to cloud mode to run the task remotely (requires cloud access). |16| `/cloud` | Switch to cloud mode to run the task remotely (requires cloud access). |

17| `/cloud-environment` | Choose the cloud environment to use (available only in cloud mode). |17| `/cloud-environment` | Choose the cloud environment to use (available only in cloud mode). |


21| `/review` | Start code review mode to review uncommitted changes or compare against a base branch. |21| `/review` | Start code review mode to review uncommitted changes or compare against a base branch. |

22| `/status` | Show the thread ID, context usage, and rate limits. |22| `/status` | Show the thread ID, context usage, and rate limits. |

23 23 

24If `/goal` doesnt appear in the slash command list, enable `features.goals`24If `/goal` doesn't appear in the slash command list, enable `features.goals`

25in `config.toml`:25in `config.toml`:

26 26 

27```27```toml

28[features]28[features]

29goals = true29goals = true

30```30```

Details

1# Best practices – Codex1# Best practices

2 2 

3If you’re new to Codex or coding agents in general, this guide will help you get better results faster. It covers the core habits that make Codex more effective across the [CLI](https://developers.openai.com/codex/cli), [IDE extension](https://developers.openai.com/codex/ide), and the [Codex app](https://developers.openai.com/codex/app), from prompting and planning to validation, MCP, skills, and automations.3If you’re new to Codex or coding agents in general, this guide will help you get better results faster. It covers the core habits that make Codex more effective across the [CLI](https://developers.openai.com/codex/cli), [IDE extension](https://developers.openai.com/codex/ide), and the [Codex app](https://developers.openai.com/codex/app), from prompting and planning to validation, MCP, skills, and automations.

4 4 


8 8 

9## Strong first use: Context and prompts9## Strong first use: Context and prompts

10 10 

11Codex is already strong enough to be useful even when your prompt isnt perfect. You can often hand it a hard problem with minimal setup and still get a strong result. Clear [prompting](https://developers.openai.com/codex/prompting) isnt required to get value, but it does make results more reliable, especially in larger codebases or higher-stakes tasks.11Codex is already strong enough to be useful even when your prompt isn't perfect. You can often hand it a hard problem with minimal setup and still get a strong result. Clear [prompting](https://developers.openai.com/codex/prompting) isn't required to get value, but it does make results more reliable, especially in larger codebases or higher-stakes tasks.

12 12 

13If you work in a large or complex repository, the biggest unlock is giving Codex the right task context and a clear structure for what you want done.13If you work in a large or complex repository, the biggest unlock is giving Codex the right task context and a clear structure for what you want done.

14 14 


19- **Constraints:** What standards, architecture, safety requirements, or conventions should Codex follow?19- **Constraints:** What standards, architecture, safety requirements, or conventions should Codex follow?

20- **Done when:** What should be true before the task is complete, such as tests passing, behavior changing, or a bug no longer reproducing?20- **Done when:** What should be true before the task is complete, such as tests passing, behavior changing, or a bug no longer reproducing?

21 21 

22This helps Codex stay scoped, make fewer assumptions, and produce work thats easier to review.22This helps Codex stay scoped, make fewer assumptions, and produce work that's easier to review.

23 23 

24Choose a reasoning level based on how hard the task is and test what works best for your workflow. Different users and tasks work best with different settings.24Choose a reasoning level based on how hard the task is and test what works best for your workflow. Different users and tasks work best with different settings.

25 25 


28- Extra High for long, agentic, reasoning-heavy tasks28- Extra High for long, agentic, reasoning-heavy tasks

29 29 

30To provide context faster, try using speech dictation inside the Codex app to30To provide context faster, try using speech dictation inside the Codex app to

31dictate what you want Codex to do rather than typing it.31 dictate what you want Codex to do rather than typing it.

32 32 

33## Plan first for difficult tasks33## Plan first for difficult tasks

34 34 


36 36 

37A few approaches work well:37A few approaches work well:

38 38 

39**Use Plan mode:** For most users, this is the easiest and most effective option. Plan mode lets Codex gather context, ask clarifying questions, and build a stronger plan before implementation. Toggle with `/plan` or `Shift`+`Tab`.39**Use Plan mode:** For most users, this is the easiest and most effective option. Plan mode lets Codex gather context, ask clarifying questions, and build a stronger plan before implementation. Toggle with `/plan` or <kbd>Shift</kbd>+<kbd>Tab</kbd>.

40 40 

41**Ask Codex to interview you:** If you have a rough idea of what you want but arent sure how to describe it well, ask Codex to question you first. Tell it to challenge your assumptions and turn the fuzzy idea into something concrete before writing code.41**Ask Codex to interview you:** If you have a rough idea of what you want but aren't sure how to describe it well, ask Codex to question you first. Tell it to challenge your assumptions and turn the fuzzy idea into something concrete before writing code.

42 42 

43**Use a PLANS.md template:** For more advanced workflows, you can configure Codex to follow a `PLANS.md` or execution-plan template for longer-running or multi-step work. For more detail, see the [execution plans guide](https://developers.openai.com/cookbook/articles/codex_exec_plans).43**Use a PLANS.md template:** For more advanced workflows, you can configure Codex to follow a `PLANS.md` or execution-plan template for longer-running or multi-step work. For more detail, see the [execution plans guide](https://developers.openai.com/cookbook/articles/codex_exec_plans).

44 44 

45## Make guidance reusable with `AGENTS.md`45## Make guidance reusable with `AGENTS.md`

46 46 

47Once a prompting pattern works, the next step is to stop repeating it manually. Thats where [AGENTS.md](https://developers.openai.com/codex/guides/agents-md) comes in.47Once a prompting pattern works, the next step is to stop repeating it manually. That's where [AGENTS.md](https://developers.openai.com/codex/guides/agents-md) comes in.

48 48 

49Think of `AGENTS.md` as an open-format README for agents. It loads into context automatically and is the best place to encode how you and your team want Codex to work in a repository.49Think of `AGENTS.md` as an open-format README for agents. It loads into context automatically and is the best place to encode how you and your team want Codex to work in a repository.

50 50 


57- Constraints and do-not rules57- Constraints and do-not rules

58- What done means and how to verify work58- What done means and how to verify work

59 59 

60The `/init` slash command in the CLI is the quick-start command to scaffold a starter `AGENTS.md` in the current directory. Its a great starting point, but you should edit the result to match how your team actually builds, tests, reviews, and ships code.60The `/init` slash command in the CLI is the quick-start command to scaffold a starter `AGENTS.md` in the current directory. It's a great starting point, but you should edit the result to match how your team actually builds, tests, reviews, and ships code.

61 61 

62You can create `AGENTS.md` files at different levels: a global `AGENTS.md` for personal defaults that sits in `~/.codex`, a repo-level file for shared standards, and more specific files in subdirectories for local rules. If there’s a more specific file closer to your current directory, that guidance wins.62You can create `AGENTS.md` files at different levels: a global `AGENTS.md` for personal defaults that sits in `~/.codex`, a repo-level file for shared standards, and more specific files in subdirectories for local rules. If there’s a more specific file closer to your current directory, that guidance wins.

63 63 


66If `AGENTS.md` starts getting too large, keep the main file concise and reference task-specific markdown files for things like planning, code review, or architecture.66If `AGENTS.md` starts getting too large, keep the main file concise and reference task-specific markdown files for things like planning, code review, or architecture.

67 67 

68When Codex makes the same mistake twice, ask it for a retrospective and update68When Codex makes the same mistake twice, ask it for a retrospective and update

69`AGENTS.md`. Guidance stays practical and based on real friction.69 `AGENTS.md`. Guidance stays practical and based on real friction.

70 70 

71## Configure Codex for consistency71## Configure Codex for consistency

72 72 


82 82 

83Codex ships with operating level sandboxing and has two key knobs that you can control. Approval mode determines when Codex asks for your permission to run a command and sandbox mode determines if Codex can read or write in the directory and what files the agent can access.83Codex ships with operating level sandboxing and has two key knobs that you can control. Approval mode determines when Codex asks for your permission to run a command and sandbox mode determines if Codex can read or write in the directory and what files the agent can access.

84 84 

85If youre new to coding agents, start with the default permissions. Keep approval and sandboxing tight by default, then loosen permissions only for trusted repos or specific workflows once the need is clear.85If you're new to coding agents, start with the default permissions. Keep approval and sandboxing tight by default, then loosen permissions only for trusted repos or specific workflows once the need is clear.

86 86 

87Note that the CLI, IDE, and Codex app all share the same configuration layers. Learn more on the [sample configuration](https://developers.openai.com/codex/config-sample) page.87Note that the CLI, IDE, and Codex app all share the same configuration layers. Learn more on the [sample configuration](https://developers.openai.com/codex/config-sample) page.

88 88 

89Configure Codex for your real environment early. Many quality issues are89Configure Codex for your real environment early. Many quality issues are

90really setup issues, like the wrong working directory, missing write access,90 really setup issues, like the wrong working directory, missing write access,

91wrong model defaults, or missing tools and connectors.91 wrong model defaults, or missing tools and connectors.

92 92 

93## Improve reliability with testing and review93## Improve reliability with testing and review

94 94 

95Dont stop at asking Codex to make a change. Ask it to create tests when needed, run the relevant checks, confirm the result, and review the work before you accept it.95Don't stop at asking Codex to make a change. Ask it to create tests when needed, run the relevant checks, confirm the result, and review the work before you accept it.

96 96 

97Codex can do this loop for you, but only if it knows what “good” looks like. That guidance can come from either the prompt or `AGENTS.md`.97Codex can do this loop for you, but only if it knows what “good” looks like. That guidance can come from either the prompt or `AGENTS.md`.

98 98 


105- Reviewing the diff for bugs, regressions, or risky patterns105- Reviewing the diff for bugs, regressions, or risky patterns

106 106 

107Toggle the diff panel in the Codex app to directly [review107Toggle the diff panel in the Codex app to directly [review

108changes](https://developers.openai.com/codex/app/review) locally. Click on a specific row to provide108 changes](https://developers.openai.com/codex/app/review) locally. Click on a specific row to provide

109feedback that gets fed as context to the next Codex turn.109 feedback that gets fed as context to the next Codex turn.

110 110 

111A useful option here is the slash command `/review`, which gives you a few ways to review code:111A useful option here is the slash command `/review`, which gives you a few ways to review code:

112 112 


117 117 

118If you and your team have a `code_review.md` file and reference it from `AGENTS.md`, Codex can follow that guidance during review as well. This is a strong pattern for teams that want review behavior to stay consistent across repositories and contributors.118If you and your team have a `code_review.md` file and reference it from `AGENTS.md`, Codex can follow that guidance during review as well. This is a strong pattern for teams that want review behavior to stay consistent across repositories and contributors.

119 119 

120Codex shouldnt just generate code. With the right instructions, it can also help **test it, check it, and review it**.120Codex shouldn't just generate code. With the right instructions, it can also help **test it, check it, and review it**.

121 121 

122If you use GitHub Cloud, you can set up Codex to run [code reviews for your PRs](https://developers.openai.com/codex/integrations/github). At OpenAI, Codex reviews 100% of PRs. You can enable automatic reviews or have Codex reactively review when you @Codex.122If you use GitHub Cloud, you can set up Codex to run [code reviews for your PRs](https://developers.openai.com/codex/integrations/github). At OpenAI, Codex reviews 100% of PRs. You can enable automatic reviews or have Codex reactively review when you @Codex.

123 123 

124## Use MCPs for external context124## Use MCPs for external context

125 125 

126Use MCPs when the context Codex needs lives outside the repo. It lets Codex connect to the tools and systems you already use, so you dont have to keep copying and pasting live information into prompts.126Use MCPs when the context Codex needs lives outside the repo. It lets Codex connect to the tools and systems you already use, so you don't have to keep copying and pasting live information into prompts.

127 127 

128[Model Context Protocol](https://developers.openai.com/codex/mcp), or MCP, is an open standard for connecting Codex to external tools and systems.128[Model Context Protocol](https://developers.openai.com/codex/mcp), or MCP, is an open standard for connecting Codex to external tools and systems.

129 129 


139In the Codex App, head to Settings → MCP servers to see custom and recommended servers. Often, Codex can help you install the needed servers. All you need to do is ask. You can also use the `codex mcp add` command in the CLI to add your custom servers with a name, URL, and other details.139In the Codex App, head to Settings → MCP servers to see custom and recommended servers. Often, Codex can help you install the needed servers. All you need to do is ask. You can also use the `codex mcp add` command in the CLI to add your custom servers with a name, URL, and other details.

140 140 

141Add tools only when they unlock a real workflow. Do not start by wiring in141Add tools only when they unlock a real workflow. Do not start by wiring in

142every tool you use. Start with one or two tools that clearly remove a manual142 every tool you use. Start with one or two tools that clearly remove a manual

143loop you already do often, then expand from there.143 loop you already do often, then expand from there.

144 144 

145## Turn repeatable work into skills145## Turn repeatable work into skills

146 146 


148 148 

149Keep each skill scoped to one job. Start with 2 to 3 concrete use cases, define clear inputs and outputs, and write the description so it says what the skill does and when to use it. Include the kinds of trigger phrases a user would actually say.149Keep each skill scoped to one job. Start with 2 to 3 concrete use cases, define clear inputs and outputs, and write the description so it says what the skill does and when to use it. Include the kinds of trigger phrases a user would actually say.

150 150 

151Dont try to cover every edge case up front. Start with one representative task, get it working well, then turn that workflow into a skill and improve from there. Include scripts or extra assets only when they improve reliability.151Don't try to cover every edge case up front. Start with one representative task, get it working well, then turn that workflow into a skill and improve from there. Include scripts or extra assets only when they improve reliability.

152 152 

153A good rule of thumb: if you keep reusing the same prompt or correcting the same workflow, it should probably become a skill.153A good rule of thumb: if you keep reusing the same prompt or correcting the same workflow, it should probably become a skill.

154 154 


161- Telemetry or incident summaries161- Telemetry or incident summaries

162- Standard debugging flows162- Standard debugging flows

163 163 

164The `$skill-creator` skill is the best place to start to scaffold the first version of a skill. Keep the first version local while you iterate. When its ready to share broadly, package it as a [plugin](https://developers.openai.com/codex/plugins/build). One of the most important parts of a skill is the description. It should say what the skill does and when to use it.164The `$skill-creator` skill is the best place to start to scaffold the first version of a skill. Keep the first version local while you iterate. When it's ready to share broadly, package it as a [plugin](https://developers.openai.com/codex/plugins/build). One of the most important parts of a skill is the description. It should say what the skill does and when to use it.

165 165 

166Personal skills are stored in `$HOME/.agents/skills`, and shared team skills166Personal skills are stored in `$HOME/.agents/skills`, and shared team skills

167can be checked into `.agents/skills` inside a repository. This is especially167 can be checked into `.agents/skills` inside a repository. This is especially

168helpful for onboarding new teammates.168 helpful for onboarding new teammates.

169 169 

170## Use automations for repeated work170## Use automations for repeated work

171 171 


182- Producing standup summaries182- Producing standup summaries

183- Running repeatable analysis workflows on a schedule183- Running repeatable analysis workflows on a schedule

184 184 

185A useful rule is that skills define the method, automations define the schedule. If a workflow still needs a lot of steering, turn it into a skill first. Once its predictable, automation becomes a force multiplier.185A useful rule is that skills define the method, automations define the schedule. If a workflow still needs a lot of steering, turn it into a skill first. Once it's predictable, automation becomes a force multiplier.

186 186 

187Use automations for reflection and maintenance, not just execution. Review187Use automations for reflection and maintenance, not just execution. Review

188recent sessions, summarize repeated friction, and improve prompts,188 recent sessions, summarize repeated friction, and improve prompts,

189instructions, or workflow setup over time.189 instructions, or workflow setup over time.

190 190 

191## Organize long-running work with session controls191## Organize long-running work with session controls

192 192 

193Codex sessions arent just chat history. Theyre working threads that accumulate context, decisions, and actions over time, so managing them well has a big impact on quality.193Codex sessions aren't just chat history. They're working threads that accumulate context, decisions, and actions over time, so managing them well has a big impact on quality.

194 194 

195The Codex app UI makes thread management easiest because you can pin threads and create worktrees. If you are using the CLI, these [slash commands](https://developers.openai.com/codex/cli/slash-commands) are especially useful:195The Codex app UI makes thread management easiest because you can pin threads and create worktrees. If you are using the CLI, these [slash commands](https://developers.openai.com/codex/cli/slash-commands) are especially useful:

196 196 


206Keep one thread per coherent unit of work. If the work is still part of the same problem, staying in the same thread is often better because it preserves the reasoning trail. Fork only when the work truly branches.206Keep one thread per coherent unit of work. If the work is still part of the same problem, staying in the same thread is often better because it preserves the reasoning trail. Fork only when the work truly branches.

207 207 

208Use Codex’s [subagent](https://developers.openai.com/codex/concepts/subagents) workflows to offload bounded208Use Codex’s [subagent](https://developers.openai.com/codex/concepts/subagents) workflows to offload bounded

209work from the main thread. Keep the main agent focused on the core problem,209 work from the main thread. Keep the main agent focused on the core problem,

210and use subagents for tasks like exploration, tests, or triage.210 and use subagents for tasks like exploration, tests, or triage.

211 211 

212## Common mistakes212## Common mistakes

213 213 


218- Skipping planning on multi-step and complex tasks218- Skipping planning on multi-step and complex tasks

219- Giving Codex full permission to your computer before you understand the workflow219- Giving Codex full permission to your computer before you understand the workflow

220- Running live threads on the same files without using git worktrees220- Running live threads on the same files without using git worktrees

221- Turning a recurring task into an automation before its reliable manually221- Turning a recurring task into an automation before it's reliable manually

222- Treating Codex like something you have to watch step by step instead of using it in parallel with your own work222- Treating Codex like something you have to watch step by step instead of using it in parallel with your own work

223- Using one thread per project instead of one thread per task. This leads to bloated context and worse results over time223- Using one thread per project instead of one thread per task. This leads to bloated context and worse results over time

224 

mcp.md +14 −14

Details

1# Model Context Protocol – Codex1# Model Context Protocol

2 2 

3Model Context Protocol (MCP) connects models to tools and context. Use it to give Codex access to third-party documentation, or to let it interact with developer tools like your browser or Figma.3Model Context Protocol (MCP) connects models to tools and context. Use it to give Codex access to third-party documentation, or to let it interact with developer tools like your browser or Figma.

4 4 


11- **Streamable HTTP servers**: Servers that you access at an address.11- **Streamable HTTP servers**: Servers that you access at an address.

12 - Bearer token authentication12 - Bearer token authentication

13 - OAuth authentication (run `codex mcp login <server-name>` for servers that support OAuth)13 - OAuth authentication (run `codex mcp login <server-name>` for servers that support OAuth)

14- **Server instructions**: Codex reads the MCP `instructions` field returned during initialization and uses it as server-wide guidance alongside the servers tools.14- **Server instructions**: Codex reads the MCP `instructions` field returned during initialization and uses it as server-wide guidance alongside the server's tools.

15 15 

16If you build or maintain an MCP server for Codex, use `instructions` for cross-tool workflows, constraints, and rate limits that apply across the server. Keep the first 512 characters self-contained so the most important guidance is available when Codex is deciding how to use the server.16If you build or maintain an MCP server for Codex, use `instructions` for cross-tool workflows, constraints, and rate limits that apply across the server. Keep the first 512 characters self-contained so the most important guidance is available when Codex is deciding how to use the server.

17 17 


30 30 

31#### Add an MCP server31#### Add an MCP server

32 32 

33```33```bash

34codex mcp add <server-name> --env VAR1=VALUE1 --env VAR2=VALUE2 -- <stdio server-command>34codex mcp add <server-name> --env VAR1=VALUE1 --env VAR2=VALUE2 -- <stdio server-command>

35```35```

36 36 

37For example, to add Context7 (a free MCP server for developer documentation), you can run the following command:37For example, to add Context7 (a free MCP server for developer documentation), you can run the following command:

38 38 

39```39```bash

40codex mcp add context7 -- npx -y @upstash/context7-mcp40codex mcp add context7 -- npx -y @upstash/context7-mcp

41```41```

42 42 


66 66 

67`env_vars` can contain plain variable names or objects with a source:67`env_vars` can contain plain variable names or objects with a source:

68 68 

69```69```toml

70env_vars = ["LOCAL_TOKEN", { name = "REMOTE_TOKEN", source = "remote" }]70env_vars = ["LOCAL_TOKEN", { name = "REMOTE_TOKEN", source = "remote" }]

71```71```

72 72 

73String entries and `source = "local"` read from Codexs local environment.73String entries and `source = "local"` read from Codex's local environment.

74`source = "remote"` reads from the remote executor environment and requires74`source = "remote"` reads from the remote executor environment and requires

75remote MCP stdio.75remote MCP stdio.

76 76 


86- `startup_timeout_sec` (optional): Timeout (seconds) for the server to start. Default: `10`.86- `startup_timeout_sec` (optional): Timeout (seconds) for the server to start. Default: `10`.

87- `tool_timeout_sec` (optional): Timeout (seconds) for the server to run a tool. Default: `60`.87- `tool_timeout_sec` (optional): Timeout (seconds) for the server to run a tool. Default: `60`.

88- `enabled` (optional): Set `false` to disable a server without deleting it.88- `enabled` (optional): Set `false` to disable a server without deleting it.

89- `required` (optional): Set `true` to make startup fail if this enabled server cant initialize.89- `required` (optional): Set `true` to make startup fail if this enabled server can't initialize.

90- `enabled_tools` (optional): Tool allow list.90- `enabled_tools` (optional): Tool allow list.

91- `disabled_tools` (optional): Tool deny list (applied after `enabled_tools`).91- `disabled_tools` (optional): Tool deny list (applied after `enabled_tools`).

92- `default_tools_approval_mode` (optional): Default approval behavior for92- `default_tools_approval_mode` (optional): Default approval behavior for


104 104 

105#### config.toml examples105#### config.toml examples

106 106 

107```107```toml

108[mcp_servers.context7]108[mcp_servers.context7]

109command = "npx"109command = "npx"

110args = ["-y", "@upstash/context7-mcp"]110args = ["-y", "@upstash/context7-mcp"]


114MY_ENV_VAR = "MY_ENV_VALUE"114MY_ENV_VAR = "MY_ENV_VALUE"

115```115```

116 116 

117```117```toml

118# Optional MCP OAuth callback overrides (used by `codex mcp login`)118# Optional MCP OAuth callback overrides (used by `codex mcp login`)

119mcp_oauth_callback_port = 5555119mcp_oauth_callback_port = 5555

120mcp_oauth_callback_url = "https://devbox.example.internal/callback"120mcp_oauth_callback_url = "https://devbox.example.internal/callback"

121```121```

122 122 

123```123```toml

124[mcp_servers.figma]124[mcp_servers.figma]

125url = "https://mcp.figma.com/mcp"125url = "https://mcp.figma.com/mcp"

126bearer_token_env_var = "FIGMA_OAUTH_TOKEN"126bearer_token_env_var = "FIGMA_OAUTH_TOKEN"

127http_headers = { "X-Figma-Region" = "us-east-1" }127http_headers = { "X-Figma-Region" = "us-east-1" }

128```128```

129 129 

130```130```toml

131[mcp_servers.chrome_devtools]131[mcp_servers.chrome_devtools]

132url = "http://localhost:3000/mcp"132url = "http://localhost:3000/mcp"

133enabled_tools = ["open", "screenshot"]133enabled_tools = ["open", "screenshot"]


144### Plugin-provided MCP servers144### Plugin-provided MCP servers

145 145 

146Installed plugins can bundle MCP servers in their plugin manifest. Those146Installed plugins can bundle MCP servers in their plugin manifest. Those

147servers are launched from the plugin, so user config doesnt set their147servers are launched from the plugin, so user config doesn't set their

148transport command. User config can still control on/off state and tool policy148transport command. User config can still control on/off state and tool policy

149under `plugins.<plugin>.mcp_servers.<server>`.149under `plugins.<plugin>.mcp_servers.<server>`.

150 150 

151```151```toml

152[plugins."sample@test".mcp_servers.sample]152[plugins."sample@test".mcp_servers.sample]

153enabled = true153enabled = true

154default_tools_approval_mode = "prompt"154default_tools_approval_mode = "prompt"


162 162 

163The list of MCP servers keeps growing. Here are a few common ones:163The list of MCP servers keeps growing. Here are a few common ones:

164 164 

165- [OpenAI Docs MCP](/learn/docs-mcp): Search and read OpenAI developer docs.165- [OpenAI Docs MCP](https://developers.openai.com/learn/docs-mcp): Search and read OpenAI developer docs.

166- [Context7](https://github.com/upstash/context7): Connect to up-to-date developer documentation.166- [Context7](https://github.com/upstash/context7): Connect to up-to-date developer documentation.

167- Figma [Local](https://developers.figma.com/docs/figma-mcp-server/local-server-installation/) and [Remote](https://developers.figma.com/docs/figma-mcp-server/remote-server-installation/): Access your Figma designs.167- Figma [Local](https://developers.figma.com/docs/figma-mcp-server/local-server-installation/) and [Remote](https://developers.figma.com/docs/figma-mcp-server/remote-server-installation/): Access your Figma designs.

168- [Playwright](https://www.npmjs.com/package/@playwright/mcp): Control and inspect a browser using Playwright.168- [Playwright](https://www.npmjs.com/package/@playwright/mcp): Control and inspect a browser using Playwright.

models.md +176 −113

Details

1# Models – Codex1# Codex Models

2 2 

3## Recommended models3## Recommended models

4 4 

5![gpt-5.5](/images/api/models/gpt-5.5.jpg)5<div class="not-prose grid gap-6 md:grid-cols-2 xl:grid-cols-3">

6 6 <ModelDetails

7gpt-5.57 client:load

8 8 name="gpt-5.5"

9OpenAI's newest frontier model for complex coding, computer use, knowledge work, and research workflows in Codex.9 slug="gpt-5.5"

10 10 wallpaperUrl="/images/api/models/gpt-5.5.jpg"

11codex -m gpt-5.511 description="OpenAI's newest frontier model for complex coding, computer use, knowledge work, and research workflows in Codex."

12 12 data={{

13Copy command13 features: [

14 14 {

15Capability15 title: "Capability",

16 16 value: "",

17Speed17 icons: [

18 18 "openai.SparklesFilled",

19Codex CLI & SDK19 "openai.SparklesFilled",

20 20 "openai.SparklesFilled",

21Codex app & IDE extension21 "openai.SparklesFilled",

22 22 "openai.SparklesFilled",

23Codex Cloud23 ],

24 24 },

25ChatGPT Credits25 {

26 26 title: "Speed",

27API Access27 value: "",

28 28 icons: ["openai.Flash", "openai.Flash", "openai.Flash"],

29![gpt-5.4](/images/api/models/gpt-5.4.jpg)29 },

30 30 {

31gpt-5.431 title: "Codex CLI & SDK",

32 32 value: true,

33Flagship frontier model for professional work with strong coding, reasoning, tool use, and agentic workflow capabilities.33 },

34 34 { title: "Codex app & IDE extension", value: true },

35codex -m gpt-5.435 {

36 36 title: "Codex Cloud",

37Copy command37 value: false,

38 38 },

39Capability39 { title: "ChatGPT Credits", value: true },

40 40 { title: "API Access", value: true },

41Speed41 ],

42 42 }}

43Codex CLI & SDK43 />

44 44 

45Codex app & IDE extension45<ModelDetails

46 46 client:load

47Codex Cloud47 name="gpt-5.4"

48 48 slug="gpt-5.4"

49ChatGPT Credits49 wallpaperUrl="/images/api/models/gpt-5.4.jpg"

50 50 description="Flagship frontier model for professional work with strong coding, reasoning, tool use, and agentic workflow capabilities."

51API Access51 data={{

52 52 features: [

53![gpt-5.4-mini](/images/api/models/gpt-5-mini.jpg)53 {

54 54 title: "Capability",

55gpt-5.4-mini55 value: "",

56 56 icons: [

57Fast, efficient mini model for responsive coding tasks and subagents.57 "openai.SparklesFilled",

58 58 "openai.SparklesFilled",

59codex -m gpt-5.4-mini59 "openai.SparklesFilled",

60 60 "openai.SparklesFilled",

61Copy command61 "openai.SparklesFilled",

62 62 ],

63Capability63 },

64 64 {

65Speed65 title: "Speed",

66 66 value: "",

67Codex CLI & SDK67 icons: ["openai.Flash", "openai.Flash", "openai.Flash"],

68 68 },

69Codex app & IDE extension69 {

70 70 title: "Codex CLI & SDK",

71Codex Cloud71 value: true,

72 72 },

73ChatGPT Credits73 { title: "Codex app & IDE extension", value: true },

74 74 {

75API Access75 title: "Codex Cloud",

76 76 value: false,

77![gpt-5.3-codex-spark](/images/codex/codex-wallpaper-2.webp)77 },

78 78 { title: "ChatGPT Credits", value: true },

79gpt-5.3-codex-spark79 { title: "API Access", value: true },

80 80 ],

81Text-only research preview model optimized for near-instant, real-time coding iteration. Available to ChatGPT Pro users.81 }}

82 82/>

83codex -m gpt-5.3-codex-spark83 

84 84<ModelDetails

85Copy command85 client:load

86 86 name="gpt-5.4-mini"

87Capability87 slug="gpt-5.4-mini"

88 88 wallpaperUrl="/images/api/models/gpt-5-mini.jpg"

89Speed89 description="Fast, efficient mini model for responsive coding tasks and subagents."

90 90 data={{

91Codex CLI & SDK91 features: [

92 92 {

93Codex app & IDE extension93 title: "Capability",

94 94 value: "",

95Codex Cloud95 icons: [

96 96 "openai.SparklesFilled",

97ChatGPT Credits97 "openai.SparklesFilled",

98 98 "openai.SparklesFilled",

99API Access99 ],

100 },

101 {

102 title: "Speed",

103 value: "",

104 icons: ["openai.Flash", "openai.Flash", "openai.Flash", "openai.Flash"],

105 },

106 {

107 title: "Codex CLI & SDK",

108 value: true,

109 },

110 { title: "Codex app & IDE extension", value: true },

111 {

112 title: "Codex Cloud",

113 value: false,

114 },

115 { title: "ChatGPT Credits", value: true },

116 { title: "API Access", value: true },

117 ],

118 }}

119/>

120 

121<ModelDetails

122 client:load

123 name="gpt-5.3-codex-spark"

124 slug="gpt-5.3-codex-spark"

125 wallpaperUrl="/images/codex/codex-wallpaper-2.webp"

126 description="Text-only research preview model optimized for near-instant, real-time coding iteration. Available to ChatGPT Pro users."

127 data={{

128 features: [

129 {

130 title: "Capability",

131 value: "",

132 icons: [

133 "openai.SparklesFilled",

134 "openai.SparklesFilled",

135 "openai.SparklesFilled",

136 ],

137 },

138 {

139 title: "Speed",

140 value: "",

141 icons: [

142 "openai.Flash",

143 "openai.Flash",

144 "openai.Flash",

145 "openai.Flash",

146 "openai.Flash",

147 ],

148 },

149 {

150 title: "Codex CLI & SDK",

151 value: true,

152 },

153 { title: "Codex app & IDE extension", value: true },

154 {

155 title: "Codex Cloud",

156 value: false,

157 },

158 { title: "ChatGPT Credits", value: false },

159 { title: "API Access", value: false },

160 ],

161 }}

162/>

163 

164</div>

100 165 

101For most tasks in Codex, start with 166For most tasks in Codex, start with

102`gpt-5.5`. It is167 `gpt-5.5`. It is

103strongest for complex coding, computer use, knowledge work, and research168 strongest for complex coding, computer use, knowledge work, and research

104workflows. GPT-5.5 is currently available in Codex when you sign in with169 workflows. GPT-5.5 is currently available in Codex when you sign in with

105ChatGPT or API-key authentication. Use170 ChatGPT or API-key authentication. Use

106 171 `gpt-5.4-mini`

107`gpt-5.4-mini`172 when you want a faster, lower-cost option for lighter coding tasks or

108 173 subagents. The `gpt-5.3-codex-spark` model is available in research preview

109when you want a faster, lower-cost option for lighter coding tasks or174 for ChatGPT Pro subscribers and is optimized for near-instant, real-time

110subagents. The `gpt-5.3-codex-spark` model is available in research preview175 coding iteration.

111for ChatGPT Pro subscribers and is optimized for near-instant, real-time

112coding iteration.

113 176 

114## Other models177## Other models

115 178 


118You can also point Codex at any model and provider that supports either the [Chat Completions](https://platform.openai.com/docs/api-reference/chat) or [Responses APIs](https://platform.openai.com/docs/api-reference/responses) to fit your specific use case.181You can also point Codex at any model and provider that supports either the [Chat Completions](https://platform.openai.com/docs/api-reference/chat) or [Responses APIs](https://platform.openai.com/docs/api-reference/responses) to fit your specific use case.

119 182 

120Support for the Chat Completions API is deprecated and will be removed in183Support for the Chat Completions API is deprecated and will be removed in

121future releases of Codex.184 future releases of Codex.

122 185 

123## Deprecated Codex models186## Deprecated Codex models

124 187 


130 193 

131### Configure your default local model194### Configure your default local model

132 195 

133The Codex CLI and IDE extension use the same `config.toml` [configuration file](https://developers.openai.com/codex/config-basic). To specify a model, add a `model` entry to your configuration file. If you dont specify a model, the Codex app, CLI, or IDE Extension defaults to a recommended model.196The Codex CLI and IDE extension use the same `config.toml` [configuration file](https://developers.openai.com/codex/config-basic). To specify a model, add a `model` entry to your configuration file. If you don't specify a model, the Codex app, CLI, or IDE Extension defaults to a recommended model.

134 197 

135```198```toml

136model = "gpt-5.5"199model = "gpt-5.5"

137```200```

138 201 


142 206 

143To start a new Codex CLI thread with a specific model or to specify the model for `codex exec` you can use the `--model`/`-m` flag:207To start a new Codex CLI thread with a specific model or to specify the model for `codex exec` you can use the `--model`/`-m` flag:

144 208 

145```209```bash

146codex -m gpt-5.5210codex -m gpt-5.5

147```211```

148 212 

149### Choosing your model for cloud tasks

150 213 

151Currently, you can’t change the default model for Codex cloud tasks.214### Choosing your model for cloud tasks

152 215 

216Currently, you can't change the default model for Codex cloud tasks.

noninteractive.md +34 −32

Details

1# Non-interactive mode – Codex1# Non-interactive mode

2 2 

3Non-interactive mode lets you run Codex from scripts (for example, continuous integration (CI) jobs) without opening the interactive TUI.3Non-interactive mode lets you run Codex from scripts (for example, continuous integration (CI) jobs) without opening the interactive TUI.

4You invoke it with `codex exec`.4You invoke it with `codex exec`.


18 18 

19Pass a task prompt as a single argument:19Pass a task prompt as a single argument:

20 20 

21```21```bash

22codex exec "summarize the repository structure and list the top 5 risky areas"22codex exec "summarize the repository structure and list the top 5 risky areas"

23```23```

24 24 

25While `codex exec` runs, Codex streams progress to `stderr` and prints only the final agent message to `stdout`. This makes it straightforward to redirect or pipe the final result:25While `codex exec` runs, Codex streams progress to `stderr` and prints only the final agent message to `stdout`. This makes it straightforward to redirect or pipe the final result:

26 26 

27```27```bash

28codex exec "generate release notes for the last 10 commits" | tee release-notes.md28codex exec "generate release notes for the last 10 commits" | tee release-notes.md

29```29```

30 30 

31Use `--ephemeral` when you dont want to persist session rollout files to disk:31Use `--ephemeral` when you don't want to persist session rollout files to disk:

32 32 

33```33```bash

34codex exec --ephemeral "triage this repository and suggest next steps"34codex exec --ephemeral "triage this repository and suggest next steps"

35```35```

36 36 


38 38 

39This makes it easy to generate input with one command and hand it directly to Codex:39This makes it easy to generate input with one command and hand it directly to Codex:

40 40 

41```41```bash

42curl -s https://jsonplaceholder.typicode.com/comments \42curl -s https://jsonplaceholder.typicode.com/comments \

43 | codex exec "format the top 20 items into a markdown table" \43 | codex exec "format the top 20 items into a markdown table" \

44 > table.md44 > table.md


57 57 

58Codex keeps `codex exec --full-auto` as a deprecated compatibility flag and prints a warning. Prefer the explicit `--sandbox workspace-write` flag in new scripts.58Codex keeps `codex exec --full-auto` as a deprecated compatibility flag and prints a warning. Prefer the explicit `--sandbox workspace-write` flag in new scripts.

59 59 

60Use `--ignore-user-config` when you need a run that doesnt load `$CODEX_HOME/config.toml`, and `--ignore-rules` when you need to skip user and project execpolicy `.rules` files for a controlled automation environment.60Use `--ignore-user-config` when you need a run that doesn't load `$CODEX_HOME/config.toml`, and `--ignore-rules` when you need to skip user and project execpolicy `.rules` files for a controlled automation environment.

61 61 

62If you configure an enabled MCP server with `required = true` and it fails to initialize, `codex exec` exits with an error instead of continuing without that server.62If you configure an enabled MCP server with `required = true` and it fails to initialize, `codex exec` exits with an error instead of continuing without that server.

63 63 


65 65 

66To consume Codex output in scripts, use JSON Lines output:66To consume Codex output in scripts, use JSON Lines output:

67 67 

68```68```bash

69codex exec --json "summarize the repo structure" | jq69codex exec --json "summarize the repo structure" | jq

70```70```

71 71 

72When you enable `--json`, `stdout` becomes a JSON Lines (JSONL) stream so you can capture every event Codex emits while its running. Event types include `thread.started`, `turn.started`, `turn.completed`, `turn.failed`, `item.*`, and `error`.72When you enable `--json`, `stdout` becomes a JSON Lines (JSONL) stream so you can capture every event Codex emits while it's running. Event types include `thread.started`, `turn.started`, `turn.completed`, `turn.failed`, `item.*`, and `error`.

73 73 

74Item types include agent messages, reasoning, command executions, file changes, MCP tool calls, web searches, and plan updates.74Item types include agent messages, reasoning, command executions, file changes, MCP tool calls, web searches, and plan updates.

75 75 

76Sample JSON stream (each line is a JSON object):76Sample JSON stream (each line is a JSON object):

77 77 

78```78```jsonl

79{"type":"thread.started","thread_id":"0199a213-81c0-7800-8aa1-bbab2a035a53"}79{"type":"thread.started","thread_id":"0199a213-81c0-7800-8aa1-bbab2a035a53"}

80{"type":"turn.started"}80{"type":"turn.started"}

81{"type":"item.started","item":{"id":"item_1","type":"command_execution","command":"bash -lc ls","status":"in_progress"}}81{"type":"item.started","item":{"id":"item_1","type":"command_execution","command":"bash -lc ls","status":"in_progress"}}


92 92 

93`schema.json`93`schema.json`

94 94 

95```95```json

96{96{

97 "type": "object",97 "type": "object",

98 "properties": {98 "properties": {


109 109 

110Run Codex with the schema and write the final JSON response to disk:110Run Codex with the schema and write the final JSON response to disk:

111 111 

112```112```bash

113codex exec "Extract project metadata" \113codex exec "Extract project metadata" \

114 --output-schema ./schema.json \114 --output-schema ./schema.json \

115 -o ./project-metadata.json115 -o ./project-metadata.json


117 117 

118Example final output (stdout):118Example final output (stdout):

119 119 

120```120```json

121{121{

122 "project_name": "Codex CLI",122 "project_name": "Codex CLI",

123 "programming_languages": ["Rust", "TypeScript", "Shell"]123 "programming_languages": ["Rust", "TypeScript", "Shell"]


126 126 

127## Authenticate in automation127## Authenticate in automation

128 128 

129`codex exec` reuses saved CLI authentication by default. In CI, its common to provide credentials explicitly:129`codex exec` reuses saved CLI authentication by default. In CI, it's common to provide credentials explicitly:

130 130 

131### Use API key auth131### Use API key auth

132 132 


138 138 

139To use a different API key for a single run, set `CODEX_API_KEY` inline:139To use a different API key for a single run, set `CODEX_API_KEY` inline:

140 140 

141```141```bash

142CODEX_API_KEY=<api-key> codex exec --json "triage open bug reports"142CODEX_API_KEY=<api-key> codex exec --json "triage open bug reports"

143```143```

144 144 

145`CODEX_API_KEY` is only supported in `codex exec`.145`CODEX_API_KEY` is only supported in `codex exec`.

146 146 

147Use ChatGPT-managed auth in CI/CD (advanced)147<ToggleSection title="Use ChatGPT-managed auth in CI/CD (advanced)">

148 

149Read this if you need to run CI/CD jobs with a Codex user account instead of an148Read this if you need to run CI/CD jobs with a Codex user account instead of an

150API key, such as enterprise teams using ChatGPT-managed Codex access on trusted149API key, such as enterprise teams using ChatGPT-managed Codex access on trusted

151runners or users who need ChatGPT/Codex rate limits instead of API key usage.150runners or users who need ChatGPT/Codex rate limits instead of API key usage.


154provision and rotate. Use this path only if you specifically need to run as153provision and rotate. Use this path only if you specifically need to run as

155your Codex account.154your Codex account.

156 155 

157Treat `~/.codex/auth.json` like a password: it contains access tokens. Dont156Treat `~/.codex/auth.json` like a password: it contains access tokens. Don't

158commit it, paste it into tickets, or share it in chat.157commit it, paste it into tickets, or share it in chat.

159 158 

160Do not use this workflow for public or open-source repositories. If `codex login`159Do not use this workflow for public or open-source repositories. If `codex login`


164 163 

165See [Maintain Codex account auth in CI/CD (advanced)](https://developers.openai.com/codex/auth/ci-cd-auth).164See [Maintain Codex account auth in CI/CD (advanced)](https://developers.openai.com/codex/auth/ci-cd-auth).

166 165 

166</ToggleSection>

167 

167## Resume a non-interactive session168## Resume a non-interactive session

168 169 

169If you need to continue a previous run (for example, a two-stage pipeline), use the `resume` subcommand:170If you need to continue a previous run (for example, a two-stage pipeline), use the `resume` subcommand:

170 171 

171```172```bash

172codex exec "review the change for race conditions"173codex exec "review the change for race conditions"

173codex exec resume --last "fix the race conditions you found"174codex exec resume --last "fix the race conditions you found"

174```175```


177 178 

178## Git repository required179## Git repository required

179 180 

180Codex requires commands to run inside a Git repository to prevent destructive changes. Override this check with `codex exec --skip-git-repo-check` if youre sure the environment is safe.181Codex requires commands to run inside a Git repository to prevent destructive changes. Override this check with `codex exec --skip-git-repo-check` if you're sure the environment is safe.

181 182 

182## Common automation patterns183## Common automation patterns

183 184 


1912. Check out the failing commit with repository read permissions only.1922. Check out the failing commit with repository read permissions only.

1923. Run setup commands before Codex, without exposing your OpenAI API key to those steps.1933. Run setup commands before Codex, without exposing your OpenAI API key to those steps.

1934. Run the Codex GitHub Action.1944. Run the Codex GitHub Action.

1945. Save Codexs local changes as a patch artifact.1955. Save Codex's local changes as a patch artifact.

1956. In a separate job, apply the patch and open a pull request.1966. In a separate job, apply the patch and open a pull request.

196 197 

197The Codex job below has only `contents: read`. After Codex runs, it only serializes the diff as an artifact. The `open_pr` job receives repository write permissions, but it does not receive `OPENAI_API_KEY`.198The Codex job below has only `contents: read`. After Codex runs, it only serializes the diff as an artifact. The `open_pr` job receives repository write permissions, but it does not receive `OPENAI_API_KEY`.


200 201 

201For a deeper security checklist, see the [Codex GitHub Action security guidance](https://github.com/openai/codex-action/blob/main/docs/security.md).202For a deeper security checklist, see the [Codex GitHub Action security guidance](https://github.com/openai/codex-action/blob/main/docs/security.md).

202 203 

203```204```yaml

204name: Codex auto-fix on CI failure205name: Codex auto-fix on CI failure

205 206 

206on:207on:


320 321 

321Prompt-plus-stdin is useful when another command already produces the data you want Codex to inspect. In this mode, you write the instruction yourself and pipe in the output as context, which makes it a natural fit for CLI workflows built around command output, logs, and generated data.322Prompt-plus-stdin is useful when another command already produces the data you want Codex to inspect. In this mode, you write the instruction yourself and pipe in the output as context, which makes it a natural fit for CLI workflows built around command output, logs, and generated data.

322 323 

323```324```bash

324npm test 2>&1 \325npm test 2>&1 \

325 | codex exec "summarize the failing tests and propose the smallest likely fix" \326 | codex exec "summarize the failing tests and propose the smallest likely fix" \

326 | tee test-summary.md327 | tee test-summary.md

327```328```

328 329 

329More prompt-plus-stdin examples330<ToggleSection title="More prompt-plus-stdin examples">

330 331 

331### Summarize logs332### Summarize logs

332 333 

333```334```bash

334tail -n 200 app.log \335tail -n 200 app.log \

335 | codex exec "identify the likely root cause, cite the most important errors, and suggest the next three debugging steps" \336 | codex exec "identify the likely root cause, cite the most important errors, and suggest the next three debugging steps" \

336 > log-triage.md337 > log-triage.md


338 339 

339### Inspect TLS or HTTP issues340### Inspect TLS or HTTP issues

340 341 

341```342```bash

342curl -vv https://api.example.com/health 2>&1 \343curl -vv https://api.example.com/health 2>&1 \

343 | codex exec "explain the TLS or HTTP failure and suggest the most likely fix" \344 | codex exec "explain the TLS or HTTP failure and suggest the most likely fix" \

344 > tls-debug.md345 > tls-debug.md


346 347 

347### Prepare a Slack-ready update348### Prepare a Slack-ready update

348 349 

349```350```bash

350gh run view 123456 --log \351gh run view 123456 --log \

351 | codex exec "write a concise Slack-ready update on the CI failure, including the likely cause and next step" \352 | codex exec "write a concise Slack-ready update on the CI failure, including the likely cause and next step" \

352 | pbcopy353 | pbcopy


354 355 

355### Draft a pull request comment from CI logs356### Draft a pull request comment from CI logs

356 357 

357```358```bash

358gh run view 123456 --log \359gh run view 123456 --log \

359 | codex exec "summarize the failure in 5 bullets for the pull request thread" \360 | codex exec "summarize the failure in 5 bullets for the pull request thread" \

360 | gh pr comment 789 --body-file -361 | gh pr comment 789 --body-file -

361```362```

362 363 

364</ToggleSection>

365 

363### Use `codex exec -` when stdin is the prompt366### Use `codex exec -` when stdin is the prompt

364 367 

365If you omit the prompt argument, Codex reads the prompt from stdin. Use `codex exec -` when you want to force that behavior explicitly.368If you omit the prompt argument, Codex reads the prompt from stdin. Use `codex exec -` when you want to force that behavior explicitly.

366 369 

367The `-` sentinel is useful when another command or script is generating the entire prompt dynamically. This is a good fit when you store prompts in files, assemble prompts with shell scripts, or combine live command output with instructions before handing the whole prompt to Codex.370The `-` sentinel is useful when another command or script is generating the entire prompt dynamically. This is a good fit when you store prompts in files, assemble prompts with shell scripts, or combine live command output with instructions before handing the whole prompt to Codex.

368 371 

369```372```bash

370cat prompt.txt | codex exec -373cat prompt.txt | codex exec -

371```374```

372 375 

373```376```bash

374printf "Summarize this error log in 3 bullets:\n\n%s\n" "$(tail -n 200 app.log)" \377printf "Summarize this error log in 3 bullets:\n\n%s\n" "$(tail -n 200 app.log)" \

375 | codex exec -378 | codex exec -

376```379```

377 380 

378```381```bash

379generate_prompt.sh | codex exec - --json > result.jsonl382generate_prompt.sh | codex exec - --json > result.jsonl

380```383```

381 

permissions.md +40 −40

Details

1# Permissions – Codex1# Permissions

2 2 

3Beta. Permission profiles are under active development and may change.3Beta. Permission profiles are under active development and may change.

4 4 

5Permission profiles do not compose with the older sandbox settings. Configure5Permission profiles do not compose with the older sandbox settings. Configure

6either `default_permissions` and `[permissions]`, or `sandbox_mode` /6 either `default_permissions` and `[permissions]`, or `sandbox_mode` /

7`sandbox_workspace_write`, but not both. If `sandbox_mode` appears in any7 `sandbox_workspace_write`, but not both. If `sandbox_mode` appears in any

8loaded config file, you pass `--sandbox`, or the selected config profile sets8 loaded config file, you pass `--sandbox`, or the selected config profile sets

9`sandbox_mode`, Codex uses those older sandbox settings instead of9 `sandbox_mode`, Codex uses those older sandbox settings instead of

10`default_permissions`.10 `default_permissions`.

11 11 

12Managed `allowed_permission_profiles` is the exception: it makes Codex use12Managed `allowed_permission_profiles` is the exception: it makes Codex use

13permission profiles. Remove older settings such as13permission profiles. Remove older settings such as


27can limit edits to selected workspace roots.27can limit edits to selected workspace roots.

28 28 

29Local permission profiles are supported on macOS, Linux, WSL, and native29Local permission profiles are supported on macOS, Linux, WSL, and native

30Windows. Platform-specific enforcement details and caveats are covered in30Windows. See [Scope and enforcement](#scope-and-enforcement) for platform-specific

31[Security limitations](#security-limitations).31details and caveats.

32 32 

33For Codex cloud network settings, see [Internet Access](https://developers.openai.com/codex/cloud/internet-access).33For Codex cloud network settings, see [Internet Access](https://developers.openai.com/codex/cloud/internet-access).

34 34 


59 count as workspace roots for that profile.59 count as workspace roots for that profile.

60- `[permissions.<name>.filesystem.":workspace_roots"]` defines the filesystem60- `[permissions.<name>.filesystem.":workspace_roots"]` defines the filesystem

61 rules Codex applies inside every effective workspace root: the current61 rules Codex applies inside every effective workspace root: the current

62 sessions runtime workspace roots plus the profile-defined roots above.62 session's runtime workspace roots plus the profile-defined roots above.

63 63 

64Profiles also use the normal config-layer model. Higher-precedence layers can64Profiles also use the normal config-layer model. Higher-precedence layers can

65add or replace entries under the same profile name without restating the whole65add or replace entries under the same profile name without restating the whole


68For example, an organization-level config and a user-level config can extend68For example, an organization-level config and a user-level config can extend

69the same profile independently:69the same profile independently:

70 70 

71```71```toml

72# /etc/codex/config.toml72# /etc/codex/config.toml

73[permissions.server.workspace_roots]73[permissions.server.workspace_roots]

74"~/code/server" = true74"~/code/server" = true

75```75```

76 76 

77```77```toml

78# ~/.codex/config.toml78# ~/.codex/config.toml

79[permissions.server.workspace_roots]79[permissions.server.workspace_roots]

80"~/code/mobile-app" = true80"~/code/mobile-app" = true


83When `server` is active, both workspace roots participate in the effective83When `server` is active, both workspace roots participate in the effective

84profile.84profile.

85 85 

86```86```toml

87default_permissions = "project-edit"87default_permissions = "project-edit"

88 88 

89[permissions.project-edit.workspace_roots]89[permissions.project-edit.workspace_roots]


127Use `extends` when a profile is mostly the same as a built-in or another named127Use `extends` when a profile is mostly the same as a built-in or another named

128profile. Prefer extending a built-in profile over starting from scratch so128profile. Prefer extending a built-in profile over starting from scratch so

129baseline protections carry forward. Extending `:workspace`, for example, keeps129baseline protections carry forward. Extending `:workspace`, for example, keeps

130the workspace roots `.codex` directory read-only unless you explicitly130the workspace root's `.codex` directory read-only unless you explicitly

131override it. Set the parent once, then add or override only the rules that131override it. Set the parent once, then add or override only the rules that

132differ.132differ.

133 133 

134```134```toml

135default_permissions = "project-edit"135default_permissions = "project-edit"

136 136 

137[permissions.project-edit]137[permissions.project-edit]


157## Configuration spec157## Configuration spec

158 158 

159| Entry | Type / values | Default | Details |159| Entry | Type / values | Default | Details |

160| --- | --- | --- | --- |160| ----------------------------------------------------------------- | -------------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

161| `default_permissions` | String profile name | None | Names the permissions profile Codex applies by default. It must match a profile under `[permissions]` or a built-in such as `:workspace`. Set it explicitly for predictable behavior; managed requirements may omit it only when both `:workspace` and `:read-only` are explicitly allowed. Codex uses older sandbox settings unless managed `allowed_permission_profiles` tells it to use permission profiles in this setup. |161| `default_permissions` | String profile name | None | Names the permissions profile Codex applies by default. It must match a profile under `[permissions]` or a built-in such as `:workspace`. Set it explicitly for predictable behavior; managed requirements may omit it only when both `:workspace` and `:read-only` are explicitly allowed. Codex uses older sandbox settings unless managed `allowed_permission_profiles` tells it to use permission profiles in this setup. |

162| `[permissions.<name>]` | Table | None | Defines a named profile. `default_permissions` selects one profile as the default; other permission-profile settings also use the profile name. |162| `[permissions.<name>]` | Table | None | Defines a named profile. `default_permissions` selects one profile as the default; other permission-profile settings also use the profile name. |

163| `permissions.<name>.description` | String | None | Provides a human-readable description for the profile. A profile does not inherit its parents description through `extends`. |163| `permissions.<name>.description` | String | None | Provides a human-readable description for the profile. A profile does not inherit its parent's description through `extends`. |

164| `permissions.<name>.extends` | String profile name | None | Starts this profile from another named profile or the built-in `:read-only` or `:workspace` profile. Codex rejects `:danger-full-access`, unknown parents, and inheritance cycles. |164| `permissions.<name>.extends` | String profile name | None | Starts this profile from another named profile or the built-in `:read-only` or `:workspace` profile. Codex rejects `:danger-full-access`, unknown parents, and inheritance cycles. |

165| `[permissions.<name>.workspace_roots]` | Table | None | Adds profile-defined workspace roots that receive `:workspace_roots` filesystem rules alongside the current sessions runtime workspace roots. |165| `[permissions.<name>.workspace_roots]` | Table | None | Adds profile-defined workspace roots that receive `:workspace_roots` filesystem rules alongside the current session's runtime workspace roots. |

166| `permissions.<name>.workspace_roots."<path>"` | Boolean | `false` | Adds the path to the profiles workspace root set when `true`. Entries set to `false` remain inactive. |166| `permissions.<name>.workspace_roots."<path>"` | Boolean | `false` | Adds the path to the profile's workspace root set when `true`. Entries set to `false` remain inactive. |

167| `[permissions.<name>.filesystem]` | Table | None | Maps filesystem paths to access values or scoped subpath maps. Missing or empty filesystem tables keep filesystem access restricted and emit a startup warning. |167| `[permissions.<name>.filesystem]` | Table | None | Maps filesystem paths to access values or scoped subpath maps. Missing or empty filesystem tables keep filesystem access restricted and emit a startup warning. |

168| `permissions.<name>.filesystem.glob_scan_max_depth` | Number | None | Limits deny-read glob expansion on Linux, WSL, and native Windows when Codex snapshots matches before sandbox startup. Larger values can increase startup scanning work. Use a value of at least `1` when an unbounded `**` pattern needs bounded pre-expansion. |168| `permissions.<name>.filesystem.glob_scan_max_depth` | Number | None | Limits deny-read glob expansion on Linux, WSL, and native Windows when Codex snapshots matches before sandbox startup. Larger values can increase startup scanning work. Use a value of at least `1` when an unbounded `**` pattern needs bounded pre-expansion. |

169| `[permissions.<name>.filesystem]."<path>"` | `read`, `write`, or `deny` | None | Grants direct access for a supported path. `deny` denies access and wins over equally specific `write` or `read` entries. Codex rejects direct write rules that the active runtime cannot enforce. |169| `[permissions.<name>.filesystem]."<path>"` | `read`, `write`, or `deny` | None | Grants direct access for a supported path. `deny` denies access and wins over equally specific `write` or `read` entries. Codex rejects direct write rules that the active runtime cannot enforce. |


188Filesystem entries use `read`, `write`, or `deny`:188Filesystem entries use `read`, `write`, or `deny`:

189 189 

190| Access | Meaning |190| Access | Meaning |

191| --- | --- |191| ------- | --------------------------------------------------------------------------------------------------------------------------------- |

192| `read` | Allows commands to read files and list directories under the path. Commands cannot create, modify, rename, or delete files there. |192| `read` | Allows commands to read files and list directories under the path. Commands cannot create, modify, rename, or delete files there. |

193| `write` | Allows commands to read and modify files under the path, including creating, renaming, and deleting files when the OS allows it. |193| `write` | Allows commands to read and modify files under the path, including creating, renaming, and deleting files when the OS allows it. |

194| `deny` | Denies both reads and writes under the path. Use it to carve out a denied subpath from a broader `read` or `write` grant. |194| `deny` | Denies both reads and writes under the path. Use it to carve out a denied subpath from a broader `read` or `write` grant. |


200This precedence lets a profile describe a broad working area first, then carve200This precedence lets a profile describe a broad working area first, then carve

201out files or directories that should stay unreadable:201out files or directories that should stay unreadable:

202 202 

203```203```toml

204[permissions.project-edit.filesystem]204[permissions.project-edit.filesystem]

205":minimal" = "read"205":minimal" = "read"

206 206 


216 216 

217A more specific path can also reopen a narrower subtree inside a broader deny:217A more specific path can also reopen a narrower subtree inside a broader deny:

218 218 

219```219```toml

220[permissions.project-edit.filesystem]220[permissions.project-edit.filesystem]

221"~/Documents" = "deny"221"~/Documents" = "deny"

222"~/Documents/codex" = "write"222"~/Documents/codex" = "write"


225Supported path forms:225Supported path forms:

226 226 

227| Path | Meaning | Scoped subpaths |227| Path | Meaning | Scoped subpaths |

228| --- | --- | --- |228| ------------------ | ------------------------------------------------------------------------------------------- | --------------- |

229| `:root` | The filesystem root | `.` only |229| `:root` | The filesystem root | `.` only |

230| `:minimal` | Platform and runtime paths needed by common tools | `.` only |230| `:minimal` | Platform and runtime paths needed by common tools | `.` only |

231| `:workspace_roots` | The current sessions workspace roots plus any enabled profile-defined workspace roots | Yes |231| `:workspace_roots` | The current session's workspace roots plus any enabled profile-defined workspace roots | Yes |

232| `:tmpdir` | The `$TMPDIR` location, when one is available | `.` only |232| `:tmpdir` | The `$TMPDIR` location, when one is available | `.` only |

233| `:slash_tmp` | The `/tmp` folder, if it exists | `.` only |233| `:slash_tmp` | The `/tmp` folder, if it exists | `.` only |

234| `/absolute/path` | A platform absolute path, such as `/path` on macOS/Linux/WSL or `C:\path` on native Windows | Yes |234| `/absolute/path` | A platform absolute path, such as `/path` on macOS/Linux/WSL or `C:\path` on native Windows | Yes |

235| `~/path` | A path under the current users home directory | Yes |235| `~/path` | A path under the current user's home directory | Yes |

236 236 

237On native Windows, home-relative paths can also use backslashes, such as237On native Windows, home-relative paths can also use backslashes, such as

238`~\work`.238`~\work`.

239 239 

240Use `:root` only when a profile intentionally needs broad read coverage:240Use `:root` only when a profile intentionally needs broad read coverage:

241 241 

242```242```toml

243[permissions.audit.filesystem]243[permissions.audit.filesystem]

244":root" = "read"244":root" = "read"

245```245```


247Use nested entries under `:workspace_roots` to scope access to workspace-root247Use nested entries under `:workspace_roots` to scope access to workspace-root

248relative subpaths:248relative subpaths:

249 249 

250```250```toml

251[permissions.project-edit.filesystem.":workspace_roots"]251[permissions.project-edit.filesystem.":workspace_roots"]

252"." = "write" # each workspace root252"." = "write" # each workspace root

253"docs" = "read" # each workspace-root docs directory253"docs" = "read" # each workspace-root docs directory


267When a glob sits under `:workspace_roots`, Codex interprets it relative to each267When a glob sits under `:workspace_roots`, Codex interprets it relative to each

268effective workspace root. For example:268effective workspace root. For example:

269 269 

270```270```toml

271[permissions.project-edit.filesystem.":workspace_roots"]271[permissions.project-edit.filesystem.":workspace_roots"]

272"**/*.env" = "deny"272"**/*.env" = "deny"

273```273```


285bounded pre-expansion before the sandbox starts. Set `glob_scan_max_depth` when285bounded pre-expansion before the sandbox starts. Set `glob_scan_max_depth` when

286you use an unbounded pattern such as `"**/*.env" = "deny"`:286you use an unbounded pattern such as `"**/*.env" = "deny"`:

287 287 

288```288```toml

289[permissions.project-edit.filesystem]289[permissions.project-edit.filesystem]

290glob_scan_max_depth = 3290glob_scan_max_depth = 3

291 291 


301Add reusable workspace roots to the profile when the same rules should apply to301Add reusable workspace roots to the profile when the same rules should apply to

302more than the current session root:302more than the current session root:

303 303 

304```304```toml

305[permissions.project-edit.workspace_roots]305[permissions.project-edit.workspace_roots]

306"~/code/app" = true306"~/code/app" = true

307"~/code/shared-lib" = true307"~/code/shared-lib" = true

308```308```

309 309 

310When this profile is active, Codex applies the `:workspace_roots` rules to the310When this profile is active, Codex applies the `:workspace_roots` rules to the

311current sessions runtime workspace roots and to each enabled profile-defined311current session's runtime workspace roots and to each enabled profile-defined

312workspace root.312workspace root.

313 313 

314On native Windows, drive-letter paths such as `D:\work` and UNC paths such as314On native Windows, drive-letter paths such as `D:\work` and UNC paths such as


318 318 

319Set `enabled = true` to allow network access for the selected profile:319Set `enabled = true` to allow network access for the selected profile:

320 320 

321```321```toml

322[permissions.project-edit.network]322[permissions.project-edit.network]

323enabled = true323enabled = true

324```324```


326When network access is enabled, Codex uses full network behavior by default.326When network access is enabled, Codex uses full network behavior by default.

327Most profiles should also define domain rules:327Most profiles should also define domain rules:

328 328 

329```329```toml

330[permissions.project-edit.network.domains]330[permissions.project-edit.network.domains]

331"example.com" = "allow" # exact host331"example.com" = "allow" # exact host

332"*.example.com" = "allow" # subdomains only332"*.example.com" = "allow" # subdomains only


336 336 

337The network sandbox proxy binds to local listeners by default:337The network sandbox proxy binds to local listeners by default:

338 338 

339```339```toml

340[permissions.project-edit.network]340[permissions.project-edit.network]

341enabled = true341enabled = true

342proxy_url = "http://127.0.0.1:3128"342proxy_url = "http://127.0.0.1:3128"


355rebinding and accidental access to local services. To intentionally allow a355rebinding and accidental access to local services. To intentionally allow a

356literal local target, allowlist the exact host or IP literal:356literal local target, allowlist the exact host or IP literal:

357 357 

358```358```toml

359[permissions.project-edit.network.domains]359[permissions.project-edit.network.domains]

360"localhost" = "allow"360"localhost" = "allow"

361"127.0.0.1" = "allow"361"127.0.0.1" = "allow"


364Set `allow_local_binding = true` only when the profile must reach allowlisted364Set `allow_local_binding = true` only when the profile must reach allowlisted

365hostnames that resolve to local or private addresses:365hostnames that resolve to local or private addresses:

366 366 

367```367```toml

368[permissions.project-edit.network]368[permissions.project-edit.network]

369enabled = true369enabled = true

370allow_local_binding = true370allow_local_binding = true


378Unix socket proxying is a local escape hatch for tools such as Docker. Use it378Unix socket proxying is a local escape hatch for tools such as Docker. Use it

379sparingly:379sparingly:

380 380 

381```381```toml

382[permissions.project-edit.network.unix_sockets]382[permissions.project-edit.network.unix_sockets]

383"/var/run/docker.sock" = "allow"383"/var/run/docker.sock" = "allow"

384"/tmp/old.sock" = "deny"384"/tmp/old.sock" = "deny"


463 463 

464### Read-only with network allowlist464### Read-only with network allowlist

465 465 

466```466```toml

467default_permissions = "readonly-net"467default_permissions = "readonly-net"

468 468 

469[permissions.readonly-net.filesystem]469[permissions.readonly-net.filesystem]


483 483 

484Here is an example of a permission profile that will make your workspace folders writable by Codex while denying reads to the rest of the filesystem (with limited exceptions, as determined by `:minimal`).484Here is an example of a permission profile that will make your workspace folders writable by Codex while denying reads to the rest of the filesystem (with limited exceptions, as determined by `:minimal`).

485 485 

486```486```toml

487default_permissions = "workspace-only"487default_permissions = "workspace-only"

488 488 

489[permissions.workspace-only]489[permissions.workspace-only]


509 509 

510### Workspace write without network510### Workspace write without network

511 511 

512```512```toml

513default_permissions = "project-edit"513default_permissions = "project-edit"

514 514 

515[permissions.project-edit.filesystem]515[permissions.project-edit.filesystem]


524 524 

525### Workspace write with public web access525### Workspace write with public web access

526 526 

527```527```toml

528default_permissions = "workspace-net"528default_permissions = "workspace-net"

529 529 

530[permissions.workspace-net.filesystem]530[permissions.workspace-net.filesystem]

plugins.md +51 −25

Details

1# Plugins – Codex1# Plugins

2 2 

3## Overview3## Overview

4 4 


36 36 

37Open **Plugins** in the Codex app to browse and install curated plugins.37Open **Plugins** in the Codex app to browse and install curated plugins.

38 38 

39![Codex Plugins page](/images/codex/plugins/directory.webp)39<CodexScreenshot

40 alt="Codex Plugins page"

41 lightSrc="/images/codex/plugins/directory.webp"

42 darkSrc="/images/codex/plugins/directory-dark.webp"

43/>

40 44 

41The plugin directory groups plugins into categories:45The plugin directory groups plugins into categories:

42 46 


49 53 

50In Codex CLI, run the following command to open the plugins list:54In Codex CLI, run the following command to open the plugins list:

51 55 

52```56```text

53codex57codex

54/plugins58/plugins

55```59```

56 60 

57![Plugins list in Codex CLI](/images/codex/plugins/cli_light.png)61<CodexScreenshot

62 alt="Plugins list in Codex CLI"

63 lightSrc="/images/codex/plugins/cli_light.png"

64 darkSrc="/images/codex/plugins/codex-plugin-cli.png"

65/>

58 66 

59The CLI plugin browser groups plugins by marketplace. Use the marketplace tabs67The CLI plugin browser groups plugins by marketplace. Use the marketplace tabs

60to switch sources, open a plugin to inspect details, install or uninstall68to switch sources, open a plugin to inspect details, install or uninstall

61marketplace entries, and press `Space` on an installed plugin to toggle69marketplace entries, and press <kbd>Space</kbd> on an installed plugin to toggle

62its enabled state.70its enabled state.

63 71 

64### Install and use a plugin72### Install and use a plugin

65 73 

66Once you open the plugin directory:74Once you open the plugin directory:

67 75 

76<WorkflowSteps>

77 

681. Search or browse for a plugin, then open its details.781. Search or browse for a plugin, then open its details.

692. Select the install button. In the app, select the plus button or792. Select the install button. In the app, select the plus button or

70 **Add to Codex**. In the CLI, select `Install plugin`.80 **Add to Codex**. In the CLI, select `Install plugin`.


73 use them.83 use them.

744. After installation, start a new thread and ask Codex to use the plugin.844. After installation, start a new thread and ask Codex to use the plugin.

75 85 

76After you install a plugin, you can use it directly in the prompt window:86</WorkflowSteps>

77 

78![Codex Plugins page](/images/codex/plugins/plugin-github-invoke.png)

79 

80Describe the task directly

81 

82Ask for the outcome you want, such as “Summarize unread Gmail threads

83from today” or “Pull the latest launch notes from Google Drive.”

84 87 

85Use this when you want Codex to choose the right installed tools for the88After you install a plugin, you can use it directly in the prompt window:

86task.

87 

88Choose a specific plugin

89 

90Type `@` to invoke the plugin or one of its bundled skills

91explicitly.

92 89 

93Use this when you want to be specific about which plugin or skill Codex90<CodexScreenshot

94should use. See [Codex app commands](https://developers.openai.com/codex/app/commands) and91 alt="Codex Plugins page"

95[Skills](https://developers.openai.com/codex/skills).92 lightSrc="/images/codex/plugins/plugin-github-invoke.png"

93 darkSrc="/images/codex/plugins/plugin-github-invoke-dark.png"

94/>

95 

96<div class="not-prose mt-4 grid gap-4 md:grid-cols-2">

97 <div class="rounded-xl border border-subtle bg-surface px-5 py-4">

98 <p class="text-sm font-semibold text-default">Describe the task directly</p>

99 <p class="mt-2 text-sm text-secondary">

100 Ask for the outcome you want, such as "Summarize unread Gmail threads

101 from today" or "Pull the latest launch notes from Google Drive."

102 </p>

103 <p class="mt-3 text-sm text-secondary">

104 Use this when you want Codex to choose the right installed tools for the

105 task.

106 </p>

107 </div>

108 

109 <div class="rounded-xl border border-subtle bg-surface px-5 py-4">

110 <p class="text-sm font-semibold text-default">Choose a specific plugin</p>

111 <p class="mt-2 text-sm text-secondary">

112 Type <code>@</code> to invoke the plugin or one of its bundled skills

113 explicitly.

114 </p>

115 <p class="mt-3 text-sm text-secondary">

116 Use this when you want to be specific about which plugin or skill Codex

117 should use. See <a href="/codex/app/commands">Codex app commands</a> and

118 <a href="/codex/skills">Skills</a>.

119 </p>

120 </div>

121</div>

96 122 

97### How permissions and data sharing work123### How permissions and data sharing work

98 124 


106 those apps in ChatGPT during setup or the first time you use them.132 those apps in ChatGPT during setup or the first time you use them.

107- If a plugin includes MCP servers, they may require extra setup or133- If a plugin includes MCP servers, they may require extra setup or

108 authentication before you can use them.134 authentication before you can use them.

109- When Codex sends data through a bundled app, that apps terms and privacy135- When Codex sends data through a bundled app, that app's terms and privacy

110 policy apply.136 policy apply.

111 137 

112### Remove or turn off a plugin138### Remove or turn off a plugin


120If you want to keep a plugin installed but turn it off, set its entry in146If you want to keep a plugin installed but turn it off, set its entry in

121`~/.codex/config.toml` to `enabled = false`, then restart Codex:147`~/.codex/config.toml` to `enabled = false`, then restart Codex:

122 148 

123```149```toml

124[plugins."gmail@openai-curated"]150[plugins."gmail@openai-curated"]

125enabled = false151enabled = false

126```152```

plugins/build.md +141 −64

Details

1# Build plugins – Codex1# Build plugins

2 2 

3This page is for plugin authors. If you want to browse, install, and use3This page is for plugin authors. If you want to browse, install, and use

4plugins in Codex, see [Plugins](https://developers.openai.com/codex/plugins). If you are still iterating on4plugins in Codex, see [Plugins](https://developers.openai.com/codex/plugins). If you are still iterating on


10 10 

11For the fastest setup, use the built-in `@plugin-creator` skill.11For the fastest setup, use the built-in `@plugin-creator` skill.

12 12 

13![plugin-creator skill in Codex](/images/codex/plugins/plugin-creator.png)13<CodexScreenshot

14 alt="plugin-creator skill in Codex"

15 lightSrc="/images/codex/plugins/plugin-creator.png"

16 darkSrc="/images/codex/plugins/plugin-creator-dark.png"

17/>

14 18 

15It scaffolds the required `.codex-plugin/plugin.json` manifest and can also19It scaffolds the required `.codex-plugin/plugin.json` manifest and can also

16generate a local marketplace entry for testing. If you already have a plugin20generate a local marketplace entry for testing. If you already have a plugin

17folder, you can still use `@plugin-creator` to wire it into a local21folder, you can still use `@plugin-creator` to wire it into a local

18marketplace.22marketplace.

19 23 

20![how to invoke the plugin-creator skill](/images/codex/plugins/plugin-creator-invoke.png)24<CodexScreenshot

25 alt="how to invoke the plugin-creator skill"

26 lightSrc="/images/codex/plugins/plugin-creator-invoke.png"

27 darkSrc="/images/codex/plugins/plugin-creator-invoke-dark.png"

28/>

21 29 

22### Build your own curated plugin list30### Build your own curated plugin list

23 31 


34picker. Then restart Codex. After that, open the plugin directory, choose your42picker. Then restart Codex. After that, open the plugin directory, choose your

35marketplace, and browse or install the plugins in that curated list.43marketplace, and browse or install the plugins in that curated list.

36 44 

37You dont need a separate marketplace per plugin. One marketplace can expose a45You don't need a separate marketplace per plugin. One marketplace can expose a

38single plugin while you are testing, then grow into a larger curated catalog as46single plugin while you are testing, then grow into a larger curated catalog as

39you add more plugins.47you add more plugins.

40 48 

41![custom local marketplace in the plugin directory](/images/codex/plugins/codex-local-plugin-light.png)49<CodexScreenshot

50 alt="custom local marketplace in the plugin directory"

51 lightSrc="/images/codex/plugins/codex-local-plugin-light.png"

52 darkSrc="/images/codex/plugins/codex-local-plugin.png"

53/>

42 54 

43### Add a marketplace from the CLI55### Add a marketplace from the CLI

44 56 

45Use `codex plugin marketplace add` when you want Codex to install and track a57Use `codex plugin marketplace add` when you want Codex to install and track a

46marketplace source for you instead of editing `config.toml` by hand.58marketplace source for you instead of editing `config.toml` by hand.

47 59 

48```60```bash

49codex plugin marketplace add owner/repo61codex plugin marketplace add owner/repo

50codex plugin marketplace add owner/repo --ref main62codex plugin marketplace add owner/repo --ref main

51codex plugin marketplace add https://github.com/example/plugins.git --sparse .agents/plugins63codex plugin marketplace add https://github.com/example/plugins.git --sparse .agents/plugins


60 72 

61To inspect, refresh, or remove configured marketplaces:73To inspect, refresh, or remove configured marketplaces:

62 74 

63```75```bash

64codex plugin marketplace list76codex plugin marketplace list

65codex plugin marketplace upgrade77codex plugin marketplace upgrade

66codex plugin marketplace upgrade marketplace-name78codex plugin marketplace upgrade marketplace-name


77 89 

781. Create a plugin folder with a manifest at `.codex-plugin/plugin.json`.901. Create a plugin folder with a manifest at `.codex-plugin/plugin.json`.

79 91 

80```92```bash

81mkdir -p my-first-plugin/.codex-plugin93mkdir -p my-first-plugin/.codex-plugin

82```94```

83 95 

84`my-first-plugin/.codex-plugin/plugin.json`96`my-first-plugin/.codex-plugin/plugin.json`

85 97 

86```98```json

87{99{

88 "name": "my-first-plugin",100 "name": "my-first-plugin",

89 "version": "1.0.0",101 "version": "1.0.0",


97 109 

982. Add a skill under `skills/<skill-name>/SKILL.md`.1102. Add a skill under `skills/<skill-name>/SKILL.md`.

99 111 

100```112```bash

101mkdir -p my-first-plugin/skills/hello113mkdir -p my-first-plugin/skills/hello

102```114```

103 115 

104`my-first-plugin/skills/hello/SKILL.md`116`my-first-plugin/skills/hello/SKILL.md`

105 117 

106```118```md

107---119---

108name: hello120name: hello

109description: Greet the user with a friendly message.121description: Greet the user with a friendly message.


124Use a repo marketplace or a personal marketplace, depending on who should be136Use a repo marketplace or a personal marketplace, depending on who should be

125able to access the plugin or curated list.137able to access the plugin or curated list.

126 138 

127Add a marketplace file at `$REPO_ROOT/.agents/plugins/marketplace.json`139<Tabs

128and store your plugins under `$REPO_ROOT/plugins/`.140 id="codex-plugins-local-install"

141 param="install-scope"

142 defaultTab="workspace"

143 tabs={[

144 {

145 id: "workspace",

146 label: "Repo",

147 },

148 {

149 id: "global",

150 label: "Personal",

151 },

152 ]}

153>

154 <div slot="workspace">

155 Add a marketplace file at `$REPO_ROOT/.agents/plugins/marketplace.json`

156 and store your plugins under `$REPO_ROOT/plugins/`.

129 157 

130**Repo marketplace example**158 **Repo marketplace example**

131 159 

132Step 1: Copy the plugin folder into `$REPO_ROOT/plugins/my-plugin`.160 Step 1: Copy the plugin folder into `$REPO_ROOT/plugins/my-plugin`.

133 161 

134```162```bash

135mkdir -p ./plugins163mkdir -p ./plugins

136cp -R /absolute/path/to/my-plugin ./plugins/my-plugin164cp -R /absolute/path/to/my-plugin ./plugins/my-plugin

137```165```

138 166 

139Step 2: Add or update `$REPO_ROOT/.agents/plugins/marketplace.json` so167 Step 2: Add or update `$REPO_ROOT/.agents/plugins/marketplace.json` so

140that `source.path` points to that plugin directory with a `./`-prefixed168 that `source.path` points to that plugin directory with a `./`-prefixed

141relative path:169 relative path:

142 170 

143```171```json

144{172{

145 "name": "local-repo",173 "name": "local-repo",

146 "plugins": [174 "plugins": [


160}188}

161```189```

162 190 

163Step 3: Restart Codex and verify that the plugin appears.191 Step 3: Restart Codex and verify that the plugin appears.

164 192 

165Add a marketplace file at `~/.agents/plugins/marketplace.json` and store193 </div>

166your plugins under `~/.codex/plugins/`.

167 194 

168**Personal marketplace example**195 <div slot="global">

196 Add a marketplace file at `~/.agents/plugins/marketplace.json` and store

197 your plugins under `~/.codex/plugins/`.

169 198 

170Step 1: Copy the plugin folder into `~/.codex/plugins/my-plugin`.199 **Personal marketplace example**

171 200 

172```201 Step 1: Copy the plugin folder into `~/.codex/plugins/my-plugin`.

202 

203```bash

173mkdir -p ~/.codex/plugins204mkdir -p ~/.codex/plugins

174cp -R /absolute/path/to/my-plugin ~/.codex/plugins/my-plugin205cp -R /absolute/path/to/my-plugin ~/.codex/plugins/my-plugin

175```206```

176 207 

177Step 2: Add or update `~/.agents/plugins/marketplace.json` so that the208 Step 2: Add or update `~/.agents/plugins/marketplace.json` so that the

178plugin entrys `source.path` points to that directory.209 plugin entry's `source.path` points to that directory.

210 

211 Step 3: Restart Codex and verify that the plugin appears.

179 212 

180Step 3: Restart Codex and verify that the plugin appears.213 </div>

214</Tabs>

181 215 

182The marketplace file points to the plugin location, so those directories are216The marketplace file points to the plugin location, so those directories are

183examples rather than fixed requirements. Codex resolves `source.path` relative217examples rather than fixed requirements. Codex resolves `source.path` relative


1995. Choose who has access, then send the invitation or link.2335. Choose who has access, then send the invitation or link.

200 234 

201People you share with can find the plugin under **Shared with you** in the235People you share with can find the plugin under **Shared with you** in the

202plugin directory. Sharing a local plugin with your workspace doesnt publish236plugin directory. Sharing a local plugin with your workspace doesn't publish

203it to the public Plugin Directory. Shared plugins stay within your workspace237it to the public Plugin Directory. Shared plugins stay within your workspace

204and organization boundary; accounts that arent signed in to that workspace238and organization boundary; accounts that aren't signed in to that workspace

205cant access them. Use groups when a team or role should share the same plugin239can't access them. Use groups when a team or role should share the same plugin

206access. Use a marketplace when you want repo or CLI distribution, and use240access. Use a marketplace when you want repo or CLI distribution, and use

207workspace sharing when you want selected teammates to install a plugin from the241workspace sharing when you want selected teammates to install a plugin from the

208Codex app.242Codex app.


210Workspace admins can disable plugin sharing from cloud-managed requirements by244Workspace admins can disable plugin sharing from cloud-managed requirements by

211adding `plugin_sharing = false` to `requirements.toml`:245adding `plugin_sharing = false` to `requirements.toml`:

212 246 

213```247```toml

214plugin_sharing = false248plugin_sharing = false

215```249```

216 250 


225marketplace, make sure its `version`, publisher metadata, and install-surface259marketplace, make sure its `version`, publisher metadata, and install-surface

226copy are ready for other developers to see.260copy are ready for other developers to see.

227 261 

228```262```json

229{263{

230 "name": "local-example-plugins",264 "name": "local-example-plugins",

231 "interface": {265 "interface": {


264- Use `interface.displayName` for the marketplace title shown in Codex.298- Use `interface.displayName` for the marketplace title shown in Codex.

265- Add one object per plugin under `plugins` to build a curated list that Codex299- Add one object per plugin under `plugins` to build a curated list that Codex

266 shows under that marketplace title.300 shows under that marketplace title.

267- Point each plugin entrys `source.path` at the plugin directory you want301- Point each plugin entry's `source.path` at the plugin directory you want

268 Codex to load. For repo installs, that often lives under `./plugins/`. For302 Codex to load. For repo installs, that often lives under `./plugins/`. For

269 personal installs, a common pattern is `./.codex/plugins/<plugin-name>`.303 personal installs, a common pattern is `./.codex/plugins/<plugin-name>`.

270- Keep `source.path` relative to the marketplace root, start it with `./`, and304- Keep `source.path` relative to the marketplace root, start it with `./`, and


288`"source": "url"` when the plugin lives at the repository root, or322`"source": "url"` when the plugin lives at the repository root, or

289`"source": "git-subdir"` when the plugin lives in a subdirectory:323`"source": "git-subdir"` when the plugin lives in a subdirectory:

290 324 

291```325```json

292{326{

293 "name": "remote-helper",327 "name": "remote-helper",

294 "source": {328 "source": {


305}339}

306```340```

307 341 

308Git-backed entries may use `ref` or `sha` selectors. If Codex cant resolve a342Git-backed entries may use `ref` or `sha` selectors. If Codex can't resolve a

309marketplace entrys source, it skips that plugin entry instead of failing the343marketplace entry's source, it skips that plugin entry instead of failing the

310whole marketplace.344whole marketplace.

311 345 

312### How Codex uses marketplaces346### How Codex uses marketplaces


327plugins, `$VERSION` is `local`, and Codex loads the installed copy from that361plugins, `$VERSION` is `local`, and Codex loads the installed copy from that

328cache path rather than directly from the marketplace entry.362cache path rather than directly from the marketplace entry.

329 363 

330You can enable or disable each plugin individually. Codex stores each plugins364You can enable or disable each plugin individually. Codex stores each plugin's

331on or off state in `~/.codex/config.toml`.365on or off state in `~/.codex/config.toml`.

332 366 

333## Package and distribute plugins367## Package and distribute plugins


340configures MCP servers, and assets used to present the plugin across supported374configures MCP servers, and assets used to present the plugin across supported

341surfaces.375surfaces.

342 376 

343- my-plugin/377<FileTree

344 378 class="mt-4"

345 - .codex-plugin/379 tree={[

346 380 {

347 - plugin.json Required: plugin manifest381 name: "my-plugin/",

348 - skills/382 open: true,

349 383 children: [

350 - my-skill/384 {

351 385 name: ".codex-plugin/",

352 - SKILL.md Optional: skill instructions386 open: true,

353 - hooks/387 children: [

354 388 {

355 - hooks.json Optional: lifecycle hooks389 name: "plugin.json",

356 - .app.json Optional: app or connector mappings390 comment: "Required: plugin manifest",

357 - .mcp.json Optional: MCP server configuration391 },

358 - assets/ Optional: icons, logos, screenshots392 ],

393 },

394 {

395 name: "skills/",

396 open: true,

397 children: [

398 {

399 name: "my-skill/",

400 open: true,

401 children: [

402 {

403 name: "SKILL.md",

404 comment: "Optional: skill instructions",

405 },

406 ],

407 },

408 ],

409 },

410 {

411 name: "hooks/",

412 open: true,

413 children: [

414 {

415 name: "hooks.json",

416 comment: "Optional: lifecycle hooks",

417 },

418 ],

419 },

420 {

421 name: ".app.json",

422 comment: "Optional: app or connector mappings",

423 },

424 {

425 name: ".mcp.json",

426 comment: "Optional: MCP server configuration",

427 },

428 {

429 name: "assets/",

430 comment: "Optional: icons, logos, screenshots",

431 },

432 ],

433 },

434 ]}

435/>

359 436 

360Only `plugin.json` belongs in `.codex-plugin/`. Keep `skills/`, `hooks/`,437Only `plugin.json` belongs in `.codex-plugin/`. Keep `skills/`, `hooks/`,

361`assets/`, `.mcp.json`, and `.app.json` at the plugin root.438`assets/`, `.mcp.json`, and `.app.json` at the plugin root.


368- Provide install-surface metadata such as descriptions, icons, and legal445- Provide install-surface metadata such as descriptions, icons, and legal

369 links.446 links.

370 447 

371Heres a complete manifest example:448Here's a complete manifest example:

372 449 

373```450```json

374{451{

375 "name": "my-plugin",452 "name": "my-plugin",

376 "version": "0.1.0",453 "version": "0.1.0",


456 533 

457Direct server map:534Direct server map:

458 535 

459```536```json

460{537{

461 "docs": {538 "docs": {

462 "command": "docs-mcp",539 "command": "docs-mcp",


467 544 

468Wrapped server map:545Wrapped server map:

469 546 

470```547```json

471{548{

472 "mcp_servers": {549 "mcp_servers": {

473 "docs": {550 "docs": {


482tool approval policy from their Codex config without editing the plugin. Use559tool approval policy from their Codex config without editing the plugin. Use

483`plugins.<plugin>.mcp_servers.<server>` for plugin-scoped MCP server policy:560`plugins.<plugin>.mcp_servers.<server>` for plugin-scoped MCP server policy:

484 561 

485```562```toml

486[plugins."my-plugin".mcp_servers.docs]563[plugins."my-plugin".mcp_servers.docs]

487enabled = true564enabled = true

488default_tools_approval_mode = "prompt"565default_tools_approval_mode = "prompt"


495When your plugin is enabled, Codex can load lifecycle hooks from your plugin572When your plugin is enabled, Codex can load lifecycle hooks from your plugin

496alongside user, project, and managed hooks.573alongside user, project, and managed hooks.

497 574 

498Installing or enabling a plugin doesnt automatically trust its hooks.575Installing or enabling a plugin doesn't automatically trust its hooks.

499Plugin-bundled hooks are non-managed hooks, so Codex skips them until the user576Plugin-bundled hooks are non-managed hooks, so Codex skips them until the user

500reviews and trusts the current hook definition.577reviews and trusts the current hook definition.

501 578 

502The default plugin hook file is `hooks/hooks.json`:579The default plugin hook file is `hooks/hooks.json`:

503 580 

504```581```json

505{582{

506 "hooks": {583 "hooks": {

507 "SessionStart": [584 "SessionStart": [


524single path, an array of paths, an inline hooks object, or an array of inline601single path, an array of paths, an inline hooks object, or an array of inline

525hooks objects.602hooks objects.

526 603 

527```604```json

528{605{

529 "name": "repo-policy",606 "name": "repo-policy",

530 "hooks": ["./hooks/session.json", "./hooks/tools.json"]607 "hooks": ["./hooks/session.json", "./hooks/tools.json"]


537 614 

538Plugin hook commands receive the Codex-specific environment variables615Plugin hook commands receive the Codex-specific environment variables

539`PLUGIN_ROOT` and `PLUGIN_DATA`. `PLUGIN_ROOT` points to the installed plugin616`PLUGIN_ROOT` and `PLUGIN_DATA`. `PLUGIN_ROOT` points to the installed plugin

540root, and `PLUGIN_DATA` points to the plugins writable data directory. Codex617root, and `PLUGIN_DATA` points to the plugin's writable data directory. Codex

541also sets `CLAUDE_PLUGIN_ROOT` and `CLAUDE_PLUGIN_DATA` for compatibility with618also sets `CLAUDE_PLUGIN_ROOT` and `CLAUDE_PLUGIN_DATA` for compatibility with

542existing plugin hooks.619existing plugin hooks.

543 620 

prompting.md +19 −14

Details

1# Prompting – Codex1# Prompting

2 2 

3## Prompts3## Prompts

4 4 


6 6 

7Example prompts:7Example prompts:

8 8 

9```9```text

10Explain how the transform module works and how other modules use it.10Explain how the transform module works and how other modules use it.

11```11```

12 12 

13```13```text

14Add a new command-line option `--json` that outputs JSON.14Add a new command-line option `--json` that outputs JSON.

15```15```

16 16 


19As with ChatGPT, Codex is only as effective as the instructions you give it. Here are some tips we find helpful when prompting Codex:19As with ChatGPT, Codex is only as effective as the instructions you give it. Here are some tips we find helpful when prompting Codex:

20 20 

21- Codex produces higher-quality outputs when it can verify its work. Include steps to reproduce an issue, validate a feature, and run linting and pre-commit checks.21- Codex produces higher-quality outputs when it can verify its work. Include steps to reproduce an issue, validate a feature, and run linting and pre-commit checks.

22- Codex handles complex work better when you break it into smaller, focused steps. Smaller tasks are easier for Codex to test and for you to review. If youre not sure how to split a task up, ask Codex to propose a plan.22- Codex handles complex work better when you break it into smaller, focused steps. Smaller tasks are easier for Codex to test and for you to review. If you're not sure how to split a task up, ask Codex to propose a plan.

23 23 

24For more ideas about prompting Codex, refer to [workflows](https://developers.openai.com/codex/workflows).24For more ideas about prompting Codex, refer to [workflows](https://developers.openai.com/codex/workflows).

25 25 


27 27 

28A thread is a single session: your prompt plus the model outputs and tool calls that follow. A thread can include multiple prompts. For example, your first prompt might ask Codex to implement a feature, and a follow-up prompt might ask it to add tests.28A thread is a single session: your prompt plus the model outputs and tool calls that follow. A thread can include multiple prompts. For example, your first prompt might ask Codex to implement a feature, and a follow-up prompt might ask it to add tests.

29 29 

30A thread is said to be running when Codex is actively working on it. You can run multiple threads at once, but avoid having two threads modify the same files. You can also resume a thread later by continuing it with another prompt.30A thread is said to be "running" when Codex is actively working on it. You can run multiple threads at once, but avoid having two threads modify the same files. You can also resume a thread later by continuing it with another prompt.

31 31 

32Threads can run either locally or in the cloud:32Threads can run either locally or in the cloud:

33 33 

34- **Local threads** run on your machine. Codex can read and edit your files and run commands, so you can see what changes and use your existing tools. To reduce the risk of unwanted changes outside your workspace, local threads run in a [sandbox](https://developers.openai.com/codex/agent-approvals-security).34- **Local threads** run on your machine. Codex can read and edit your files and run commands, so you can see what changes and use your existing tools. To reduce the risk of unwanted changes outside your workspace, local threads run in a [sandbox](https://developers.openai.com/codex/agent-approvals-security).

35- **Cloud threads** run in an isolated [environment](https://developers.openai.com/codex/cloud/environments). Codex clones your repository and checks out the branch its working on. Cloud threads are useful when you want to run work in parallel or delegate tasks from another device. To use cloud threads with your repo, push your code to GitHub first. You can also [delegate tasks from your local machine](https://developers.openai.com/codex/ide/cloud-tasks), which includes your current working state.35- **Cloud threads** run in an isolated [environment](https://developers.openai.com/codex/cloud/environments). Codex clones your repository and checks out the branch it's working on. Cloud threads are useful when you want to run work in parallel or delegate tasks from another device. To use cloud threads with your repo, push your code to GitHub first. You can also [delegate tasks from your local machine](https://developers.openai.com/codex/ide/cloud-tasks), which includes your current working state.

36 36 

37In the Codex app, you can also start a chat without choosing a project. Chats37In the Codex app, you can also start a chat without choosing a project. Chats

38arent tied to a saved repository or project folder. Use them for research,38aren't tied to a saved repository or project folder. Use them for research,

39planning, connected-tool workflows, or other work where Codex shouldnt start39planning, connected-tool workflows, or other work where Codex shouldn't start

40from a codebase. Chats use a Codex-managed `threads` directory under your Codex40from a codebase. Chats use a Codex-managed `threads` directory under your Codex

41home as their working location. By default, that location is `~/.codex/threads`.41home as their working location. By default, that location is `~/.codex/threads`.

42To change the base location for this state, set `CODEX_HOME`; see42To change the base location for this state, set `CODEX_HOME`; see


48 48 

49As the agent works, it also gathers context from file contents, tool output, and an ongoing record of what it has done and what it still needs to do.49As the agent works, it also gathers context from file contents, tool output, and an ongoing record of what it has done and what it still needs to do.

50 50 

51All information in a thread must fit within the models **context window**, which varies by model. Codex monitors and reports the remaining space. For longer tasks, Codex may automatically **compact** the context by summarizing relevant information and discarding less relevant details. With repeated compaction, Codex can continue working on complex tasks over many steps.51All information in a thread must fit within the model's **context window**, which varies by model. Codex monitors and reports the remaining space. For longer tasks, Codex may automatically **compact** the context by summarizing relevant information and discarding less relevant details. With repeated compaction, Codex can continue working on complex tasks over many steps.

52 52 

53## Goal mode53## Goal mode

54 54 


56task. Use it when the work may take many steps, or when Codex needs a clear56task. Use it when the work may take many steps, or when Codex needs a clear

57definition of done that it can keep checking as it works.57definition of done that it can keep checking as it works.

58 58 

59![Codex app goal progress controls above the composer](/images/codex/app/goal-dialog-light.webp)59<CodexScreenshot

60 alt="Codex app goal progress controls above the composer"

61 lightSrc="/images/codex/app/goal-dialog-light.webp"

62 darkSrc="/images/codex/app/goal-dialog-dark.webp"

63 class="mb-6"

64/>

60 65 

61When you set a goal, the goal text acts as both the starting prompt and the66When you set a goal, the goal text acts as both the starting prompt and the

62completion criteria. Codex uses it to decide what to do next and whether the67completion criteria. Codex uses it to decide what to do next and whether the


64app](https://developers.openai.com/codex/app/commands#set-or-manage-a-goal-with-goal), [IDE69app](https://developers.openai.com/codex/app/commands#set-or-manage-a-goal-with-goal), [IDE

65extension](https://developers.openai.com/codex/ide/slash-commands), or [CLI](https://developers.openai.com/codex/cli/slash-commands#set-or-view-a-task-goal-with-goal).70extension](https://developers.openai.com/codex/ide/slash-commands), or [CLI](https://developers.openai.com/codex/cli/slash-commands#set-or-view-a-task-goal-with-goal).

66 71 

67If `/goal` doesnt appear in the slash command list, enable `features.goals`72If `/goal` doesn't appear in the slash command list, enable `features.goals`

68in `config.toml`:73in `config.toml`:

69 74 

70```75```toml

71[features]76[features]

72goals = true77goals = true

73```78```


79Write goals so Codex can tell whether it has succeeded. Good goals include a84Write goals so Codex can tell whether it has succeeded. Good goals include a

80specific outcome, measurable target, or test criteria. For example:85specific outcome, measurable target, or test criteria. For example:

81 86 

82```87```text

83Migrate this codebase from JavaScript to TypeScript. The app should compile in88Migrate this codebase from JavaScript to TypeScript. The app should compile in

84strict mode without explicit `any` type definitions.89strict mode without explicit `any` type definitions.

85```90```

86 91 

87```92```text

88Reduce the time to interactive of the home page to below 1 second.93Reduce the time to interactive of the home page to below 1 second.

89```94```

90 95 

quickstart.md +335 −41

Details

1# Quickstart – Codex1# Quickstart

2 2 

3Every ChatGPT plan includes Codex.3Every ChatGPT plan includes Codex.

4 4 


6 6 

7## Setup7## Setup

8 8 

9<script

10 is:inline

11 data-astro-rerun

12 set:html={String.raw`

13(() => {

14 const platform =

15 (navigator.userAgentData?.platform || navigator.platform || "").toLowerCase();

16 const isDesktopAppPlatform =

17 platform.includes("mac") ||

18 platform.includes("win") ||

19 /macintosh|mac os x|windows|win64|win32/i.test(navigator.userAgent || "");

20 if (!isDesktopAppPlatform) return;

21 

22 const shouldPreferApp = () => {

23 try {

24 const url = new URL(window.location.href);

25 return !url.searchParams.get("setup");

26 } catch {

27 return true;

28 }

29 };

30 

31 if (!shouldPreferApp()) return;

32 

33 window.__tabsPreferred = window.__tabsPreferred || {};

34 window.__tabsPreferred.setup = "app";

35})();

36`}

37/>

38 

39<Tabs

40 id="codex-quickstart-setup"

41 param="setup"

42 defaultTab="ide"

43 size="3xl"

44 block={true}

45 blockThreshold={170}

46 tabs={[

47 {

48 id: "app",

49 label: "App",

50 subtitle: "Recommended",

51 },

52 { id: "ide", label: "IDE extension", subtitle: "Codex in your IDE" },

53 { id: "cli", label: "CLI", subtitle: "Codex in your terminal" },

54 { id: "cloud", label: "Cloud", subtitle: "Codex in your browser" },

55 ]}

56>

57 <div slot="app">

9The Codex app is available on macOS and Windows.58The Codex app is available on macOS and Windows.

10 59 

11Most Codex app features are available on both platforms. Platform-specific60Most Codex app features are available on both platforms. Platform-specific

12exceptions are noted in the relevant docs.61exceptions are noted in the relevant docs.

13 62 

63<WorkflowSteps variant="headings">

141. Download and install the Codex app641. Download and install the Codex app

15 65 

16 Download the Codex app for macOS or Windows. Choose the Intel build if youre using an Intel-based Mac.66 Download the Codex app for macOS or Windows. Choose the Intel build if you're using an Intel-based Mac.

17 67 

18 [Download for macOS (Apple Silicon)](https://persistent.oaistatic.com/codex-app-prod/Codex.dmg)[Download for macOS (Intel)](https://persistent.oaistatic.com/codex-app-prod/Codex-latest-x64.dmg)68 <CodexAppDownloadCta client:load className="mb-4" />

19 

20 Need a different operating system?

21 

22 [Download for Windows](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi)

23 69 

70 <div class="text-sm">

24 [Get notified for Linux](https://openai.com/form/codex-app/)71 [Get notified for Linux](https://openai.com/form/codex-app/)

72 </div>

73 

252. Open Codex and sign in742. Open Codex and sign in

26 75 

27 Once you downloaded and installed the Codex app, open it and sign in with your ChatGPT account or an OpenAI API key.76 Once you downloaded and installed the Codex app, open it and sign in with your ChatGPT account or an OpenAI API key.


31 81 

32 Choose a project folder that you want Codex to work in.82 Choose a project folder that you want Codex to work in.

33 83 

34 If you used the Codex app, CLI, or IDE Extension before youll see past projects that you worked on.84 If you used the Codex app, CLI, or IDE Extension before you'll see past projects that you worked on.

85 

354. Send your first message864. Send your first message

36 87 

37 After choosing the project, make sure **Local** is selected to have Codex work on your machine and send your first message to Codex.88 After choosing the project, make sure **Local** is selected to have Codex work on your machine and send your first message to Codex.

38 89 

39 You can ask Codex anything about the project or your computer in general. Here are some examples:90 You can ask Codex anything about the project or your computer in general. Here are some examples:

40 91 

41- Tell me about this project92 <ExampleGallery>

42- Build a classic Snake game in this repo.93 <ExampleTask

43- Find and fix bugs in my codebase with minimal, high-confidence changes.94 client:load

95 id="intro"

96 prompt="Tell me about this project"

97 iconName="brain"

98 />

99 <ExampleTask

100 client:load

101 id="snake-game"

102 shortDescription="Build a classic Snake game in this repo."

103 prompt={[

104 "Build a classic Snake game in this repo.",

105 "",

106 "Scope & constraints:",

107 "- Implement ONLY the classic Snake loop: grid movement, growing snake, food spawn, score, game-over, restart.",

108 "- Reuse existing project tooling/frameworks; do NOT add new dependencies unless truly required.",

109 "- Keep UI minimal and consistent with the repo’s existing styles (no new design systems, no extra animations).",

110 "",

111 "Implementation plan:",

112 "1) Inspect the repo to find the right place to add a small interactive game (existing pages/routes/components).",

113 "2) Implement game state (snake positions, direction, food, score, tick timer) with deterministic, testable logic.",

114 "3) Render: simple grid + snake + food; support keyboard controls (arrow keys/WASD) and on-screen controls if mobile is present in the repo.",

115 "4) Add basic tests for the core game logic (movement, collisions, growth, food placement) if the repo has a test runner.",

116 "",

117 "Deliverables:",

118 "- A small set of files/changes with clear names.",

119 "- Short run instructions (how to start dev server + where to navigate).",

120 "- A brief checklist of what to manually verify (controls, pause/restart, boundaries).",

121 ].join("\n")}

122 iconName="gamepad"

123 />

124 <ExampleTask

125 client:load

126 id="fix-bugs"

127 shortDescription="Find and fix bugs in my codebase with minimal, high-confidence changes."

128 prompt={[

129 "Find and fix bugs in my codebase with minimal, high-confidence changes.",

130 "",

131 "Method (grounded + disciplined):",

132 "1) Reproduce: run tests/lint/build (or follow the existing repo scripts). If I provided an error, reproduce that exact failure.",

133 "2) Localize: identify the smallest set of files/lines involved (stack traces, failing tests, logs).",

134 "3) Fix: implement the minimal change that resolves the issue without refactors or unrelated cleanup.",

135 "4) Prove: add/update a focused test (or a tight repro) that fails before and passes after.",

136 "",

137 "Constraints:",

138 "- Do NOT invent errors or pretend to run commands you cannot run.",

139 "- No scope drift: no new features, no UI embellishments, no style overhauls.",

140 "- If information is missing, state what you can confirm from the repo and what remains unknown.",

141 "",

142 "Output:",

143 "- Summary (3–6 sentences max): what was broken, why, and the fix.",

144 "- Then ≤5 bullets: What changed, Where (paths), Evidence (tests/logs), Risks, Next steps.",

145 ].join("\n")}

146 iconName="search"

147 />

148 </ExampleGallery>

44 149 

45 If you need more inspiration, explore [Codex use cases](https://developers.openai.com/codex/use-cases).150 If you need more inspiration, explore [Codex use cases](https://developers.openai.com/codex/use-cases).

46 If youre new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).151 If you're new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).

152 

153</WorkflowSteps>

154 

155 

156 </div>

47 157 

158 <div slot="ide">

48Install the Codex extension for your IDE.159Install the Codex extension for your IDE.

49 160 

161<WorkflowSteps variant="headings">

501. Install the Codex extension1621. Install the Codex extension

51 163 

52 Download it for your editor:164 Download it for your editor:


64 178 

65 Codex starts in Agent mode by default, which lets it read files, run commands, and write changes in your project directory.179 Codex starts in Agent mode by default, which lets it read files, run commands, and write changes in your project directory.

66 180

67- Tell me about this project181 <ExampleGallery>

68- Build a classic Snake game in this repo.182 <ExampleTask

69- Find and fix bugs in my codebase with minimal, high-confidence changes.183 client:load

184 id="intro"

185 prompt="Tell me about this project"

186 iconName="brain"

187 />

188 <ExampleTask

189 client:load

190 id="snake-game"

191 shortDescription="Build a classic Snake game in this repo."

192 prompt={[

193 "Build a classic Snake game in this repo.",

194 "",

195 "Scope & constraints:",

196 "- Implement ONLY the classic Snake loop: grid movement, growing snake, food spawn, score, game-over, restart.",

197 "- Reuse existing project tooling/frameworks; do NOT add new dependencies unless truly required.",

198 "- Keep UI minimal and consistent with the repo’s existing styles (no new design systems, no extra animations).",

199 "",

200 "Implementation plan:",

201 "1) Inspect the repo to find the right place to add a small interactive game (existing pages/routes/components).",

202 "2) Implement game state (snake positions, direction, food, score, tick timer) with deterministic, testable logic.",

203 "3) Render: simple grid + snake + food; support keyboard controls (arrow keys/WASD) and on-screen controls if mobile is present in the repo.",

204 "4) Add basic tests for the core game logic (movement, collisions, growth, food placement) if the repo has a test runner.",

205 "",

206 "Deliverables:",

207 "- A small set of files/changes with clear names.",

208 "- Short run instructions (how to start dev server + where to navigate).",

209 "- A brief checklist of what to manually verify (controls, pause/restart, boundaries).",

210 ].join("\n")}

211 iconName="gamepad"

212 />

213 <ExampleTask

214 client:load

215 id="fix-bugs"

216 shortDescription="Find and fix bugs in my codebase with minimal, high-confidence changes."

217 prompt={[

218 "Find and fix bugs in my codebase with minimal, high-confidence changes.",

219 "",

220 "Method (grounded + disciplined):",

221 "1) Reproduce: run tests/lint/build (or follow the existing repo scripts). If I provided an error, reproduce that exact failure.",

222 "2) Localize: identify the smallest set of files/lines involved (stack traces, failing tests, logs).",

223 "3) Fix: implement the minimal change that resolves the issue without refactors or unrelated cleanup.",

224 "4) Prove: add/update a focused test (or a tight repro) that fails before and passes after.",

225 "",

226 "Constraints:",

227 "- Do NOT invent errors or pretend to run commands you cannot run.",

228 "- No scope drift: no new features, no UI embellishments, no style overhauls.",

229 "- If information is missing, state what you can confirm from the repo and what remains unknown.",

230 "",

231 "Output:",

232 "- Summary (3–6 sentences max): what was broken, why, and the fix.",

233 "- Then ≤5 bullets: What changed, Where (paths), Evidence (tests/logs), Risks, Next steps.",

234 ].join("\n")}

235 iconName="search"

236 />

237 </ExampleGallery>

238 

704. Use Git checkpoints2394. Use Git checkpoints

71 240 

72 Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.241 Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.

73 If youre new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).242 If you're new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).

243

244 <CtaPillLink href="/codex/ide" label="Learn more about the Codex IDE extension" class="mt-8" />

245</WorkflowSteps>

74 246 

75 [Learn more about the Codex IDE extension](https://developers.openai.com/codex/ide)

76 247 

248 </div>

249 

250 <div slot="cli">

77The Codex CLI is supported on macOS, Windows, and Linux.251The Codex CLI is supported on macOS, Windows, and Linux.

78 252 

253<WorkflowSteps variant="headings">

791. Install the Codex CLI2541. Install the Codex CLI

80 255 

81 On macOS or Linux, use the standalone installer:256 On macOS or Linux, use the standalone installer:

82 257 

83 ```258 ```bash

84 curl -fsSL https://chatgpt.com/codex/install.sh | sh259 curl -fsSL https://chatgpt.com/codex/install.sh | sh

85 ```260 ```

86 261 

87 On Windows, run:262 On Windows, run:

88 263 

89 ```264 ```powershell

90 powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"265 powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

91 ```266 ```

92 267 


95 [Environment variables](https://developers.openai.com/codex/environment-variables#installer-variables)270 [Environment variables](https://developers.openai.com/codex/environment-variables#installer-variables)

96 for details.271 for details.

97 272 

98 ```273 ```bash

99 curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh274 curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh

100 ```275 ```

101 276 

102 ```277 ```powershell

103 $env:CODEX_NON_INTERACTIVE=1; irm https://chatgpt.com/codex/install.ps1 | iex278 $env:CODEX_NON_INTERACTIVE=1; irm https://chatgpt.com/codex/install.ps1 | iex

104 ```279 ```

105 280 

106 You can also install Codex CLI with npm or Homebrew:281 You can also install Codex CLI with npm or Homebrew:

107 282 

108 ```283 ```bash

109 npm install -g @openai/codex284 npm install -g @openai/codex

110 ```285 ```

111 286 

112 ```287 ```bash

113 brew install --cask codex288 brew install --cask codex

114 ```289 ```

290 

1152. Run `codex` and sign in2912. Run `codex` and sign in

116 292 

117 Run `codex` in your terminal to get started. Youll be prompted to sign in with your ChatGPT account or an API key.293 Run `codex` in your terminal to get started. You'll be prompted to sign in with your ChatGPT account or an API key.

294 

1183. Ask Codex to work in your current directory2953. Ask Codex to work in your current directory

119 296 

120 Once authenticated, you can ask Codex to perform tasks in the current directory.297 Once authenticated, you can ask Codex to perform tasks in the current directory.

121 298 

122- Tell me about this project299 <ExampleGallery>

123- Build a classic Snake game in this repo.300 <ExampleTask

124- Find and fix bugs in my codebase with minimal, high-confidence changes.301 client:load

302 id="intro"

303 prompt="Tell me about this project"

304 iconName="brain"

305 />

306 <ExampleTask

307 client:load

308 id="snake-game"

309 shortDescription="Build a classic Snake game in this repo."

310 prompt={[

311 "Build a classic Snake game in this repo.",

312 "",

313 "Scope & constraints:",

314 "- Implement ONLY the classic Snake loop: grid movement, growing snake, food spawn, score, game-over, restart.",

315 "- Reuse existing project tooling/frameworks; do NOT add new dependencies unless truly required.",

316 "- Keep UI minimal and consistent with the repo’s existing styles (no new design systems, no extra animations).",

317 "",

318 "Implementation plan:",

319 "1) Inspect the repo to find the right place to add a small interactive game (existing pages/routes/components).",

320 "2) Implement game state (snake positions, direction, food, score, tick timer) with deterministic, testable logic.",

321 "3) Render: simple grid + snake + food; support keyboard controls (arrow keys/WASD) and on-screen controls if mobile is present in the repo.",

322 "4) Add basic tests for the core game logic (movement, collisions, growth, food placement) if the repo has a test runner.",

323 "",

324 "Deliverables:",

325 "- A small set of files/changes with clear names.",

326 "- Short run instructions (how to start dev server + where to navigate).",

327 "- A brief checklist of what to manually verify (controls, pause/restart, boundaries).",

328 ].join("\n")}

329 iconName="gamepad"

330 />

331 <ExampleTask

332 client:load

333 id="fix-bugs"

334 shortDescription="Find and fix bugs in my codebase with minimal, high-confidence changes."

335 prompt={[

336 "Find and fix bugs in my codebase with minimal, high-confidence changes.",

337 "",

338 "Method (grounded + disciplined):",

339 "1) Reproduce: run tests/lint/build (or follow the existing repo scripts). If I provided an error, reproduce that exact failure.",

340 "2) Localize: identify the smallest set of files/lines involved (stack traces, failing tests, logs).",

341 "3) Fix: implement the minimal change that resolves the issue without refactors or unrelated cleanup.",

342 "4) Prove: add/update a focused test (or a tight repro) that fails before and passes after.",

343 "",

344 "Constraints:",

345 "- Do NOT invent errors or pretend to run commands you cannot run.",

346 "- No scope drift: no new features, no UI embellishments, no style overhauls.",

347 "- If information is missing, state what you can confirm from the repo and what remains unknown.",

348 "",

349 "Output:",

350 "- Summary (3–6 sentences max): what was broken, why, and the fix.",

351 "- Then ≤5 bullets: What changed, Where (paths), Evidence (tests/logs), Risks, Next steps.",

352 ].join("\n")}

353 iconName="search"

354 />

355 </ExampleGallery>

356 

1254. Use Git checkpoints3574. Use Git checkpoints

126 358 

127 Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.359 Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.

128 If youre new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).360 If you're new to Codex, read the [best practices guide](https://developers.openai.com/codex/learn/best-practices).

361</WorkflowSteps>

362 

363 <CtaPillLink href="/codex/cli" label="Learn more about the Codex CLI" class="mt-8" />

129 364 

130[Learn more about the Codex CLI](https://developers.openai.com/codex/cli)365 </div>

131 366 

367 <div slot="cloud">

132Use Codex in the cloud at [chatgpt.com/codex](https://chatgpt.com/codex).368Use Codex in the cloud at [chatgpt.com/codex](https://chatgpt.com/codex).

133 369 

370<WorkflowSteps variant="headings">

1341. Open Codex in your browser3711. Open Codex in your browser

135 372 

136 Go to [chatgpt.com/codex](https://chatgpt.com/codex). You can also delegate a task to Codex by tagging `@codex` in a GitHub pull request comment (requires signing in to ChatGPT).373 Go to [chatgpt.com/codex](https://chatgpt.com/codex). You can also delegate a task to Codex by tagging `@codex` in a GitHub pull request comment (requires signing in to ChatGPT).


141 380 

142 Once your environment is ready, launch coding tasks from the [Codex interface](https://chatgpt.com/codex). You can monitor progress in real time by viewing logs, or let tasks run in the background.381 Once your environment is ready, launch coding tasks from the [Codex interface](https://chatgpt.com/codex). You can monitor progress in real time by viewing logs, or let tasks run in the background.

143 382 

144- Tell me about this project383 <ExampleGallery>

145- Explain the top failure modes of my application's architecture.384 <ExampleTask

146- Find and fix bugs in my codebase with minimal, high-confidence changes.385 client:load

386 id="intro"

387 prompt="Tell me about this project"

388 iconName="brain"

389 />

390 <ExampleTask

391 client:load

392 id="architecture-failure-modes"

393 shortDescription="Explain the top failure modes of my application's architecture."

394 prompt={[

395 "Explain the top failure modes of my application's architecture.",

396 "",

397 "Approach:",

398 "- Derive the architecture from repo evidence (services, DBs, queues, network calls, critical paths).",

399 "- Identify realistic failure modes (availability, data loss, latency, scaling, consistency, security, dependency outages).",

400 "",

401 "Output:",

402 "- 1 short overview paragraph.",

403 "- Then ≤5 bullets: Failure mode, Trigger, Symptoms, Detection, Mitigation.",

404 "- If key architecture details are missing, state what you inferred vs. what you confirmed.",

405 ].join("\n")}

406 iconName="brain"

407 />

408 <ExampleTask

409 client:load

410 id="fix-bugs"

411 shortDescription="Find and fix bugs in my codebase with minimal, high-confidence changes."

412 prompt={[

413 "Find and fix bugs in my codebase with minimal, high-confidence changes.",

414 "",

415 "Method (grounded + disciplined):",

416 "1) Reproduce: run tests/lint/build (or follow the existing repo scripts). If I provided an error, reproduce that exact failure.",

417 "2) Localize: identify the smallest set of files/lines involved (stack traces, failing tests, logs).",

418 "3) Fix: implement the minimal change that resolves the issue without refactors or unrelated cleanup.",

419 "4) Prove: add/update a focused test (or a tight repro) that fails before and passes after.",

420 "",

421 "Constraints:",

422 "- Do NOT invent errors or pretend to run commands you cannot run.",

423 "- No scope drift: no new features, no UI embellishments, no style overhauls.",

424 "- If information is missing, state what you can confirm from the repo and what remains unknown.",

425 "",

426 "Output:",

427 "- Summary (3–6 sentences max): what was broken, why, and the fix.",

428 "- Then ≤5 bullets: What changed, Where (paths), Evidence (tests/logs), Risks, Next steps.",

429 ].join("\n")}

430 iconName="search"

431 />

432 </ExampleGallery>

433 

1474. Review changes and create a pull request4344. Review changes and create a pull request

148 435 

149 When a task completes, review the proposed changes in the diff view. You can iterate on the results or create a pull request directly in your GitHub repository.436 When a task completes, review the proposed changes in the diff view. You can iterate on the results or create a pull request directly in your GitHub repository.

150 437 

151 Codex also provides a preview of the changes. You can accept the PR as is, or check out the branch locally to test the changes:438 Codex also provides a preview of the changes. You can accept the PR as is, or check out the branch locally to test the changes:

152 439 

153 ```440 ```bash

154 git fetch441 git fetch

155 git checkout <branch-name>442 git checkout <branch-name>

156 ```443 ```

157 444 

158 [Learn more about Codex cloud](https://developers.openai.com/codex/cloud)445 <CtaPillLink href="/codex/cloud" label="Learn more about Codex cloud" class="mt-8" />

446</WorkflowSteps>

159 447 

160## Next steps448 </div>

161 449</Tabs>

162[Learn more about the Codex app

163 450 

164Use the Codex app to work with your local projects.](https://developers.openai.com/codex/app)451<div class="h-6" aria-hidden="true"></div>

165[Migrate to Codex

166 452 

167Move supported instruction files, MCP server configuration, skills, and453## Next steps

168subagents into Codex.](https://developers.openai.com/codex/migrate)

169 454 

455[<IconItem title="Learn more about the Codex app" className="mt-2">

456 <span slot="icon">

457 <OpenBook />

458 </span>

459 Use the Codex app to work with your local projects.

460 </IconItem>](https://developers.openai.com/codex/app)

461 

462[<IconItem title="Migrate to Codex" className="mt-2">

463 <span slot="icon">

464 <CompareArrows />

465 </span>

466 Move supported instruction files, MCP server configuration, skills, and

467 subagents into Codex.

468 </IconItem>](https://developers.openai.com/codex/migrate)

Details

1# Remote connections – Codex1# Remote connections

2 

3import {

4 Desktop,

5 Storage,

6 Terminal,

7} from "@components/react/oai/platform/ui/Icon.react";

2 8 

3Remote connections let you use Codex from another device or another machine.9Remote connections let you use Codex from another device or another machine.

4Use Codex in the ChatGPT mobile app to work with Codex on a connected Mac or10Use Codex in the ChatGPT mobile app to work with Codex on a connected Mac or

5Windows device, continue work from another supported Codex App device, or connect11Windows device, continue work from another supported Codex App device, or connect

6the Codex App to projects on an SSH host.12the Codex App to projects on an SSH host.

7 13 

8Remote access uses the connected hosts projects, threads, files, credentials,14Remote access uses the connected host's projects, threads, files, credentials,

9permissions, plugins, Computer Use, browser setup, and local tools.15permissions, plugins, Computer Use, browser setup, and local tools.

10 16 

11## What you can do remotely17## What you can do remotely


21App host. To connect Codex to a project on an SSH host, see27App host. To connect Codex to a project on an SSH host, see

22[connect to an SSH host](#connect-to-an-ssh-host).28[connect to an SSH host](#connect-to-an-ssh-host).

23 29 

24![Codex mobile setup screen alongside the ChatGPT mobile Codex project list](/images/codex/app/mobile-setup-light.webp)30<div class="not-prose my-6 max-w-4xl rounded-xl bg-[url('/images/codex/codex-wallpaper-1.webp')] bg-cover bg-center p-4 md:p-8">

31 <CodexScreenshot

32 alt="Codex mobile setup screen alongside the ChatGPT mobile Codex project list"

33 lightSrc="/images/codex/app/mobile-setup-light.webp"

34 darkSrc="/images/codex/app/mobile-setup-dark.webp"

35 variant="no-wallpaper"

36 maxHeight="none"

37 maxWidth="420px"

38 />

39</div>

25 40 

26## Before you set up mobile access41## Before you set up mobile access

27 42 

28Codex mobile setup supports Codex App hosts on macOS and Windows. You can43Codex mobile setup supports Codex App hosts on macOS and Windows. You can

29control a Windows host from ChatGPT on iOS or Android, or from a Mac running44 control a Windows host from ChatGPT on iOS or Android, or from a Mac running

30Codex. Windows cant currently control another computer from the Codex App.45 Codex. Windows can't currently control another computer from the Codex App.

31 46 

32Make sure you have:47Make sure you have:

33 48 

34- Codex access in the ChatGPT account and workspace you want to use.49- Codex access in the ChatGPT account and workspace you want to use.

35- The latest ChatGPT mobile app on an iOS or Android device. If you dont see50- The latest ChatGPT mobile app on an iOS or Android device. If you don't see

36 Codex in the ChatGPT mobile app, update ChatGPT first.51 Codex in the ChatGPT mobile app, update ChatGPT first.

37- The latest Codex App for macOS or Windows running on a host thats awake,52- The latest Codex App for macOS or Windows running on a host that's awake,

38 online, and signed in to the same account and workspace. Mobile setup starts53 online, and signed in to the same account and workspace. Mobile setup starts

39 from the Codex App; you cant set it up from the Codex CLI or IDE Extension.54 from the Codex App; you can't set it up from the Codex CLI or IDE Extension.

40- Any required multi-factor authentication, SSO, or passkey configuration for55- Any required multi-factor authentication, SSO, or passkey configuration for

41 that account or workspace.56 that account or workspace.

42 57 


48Start in the Codex App on the host you want to connect. The setup flow enables63Start in the Codex App on the host you want to connect. The setup flow enables

49remote access for that host, then shows a QR code you can scan from your phone.64remote access for that host, then shows a QR code you can scan from your phone.

50 65 

66<WorkflowSteps variant="headings">

67 

511. Start Codex mobile setup.681. Start Codex mobile setup.

52 69 

53 Open Codex on the host and select **Set up Codex mobile** in the70 Open Codex on the host and select **Set up Codex mobile** in the


68 devices. You can also choose whether to keep the computer awake, enable88 devices. You can also choose whether to keep the computer awake, enable

69 Computer Use, or install the Chrome extension.89 Computer Use, or install the Chrome extension.

70 90 

71![Connections settings showing devices that can control this host and remote access settings](/images/codex/app/mobile-control-this-mac-framed-light.webp)91</WorkflowSteps>

92 

93<div class="not-prose my-6 max-w-4xl">

94 <CodexScreenshot

95 alt="Connections settings showing devices that can control this host and remote access settings"

96 lightSrc="/images/codex/app/mobile-control-this-mac-framed-light.webp"

97 darkSrc="/images/codex/app/mobile-control-this-mac-framed-dark.webp"

98 maxHeight="480px"

99 class="p-3 sm:p-4"

100 imageClass="rounded-xl"

101 />

102</div>

72 103 

73## Choose what to connect104## Choose what to connect

74 105 

75Start with the laptop or desktop where you already use Codex. Add an always-on106Start with the laptop or desktop where you already use Codex. Add an always-on

76computer or SSH host when you need continuous access or a different environment.107computer or SSH host when you need continuous access or a different environment.

77 108 

78### Your laptop or desktop109### <span class="not-prose inline-flex items-center gap-3 align-middle"><span class="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-surface-secondary text-secondary"><Desktop width={17} height={17} /></span><span>Your laptop or desktop</span></span>

79 110 

80Connect the Mac or Windows PC where you already run Codex day to day. This gives111Connect the Mac or Windows PC where you already run Codex day to day. This gives

81remote access to the same projects, threads, credentials, plugins, and local112remote access to the same projects, threads, credentials, plugins, and local

82setup you already use.113setup you already use.

83 114 

84If that computer sleeps, loses network access, or closes Codex, remote access115If that computer sleeps, loses network access, or closes Codex, remote access

85stops until its available again. If you use this computer as your host device,116stops until it's available again. If you use this computer as your host device,

86keep it plugged in and use the hosts connection settings to keep it awake where117keep it plugged in and use the host's connection settings to keep it awake where

87available.118available.

88 119 

89On a Mac laptop, remote access can stay available with the lid open and power120On a Mac laptop, remote access can stay available with the lid open and power


95foreground, so remote control is best for starting or checking work while you126foreground, so remote control is best for starting or checking work while you

96dedicate the host desktop to the task.127dedicate the host desktop to the task.

97 128 

98### A dedicated always-on computer129### <span class="not-prose inline-flex items-center gap-3 align-middle"><span class="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-surface-secondary text-secondary"><Storage width={17} height={17} /></span><span>A dedicated always-on computer</span></span>

99 130 

100Use a dedicated always-on Mac or Windows PC when you want Codex to stay131Use a dedicated always-on Mac or Windows PC when you want Codex to stay

101reachable for longer-running work.132reachable for longer-running work.


103Install the projects, credentials, plugins, MCP servers, and tools Codex should134Install the projects, credentials, plugins, MCP servers, and tools Codex should

104use on that machine.135use on that machine.

105 136 

106### A remote development environment137### <span class="not-prose inline-flex items-center gap-3 align-middle"><span class="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-surface-secondary text-secondary"><Terminal width={17} height={17} /></span><span>A remote development environment</span></span>

107 138 

108Use an SSH host or managed remote development environment when the project139Use an SSH host or managed remote development environment when the project

109already lives in a remote environment. Connect the Codex App host to that140already lives in a remote environment. Connect the Codex App host to that


114For SSH setup details, see [connect to an SSH host](#connect-to-an-ssh-host).145For SSH setup details, see [connect to an SSH host](#connect-to-an-ssh-host).

115 146 

116For browser or desktop tasks on an always-on computer or remote host, enable147For browser or desktop tasks on an always-on computer or remote host, enable

117Computer Use and install the Chrome extension on that host.148 Computer Use and install the Chrome extension on that host.

118 149 

119## What comes from the connected host150## What comes from the connected host

120 151 


126- Repository files and local documents come from the connected host.157- Repository files and local documents come from the connected host.

127- Shell commands run on that host or remote environment.158- Shell commands run on that host or remote environment.

128- Any plugin installed on that host is available when you use Codex remotely.159- Any plugin installed on that host is available when you use Codex remotely.

129- MCP servers, skills, browser access, and Computer Use come from that hosts160- MCP servers, skills, browser access, and Computer Use come from that host's

130 configuration.161 configuration.

131- Signed-in websites and desktop apps are available only when the host can162- Signed-in websites and desktop apps are available only when the host can

132 access them.163 access them.


147In Codex on a Mac, use **Settings > Connections > Control other devices** to add178In Codex on a Mac, use **Settings > Connections > Control other devices** to add

148the other host. A device can allow remote access and control another device at179the other host. A device can allow remote access and control another device at

149the same time. You can control Windows hosts from a Mac or from ChatGPT on iOS180the same time. You can control Windows hosts from a Mac or from ChatGPT on iOS

150or Android, but you cant use Windows to control another computer. For example,181or Android, but you can't use Windows to control another computer. For example,

151you can control a Windows device from your Mac or phone, but you cant use a182you can control a Windows device from your Mac or phone, but you can't use a

152Windows device to control another Windows device.183Windows device to control another Windows device.

153 184 

154![Connections settings showing another device available under Control other devices](/images/codex/app/mobile-control-other-devices-framed-light.webp)185<div class="not-prose my-6 max-w-4xl">

186 <CodexScreenshot

187 alt="Connections settings showing another device available under Control other devices"

188 lightSrc="/images/codex/app/mobile-control-other-devices-framed-light.webp"

189 darkSrc="/images/codex/app/mobile-control-other-devices-framed-dark.webp"

190 maxHeight="360px"

191 class="p-3 sm:p-4"

192 imageClass="rounded-xl"

193 />

194</div>

155 195 

156## Connect to an SSH host196## Connect to an SSH host

157 197 


163normal SSH access: trusted keys, least-privilege accounts, and no203normal SSH access: trusted keys, least-privilege accounts, and no

164unauthenticated public listeners.204unauthenticated public listeners.

165 205 

206<WorkflowSteps variant="headings">

207 

1661. Add the host to your SSH config so Codex can auto-discover it.2081. Add the host to your SSH config so Codex can auto-discover it.

167 209 

168 ```210 ```text

169 Host devbox211 Host devbox

170 HostName devbox.example.com212 HostName devbox.example.com

171 User you213 User you


174 216 

175 Codex reads concrete host aliases from `~/.ssh/config`, resolves them with217 Codex reads concrete host aliases from `~/.ssh/config`, resolves them with

176 OpenSSH, and ignores pattern-only hosts.218 OpenSSH, and ignores pattern-only hosts.

219 

1772. Confirm you can SSH to the host from the machine running the Codex App.2202. Confirm you can SSH to the host from the machine running the Codex App.

178 221 

179 ```222 ```bash

180 ssh devbox223 ssh devbox

181 ```224 ```

225 

1823. Install and authenticate Codex on the remote host.2263. Install and authenticate Codex on the remote host.

183 227 

184 The app starts the remote Codex app server through SSH, using the remote228 The app starts the remote Codex app server through SSH, using the remote

185 users login shell. Make sure the `codex` command is available on the229 user's login shell. Make sure the `codex` command is available on the

186 remote hosts `PATH` in that shell.230 remote host's `PATH` in that shell.

231 

1874. In the Codex App, open **Settings > Connections**, add or enable the SSH2324. In the Codex App, open **Settings > Connections**, add or enable the SSH

188 host, then choose a remote project folder.233 host, then choose a remote project folder.

189 234 

190![Codex app settings showing SSH remote connections](/images/codex/app/remote-connections-light.webp)235</WorkflowSteps>

236 

237<CodexScreenshot

238 alt="Codex app settings showing SSH remote connections"

239 lightSrc="/images/codex/app/remote-connections-light.webp"

240 darkSrc="/images/codex/app/remote-connections-dark.webp"

241 maxHeight="420px"

242 class="p-3 sm:p-4"

243 imageClass="rounded-xl"

244/>

191 245 

192## Authentication and network exposure246## Authentication and network exposure

193 247 

194Remote connections use SSH to start and manage the remote Codex app server.248Remote connections use SSH to start and manage the remote Codex app server.

195Dont expose app-server transports directly on a shared or public network.249Don't expose app-server transports directly on a shared or public network.

196 250 

197If you need to reach a remote machine outside your current network, use a VPN251If you need to reach a remote machine outside your current network, use a VPN

198or mesh networking tool instead of exposing the app server directly to the252or mesh networking tool instead of exposing the app server directly to the


200 254 

201## Troubleshooting255## Troubleshooting

202 256 

203### You dont see the host on your phone257### You don't see the host on your phone

204 258 

205Confirm that the Codex App is running on the host, youve enabled **Allow other259Confirm that the Codex App is running on the host, you've enabled **Allow other

206devices to connect**, and both devices use the same ChatGPT account and260devices to connect**, and both devices use the same ChatGPT account and

207workspace.261workspace.

208 262 

209### The approval request doesnt appear263### The approval request doesn't appear

210 264 

211Open Codex in the ChatGPT mobile app. Confirm that the phone and host use the265Open Codex in the ChatGPT mobile app. Confirm that the phone and host use the

212same ChatGPT account and workspace, then scan the QR code again or restart setup266same ChatGPT account and workspace, then scan the QR code again or restart setup

213from the host. If you use a ChatGPT workspace, ask your admin to confirm that267from the host. If you use a ChatGPT workspace, ask your admin to confirm that

214theyve enabled Remote Control access.268they've enabled Remote Control access.

215 269 

216### The remote session disconnects270### The remote session disconnects

217 271 


223Complete the account or workspace authentication prompt shown during setup. If277Complete the account or workspace authentication prompt shown during setup. If

224your organization requires SSO, multi-factor authentication, or a passkey,278your organization requires SSO, multi-factor authentication, or a passkey,

225finish that flow before trying again. If setup still fails, ask your workspace279finish that flow before trying again. If setup still fails, ask your workspace

226admin to confirm that theyve enabled Remote Control access.280admin to confirm that they've enabled Remote Control access.

227 281 

228## See also282## See also

229 283 

sdk.md +10 −10

Details

1# SDK – Codex1# Codex SDK

2 2 

3If you use Codex through the Codex CLI, the IDE extension, or Codex Web, you can also control it programmatically.3If you use Codex through the Codex CLI, the IDE extension, or Codex Web, you can also control it programmatically.

4 4 


11 11 

12## TypeScript library12## TypeScript library

13 13 

14The TypeScript library provides a way to control Codex from within your application thats more comprehensive and flexible than non-interactive mode.14The TypeScript library provides a way to control Codex from within your application that's more comprehensive and flexible than non-interactive mode.

15 15 

16Use the library server-side; it requires Node.js 18 or later.16Use the library server-side; it requires Node.js 18 or later.

17 17 


19 19 

20To get started, install the Codex SDK using `npm`:20To get started, install the Codex SDK using `npm`:

21 21 

22```22```bash

23npm install @openai/codex-sdk23npm install @openai/codex-sdk

24```24```

25 25 


27 27 

28Start a thread with Codex and run it with your prompt.28Start a thread with Codex and run it with your prompt.

29 29 

30```30```ts

31import { Codex } from "@openai/codex-sdk";31 

32 32 

33const codex = new Codex();33const codex = new Codex();

34const thread = codex.startThread();34const thread = codex.startThread();


41 41 

42Call `run()` again to continue on the same thread, or resume a past thread by providing a thread ID.42Call `run()` again to continue on the same thread, or resume a past thread by providing a thread ID.

43 43 

44```44```ts

45// running the same thread45// running the same thread

46const result = await thread.run("Implement the plan");46const result = await thread.run("Implement the plan");

47 47 


66 66 

67To install the SDK run:67To install the SDK run:

68 68 

69```69```bash

70pip install openai-codex70pip install openai-codex

71```71```

72 72 


80 80 

81Start Codex, create a thread, and run a prompt:81Start Codex, create a thread, and run a prompt:

82 82 

83```83```python

84from openai_codex import Codex, Sandbox84from openai_codex import Codex, Sandbox

85 85 

86with Codex() as codex:86with Codex() as codex:


94 94 

95Use `AsyncCodex` when your application is already asynchronous:95Use `AsyncCodex` when your application is already asynchronous:

96 96 

97```97```python

98import asyncio98import asyncio

99 99 

100from openai_codex import AsyncCodex100from openai_codex import AsyncCodex


113Use the same `Sandbox` presets when creating a thread or changing its filesystem115Use the same `Sandbox` presets when creating a thread or changing its filesystem

114access for a later turn:116access for a later turn:

115 117 

116```118```python

117from openai_codex import Codex, Sandbox119from openai_codex import Codex, Sandbox

118 120 

119with Codex() as codex:121with Codex() as codex:

security.md +11 −6

Details

1# Security – Codex1# Codex Security

2 2 

3[Install plugin in Codex App](https://chatgpt.com/plugins/share/676aca3811d54fa7bcdef5255236b3c4)3<CtaPillLink

4 href="https://chatgpt.com/plugins/share/676aca3811d54fa7bcdef5255236b3c4"

5 label="Install plugin in Codex App"

6 icon="external"

7 class="my-8"

8/>

4 9 

5For installation steps, supported skills, and review boundaries, see the10For installation steps, supported skills, and review boundaries, see the

6[Codex Security plugin guide](https://developers.openai.com/codex/security/plugin).11[Codex Security plugin guide](https://developers.openai.com/codex/security/plugin).


12- [Remediate a vulnerability backlog](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog) with bounded fixes for approved findings.17- [Remediate a vulnerability backlog](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog) with bounded fixes for approved findings.

13 18 

14The plugin runs in your Codex thread. Codex Security cloud scans connected19The plugin runs in your Codex thread. Codex Security cloud scans connected

15GitHub repositories through Codex Web. For Codex sandboxing, approvals,20 GitHub repositories through Codex Web. For Codex sandboxing, approvals,

16network controls, and admin settings, see [Agent approvals &21 network controls, and admin settings, see [Agent approvals &

17security](https://developers.openai.com/codex/agent-approvals-security).22 security](https://developers.openai.com/codex/agent-approvals-security).

18 23 

19## Codex Security cloud24## Codex Security cloud

20 25 


40 45 

41## Codex Security cloud access and prerequisites46## Codex Security cloud access and prerequisites

42 47 

43Codex Security is available for ChatGPT Enterprise, Edu, Business, and Pro users. It works with connected GitHub repositories through Codex Web. If you need access or a repository isnt visible, confirm the repository is available through your Codex Web workspace or contact your OpenAI account team.48Codex Security is available for ChatGPT Enterprise, Edu, Business, and Pro users. It works with connected GitHub repositories through Codex Web. If you need access or a repository isn't visible, confirm the repository is available through your Codex Web workspace or contact your OpenAI account team.

44 49 

45## Related docs50## Related docs

46 51 

security/plugin.md +54 −18

Details

1# Plugin – Codex Security1# Codex Security plugin

2 2 

3The Codex Security plugin adds security-review workflows to Codex for code that3The Codex Security plugin adds security-review workflows to Codex for code that

4you have authorization to assess. Use it from an open repository to investigate4you have authorization to assess. Use it from an open repository to investigate


6findings, and prepare minimal fixes for review.6findings, and prepare minimal fixes for review.

7 7 

8This page covers the installable plugin that runs in your Codex thread. For8This page covers the installable plugin that runs in your Codex thread. For

9the research-preview product that scans connected GitHub repositories through9 the research-preview product that scans connected GitHub repositories through

10Codex Web, see [Codex Security](https://developers.openai.com/codex/security).10 Codex Web, see [Codex Security](https://developers.openai.com/codex/security).

11 11 

12## Install the plugin12## Install the plugin

13 13 

14[Install the Codex Security plugin](codex://plugins/install/codex-security?marketplace=openai-curated)14<Tabs

15 15 param="install"

16After installation, start a new thread in the repository you want to16 tabs={[

17assess.17 {

18 18 id: "app",

191. Open Codex19 label: "Codex app",

20 },

21 {

22 id: "cli",

23 label: "Codex CLI",

24 },

25 ]}

26>

27 <div slot="app">

28 <ButtonLink

29 href="codex://plugins/install/codex-security?marketplace=openai-curated"

30 color="primary"

31 variant="solid"

32 size="lg"

33 pill

34 className="mt-2"

35 >

36 Install the Codex Security plugin

37 </ButtonLink>

38 

39 <br />

40 

41 After installation, start a new thread in the repository you want to

42 assess.

43 

44 </div>

45 

46 <div slot="cli">

47 <WorkflowSteps variant="headings">

48 1. Open Codex

20 49 

21 Start Codex from your repository:50 Start Codex from your repository:

22 51 

23 ```52 ```bash

24 codex53 codex

25 ```54 ```

262. Open the plugin browser55 

56 2. Open the plugin browser

27 57 

28 Enter:58 Enter:

29 59 

30 ```60 ```text

31 /plugins61 /plugins

32 ```62 ```

333. Install Codex Security63 

64 3. Install Codex Security

34 65 

35 Search for **Codex Security**, open it, and select `Install plugin`.66 Search for **Codex Security**, open it, and select `Install plugin`.

364. Start a new thread67 

68 4. Start a new thread

37 69 

38 Start a new thread in the repository you are authorized to review.70 Start a new thread in the repository you are authorized to review.

71 </WorkflowSteps>

72 

73 </div>

74</Tabs>

39 75 

40## Choose a security workflow76## Choose a security workflow

41 77 


44more time and tokens to search for more candidate findings.80more time and tokens to search for more candidate findings.

45 81 

46| Goal | Skill | Scope and output |82| Goal | Skill | Scope and output |

47| --- | --- | --- |83| -------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |

48| Review a repository or one scoped path | `$codex-security:security-scan` | Runs threat modeling, finding discovery, validation, attack-path analysis, and produces Markdown and HTML reports. |84| Review a repository or one scoped path | `$codex-security:security-scan` | Runs threat modeling, finding discovery, validation, attack-path analysis, and produces Markdown and HTML reports. |

49| Run a higher-recall audit | `$codex-security:deep-security-scan` | Repeats repository-wide discovery with delegated workers before validation and reporting. Use it only for an entire repository. |85| Run a higher-recall audit | `$codex-security:deep-security-scan` | Repeats repository-wide discovery with delegated workers before validation and reporting. Use it only for an entire repository. |

50| Review a change before merge | `$codex-security:security-diff-scan` | Reviews a pull request, commit, branch diff, or working-tree patch and produces a Markdown report grounded in changed code. |86| Review a change before merge | `$codex-security:security-diff-scan` | Reviews a pull request, commit, branch diff, or working-tree patch and produces a Markdown report grounded in changed code. |


52 88 

53For example, to scan a repository:89For example, to scan a repository:

54 90 

55```91```text

56Use $codex-security:security-scan to scan this repository for security92Use $codex-security:security-scan to scan this repository for security

57vulnerabilities. Keep the scan grounded in code evidence, validate plausible93vulnerabilities. Keep the scan grounded in code evidence, validate plausible

58findings where feasible, and return the final report paths. Do not modify code.94findings where feasible, and return the final report paths. Do not modify code.


60 96 

61To review the current change instead:97To review the current change instead:

62 98 

63```99```text

64Use $codex-security:security-diff-scan to review the current branch diff for100Use $codex-security:security-diff-scan to review the current branch diff for

65security regressions. Keep the review scoped to changed code and directly101security regressions. Keep the review scoped to changed code and directly

66supporting files. Do not modify code.102supporting files. Do not modify code.


88 124 

89When a finding is actionable, ask for a bounded fix:125When a finding is actionable, ask for a bounded fix:

90 126 

91```127```text

92Use $codex-security:fix-finding to fix finding [finding ID or report128Use $codex-security:fix-finding to fix finding [finding ID or report

93reference]. Add focused regression coverage, verify legitimate behavior still129reference]. Add focused regression coverage, verify legitimate behavior still

94works, and show that the original issue no longer reproduces. Do not broaden130works, and show that the original issue no longer reproduces. Do not broaden

sites.md +39 −22

Details

1# Sites – Codex1# Sites

2 2 

3Sites lets Codex create, save, deploy, and inspect websites, web apps, and3Sites lets Codex create, save, deploy, and inspect websites, web apps, and

4games hosted by OpenAI. Use the **Sites** plugin when you want to turn a prompt4games hosted by OpenAI. Use the **Sites** plugin when you want to turn a prompt


6separate deployment workflow.6separate deployment workflow.

7 7 

8Every Sites deployment URL is a production deployment. If you want to review a8Every Sites deployment URL is a production deployment. If you want to review a

9build before it becomes live, ask Codex to save a version without deploying9 build before it becomes live, ask Codex to save a version without deploying

10it.10 it.

11 11 

12## Get started with Sites12## Get started with Sites

13 13 


17before members can use it. Compare support by plan in17before members can use it. Compare support by plan in

18[Feature availability](https://developers.openai.com/codex/pricing#feature-availability).18[Feature availability](https://developers.openai.com/codex/pricing#feature-availability).

19 19 

20<WorkflowSteps variant="headings">

201. Enable Sites for an Enterprise workspace211. Enable Sites for an Enterprise workspace

21 22 

22 If you use ChatGPT Enterprise, ask your workspace admin to open the RBAC23 If you use ChatGPT Enterprise, ask your workspace admin to open the RBAC

23 controls in [ChatGPT admin settings](https://chatgpt.com/admin/settings) and24 controls in [ChatGPT admin settings](https://chatgpt.com/admin/settings) and

24 turn on Sites for the appropriate role. ChatGPT Business workspaces can skip25 turn on Sites for the appropriate role. ChatGPT Business workspaces can skip

25 this step because Sites is enabled by default.26 this step because Sites is enabled by default.

27 

262. Add the Sites plugin282. Add the Sites plugin

27 29 

28 If **Sites** isnt already available, open **Plugins** in the Codex app, find30 If **Sites** isn't already available, open **Plugins** in the Codex app, find

29 **Sites**, and add it to Codex. Start a new thread after installing a plugin.31 **Sites**, and add it to Codex. Start a new thread after installing a plugin.

32 

303. Start a Sites task333. Start a Sites task

31 34 

32 In a thread, describe the site you want to create or publish. You can name35 In a thread, describe the site you want to create or publish. You can name

33 the plugin explicitly with `@Sites`, especially when your task should end in36 the plugin explicitly with `@Sites`, especially when your task should end in

34 a hosted deployment.37 a hosted deployment.

35 38 

36 ![Codex app composer with the Sites plugin and connected apps mentioned in a prompt](/images/codex/sites/prompt-input-light.jpg)39 <CodexScreenshot

40 alt="Codex app composer with the Sites plugin and connected apps mentioned in a prompt"

41 lightSrc="/images/codex/sites/prompt-input-light.jpg"

42 darkSrc="/images/codex/sites/prompt-input-dark.jpg"

43 variant="no-wallpaper"

44 />

45 

374. Review whether to save or deploy464. Review whether to save or deploy

38 47 

39 Ask Codex to validate the sites build. Then tell it either to save a48 Ask Codex to validate the site's build. Then tell it either to save a

40 deployable version for review or to deploy the approved saved version.49 deployable version for review or to deploy the approved saved version.

50 

415. Return to deployed sites515. Return to deployed sites

42 52 

43 Open **Sites** in the app sidebar to return to your Sites projects. You can53 Open **Sites** in the app sidebar to return to your Sites projects. You can

44 also ask Codex to inspect saved versions, check deployment status, or change54 also ask Codex to inspect saved versions, check deployment status, or change

45 who can access a deployed site.55 who can access a deployed site.

46 56 

47 ![Sites project list in the Codex app](/images/codex/sites/sites-list-light.jpg)57 <CodexScreenshot

58 alt="Sites project list in the Codex app"

59 lightSrc="/images/codex/sites/sites-list-light.jpg"

60 darkSrc="/images/codex/sites/sites-list-dark.jpg"

61 variant="no-wallpaper"

62 />

63 

64</WorkflowSteps>

48 65 

49## Prompt Sites for common tasks66## Prompt Sites for common tasks

50 67 

51For a new website, dashboard, or internal tool, include the audience, core68For a new website, dashboard, or internal tool, include the audience, core

52experience, and required data:69experience, and required data:

53 70 

54```71```text

55@Sites Build a project request dashboard for my operations team. Let team72@Sites Build a project request dashboard for my operations team. Let team

56members submit requests, see who owns each one, update the status, and filter73members submit requests, see who owns each one, update the status, and filter

57the list. Require people to sign in with their workspace account, and keep the74the list. Require people to sign in with their workspace account, and keep the


60 77 

61For an existing project, ask Sites to prepare and publish the current app:78For an existing project, ask Sites to prepare and publish the current app:

62 79 

63```80```text

64@Sites Deploy this project. Check whether it is compatible with Sites, make any81@Sites Deploy this project. Check whether it is compatible with Sites, make any

65required changes, and give me the deployment URL.82required changes, and give me the deployment URL.

66```83```


68When a site needs durable application data or uploaded files, say so in the85When a site needs durable application data or uploaded files, say so in the

69request:86request:

70 87 

71```88```text

72@Sites Add persistent player scores and avatar uploads to this game. Use89@Sites Add persistent player scores and avatar uploads to this game. Use

73the appropriate Sites storage and deploy the updated game.90the appropriate Sites storage and deploy the updated game.

74```91```

75 92 

76Browse the [Sites showcase](/showcase/sites) for deployed internal apps and93Browse the [Sites showcase](https://developers.openai.com/showcase/sites) for deployed internal apps and

77the full prompts used to create them.94 the full prompts used to create them.

78 95 

79## Understand projects, versions, and deployments96## Understand projects, versions, and deployments

80 97 


86For example, a provisioned site that uses a relational database binding and no103For example, a provisioned site that uses a relational database binding and no

87file storage can contain:104file storage can contain:

88 105 

89```106```json

90{107{

91 "project_id": "<project-id>",108 "project_id": "<project-id>",

92 "d1": "DB",109 "d1": "DB",


110 127 

111Sites hosts projects that build Cloudflare Worker-compatible output as ES128Sites hosts projects that build Cloudflare Worker-compatible output as ES

112modules. For new projects, the Sites workflow can start with its recommended129modules. For new projects, the Sites workflow can start with its recommended

113site starter. For an existing site, ask Codex to confirm that the projects130site starter. For an existing site, ask Codex to confirm that the project's

114build can produce compatible deployment artifacts before you request a131build can produce compatible deployment artifacts before you request a

115deployment.132deployment.

116 133 


118site shape:135site shape:

119 136 

120| Site need | What to ask Sites for |137| Site need | What to ask Sites for |

121| --- | --- |138| -------------------------------------------------------------- | ----------------------------------------------------------------------------- |

122| Content-led website or landing page | A site with no persistent application state unless the experience requires it |139| Content-led website or landing page | A site with no persistent application state unless the experience requires it |

123| Saved records, user progress, or game scores | D1, a relational database for durable structured data |140| Saved records, user progress, or game scores | D1, a relational database for durable structured data |

124| Images, documents, audio, video, or other uploads | R2, object storage for files |141| Images, documents, audio, video, or other uploads | R2, object storage for files |

125| Uploaded files with searchable metadata | D1 for metadata and R2 for file contents |142| Uploaded files with searchable metadata | D1 for metadata and R2 for file contents |

126| Internal site that needs the current workspace users identity | Workspace-authenticated user identity |143| Internal site that needs the current workspace user's identity | Workspace-authenticated user identity |

127| Public sign-in or an external identity provider | An authentication-enabled Sites project |144| Public sign-in or an external identity provider | An authentication-enabled Sites project |

128 145 

129Dont request durable storage for temporary presentation state, such as a146Don't request durable storage for temporary presentation state, such as a

130theme choice or a dismissed banner. Do request it for product data that people147theme choice or a dismissed banner. Do request it for product data that people

131expect the hosted site to remember.148expect the hosted site to remember.

132 149 


139You can ask Sites to apply one of these access modes:156You can ask Sites to apply one of these access modes:

140 157 

141| Access mode | Who can access the site |158| Access mode | Who can access the site |

142| --- | --- |159| -------------------------------- | --------------------------------------------------------------------------------------------- |

143| Owner and admins (`admins_only`) | The site owner and workspace admins |160| Owner and admins (`admins_only`) | The site owner and workspace admins |

144| Workspace (`workspace_all`) | All active users in the workspace |161| Workspace (`workspace_all`) | All active users in the workspace |

145| Custom (`custom`) | Specific active users or workspace groups that you choose; Sites continues to allow the owner |162| Custom (`custom`) | Specific active users or workspace groups that you choose; Sites continues to allow the owner |

146 163 

147For example:164For example:

148 165 

149```166```text

150@Sites Change this deployed site's access to everyone in my workspace after167@Sites Change this deployed site's access to everyone in my workspace after

151showing me the current site and confirming the deployment URL.168showing me the current site and confirming the deployment URL.

152```169```


154### Configure runtime environment values171### Configure runtime environment values

155 172 

156Open **Sites** in the app sidebar and select a project to add, update, or remove173Open **Sites** in the app sidebar and select a project to add, update, or remove

157hosted environment variables and secrets in the Sites panel. Dont store these174hosted environment variables and secrets in the Sites panel. Don't store these

158values in `.openai/hosting.json`. Keep local `.env` and `.env.example` files175values in `.openai/hosting.json`. Keep local `.env` and `.env.example` files

159aligned with the keys needed for local development, and dont commit secret176aligned with the keys needed for local development, and don't commit secret

160values.177values.

161 178 

162When you add, update, or remove hosted environment values, ask Codex to179When you add, update, or remove hosted environment values, ask Codex to


172- Confirm that the build succeeded and that the selected saved version is the189- Confirm that the build succeeded and that the selected saved version is the

173 version you intend to publish.190 version you intend to publish.

174- Check that only the intended audience can access the site.191- Check that only the intended audience can access the site.

175- Confirm that you configured runtime secret values through Sites and didnt192- Confirm that you configured runtime secret values through Sites and didn't

176 commit them in source files.193 commit them in source files.

177- After deployment, ask Codex to confirm deployment status and the production194- After deployment, ask Codex to confirm deployment status and the production

178 URL before you share it.195 URL before you share it.

Details

1# Upgrade your API integration | Codex use cases1---

2 2name: Upgrade your API integration

3Codex use cases3tagline: Upgrade your app to the latest OpenAI API models.

4 4summary: Use Codex to update your existing OpenAI API integration to the latest

5![](/assets/OpenAI-black-wordmark.svg)5 recommended models and API features, while checking for regressions before you

6 6 ship.

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7skills:

8 8 - token: $openai-docs

9Codex use case9 url: https://github.com/openai/skills/tree/main/skills/.curated/openai-docs

10 10 description: Pull the current model, migration, and API guidance before Codex

11# Upgrade your API integration11 makes edits to your implementation.

12 12bestFor:

13Upgrade your app to the latest OpenAI API models.13 - Teams upgrading from older models or API surfaces

14 14 - Repos that need behavior-preserving migrations with explicit validation

15Difficulty **Intermediate**15starterPrompt:

16 16 title: Upgrade the Integration Safely

17Time horizon **1h**17 body: >-

18 18 Use $openai-docs to upgrade this OpenAI integration to the latest

19Use Codex to update your existing OpenAI API integration to the latest recommended models and API features, while checking for regressions before you ship.19 recommended model and API features.

20 20 

21## Best for21 

22 22 Specifically, look for the latest model and prompt guidance for this

23- Teams upgrading from older models or API surfaces23 specific model.

24- Repos that need behavior-preserving migrations with explicit validation24 

25 25 

26# Contents26 Requirements:

27 27 

28[← All use cases](https://developers.openai.com/codex/use-cases)28 - Start by inventorying the current models, endpoints, and tool assumptions

29 29 in the repo.

30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/api-integration-migrations/?export=pdf)30 

31 31 - Identify the smallest migration plan that gets us onto the latest

32Use Codex to update your existing OpenAI API integration to the latest recommended models and API features, while checking for regressions before you ship.32 supported path.

33 33 

34Intermediate34 - Preserve behavior unless a change is required by the new API or model.

35 35 

361h36 - Update prompts using the latest model prompt guidance.

37 37 

38Related links38 - Call out any prompt, tool, or response-shape changes we need to review

39 39 manually.

40[Latest model guide](https://developers.openai.com/api/docs/guides/latest-model) [Prompt guidance](https://developers.openai.com/api/docs/guides/prompt-guidance) [OpenAI Docs MCP](/learn/docs-mcp) [Evals guide](https://developers.openai.com/api/docs/guides/evals)40relatedLinks:

41 41 - label: Latest model guide

42## Best for42 url: /api/docs/guides/latest-model

43 43 - label: Prompt guidance

44- Teams upgrading from older models or API surfaces44 url: /api/docs/guides/prompt-guidance

45- Repos that need behavior-preserving migrations with explicit validation45 - label: OpenAI Docs MCP

46 46 url: /learn/docs-mcp

47## Skills & Plugins47 - label: Evals guide

48 48 url: /api/docs/guides/evals

49- [OpenAI Docs](https://github.com/openai/skills/tree/main/skills/.curated/openai-docs)49---

50 

51 Pull the current model, migration, and API guidance before Codex makes edits to your implementation.

52 

53| Skill | Why use it |

54| --- | --- |

55| [OpenAI Docs](https://github.com/openai/skills/tree/main/skills/.curated/openai-docs) | Pull the current model, migration, and API guidance before Codex makes edits to your implementation. |

56 

57## Starter prompt

58 

59Use $openai-docs to upgrade this OpenAI integration to the latest recommended model and API features.

60Specifically, look for the latest model and prompt guidance for this specific model.

61Requirements:

62- Start by inventorying the current models, endpoints, and tool assumptions in the repo.

63- Identify the smallest migration plan that gets us onto the latest supported path.

64- Preserve behavior unless a change is required by the new API or model.

65- Update prompts using the latest model prompt guidance.

66- Call out any prompt, tool, or response-shape changes we need to review manually.

67 

68Open in the Codex app

69 

70Use $openai-docs to upgrade this OpenAI integration to the latest recommended model and API features.

71Specifically, look for the latest model and prompt guidance for this specific model.

72Requirements:

73- Start by inventorying the current models, endpoints, and tool assumptions in the repo.

74- Identify the smallest migration plan that gets us onto the latest supported path.

75- Preserve behavior unless a change is required by the new API or model.

76- Update prompts using the latest model prompt guidance.

77- Call out any prompt, tool, or response-shape changes we need to review manually.

78 50 

79## Introduction51## Introduction

80 52 


100Make sure to build an evals pipeline that you can run every time you make changes to your integration, to verify there is no regression in behavior.72Make sure to build an evals pipeline that you can run every time you make changes to your integration, to verify there is no regression in behavior.

101 73 

102This [cookbook guide](https://developers.openai.com/cookbook/examples/evaluation/building_resilient_prompts_using_an_evaluation_flywheel) covers in detail how to do this using our [Evals API](https://developers.openai.com/api/docs/guides/evals).74This [cookbook guide](https://developers.openai.com/cookbook/examples/evaluation/building_resilient_prompts_using_an_evaluation_flywheel) covers in detail how to do this using our [Evals API](https://developers.openai.com/api/docs/guides/evals).

103 

104## Related use cases

105 

106[![](https://developers.openai.com/codex/use-cases/ai-app-evals.webp)

107 

108### Add evals to your AI application

109 

110Ask Codex to inspect your AI application, identify the behavior you want to evaluate, and...

111 

112Evaluation Quality](https://developers.openai.com/codex/use-cases/ai-app-evals)[![](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog.webp)

113 

114### Remediate a vulnerability backlog

115 

116Bring in approved findings from ticketing tools or vulnerability reporting systems, then use...

117 

118Engineering Quality](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)[![](https://developers.openai.com/codex/use-cases/macos-telemetry-logs.webp)

119 

120### Add Mac telemetry

121 

122Use Codex and the Build macOS Apps plugin to add a few high-signal `Logger` events around...

123 

124macOS Code](https://developers.openai.com/codex/use-cases/macos-telemetry-logs)

125 

Details

1# Build and deploy internal apps | Codex use cases1---

2 2name: Build and deploy internal apps

3Codex use cases3tagline: Turn a team workflow into a hosted internal app with Sites.

4 4summary: Use Codex with Sites to build, test, and deploy internal apps, with

5![](/assets/OpenAI-black-wordmark.svg)5 built-in storage and auth context.

6 6skills:

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7 - token: sites

8 8 url: https://chatgpt.com/plugins/share/sites

9Codex use case9 description: Build, test, and deploy a static site or full-stack web app from Codex.

10 10bestFor:

11# Build and deploy internal apps11 - Teams that want to turn recurring workflows into interactive apps.

12 12 - Apps that need lightweight structured persistence, file uploads, or

13Turn a team workflow into a hosted internal app with Sites.13 workspace-oriented sharing.

14 14 - Internal tools that benefit from building, testing, deploying, and iterating

15Difficulty **Intermediate**15 in one Codex thread.

16 16starterPrompt:

17Time horizon **30m**17 title: Build and Deploy an Internal App

18 18 body: |-

19Use Codex with Sites to build, test, and deploy internal apps, with built-in storage and auth context.19 Use @sites to build and deploy an internal app for [team or workflow].

20 20 

21## Best for21 Goal:

22 22 - [what the app should help people do]

23- Teams that want to turn recurring workflows into interactive apps.23 - [who should use it]

24- Apps that need lightweight structured persistence, file uploads, or workspace-oriented sharing.24 - [source docs, data, or connected services Codex should inspect]

25- Internal tools that benefit from building, testing, deploying, and iterating in one Codex thread.25 

26 26 Requirements:

27# Contents27 - Keep the first version focused on one useful workflow.

28 28 - Use D1 for structured data persistence.

29[← All use cases](https://developers.openai.com/codex/use-cases)29 - Use R2 for user-uploaded files if needed.

30 30 - Test the main flow, persistence, and responsive layout before deploying.

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/build-and-deploy-internal-apps/?export=pdf)31 

32 32 Make it available to all workspace users.

33Use Codex with Sites to build, test, and deploy internal apps, with built-in storage and auth context.33 suggestedEffort: medium

34 34relatedLinks:

35Intermediate35 - label: Sites documentation

36 36 url: /codex/sites

3730m37 - label: Sites showcase

38 38 url: /showcase/sites

39Related links39---

40 

41[Sites documentation](https://developers.openai.com/codex/sites) [Sites showcase](/showcase/sites)

42 

43## Best for

44 

45- Teams that want to turn recurring workflows into interactive apps.

46- Apps that need lightweight structured persistence, file uploads, or workspace-oriented sharing.

47- Internal tools that benefit from building, testing, deploying, and iterating in one Codex thread.

48 

49## Skills & Plugins

50 

51- [Sites](https://chatgpt.com/plugins/share/sites)

52 

53 Build, test, and deploy a static site or full-stack web app from Codex.

54 

55| Skill | Why use it |

56| --- | --- |

57| [Sites](https://chatgpt.com/plugins/share/sites) | Build, test, and deploy a static site or full-stack web app from Codex. |

58 

59## Starter prompt

60 

61Use @sites to build and deploy an internal app for [team or workflow].

62Goal:

63- [what the app should help people do]

64- [who should use it]

65- [source docs, data, or connected services Codex should inspect]

66Requirements:

67- Keep the first version focused on one useful workflow.

68- Use D1 for structured data persistence.

69- Use R2 for user-uploaded files if needed.

70- Test the main flow, persistence, and responsive layout before deploying.

71Make it available to all workspace users.

72 

73Open in the Codex app

74 

75Use @sites to build and deploy an internal app for [team or workflow].

76Goal:

77- [what the app should help people do]

78- [who should use it]

79- [source docs, data, or connected services Codex should inspect]

80Requirements:

81- Keep the first version focused on one useful workflow.

82- Use D1 for structured data persistence.

83- Use R2 for user-uploaded files if needed.

84- Test the main flow, persistence, and responsive layout before deploying.

85Make it available to all workspace users.

86 40 

87## Build and deploy from one thread41## Build and deploy from one thread

88 42 


101You can also leverage [Plugins](https://developers.openai.com/codex/plugins) to fetch or refresh data from internal sources.55You can also leverage [Plugins](https://developers.openai.com/codex/plugins) to fetch or refresh data from internal sources.

102 56 

103If you need live data fetching, you can connect to a 3rd party tool using an57If you need live data fetching, you can connect to a 3rd party tool using an

104API key. But if you want to leverage app connections, you can create a [thread58 API key. But if you want to leverage app connections, you can create a [thread

105automation](https://developers.openai.com/codex/app/automations#thread-automations) to fetch data with59 automation](https://developers.openai.com/codex/app/automations#thread-automations) to fetch data with

106plugins on a set schedule, update the app and redeploy it.60 plugins on a set schedule, update the app and redeploy it.

107 61 

108## Choose storage deliberately62## Choose storage deliberately

109 63 


128 82 

129To change access, you can manage your projects from the Sites page in Codex or ask Codex directly to update access to either:83To change access, you can manage your projects from the Sites page in Codex or ask Codex directly to update access to either:

130 84 

131@Sites Change this site's access to everyone in my workspace.

132 

133## Examples85## Examples

134 86 

135The [Sites showcase](/showcase/sites) includes sites examples with full prompts.87The [Sites showcase](https://developers.openai.com/showcase/sites) includes sites examples with full prompts.

136 

137- **[Onboarding Hub](/showcase/onboarding-hub)** combines a first-week checklist, resources, notes, and uploaded documents. It uses D1 for user state and file metadata, and R2 for uploaded file bytes.

138- **[Enablement Hub](/showcase/enablement-hub)** provides a searchable training library with filters and saved bookmarks backed by D1.

139- **[Pulse Dashboard](/showcase/pulse-dashboard)** presents metrics, trends, and lineage details while using D1 for configuration and cached snapshots.

140- **[Sparkboard](/showcase/idea-intake)** turns employee idea intake into a workflow with authenticated submissions, voting, comments, status boards, and contributor rankings.

141- **[Launch Cal](/showcase/launch-cal)** organizes upcoming product launches into a monthly calendar with filters, risk signals, checklists, and connected-source references.

142- **[Event Planning Hub](/showcase/event-planning-hub)** combines event requests, approvals, templates, milestones, policy readiness, and connected planning resources.

143 

144Use those examples as starting points, then narrow the prompt around your team’s workflow and source material.

145 

146## Related use cases

147 

148[![](https://developers.openai.com/codex/use-cases/deploy-app-or-website.webp)

149 

150### Deploy an app or website

151 

152Use Codex with Build Web Apps and Vercel to turn a repo, screenshot, design, or rough app...

153 

154Front-end Integrations](https://developers.openai.com/codex/use-cases/deploy-app-or-website)[![](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept.webp)

155 

156### Get from idea to proof of concept

157 

158Use Codex with ImageGen to turn a rough idea into a visual direction, implement the smallest...

159 

160Front-end Engineering](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept)[![](https://developers.openai.com/codex/use-cases/make-granular-ui-changes.webp)

161 

162### Make granular UI changes

163 

164Use Codex to make one small UI adjustment at a time in an existing app, verify it in the...

165 88 

166Front-end Design](https://developers.openai.com/codex/use-cases/make-granular-ui-changes)89- **[Onboarding Hub](https://developers.openai.com/showcase/onboarding-hub)** combines a first-week checklist, resources, notes, and uploaded documents. It uses D1 for user state and file metadata, and R2 for uploaded file bytes.

90- **[Enablement Hub](https://developers.openai.com/showcase/enablement-hub)** provides a searchable training library with filters and saved bookmarks backed by D1.

91- **[Pulse Dashboard](https://developers.openai.com/showcase/pulse-dashboard)** presents metrics, trends, and lineage details while using D1 for configuration and cached snapshots.

92- **[Sparkboard](https://developers.openai.com/showcase/idea-intake)** turns employee idea intake into a workflow with authenticated submissions, voting, comments, status boards, and contributor rankings.

93- **[Launch Cal](https://developers.openai.com/showcase/launch-cal)** organizes upcoming product launches into a monthly calendar with filters, risk signals, checklists, and connected-source references.

94- **[Event Planning Hub](https://developers.openai.com/showcase/event-planning-hub)** combines event requests, approvals, templates, milestones, policy readiness, and connected planning resources.

167 95 

96Use those examples as starting points, then narrow the prompt around your team's workflow and source material.

Details

1# Validate bulk RNA-seq inputs | Codex use cases1---

2 2name: Validate bulk RNA-seq inputs

3Codex use cases3tagline: Validate bulk RNA-seq inputs before differential expression.

4 4summary: Use Codex with the NGS Analysis plugin to validate sample sheets,

5![](/assets/OpenAI-black-wordmark.svg)5 FASTQs, and references, then return MultiQC, Salmon matrices, provenance, and

6 6 a short QC interpretation before differential expression.

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7skills:

8 8 - token: NGS Analysis

9Codex use case9 url: codex://plugins/ngs-analysis@openai-curated

10 10 description: Validate sequencing inputs, run bulk RNA-seq counts and QC, and

11# Validate bulk RNA-seq inputs11 return auditable artifacts.

12 12bestFor:

13Validate bulk RNA-seq inputs before differential expression.13 - Bioinformatics teams validating bulk RNA-seq inputs before differential

14 14 expression.

15Difficulty **Intermediate**15 - Researchers who want transcript and gene-level quantification plus QC in one

16 16 thread.

17Time horizon **Long-running**17 - Teams that need mapping-rate, duplication, library-type, and

18 18 resource-readiness review.

19Use Codex with the NGS Analysis plugin to validate sample sheets, FASTQs, and references, then return MultiQC, Salmon matrices, provenance, and a short QC interpretation before differential expression.19starterPrompt:

20 20 title: Run Bulk RNA-seq Counts and QC

21## Best for21 body: >-

22 22 Use the NGS Analysis plugin.

23- Bioinformatics teams validating bulk RNA-seq inputs before differential expression.23 

24- Researchers who want transcript and gene-level quantification plus QC in one thread.24 

25- Teams that need mapping-rate, duplication, library-type, and resource-readiness review.25 Run bulk RNA-seq FASTQ-to-count QC on the provided sample sheet, FASTQ root,

26 26 transcriptome FASTA, genome FASTA, and GTF.

27# Contents27 

28 28 

29[← All use cases](https://developers.openai.com/codex/use-cases)29 Return:

30 30 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc/?export=pdf)31 - run_manifest.json

32 32 

33Use Codex with the NGS Analysis plugin to validate sample sheets, FASTQs, and references, then return MultiQC, Salmon matrices, provenance, and a short QC interpretation before differential expression.33 - MultiQC plus browser-safe review links

34 34 

35Intermediate35 - Salmon transcript- and gene-level matrices

36 36 

37Long-running37 - validation and resource-readiness artifacts

38 38 

39Related links39 - a short QC interpretation that calls out mapping rate, duplication,

40 40 library-type agreement, outlier samples, and anything that would block

41[Request access to GPT-Rosalind](https://openai.com/form/life-sciences-access/)41 downstream differential expression

42 42 suggestedEffort: high

43## Best for43relatedLinks:

44 44 - label: Request access to GPT-Rosalind

45- Bioinformatics teams validating bulk RNA-seq inputs before differential expression.45 url: https://openai.com/form/life-sciences-access/

46- Researchers who want transcript and gene-level quantification plus QC in one thread.46---

47- Teams that need mapping-rate, duplication, library-type, and resource-readiness review.

48 

49## Skills & Plugins

50 

51- [NGS Analysis](codex://plugins/ngs-analysis@openai-curated)

52 

53 Validate sequencing inputs, run bulk RNA-seq counts and QC, and return auditable artifacts.

54 

55| Skill | Why use it |

56| --- | --- |

57| [NGS Analysis](codex://plugins/ngs-analysis@openai-curated) | Validate sequencing inputs, run bulk RNA-seq counts and QC, and return auditable artifacts. |

58 

59## Starter prompt

60 

61Use the NGS Analysis plugin.

62Run bulk RNA-seq FASTQ-to-count QC on the provided sample sheet, FASTQ root, transcriptome FASTA, genome FASTA, and GTF.

63Return:

64- run\_manifest.json

65- MultiQC plus browser-safe review links

66- Salmon transcript- and gene-level matrices

67- validation and resource-readiness artifacts

68- a short QC interpretation that calls out mapping rate, duplication, library-type agreement, outlier samples, and anything that would block downstream differential expression

69 

70Open in the Codex app

71 

72Use the NGS Analysis plugin.

73Run bulk RNA-seq FASTQ-to-count QC on the provided sample sheet, FASTQ root, transcriptome FASTA, genome FASTA, and GTF.

74Return:

75- run\_manifest.json

76- MultiQC plus browser-safe review links

77- Salmon transcript- and gene-level matrices

78- validation and resource-readiness artifacts

79- a short QC interpretation that calls out mapping rate, duplication, library-type agreement, outlier samples, and anything that would block downstream differential expression

80 47 

81## Leverage skills48## Leverage skills

82 49 


116with the run provenance for downstream analysis.87with the run provenance for downstream analysis.

117 88 

118![Open the generated gene-level count matrix for downstream review.](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc-screenshot-3.webp)89![Open the generated gene-level count matrix for downstream review.](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc-screenshot-3.webp)

119 

120## Related use cases

121 

122[![](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc.webp)

123 

124### Annotate scRNA-seq data

125 

126Use Codex with the NGS Analysis plugin to turn a 10x-style matrix bundle into QC-filtered...

127 

128Sciences Data](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc)[![](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures.webp)

129 

130### Discover protein folding architectures

131 

132Use Codex with Goal Mode to research and implement novel architectural modifications to...

133 

134Sciences Engineering](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures)[![](https://developers.openai.com/codex/use-cases/target-prioritization.webp)

135 

136### Prioritize drug targets

137 

138Use Codex with the Life Science Research plugin to normalize entities, retrieve genetics...

139 

140Sciences Data](https://developers.openai.com/codex/use-cases/target-prioritization)

141 

Details

1# Game development – Codex1# Game development

2 

3Prototype loops, UI, and gameplay faster.

2 4 

3Codex, combined with image generation, is particularly powerful to create browser-based and other types of games.5Codex, combined with image generation, is particularly powerful to create browser-based and other types of games.

4These use cases will help you turn ideas into live games.6These use cases will help you turn ideas into live games.


7 9 

8Ask Codex to turn a game brief into a browser build with assets, controls, and a loop you can test.10Ask Codex to turn a game brief into a browser build with assets, controls, and a loop you can test.

9 11 

10[![](https://developers.openai.com/codex/use-cases/browser-games.webp)12- https://developers.openai.com/codex/use-cases/browser-games

11 

12### Create browser-based games

13 

14Use Codex to turn a game brief into first a well-defined plan, and then a real browser-based...

15 

16Engineering Code](https://developers.openai.com/codex/use-cases/browser-games)

17 13 

18## Tune UI and controls14## Tune UI and controls

19 15 

20Use Codex to adjust HUD details, menus, controls, and small interaction issues after the game is running.16Use Codex to adjust HUD details, menus, controls, and small interaction issues after the game is running.

21 17 

22[![](https://developers.openai.com/codex/use-cases/make-granular-ui-changes.webp)18- https://developers.openai.com/codex/use-cases/make-granular-ui-changes

23 

24### Make granular UI changes

25 

26Use Codex to make one small UI adjustment at a time in an existing app, verify it in the...

27 

28Front-end Design](https://developers.openai.com/codex/use-cases/make-granular-ui-changes)

29 19 

30## Tackle hard game logic20## Tackle hard game logic

31 21 

32Leverage Codex to iterate on complex game algorithms by running a self-evaluation loop.22Leverage Codex to iterate on complex game algorithms by running a self-evaluation loop.

33 23 

34[![](https://developers.openai.com/codex/use-cases/iterate-on-difficult-problems.webp)24- https://developers.openai.com/codex/use-cases/iterate-on-difficult-problems

35 

36### Iterate on difficult problems

37 

38Give Codex an evaluation system, such as scripts and reviewable artifacts, so it can keep...

39 

40Engineering Analysis](https://developers.openai.com/codex/use-cases/iterate-on-difficult-problems)

41 25 

42## Triage bugs from real signals26## Triage bugs from real signals

43 27 

44Use Codex to gather bug reports, failing checks, logs, and repro notes into a prioritized list before it patches the game.28Use Codex to gather bug reports, failing checks, logs, and repro notes into a prioritized list before it patches the game.

45 29 

46[![](https://developers.openai.com/codex/use-cases/automation-bug-triage.webp)30- https://developers.openai.com/codex/use-cases/automation-bug-triage

47 

48### Automate bug triage

49 

50Ask Codex to check recent alerts, issues, failed checks, logs, and chat reports, tune the...

51 

52Automation Quality](https://developers.openai.com/codex/use-cases/automation-bug-triage)

53 31 

54## Review before merge32## Review before merge

55 33 

56Have Codex in GitHub automatically review PRs and catch regressions and missing tests for faster deployment.34Have Codex in GitHub automatically review PRs and catch regressions and missing tests for faster deployment.

57 35 

58[![](https://developers.openai.com/codex/use-cases/github-code-reviews.webp)36- https://developers.openai.com/codex/use-cases/github-code-reviews

59 

60### Review GitHub pull requests

61 

62Use Codex code review in GitHub to automatically surface regressions, missing tests, and...

63 

64Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)

65 

Details

1# Life Sciences – Codex1# Life Sciences

2 

3Use GPT-Rosalind to accelerate scientific research and drug discovery.

2 4 

3GPT-Rosalind, our frontier reasoning model, is built to support research across5GPT-Rosalind, our frontier reasoning model, is built to support research across

4biology, drug discovery, and translational medicine. This life sciences model6biology, drug discovery, and translational medicine. This life sciences model


13from bulk and single-cell RNA-seq analysis to multi-source target15from bulk and single-cell RNA-seq analysis to multi-source target

14prioritization.16prioritization.

15 17 

16[![](https://developers.openai.com/codex/use-cases/target-prioritization.webp)18- https://developers.openai.com/codex/use-cases/target-prioritization

17 19- https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc

18### Prioritize drug targets20- https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc

19 

20Use Codex with the Life Science Research plugin to normalize entities, retrieve genetics...

21 

22Sciences Data](https://developers.openai.com/codex/use-cases/target-prioritization)[![](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc.webp)

23 

24### Validate bulk RNA-seq inputs

25 

26Use Codex with the NGS Analysis plugin to validate sample sheets, FASTQs, and references...

27 

28Sciences Data](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc)[![](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc.webp)

29 

30### Annotate scRNA-seq data

31 

32Use Codex with the NGS Analysis plugin to turn a 10x-style matrix bundle into QC-filtered...

33 

34Sciences Data](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc)

35 21 

36## Protein Folding Research & Architecture Search22## Protein Folding Research & Architecture Search

37 23 

38Use Codex to turn protein-folding hypotheses into reviewable experiment loops24Use Codex to turn protein-folding hypotheses into reviewable experiment loops

39with explicit benchmarks, durable artifacts, and clear evidence boundaries.25with explicit benchmarks, durable artifacts, and clear evidence boundaries.

40 26 

41[![](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures.webp)27- https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures

42 

43### Discover protein folding architectures

44 

45Use Codex with Goal Mode to research and implement novel architectural modifications to...

46 

47Sciences Engineering](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures)

48 

Details

1# Native development – Codex1# Native development

2 

3Build and debug iOS and macOS apps.

2 4 

3Codex works great on Apple platform projects when each pass has a build, run, or simulator loop attached to it.5Codex works great on Apple platform projects when each pass has a build, run, or simulator loop attached to it.

4These use cases are helpful when you are building new or existing iOS and macOS apps and need to iterate on the UI and debug issues.6These use cases are helpful when you are building new or existing iOS and macOS apps and need to iterate on the UI and debug issues.


7 9 

8Ask Codex to scaffold iOS and macOS apps with repeatable build loops. The Mac shell use case goes deeper on sidebar-detail-inspector layouts, commands, settings, and other desktop-native structure.10Ask Codex to scaffold iOS and macOS apps with repeatable build loops. The Mac shell use case goes deeper on sidebar-detail-inspector layouts, commands, settings, and other desktop-native structure.

9 11 

10[![](https://developers.openai.com/codex/use-cases/native-ios-apps.webp)12- https://developers.openai.com/codex/use-cases/native-ios-apps

11 13- https://developers.openai.com/codex/use-cases/native-macos-apps

12### Build for iOS14- https://developers.openai.com/codex/use-cases/macos-sidebar-detail-inspector

13 

14Use Codex to scaffold iOS SwiftUI projects, keep the build loop CLI-first with `xcodebuild`...

15 

16iOS Code](https://developers.openai.com/codex/use-cases/native-ios-apps)[![](https://developers.openai.com/codex/use-cases/native-macos-apps.webp)

17 

18### Build for macOS

19 

20Use Codex to build macOS SwiftUI apps, wire a shell-first build-and-run loop, and add...

21 

22macOS Code](https://developers.openai.com/codex/use-cases/native-macos-apps)[![](https://developers.openai.com/codex/use-cases/macos-sidebar-detail-inspector.webp)

23 

24### Build a Mac app shell

25 

26Use Codex and the Build macOS Apps plugin to turn an app idea into a desktop-native...

27 

28macOS Code](https://developers.openai.com/codex/use-cases/macos-sidebar-detail-inspector)

29 15 

30## Refactor iOS SwiftUI screens16## Refactor iOS SwiftUI screens

31 17 

32Use Codex to split large SwiftUI views without changing behavior, then move selected iOS flows to Liquid Glass when the app is ready.18Use Codex to split large SwiftUI views without changing behavior, then move selected iOS flows to Liquid Glass when the app is ready.

33 19 

34[![](https://developers.openai.com/codex/use-cases/ios-swiftui-view-refactor.webp)20- https://developers.openai.com/codex/use-cases/ios-swiftui-view-refactor

35 21- https://developers.openai.com/codex/use-cases/ios-liquid-glass

36### Refactor SwiftUI screens

37 

38Use Codex and the Build iOS Apps plugin to break a long SwiftUI view into dedicated section...

39 

40iOS Code](https://developers.openai.com/codex/use-cases/ios-swiftui-view-refactor)[![](https://developers.openai.com/codex/use-cases/ios-liquid-glass.webp)

41 

42### Adopt liquid glass

43 

44Use Codex and the Build iOS Apps plugin to audit existing iPhone and iPad UI, replace custom...

45 

46iOS Code](https://developers.openai.com/codex/use-cases/ios-liquid-glass)

47 22 

48## Expose iOS actions to the system23## Expose iOS actions to the system

49 24 

50Leverage Codex to identify the actions and entities your app should expose through App Intents, so users can reach app behavior from system surfaces.25Leverage Codex to identify the actions and entities your app should expose through App Intents, so users can reach app behavior from system surfaces.

51 26 

52[![](https://developers.openai.com/codex/use-cases/ios-app-intents.webp)27- https://developers.openai.com/codex/use-cases/ios-app-intents

53 

54### Add iOS app intents

55 

56Use Codex and the Build iOS Apps plugin to identify the actions and entities your app should...

57 

58iOS Code](https://developers.openai.com/codex/use-cases/ios-app-intents)

59 28 

60## Debug your app29## Debug your app

61 30 

62Have Codex reproduce bugs in Simulator or add telemetry to your macOS app to help you debug and fix issues.31Have Codex reproduce bugs in Simulator or add telemetry to your macOS app to help you debug and fix issues.

63 32 

64[![](https://developers.openai.com/codex/use-cases/ios-simulator-bug-debugging.webp)33- https://developers.openai.com/codex/use-cases/ios-simulator-bug-debugging

65 34- https://developers.openai.com/codex/use-cases/macos-telemetry-logs

66### Debug in iOS simulator

67 

68Use Codex to discover the right Xcode scheme and simulator, launch the app, inspect the UI...

69 

70iOS Code](https://developers.openai.com/codex/use-cases/ios-simulator-bug-debugging)[![](https://developers.openai.com/codex/use-cases/macos-telemetry-logs.webp)

71 

72### Add Mac telemetry

73 

74Use Codex and the Build macOS Apps plugin to add a few high-signal `Logger` events around...

75 

76macOS Code](https://developers.openai.com/codex/use-cases/macos-telemetry-logs)

77 

Details

1# Production systems – Codex1# Production systems

2 

3Navigate, refactor, and review real codebases.

2 4 

3The use cases in this collection are useful when Codex is working in a repo that already has history, tests, owners, and production constraints.5The use cases in this collection are useful when Codex is working in a repo that already has history, tests, owners, and production constraints.

4Codex is particularly good at navigating complex codebases, including sprawling monorepos with lots of different services and dependencies.6Codex is particularly good at navigating complex codebases, including sprawling monorepos with lots of different services and dependencies.

5If youre working on a production system, get familiar with these use cases to understand how Codex can help you.7If you're working on a production system, get familiar with these use cases to understand how Codex can help you.

6 8 

7## Start with a codebase tour9## Start with a codebase tour

8 10 

9Use Codex to get familiar with a complex codebase, which is especially useful when onboarding onto a repo for production software.11Use Codex to get familiar with a complex codebase, which is especially useful when onboarding onto a repo for production software.

10 12 

11[![](https://developers.openai.com/codex/use-cases/codebase-onboarding.webp)13- https://developers.openai.com/codex/use-cases/codebase-onboarding

12 

13### Understand large codebases

14 

15Use Codex to map unfamiliar codebases, explain different modules and data flow, and point...

16 

17Engineering Analysis](https://developers.openai.com/codex/use-cases/codebase-onboarding)

18 14 

19## Modernize the codebase15## Modernize the codebase

20 16 

21Leverage Codex to plan tech stack migrations, upgrade your integration to the latest models if applicable, and refactor the codebase to improve readability and maintainability.17Leverage Codex to plan tech stack migrations, upgrade your integration to the latest models if applicable, and refactor the codebase to improve readability and maintainability.

22 18 

23[![](https://developers.openai.com/codex/use-cases/api-integration-migrations.webp)19- https://developers.openai.com/codex/use-cases/api-integration-migrations

24 20- https://developers.openai.com/codex/use-cases/refactor-your-codebase

25### Upgrade your API integration21- https://developers.openai.com/codex/use-cases/code-migrations

26 

27Use Codex to update your existing OpenAI API integration to the latest recommended models...

28 

29Evaluation Engineering](https://developers.openai.com/codex/use-cases/api-integration-migrations)[![](https://developers.openai.com/codex/use-cases/refactor-your-codebase.webp)

30 

31### Refactor your codebase

32 

33Use Codex to remove dead code, untangle large files, collapse duplicated logic, and...

34 

35Engineering Code](https://developers.openai.com/codex/use-cases/refactor-your-codebase)[![](https://developers.openai.com/codex/use-cases/code-migrations.webp)

36 

37### Run code migrations

38 

39Use Codex to map a legacy system to a new stack, land the move in milestones, and validate...

40 

41Engineering Code](https://developers.openai.com/codex/use-cases/code-migrations)

42 22 

43## Codify repeatable work23## Codify repeatable work

44 24 

45Ask Codex to turn repo-specific workflows or checklists into a skill, so that all repo contributors can benefit from a standardized process.25Ask Codex to turn repo-specific workflows or checklists into a skill, so that all repo contributors can benefit from a standardized process.

46 26 

47[![](https://developers.openai.com/codex/use-cases/reusable-codex-skills.webp)27- https://developers.openai.com/codex/use-cases/reusable-codex-skills

48 

49### Save workflows as skills

50 

51Turn a working Codex thread, review rules, test commands, release checklists, design...

52 

53Engineering Workflow](https://developers.openai.com/codex/use-cases/reusable-codex-skills)

54 28 

55## Keep documentation current29## Keep documentation current

56 30 

57Ask Codex to compare source changes with existing docs, update the smallest useful docs surface, and verify the changes.31Ask Codex to compare source changes with existing docs, update the smallest useful docs surface, and verify the changes.

58 32 

59[![](https://developers.openai.com/codex/use-cases/update-documentation.webp)33- https://developers.openai.com/codex/use-cases/update-documentation

60 

61### Keep documentation up-to-date

62 

63Use Codex to compare source code changes, public docs, release notes, and PR context, then...

64 

65Engineering Code](https://developers.openai.com/codex/use-cases/update-documentation)

66 34 

67## Maintain system health35## Maintain system health

68 36 

69Let Codex pick up feature requests and bug fixes automatically by using it from Slack and connecting it to your alerting, issue tracking, and daily bug sweeps.37Let Codex pick up feature requests and bug fixes automatically by using it from Slack and connecting it to your alerting, issue tracking, and daily bug sweeps.

70 38 

71[![](https://developers.openai.com/codex/use-cases/slack-coding-tasks.webp)39- https://developers.openai.com/codex/use-cases/slack-coding-tasks

72 40- https://developers.openai.com/codex/use-cases/automation-bug-triage

73### Kick off coding tasks from Slack

74 

75Mention `@Codex` in Slack to start a task tied to the right repo and environment, then...

76 

77Integrations Workflow](https://developers.openai.com/codex/use-cases/slack-coding-tasks)[![](https://developers.openai.com/codex/use-cases/automation-bug-triage.webp)

78 

79### Automate bug triage

80 

81Ask Codex to check recent alerts, issues, failed checks, logs, and chat reports, tune the...

82 

83Automation Quality](https://developers.openai.com/codex/use-cases/automation-bug-triage)

84 41 

85## Avoid the review bottleneck42## Avoid the review bottleneck

86 43 

87Use Codex to automatically review PRs and run focused QA passes on critical flows, so you can catch issues quickly and ship updates confidently.44Use Codex to automatically review PRs and run focused QA passes on critical flows, so you can catch issues quickly and ship updates confidently.

88 45 

89[![](https://developers.openai.com/codex/use-cases/github-code-reviews.webp)46- https://developers.openai.com/codex/use-cases/github-code-reviews

90 47- https://developers.openai.com/codex/use-cases/qa-your-app-with-computer-use

91### Review GitHub pull requests

92 

93Use Codex code review in GitHub to automatically surface regressions, missing tests, and...

94 

95Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)[![](https://developers.openai.com/codex/use-cases/qa-your-app-with-computer-use.webp)

96 

97### QA your app with Computer Use

98 

99Use Computer Use to exercise key flows, catch issues, and finish with a bug report.

100 

101Automation Quality](https://developers.openai.com/codex/use-cases/qa-your-app-with-computer-use)

102 

Details

1# Productivity & Collaboration – Codex1# Productivity & Collaboration

2 

3Coordinate work across apps, data, and teams.

2 4 

3Codex can help you manage all of your work across multiple apps and files and help collaborate with your team.5Codex can help you manage all of your work across multiple apps and files and help collaborate with your team.

4The use cases in this collection cover common workflows when the work starts in files, messages, docs, spreadsheets, and when you need shareable artifacts.6The use cases in this collection cover common workflows when the work starts in files, messages, docs, spreadsheets, and when you need shareable artifacts.


7 9 

8Ask Codex to turn a dense paper, spec, or technical guide into definitions, examples, and questions you can review.10Ask Codex to turn a dense paper, spec, or technical guide into definitions, examples, and questions you can review.

9 11 

10[![](https://developers.openai.com/codex/use-cases/learn-a-new-concept.webp)12- https://developers.openai.com/codex/use-cases/learn-a-new-concept

11 

12### Learn a new concept

13 

14Use Codex to study material such as research papers or courses, split the reading across...

15 

16Knowledge Work Data](https://developers.openai.com/codex/use-cases/learn-a-new-concept)

17 13 

18## Delegate multi-step workflows14## Delegate multi-step workflows

19 15 

20Use Codex to gather approved inputs from multiple apps and prepare new workflows, or let it take control of your computer to complete tasks across multiple apps.16Use Codex to gather approved inputs from multiple apps and prepare new workflows, or let it take control of your computer to complete tasks across multiple apps.

21 17 

22[![](https://developers.openai.com/codex/use-cases/new-hire-onboarding.webp)18- https://developers.openai.com/codex/use-cases/new-hire-onboarding

23 19- https://developers.openai.com/codex/use-cases/use-your-computer-with-codex

24### Coordinate new-hire onboarding

25 

26Use Codex to gather approved new-hire context, stage tracker updates, draft team-by-team...

27 

28Integrations Data](https://developers.openai.com/codex/use-cases/new-hire-onboarding)[![](https://developers.openai.com/codex/use-cases/use-your-computer-with-codex.webp)

29 

30### Use your computer with Codex

31 

32Use Computer Use to hand off multi-step tasks across Mac apps, windows, and files.

33 

34Knowledge Work Workflow](https://developers.openai.com/codex/use-cases/use-your-computer-with-codex)

35 20 

36## Keep work moving21## Keep work moving

37 22 

38Have Codex check the sources you approve and return only the items that need attention: real asks, changed artifacts, blocked handoffs, reply drafts, and decisions.23Have Codex check the sources you approve and return only the items that need attention: real asks, changed artifacts, blocked handoffs, reply drafts, and decisions.

39 24 

40[![](https://developers.openai.com/codex/use-cases/proactive-teammate.webp)25- https://developers.openai.com/codex/use-cases/proactive-teammate

41 26- https://developers.openai.com/codex/use-cases/manage-your-inbox

42### Set up a teammate27- https://developers.openai.com/codex/use-cases/complete-tasks-from-messages

43 

44Connect the tools where work happens, teach one thread what matters, then add an automation...

45 

46Automation Integrations](https://developers.openai.com/codex/use-cases/proactive-teammate)[![](https://developers.openai.com/codex/use-cases/manage-your-inbox.webp)

47 

48### Manage your inbox

49 

50Use Codex with Gmail to find emails that need attention, draft responses in your voice, pull...

51 

52Automation Integrations](https://developers.openai.com/codex/use-cases/manage-your-inbox)[![](https://developers.openai.com/codex/use-cases/complete-tasks-from-messages.webp)

53 

54### Complete tasks from messages

55 

56Use Computer Use to read one Messages thread, complete the task, and draft a reply.

57 

58Knowledge Work Integrations](https://developers.openai.com/codex/use-cases/complete-tasks-from-messages)

59 28 

60## Work with data29## Work with data

61 30 

62Use Codex to explore datasets or clean up spreadsheets, explore hypotheses, ask questions or create visualizations.31Use Codex to explore datasets or clean up spreadsheets, explore hypotheses, ask questions or create visualizations.

63 32 

64[![](https://developers.openai.com/codex/use-cases/clean-messy-data.webp)33- https://developers.openai.com/codex/use-cases/clean-messy-data

65 34- https://developers.openai.com/codex/use-cases/analyze-data-export

66### Clean and prepare messy data35- https://developers.openai.com/codex/use-cases/datasets-and-reports

67 

68Drag in or mention a messy CSV or spreadsheet, describe the problems you see, and ask Codex...

69 

70Data Knowledge Work](https://developers.openai.com/codex/use-cases/clean-messy-data)[![](https://developers.openai.com/codex/use-cases/analyze-data-export.webp)

71 

72### Query tabular data

73 

74Use Codex with a CSV, spreadsheet, dashboard export, Google Sheet, or local data file to...

75 

76Data Knowledge Work](https://developers.openai.com/codex/use-cases/analyze-data-export)[![](https://developers.openai.com/codex/use-cases/datasets-and-reports.webp)

77 

78### Analyze datasets and ship reports

79 

80Use Codex to clean data, join sources, explore hypotheses, model results, and package the...

81 

82Data Analysis](https://developers.openai.com/codex/use-cases/datasets-and-reports)

83 36 

84## Package analysis into reviewable artifacts37## Package analysis into reviewable artifacts

85 38 

86Let Codex turn approved inputs into outputs you can share: slides, messages, and other artifacts ready for review.39Let Codex turn approved inputs into outputs you can share: slides, messages, and other artifacts ready for review.

87 40 

88[![](https://developers.openai.com/codex/use-cases/feedback-synthesis.webp)41- https://developers.openai.com/codex/use-cases/feedback-synthesis

89 42- https://developers.openai.com/codex/use-cases/generate-slide-decks

90### Turn feedback into actions

91 

92Connect Codex to multiple data sources such as Slack, GitHub, Linear, or Google Drive to...

93 

94Data Integrations](https://developers.openai.com/codex/use-cases/feedback-synthesis)[![](https://developers.openai.com/codex/use-cases/generate-slide-decks.webp)

95 

96### Generate slide decks

97 

98Use Codex to update existing presentations or build new decks by editing slides directly...

99 

100Data Integrations](https://developers.openai.com/codex/use-cases/generate-slide-decks)

101 

Details

1# Security – Codex1# Security

2 

3Assess code, review changes, and remediate security findings.

2 4 

3Codex can help engineering and security teams assess authorized code, gather5Codex can help engineering and security teams assess authorized code, gather

4evidence, and turn reviewed findings into focused fixes. These use cases cover6evidence, and turn reviewed findings into focused fixes. These use cases cover


11repository, review plausible findings, and produce reports that support human13repository, review plausible findings, and produce reports that support human

12triage.14triage.

13 15 

14[![](https://developers.openai.com/codex/use-cases/deep-security-scan.webp)16- https://developers.openai.com/codex/use-cases/deep-security-scan

15 

16### Run a deep security scan

17 

18Use the Codex Security plugin to run a higher-recall, repository-wide audit that repeats...

19 

20Engineering Quality](https://developers.openai.com/codex/use-cases/deep-security-scan)

21 17 

22## Review changes before merge18## Review changes before merge

23 19 

24Ask Codex to inspect a pull request, branch, commit, or working-tree diff for20Ask Codex to inspect a pull request, branch, commit, or working-tree diff for

25security regressions and return evidence tied to the changed code.21security regressions and return evidence tied to the changed code.

26 22 

27[![](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security.webp)23- https://developers.openai.com/codex/use-cases/scan-code-changes-for-security

28 

29### Scan code changes for security

30 

31Use the Codex Security plugin to examine a Git-backed change set, validate plausible...

32 

33Engineering Quality](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security)

34 24 

35## Audit dependency incidents25## Audit dependency incidents

36 26 

37Turn a public package or supply chain advisory into a read-only repository27Turn a public package or supply chain advisory into a read-only repository

38audit covering manifests, lock files, scripts, workflows, and exposure paths.28audit covering manifests, lock files, scripts, workflows, and exposure paths.

39 29 

40[![](https://developers.openai.com/codex/use-cases/dependency-incident-audits.webp)30- https://developers.openai.com/codex/use-cases/dependency-incident-audits

41 

42### Audit dependency incidents

43 

44Use Codex to turn a public package or supply chain advisory into a read-only audit, then...

45 

46Engineering Quality](https://developers.openai.com/codex/use-cases/dependency-incident-audits)

47 31 

48## Remediate reviewed findings32## Remediate reviewed findings

49 33 


51then have it make a minimal fix and verify that the vulnerable behavior no35then have it make a minimal fix and verify that the vulnerable behavior no

52longer reproduces.36longer reproduces.

53 37 

54[![](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog.webp)38- https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog

55 

56### Remediate a vulnerability backlog

57 

58Bring in approved findings from ticketing tools or vulnerability reporting systems, then use...

59 

60Engineering Quality](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)

61 

Details

1# Web development – Codex1# Web development

2 

3Build responsive UI from designs and prompts.

2 4 

3Codex works great with existing design systems, taking into account constraints and visual inputs to produce a responsive UI.5Codex works great with existing design systems, taking into account constraints and visual inputs to produce a responsive UI.

4These use cases are helpful when you are building web apps and need to iterate on frontend designs.6These use cases are helpful when you are building web apps and need to iterate on frontend designs.


7 9 

8Use Codex to turn a rough idea into a visual direction and implement a first prototype.10Use Codex to turn a rough idea into a visual direction and implement a first prototype.

9 11 

10[![](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept.webp)12- https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept

11 

12### Get from idea to proof of concept

13 

14Use Codex with ImageGen to turn a rough idea into a visual direction, implement the smallest...

15 

16Front-end Engineering](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept)

17 13 

18## Build from Figma14## Build from Figma

19 15 

20Use Codex to pull design context from Figma and turn it into code that follows the repos components, styling, and design system.16Use Codex to pull design context from Figma and turn it into code that follows the repo's components, styling, and design system.

21 

22[![](https://developers.openai.com/codex/use-cases/figma-designs-to-code.webp)

23 

24### Turn Figma designs into code

25 17 

26Use Codex to pull design context, assets, and variants from Figma, translate them into code...18- https://developers.openai.com/codex/use-cases/figma-designs-to-code

27 

28Front-end Design](https://developers.openai.com/codex/use-cases/figma-designs-to-code)

29 19 

30## Iterate on the UI20## Iterate on the UI

31 21 

32Leverage Codex to make targeted changes from visual inputs or prompts, and have it verify its work in the browser.22Leverage Codex to make targeted changes from visual inputs or prompts, and have it verify its work in the browser.

33 23 

34[![](https://developers.openai.com/codex/use-cases/frontend-designs.webp)24- https://developers.openai.com/codex/use-cases/frontend-designs

35 25- https://developers.openai.com/codex/use-cases/make-granular-ui-changes

36### Build responsive front-end designs

37 

38Use Codex to translate screenshots and design briefs into code that matches the repo's...

39 

40Front-end Design](https://developers.openai.com/codex/use-cases/frontend-designs)[![](https://developers.openai.com/codex/use-cases/make-granular-ui-changes.webp)

41 

42### Make granular UI changes

43 

44Use Codex to make one small UI adjustment at a time in an existing app, verify it in the...

45 

46Front-end Design](https://developers.openai.com/codex/use-cases/make-granular-ui-changes)

47 26 

48## Pick up scoped Slack tasks27## Pick up scoped Slack tasks

49 28 

50Tag Codex in Slack when theres a feature request or a reported issue, so that it can pick up the task and work on it in the background.29Tag Codex in Slack when there's a feature request or a reported issue, so that it can pick up the task and work on it in the background.

51 

52[![](https://developers.openai.com/codex/use-cases/slack-coding-tasks.webp)

53 

54### Kick off coding tasks from Slack

55 30 

56Mention `@Codex` in Slack to start a task tied to the right repo and environment, then...31- https://developers.openai.com/codex/use-cases/slack-coding-tasks

57 

58Integrations Workflow](https://developers.openai.com/codex/use-cases/slack-coding-tasks)

59 32 

60## Deploy a preview33## Deploy a preview

61 34 

62Use Codex to build or update a web app, deploy it with Vercel, and hand back a live URL you can share.35Use Codex to build or update a web app, deploy it with Vercel, and hand back a live URL you can share.

63 36 

64[![](https://developers.openai.com/codex/use-cases/deploy-app-or-website.webp)37- https://developers.openai.com/codex/use-cases/deploy-app-or-website

65 

66### Deploy an app or website

67 

68Use Codex with Build Web Apps and Vercel to turn a repo, screenshot, design, or rough app...

69 

70Front-end Integrations](https://developers.openai.com/codex/use-cases/deploy-app-or-website)

71 38 

72## Ship changes faster39## Ship changes faster

73 40 

74Use Codex in GitHub to make sure changes are safe to merge so you can have a faster development loop.41Use Codex in GitHub to make sure changes are safe to merge so you can have a faster development loop.

75 42 

76[![](https://developers.openai.com/codex/use-cases/github-code-reviews.webp)43- https://developers.openai.com/codex/use-cases/github-code-reviews

77 

78### Review GitHub pull requests

79 

80Use Codex code review in GitHub to automatically surface regressions, missing tests, and...

81 

82Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)

83 

Details

1# Run a deep security scan | Codex use cases1---

2 2name: Run a deep security scan

3Codex use cases3tagline: Search an authorized repository deeply for plausible vulnerabilities.

4 4summary: Use the Codex Security plugin to run a higher-recall, repository-wide

5![](/assets/OpenAI-black-wordmark.svg)5 audit that repeats discovery, validates candidates, and produces reviewable

6 6 report artifacts.

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7skills:

8 8 - token: $codex-security:deep-security-scan

9Codex use case9 url: /codex/security/plugin

10 10 description: Run repeated repository-wide security discovery passes, validate

11# Run a deep security scan11 surviving findings, analyze attack paths, and create reviewable reports.

12 12bestFor:

13Search an authorized repository deeply for plausible vulnerabilities.13 - Application security reviews of a complete repository that you own or are

14 14 authorized to assess.

15Difficulty **Advanced**15 - High-recall reviews where additional runtime and token use are appropriate

16 16 for finding more candidate issues.

17Time horizon **Long-running**17 - Security teams that need traceable finding evidence before deciding what to

18 18 remediate.

19Use the Codex Security plugin to run a higher-recall, repository-wide audit that repeats discovery, validates candidates, and produces reviewable report artifacts.19starterPrompt:

20 20 title: Run a Deep Security Scan

21## Best for21 body: >-

22 22 /goal Run a deep security scan on this repository. Do not stop until all

23- Application security reviews of a complete repository that you own or are authorized to assess.23 required steps are complete and the final report is ready.

24- High-recall reviews where additional runtime and token use are appropriate for finding more candidate issues.24 

25- Security teams that need traceable finding evidence before deciding what to remediate.25 

26 26 Scope and rules:

27# Contents27 

28 28 - I am authorized to assess this repository.

29[← All use cases](https://developers.openai.com/codex/use-cases)29 

30 30 - Treat the entire repository as in scope.

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/deep-security-scan/?export=pdf)31 

32 32 - Use the Codex Security plugin's deep scan workflow; do not broaden this

33Use the Codex Security plugin to run a higher-recall, repository-wide audit that repeats discovery, validates candidates, and produces reviewable report artifacts.33 into a diff or scoped-path review.

34 34 

35Advanced35 - Keep the scan read-only; do not modify code, open pull requests, or test

36 36 external targets.

37Long-running37 

38 38 

39Related links39 Return the final Markdown and HTML report paths and summarize the findings

40 40 that require human review first.

41[Codex Security plugin](https://developers.openai.com/codex/security/plugin) [Agent approvals and security](https://developers.openai.com/codex/agent-approvals-security) [Codex cyber safety](https://developers.openai.com/codex/concepts/cyber-safety)41 suggestedEffort: high

42 42relatedLinks:

43## Best for43 - label: Codex Security plugin

44 44 url: /codex/security/plugin

45- Application security reviews of a complete repository that you own or are authorized to assess.45 - label: Agent approvals and security

46- High-recall reviews where additional runtime and token use are appropriate for finding more candidate issues.46 url: /codex/agent-approvals-security

47- Security teams that need traceable finding evidence before deciding what to remediate.47 - label: Codex cyber safety

48 48 url: /codex/concepts/cyber-safety

49## Skills & Plugins49---

50 

51- [Codex Security:deep Security Scan](https://developers.openai.com/codex/security/plugin)

52 

53 Run repeated repository-wide security discovery passes, validate surviving findings, analyze attack paths, and create reviewable reports.

54 

55| Skill | Why use it |

56| --- | --- |

57| [Codex Security:deep Security Scan](https://developers.openai.com/codex/security/plugin) | Run repeated repository-wide security discovery passes, validate surviving findings, analyze attack paths, and create reviewable reports. |

58 

59## Starter prompt

60 

61/goal Run a deep security scan on this repository. Do not stop until all required steps are complete and the final report is ready.

62Scope and rules:

63- I am authorized to assess this repository.

64- Treat the entire repository as in scope.

65- Use the Codex Security plugin's deep scan workflow; do not broaden this into a diff or scoped-path review.

66- Keep the scan read-only; do not modify code, open pull requests, or test external targets.

67Return the final Markdown and HTML report paths and summarize the findings that require human review first.

68 

69Open in the Codex app

70 

71/goal Run a deep security scan on this repository. Do not stop until all required steps are complete and the final report is ready.

72Scope and rules:

73- I am authorized to assess this repository.

74- Treat the entire repository as in scope.

75- Use the Codex Security plugin's deep scan workflow; do not broaden this into a diff or scoped-path review.

76- Keep the scan read-only; do not modify code, open pull requests, or test external targets.

77Return the final Markdown and HTML report paths and summarize the findings that require human review first.

78 50 

79## Choose a deep repository review51## Choose a deep repository review

80 52 


106Start remediation only for a finding you have selected and reviewed. Use82Start remediation only for a finding you have selected and reviewed. Use

107[Remediate a vulnerability backlog](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)83[Remediate a vulnerability backlog](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)

108to fix findings one at a time with focused regression validation.84to fix findings one at a time with focused regression validation.

109 

110## Related use cases

111 

112[![](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security.webp)

113 

114### Scan code changes for security

115 

116Use the Codex Security plugin to examine a Git-backed change set, validate plausible...

117 

118Engineering Quality](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security)[![](https://developers.openai.com/codex/use-cases/dependency-incident-audits.webp)

119 

120### Audit dependency incidents

121 

122Use Codex to turn a public package or supply chain advisory into a read-only audit, then...

123 

124Engineering Quality](https://developers.openai.com/codex/use-cases/dependency-incident-audits)[![](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog.webp)

125 

126### Remediate a vulnerability backlog

127 

128Bring in approved findings from ticketing tools or vulnerability reporting systems, then use...

129 

130Engineering Quality](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)

131 

Details

1# Audit dependency incidents | Codex use cases1---

2name: Audit dependency incidents

3tagline: Turn a public package advisory into a safe repo-audit plan.

4summary: Use Codex to turn a public package or supply chain advisory into a

5 read-only audit, then inspect manifests, lock files, CI workflows, and scripts

6 without running untrusted code.

7skills:

8 - token: github

9 url: /codex/integrations/github

10 description: Inspect repository files, pull requests, workflows, and

11 security-relevant history.

12bestFor:

13 - Engineering and security teams responding to public package or supply chain

14 advisories.

15 - Maintainers who need to check lock files, scripts, CI permissions, and

16 caches before changing dependencies.

17 - Incident reviews where Codex should gather evidence without installing

18 packages or running untrusted code.

19starterPrompt:

20 title: Build the Incident Audit

21 body: >-

22 Help me audit this repository for exposure to this public package advisory:

23 [advisory URL].

2 24 

3Codex use cases

4 25 

5![](/assets/OpenAI-black-wordmark.svg)26 Stay read-only unless I explicitly approve a remediation step.

6 27 

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)

8 28 

9Codex use case29 First, summarize:

10 30 

11# Audit dependency incidents31 - affected packages and version ranges

12 32 

13Turn a public package advisory into a safe repo-audit plan.33 - authoritative sources versus broader reports

14 34 

15Difficulty **Advanced**35 - what evidence would prove exposure in this repo

16 36 

17Time horizon **1h**37 - what evidence would rule it out

18 38 

19Use Codex to turn a public package or supply chain advisory into a read-only audit, then inspect manifests, lock files, CI workflows, and scripts without running untrusted code.

20 39 

21## Best for40 Then inspect:

22 41 

23- Engineering and security teams responding to public package or supply chain advisories.42 - package manifests and lock files

24- Maintainers who need to check lock files, scripts, CI permissions, and caches before changing dependencies.

25- Incident reviews where Codex should gather evidence without installing packages or running untrusted code.

26 43 

27# Contents44 - CI workflows and permissions

28 45 

29[← All use cases](https://developers.openai.com/codex/use-cases)46 - install, build, and postinstall scripts

30 47 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/dependency-incident-audits/?export=pdf)48 - vendored artifacts, containers, or generated bundles if relevant

32 49 

33Use Codex to turn a public package or supply chain advisory into a read-only audit, then inspect manifests, lock files, CI workflows, and scripts without running untrusted code.50 - cache or token exposure paths if the advisory involves CI or publishing

34 51 

35Advanced

36 52 

371h53 Return:

38 54 

39Related links55 - evidence status: confirmed exposure, needs verification, or ruled out

40 56 

41[Codex Security](https://developers.openai.com/codex/security) [Agent approvals and security](https://developers.openai.com/codex/agent-approvals-security) [Codex cyber safety](https://developers.openai.com/codex/concepts/cyber-safety)57 - severity and blast-radius notes

42 58 

43## Best for59 - file references for every repo-specific claim

44 60 

45- Engineering and security teams responding to public package or supply chain advisories.61 - caveats and recommended next steps

46- Maintainers who need to check lock files, scripts, CI permissions, and caches before changing dependencies.

47- Incident reviews where Codex should gather evidence without installing packages or running untrusted code.

48 62 

49## Skills & Plugins

50 63 

51- [GitHub](https://developers.openai.com/codex/integrations/github)64 Do not install packages, run lifecycle scripts, build the project, execute

52 65 untrusted code, rotate credentials, or clean up files unless I explicitly

53 Inspect repository files, pull requests, workflows, and security-relevant history.66 approve that step.

54 67 suggestedEffort: high

55| Skill | Why use it |68relatedLinks:

56| --- | --- |69 - label: Codex Security

57| [GitHub](https://developers.openai.com/codex/integrations/github) | Inspect repository files, pull requests, workflows, and security-relevant history. |70 url: /codex/security

58 71 - label: Agent approvals and security

59## Starter prompt72 url: /codex/agent-approvals-security

60 73 - label: Codex cyber safety

61Help me audit this repository for exposure to this public package advisory: [advisory URL].74 url: /codex/concepts/cyber-safety

62Stay read-only unless I explicitly approve a remediation step.75---

63First, summarize:

64- affected packages and version ranges

65- authoritative sources versus broader reports

66- what evidence would prove exposure in this repo

67- what evidence would rule it out

68Then inspect:

69- package manifests and lock files

70- CI workflows and permissions

71- install, build, and postinstall scripts

72- vendored artifacts, containers, or generated bundles if relevant

73- cache or token exposure paths if the advisory involves CI or publishing

74Return:

75- evidence status: confirmed exposure, needs verification, or ruled out

76- severity and blast-radius notes

77- file references for every repo-specific claim

78- caveats and recommended next steps

79Do not install packages, run lifecycle scripts, build the project, execute untrusted code, rotate credentials, or clean up files unless I explicitly approve that step.

80 

81Open in the Codex app

82 

83Help me audit this repository for exposure to this public package advisory: [advisory URL].

84Stay read-only unless I explicitly approve a remediation step.

85First, summarize:

86- affected packages and version ranges

87- authoritative sources versus broader reports

88- what evidence would prove exposure in this repo

89- what evidence would rule it out

90Then inspect:

91- package manifests and lock files

92- CI workflows and permissions

93- install, build, and postinstall scripts

94- vendored artifacts, containers, or generated bundles if relevant

95- cache or token exposure paths if the advisory involves CI or publishing

96Return:

97- evidence status: confirmed exposure, needs verification, or ruled out

98- severity and blast-radius notes

99- file references for every repo-specific claim

100- caveats and recommended next steps

101Do not install packages, run lifecycle scripts, build the project, execute untrusted code, rotate credentials, or clean up files unless I explicitly approve that step.

102 76 

103## Start with a safe audit plan77## Start with a safe audit plan

104 78 

105When a dependency or supply chain incident moves quickly, the first useful output isnt a rushed patch. Its a clear audit plan: what changed, which packages or workflows might be affected, and what evidence would prove exposure in your repo.79When a dependency or supply chain incident moves quickly, the first useful output isn't a rushed patch. It's a clear audit plan: what changed, which packages or workflows might be affected, and what evidence would prove exposure in your repo.

106 80 

107Use Codex to turn the advisory into a conservative, read-only checklist before installing, building, testing, or running anything.81Use Codex to turn the advisory into a conservative, read-only checklist before installing, building, testing, or running anything.

108 82 


120 98 

121A useful audit result should show both how bad a finding would be and how strong the evidence is:99A useful audit result should show both how bad a finding would be and how strong the evidence is:

122 100 

123![](/assets/OAI_Codex-Blossom_Fallback_Black.svg)

124Codex

125 101 

126**Confirmed exposure:** the lockfile contains an affected

127package version in a production dependency path.

128 102 

129**Needs verification:** one CI job has publish permissions, but103<p>

130the workflow does not appear to install the affected package directly.104 <strong>Confirmed exposure:</strong> the lockfile contains an affected

105 package version in a production dependency path.

106 </p>

107 <p>

108 <strong>Needs verification:</strong> one CI job has publish permissions, but

109 the workflow does not appear to install the affected package directly.

110 </p>

111 <p>

112 <strong>Ruled out:</strong> the package name appears in docs only and is not

113 present in manifests or lock files.

114 </p>

115 <p>

116 <strong>Next step:</strong> review the proposed dependency update and token

117 rotation plan before any destructive action.

118 </p>

131 119 

132**Ruled out:** the package name appears in docs only and is not

133present in manifests or lock files.

134 120 

135**Next step:** review the proposed dependency update and token

136rotation plan before any destructive action.

137 121 

138Once the read-only pass is complete, you can ask Codex to prepare a remediation PR, update CI permissions, or write a follow-up incident note. Keep those actions separate from the initial audit.122Once the read-only pass is complete, you can ask Codex to prepare a remediation PR, update CI permissions, or write a follow-up incident note. Keep those actions separate from the initial audit.

139 

140Turn the confirmed findings from this audit into a remediation plan.

141For each finding, include:

142- proposed change

143- files or settings to update

144- test or verification step

145- rollback plan

146- whether I need to rotate a credential or review an external system

147Do not make changes yet. Keep any command that could execute untrusted code out of the plan unless you explain why it is safe.

148 

149## Related use cases

150 

151[![](https://developers.openai.com/codex/use-cases/deep-security-scan.webp)

152 

153### Run a deep security scan

154 

155Use the Codex Security plugin to run a higher-recall, repository-wide audit that repeats...

156 

157Engineering Quality](https://developers.openai.com/codex/use-cases/deep-security-scan)[![](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security.webp)

158 

159### Scan code changes for security

160 

161Use the Codex Security plugin to examine a Git-backed change set, validate plausible...

162 

163Engineering Quality](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security)[![](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog.webp)

164 

165### Remediate a vulnerability backlog

166 

167Bring in approved findings from ticketing tools or vulnerability reporting systems, then use...

168 

169Engineering Quality](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)

170 

Details

1# Discover protein folding architectures | Codex use cases1---

2name: Discover protein folding architectures

3tagline: Turn protein-folding hypotheses into benchmarked experiment loops.

4summary: Use Codex with Goal Mode to research and implement novel architectural

5 modifications to AlphaFold2 for improved protein folding performance.

6bestFor:

7 - Computational biologists exploring architecture, loss, or curriculum changes

8 against an automatically scorable benchmark.

9 - Researchers who have a scientifically motivated hypothesis and want to

10 compress the path from idea to working experimental fork.

11 - ML engineers running long-lived autoresearch loops that require persistent

12 experiment tracking and iterative debugging.

13starterPrompt:

14 title: Run a Scientist-guided Architecture Search

15 body: >-

16 Use Goal Mode to improve the validation lDDT-Cα score of this

17 AlphaFold2-style protein-structure model on the NanoFold public benchmark.

2 18 

3Codex use cases

4 19 

5![](/assets/OpenAI-black-wordmark.svg)20 The scientific hypothesis is that persistent higher-order geometric states

21 may help the model learn protein geometry more efficiently from limited

22 data:

6 23 

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)

8 24 

9Codex use case25 - retain the standard MSA and pairwise representations;

10 26 

11# Discover protein folding architectures27 - add sparse learned 2-simplex face states for selected residue triplets;

12 28 

13Turn protein-folding hypotheses into benchmarked experiment loops.29 - add sparse learned 3-simplex tetrahedral states for selected residue

30 quadruplets;

14 31 

15Difficulty **Advanced**32 - construct topology only from official benchmark inputs and model-generated

33 recycled geometry;

16 34 

17Time horizon **Long-running**35 - keep the implementation computationally practical under NanoFold

36 constraints.

18 37 

19Use Codex with Goal Mode to research and implement novel architectural modifications to AlphaFold2 for improved protein folding performance.

20 38 

21## Best for39 Maintain durable tracking files for:

22 40 

23- Computational biologists exploring architecture, loss, or curriculum changes against an automatically scorable benchmark.41 1. The current strategy, status, and proposed next steps in PLAN.md

24- Researchers who have a scientifically motivated hypothesis and want to compress the path from idea to working experimental fork.

25- ML engineers running long-lived autoresearch loops that require persistent experiment tracking and iterative debugging.

26 42 

27# Contents43 2. A structured log of experiments and results in EXPERIMENTS.md

28 44 

29[← All use cases](https://developers.openai.com/codex/use-cases)45 3. A running scratchpad of notes and thoughts in EXPERIMENT_NOTES.md

30 46 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures/?export=pdf)

32 47 

33Use Codex with Goal Mode to research and implement novel architectural modifications to AlphaFold2 for improved protein folding performance.48 For each iteration:

34 49 

35Advanced50 1. state the hypothesis being tested;

36 51 

37Long-running52 2. make the smallest coherent code or configuration change;

38 53 

39Related links54 3. run the relevant tests and benchmark slice;

40 55 

41[Follow a goal](https://developers.openai.com/codex/use-cases/follow-goals) [SimplexFold repository](https://github.com/ChrisHayduk/SimplexFold) [SimplexFold benchmark plan](https://github.com/ChrisHayduk/SimplexFold/blob/main/BENCHMARK_PLAN.md) [NanoFold competition](https://github.com/ChrisHayduk/nanoFold-Competition)56 4. record metrics, latency, memory, and failure modes;

42 57 

43## Best for58 5. decide whether to keep, revert, or refine the change;

44 59 

45- Computational biologists exploring architecture, loss, or curriculum changes against an automatically scorable benchmark.60 6. periodically reassess the architecture-level search direction rather than

46- Researchers who have a scientifically motivated hypothesis and want to compress the path from idea to working experimental fork.61 only tuning local hyperparameters.

47- ML engineers running long-lived autoresearch loops that require persistent experiment tracking and iterative debugging.

48 62 

49## Starter prompt

50 63 

51Use Goal Mode to improve the validation lDDT-Cα score of this AlphaFold2-style protein-structure model on the NanoFold public benchmark.64 Do not claim generalization gains from smoke tests or single-chain overfit

52The scientific hypothesis is that persistent higher-order geometric states may help the model learn protein geometry more efficiently from limited data:65 diagnostics. Prefer matched comparisons and preserve the evidence boundary.

53- retain the standard MSA and pairwise representations;66 suggestedEffort: high

54- add sparse learned 2-simplex face states for selected residue triplets;67relatedLinks:

55- add sparse learned 3-simplex tetrahedral states for selected residue quadruplets;68 - label: Follow a goal

56- construct topology only from official benchmark inputs and model-generated recycled geometry;69 url: /codex/use-cases/follow-goals

57- keep the implementation computationally practical under NanoFold constraints.70 - label: SimplexFold repository

58Maintain durable tracking files for:71 url: https://github.com/ChrisHayduk/SimplexFold

591. The current strategy, status, and proposed next steps in PLAN.md72 - label: SimplexFold benchmark plan

602. A structured log of experiments and results in EXPERIMENTS.md73 url: https://github.com/ChrisHayduk/SimplexFold/blob/main/BENCHMARK_PLAN.md

613. A running scratchpad of notes and thoughts in EXPERIMENT\_NOTES.md74 - label: NanoFold competition

62For each iteration:75 url: https://github.com/ChrisHayduk/nanoFold-Competition

631. state the hypothesis being tested;76---

642. make the smallest coherent code or configuration change;

653. run the relevant tests and benchmark slice;

664. record metrics, latency, memory, and failure modes;

675. decide whether to keep, revert, or refine the change;

686. periodically reassess the architecture-level search direction rather than only tuning local hyperparameters.

69Do not claim generalization gains from smoke tests or single-chain overfit diagnostics. Prefer matched comparisons and preserve the evidence boundary.

70 

71Open in the Codex app

72 

73Use Goal Mode to improve the validation lDDT-Cα score of this AlphaFold2-style protein-structure model on the NanoFold public benchmark.

74The scientific hypothesis is that persistent higher-order geometric states may help the model learn protein geometry more efficiently from limited data:

75- retain the standard MSA and pairwise representations;

76- add sparse learned 2-simplex face states for selected residue triplets;

77- add sparse learned 3-simplex tetrahedral states for selected residue quadruplets;

78- construct topology only from official benchmark inputs and model-generated recycled geometry;

79- keep the implementation computationally practical under NanoFold constraints.

80Maintain durable tracking files for:

811. The current strategy, status, and proposed next steps in PLAN.md

822. A structured log of experiments and results in EXPERIMENTS.md

833. A running scratchpad of notes and thoughts in EXPERIMENT\_NOTES.md

84For each iteration:

851. state the hypothesis being tested;

862. make the smallest coherent code or configuration change;

873. run the relevant tests and benchmark slice;

884. record metrics, latency, memory, and failure modes;

895. decide whether to keep, revert, or refine the change;

906. periodically reassess the architecture-level search direction rather than only tuning local hyperparameters.

91Do not claim generalization gains from smoke tests or single-chain overfit diagnostics. Prefer matched comparisons and preserve the evidence boundary.

92 77 

93## Explore a protein-folding architecture hypothesis78## Explore a protein-folding architecture hypothesis

94 79 


115adds sparse face states `F_ijk` and tetrahedral states `U_ijkl` alongside the100adds sparse face states `F_ijk` and tetrahedral states `U_ijkl` alongside the

116conventional pair representation `Z_ij`.101conventional pair representation `Z_ij`.

117 102 

118```103```text

119MSA representation M104MSA representation M

120 <-> pair / edge tensor Z_ij105 <-> pair / edge tensor Z_ij

121 <-> sparse face tensor F_ijk106 <-> sparse face tensor F_ijk


170implementation, experimentation, debugging, and follow-up search cycle.159implementation, experimentation, debugging, and follow-up search cycle.

171 160 

172Treat promising diagnostics as evidence that the implementation path works,161Treat promising diagnostics as evidence that the implementation path works,

173not as proof of generalization. Review the agents trajectory periodically,162not as proof of generalization. Review the agent's trajectory periodically,

174steer it back toward scientifically meaningful architecture questions if it163steer it back toward scientifically meaningful architecture questions if it

175collapses into local hyperparameter tuning, and promote claims only after164collapses into local hyperparameter tuning, and promote claims only after

176matched public-validation comparisons and appropriate replicates.165matched public-validation comparisons and appropriate replicates.


183- [NanoFold competition rules](https://github.com/ChrisHayduk/nanoFold-Competition/blob/main/docs/COMPETITION.md)172- [NanoFold competition rules](https://github.com/ChrisHayduk/nanoFold-Competition/blob/main/docs/COMPETITION.md)

184- [Goal Mode running for more than 150 hours](https://x.com/ChrisHayduk/status/2055757345506877759?s=20)173- [Goal Mode running for more than 150 hours](https://x.com/ChrisHayduk/status/2055757345506877759?s=20)

185- [Goal Mode article](https://x.com/ChrisHayduk/status/2053807198870880743?s=20)174- [Goal Mode article](https://x.com/ChrisHayduk/status/2053807198870880743?s=20)

186 

187## Related use cases

188 

189[![](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc.webp)

190 

191### Annotate scRNA-seq data

192 

193Use Codex with the NGS Analysis plugin to turn a 10x-style matrix bundle into QC-filtered...

194 

195Sciences Data](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc)[![](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc.webp)

196 

197### Validate bulk RNA-seq inputs

198 

199Use Codex with the NGS Analysis plugin to validate sample sheets, FASTQs, and references...

200 

201Sciences Data](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc)[![](https://developers.openai.com/codex/use-cases/target-prioritization.webp)

202 

203### Prioritize drug targets

204 

205Use Codex with the Life Science Research plugin to normalize entities, retrieve genetics...

206 

207Sciences Data](https://developers.openai.com/codex/use-cases/target-prioritization)

208 

Details

1# Run event playbooks | Codex use cases1---

2 2name: Run event playbooks

3Codex use cases3tagline: Create repeatable workflows for event program management.

4 4summary: Use Codex with Slack, Google Drive, and Calendar to gather planning

5![](/assets/OpenAI-black-wordmark.svg)5 context, draft attendee-facing copy, and prepare a private checklist with

6 6 owners, approvals, and open questions.

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7skills:

8 8 - token: slack

9Codex use case9 url: https://github.com/openai/plugins/tree/main/plugins/slack

10 10 description: Read planning channels, threads, canvases, and decisions that

11# Run event playbooks11 define the current event scope.

12 12 - token: google-drive

13Create repeatable workflows for event program management.13 url: https://github.com/openai/plugins/tree/main/plugins/google-drive

14 14 description: Gather approved templates, event docs, decks, recap notes, and

15Difficulty **Intermediate**15 launch assets.

16 16 - token: google-calendar

17Time horizon **1h**17 url: https://github.com/openai/plugins/tree/main/plugins/google-calendar

18 18 description: Check event timing, deadlines, and meeting context while building

19Use Codex with Slack, Google Drive, and Calendar to gather planning context, draft attendee-facing copy, and prepare a private checklist with owners, approvals, and open questions.19 the playbook.

20 20 - token: sheets

21## Best for21 description: Track tasks, owners, and deadlines in a structured format.

22 22bestFor:

23- Community, developer relations, marketing, and operations teams running events.23 - Community, developer relations, marketing, and operations teams running

24- Event pages, handoffs, and launch checklists where public copy and private operations need to stay separate.24 events.

25- Recurring event programs that need source-backed templates, owners, approvals, and open questions.25 - Event pages, handoffs, and launch checklists where public copy and private

26 26 operations need to stay separate.

27# Contents27 - Recurring event programs that need source-backed templates, owners,

28 28 approvals, and open questions.

29[← All use cases](https://developers.openai.com/codex/use-cases)29starterPrompt:

30 30 title: Build the Event Playbook

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/event-launch-playbooks/?export=pdf)31 body: >-

32 32 Create a source-backed playbook for [event].

33Use Codex with Slack, Google Drive, and Calendar to gather planning context, draft attendee-facing copy, and prepare a private checklist with owners, approvals, and open questions.33 

34 34 

35Intermediate35 Sources to use:

36 36 

371h37 - planning channels or threads: [links or names]

38 38 

39Related links39 - approved docs, decks, sheets, or templates: [links or names]

40 40 

41[Codex plugins](https://developers.openai.com/codex/plugins) [Codex automations](https://developers.openai.com/codex/app/automations) [Use Codex in Slack](https://developers.openai.com/codex/integrations/slack)41 - calendar events or deadlines: [links or dates]

42 42 

43## Best for43 

44 44 Split the output into:

45- Community, developer relations, marketing, and operations teams running events.45 

46- Event pages, handoffs, and launch checklists where public copy and private operations need to stay separate.46 - attendee-facing copy

47- Recurring event programs that need source-backed templates, owners, approvals, and open questions.47 

48 48 - private operating checklist

49## Skills & Plugins49 

50 50 - owner map

51- [Slack](https://github.com/openai/plugins/tree/main/plugins/slack)51 

52 52 - support plan or resources

53 Read planning channels, threads, canvases, and decisions that define the current event scope.53 

54- [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive)54 - approvals still needed

55 55 

56 Gather approved templates, event docs, decks, recap notes, and launch assets.56 - open questions

57- [Google Calendar](https://github.com/openai/plugins/tree/main/plugins/google-calendar)57 

58 58 - source appendix

59 Check event timing, deadlines, and meeting context while building the playbook.59 

60- Sheets60 

61 61 Do not publish anything or assume missing details. Put unknowns in open

62 Track tasks, owners, and deadlines in a structured format.62 questions and keep private operations out of the public copy.

63 63 suggestedEffort: medium

64| Skill | Why use it |64relatedLinks:

65| --- | --- |65 - label: Codex plugins

66| [Slack](https://github.com/openai/plugins/tree/main/plugins/slack) | Read planning channels, threads, canvases, and decisions that define the current event scope. |66 url: /codex/plugins

67| [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive) | Gather approved templates, event docs, decks, recap notes, and launch assets. |67 - label: Codex automations

68| [Google Calendar](https://github.com/openai/plugins/tree/main/plugins/google-calendar) | Check event timing, deadlines, and meeting context while building the playbook. |68 url: /codex/app/automations

69| Sheets | Track tasks, owners, and deadlines in a structured format. |69 - label: Use Codex in Slack

70 70 url: /codex/integrations/slack

71## Starter prompt71---

72 

73Create a source-backed playbook for [event].

74Sources to use:

75- planning channels or threads: [links or names]

76- approved docs, decks, sheets, or templates: [links or names]

77- calendar events or deadlines: [links or dates]

78Split the output into:

79- attendee-facing copy

80- private operating checklist

81- owner map

82- support plan or resources

83- approvals still needed

84- open questions

85- source appendix

86Do not publish anything or assume missing details. Put unknowns in open questions and keep private operations out of the public copy.

87 

88Open in the Codex app

89 

90Create a source-backed playbook for [event].

91Sources to use:

92- planning channels or threads: [links or names]

93- approved docs, decks, sheets, or templates: [links or names]

94- calendar events or deadlines: [links or dates]

95Split the output into:

96- attendee-facing copy

97- private operating checklist

98- owner map

99- support plan or resources

100- approvals still needed

101- open questions

102- source appendix

103Do not publish anything or assume missing details. Put unknowns in open questions and keep private operations out of the public copy.

104 72 

105## Introduction73## Introduction

106 74 


127## Run the playbook as an automation95## Run the playbook as an automation

128 96 

129After the first run of your new playbook works, keep the same thread open and ask Codex to run it as a scheduled automation.97After the first run of your new playbook works, keep the same thread open and ask Codex to run it as a scheduled automation.

130 

131Review the new event requests.

132Check:

133- attendee-facing copy has no private logistics, budget notes, or internal-only partner context

134- asks are in line with the event program

135And give me a draft for follow up questions/checks I could send.

136 

137## Related use cases

138 

139[![](https://developers.openai.com/codex/use-cases/new-hire-onboarding.webp)

140 

141### Coordinate new-hire onboarding

142 

143Use Codex to gather approved new-hire context, stage tracker updates, draft team-by-team...

144 

145Integrations Data](https://developers.openai.com/codex/use-cases/new-hire-onboarding)[![](https://developers.openai.com/codex/use-cases/draft-prds-from-sources.webp)

146 

147### Draft PRDs from internal context

148 

149Use Codex with the $documents skill and connected apps such as Linear, Slack, Notion or...

150 

151Integrations Knowledge Work](https://developers.openai.com/codex/use-cases/draft-prds-from-sources)[![](https://developers.openai.com/codex/use-cases/meeting-prep-briefs.webp)

152 

153### Prepare meeting briefs

154 

155Use Codex with Calendar, Drive, Slack, and Gmail to gather approved sources before a...

156 

157Integrations Knowledge Work](https://developers.openai.com/codex/use-cases/meeting-prep-briefs)

158 

Details

1# Follow a goal | Codex use cases1---

2 2name: Follow a goal

3Codex use cases3tagline: Give Codex a durable objective for long-running work.

4 4summary: Use `/goal` when a task needs Codex to keep working across turns toward

5![](/assets/OpenAI-black-wordmark.svg)5 a verifiable stopping condition.

6 6bestFor:

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7 - Long-running coding work with a clear success condition and validation loop.

8 8 - Code migrations, large refactors, deployment retry loops, experiments,

9Codex use case9 games, and side projects where Codex can keep making scoped progress.

10 10 - Teams that need to run long experiments with clear success criteria.

11# Follow a goal11starterPrompt:

12 12 title: Set a Long-Running Goal

13Give Codex a durable objective for long-running work.13 body: /goal Complete [objective] without stopping until [verifiable end state].

14 14relatedLinks:

15Difficulty **Advanced**15 - label: "`/goal` in CLI slash commands"

16 16 url: /codex/cli/slash-commands#set-or-view-a-task-goal-with-goal

17Time horizon **Long-running**17 - label: Codex workflows

18 18 url: /codex/workflows

19Use `/goal` when a task needs Codex to keep working across turns toward a verifiable stopping condition.19 - label: Run code migrations

20 20 url: /codex/use-cases/code-migrations

21## Best for21 - label: Iterate on difficult problems

22 22 url: /codex/use-cases/iterate-on-difficult-problems

23- Long-running coding work with a clear success condition and validation loop.23---

24- Code migrations, large refactors, deployment retry loops, experiments, games, and side projects where Codex can keep making scoped progress.

25- Teams that need to run long experiments with clear success criteria.

26 

27# Contents

28 

29[← All use cases](https://developers.openai.com/codex/use-cases)

30 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/follow-goals/?export=pdf)

32 

33Use `/goal` when a task needs Codex to keep working across turns toward a verifiable stopping condition.

34 

35Advanced

36 

37Long-running

38 

39Related links

40 

41[`/goal` in CLI slash commands](https://developers.openai.com/codex/cli/slash-commands#set-a-goal-with-goal) [Codex workflows](https://developers.openai.com/codex/workflows) [Run code migrations](https://developers.openai.com/codex/use-cases/code-migrations) [Iterate on difficult problems](https://developers.openai.com/codex/use-cases/iterate-on-difficult-problems)

42 

43## Best for

44 

45- Long-running coding work with a clear success condition and validation loop.

46- Code migrations, large refactors, deployment retry loops, experiments, games, and side projects where Codex can keep making scoped progress.

47- Teams that need to run long experiments with clear success criteria.

48 

49## Starter prompt

50 

51/goal Complete [objective] without stopping until [verifiable end state].

52 

53Open in the Codex app

54 

55/goal Complete [objective] without stopping until [verifiable end state].

56 24 

57## Introduction25## Introduction

58 26 

59Use `/goal` when you want Codex to keep working toward one durable objective instead of stopping after one normal turn. Its useful for work that has a clear target, a validation loop, and enough room for Codex to make progress without asking you to steer every step. When you use `/goal`, Codex can work independently for multiple hours without needing your input.27Use `/goal` when you want Codex to keep working toward one durable objective instead of stopping after one normal turn. It's useful for work that has a clear target, a validation loop, and enough room for Codex to make progress without asking you to steer every step. When you use `/goal`, Codex can work independently for multiple hours without needing your input.

60 28 

61Set a goal with `/goal <objective>`, check the current goal with `/goal`, and use `/goal pause`, `/goal resume`, or `/goal clear` when you need to control the run.29Set a goal with `/goal <objective>`, check the current goal with `/goal`, and use `/goal pause`, `/goal resume`, or `/goal clear` when you need to control the run.

62 30 

63If `/goal` doesnt appear in the slash command list, enable `features.goals`31If `/goal` doesn't appear in the slash command list, enable `features.goals`

64in `config.toml`:32in `config.toml`:

65 33 

66```34```toml

67[features]35[features]

68goals = true36goals = true

69```37```


72 40 

73## Choose the right work41## Choose the right work

74 42 

75A good goal is bigger than one prompt but smaller than an open-ended backlog. It should define what Codex should achieve, what it shouldnt change, how it should validate progress, and when it should stop.43A good goal is bigger than one prompt but smaller than an open-ended backlog. It should define what Codex should achieve, what it shouldn't change, how it should validate progress, and when it should stop.

76 44 

77This works well for:45This works well for:

78 46 


915. Use `/goal` to inspect status while it runs.615. Use `/goal` to inspect status while it runs.

926. Pause, resume, or clear the goal when the run is done, blocked, or changing direction.626. Pause, resume, or clear the goal when the run is done, blocked, or changing direction.

93 63 

94The important part is the contract. Codex should know what “done” means before it starts. If the goal is a migration, “done” might mean the new path passes contract tests and the legacy path still has a rollback. If the goal is a game or prototype, “done” might mean the app builds, launches, and matches the input reference or expected behavior.64 

65 

66The important part is the contract. Codex should know what "done" means before it starts. If the goal is a migration, "done" might mean the new path passes contract tests and the legacy path still has a rollback. If the goal is a game or prototype, "done" might mean the app builds, launches, and matches the input reference or expected behavior.

95 67 

96Ask Codex to help: start by having a conversation about what you want to68Ask Codex to help: start by having a conversation about what you want to

97build, then ask it to directly set a goal and start working.69 build, then ask it to directly set a goal and start working.

98 70 

99## Let Codex work independently71## Let Codex work independently

100 72 

101During a goal, ask for compact progress reports that make the run easier to trust. A useful status update names the current checkpoint, what was verified, what remains, and whether Codex is blocked.73During a goal, ask for compact progress reports that make the run easier to trust. A useful status update names the current checkpoint, what was verified, what remains, and whether Codex is blocked.

102If the status becomes vague, tighten the goal rather than adding more one-off instructions. Tell Codex exactly which checkpoint matters next, which command proves it, and what should cause it to pause.74If the status becomes vague, tighten the goal rather than adding more one-off instructions. Tell Codex exactly which checkpoint matters next, which command proves it, and what should cause it to pause.

103 75 

104When Codex follows a goal, it can work independently for many hours without you having to check in. It will stop running when its confident it has reached the stopping condition, so you should think of `/goal` as a background task you dont need to monitor.76When Codex follows a goal, it can work independently for many hours without you having to check in. It will stop running when it's confident it has reached the stopping condition, so you should think of `/goal` as a background task you don't need to monitor.

105 77 

106## Example goals78## Example goals

107 79 

108### Migrations80### Migrations

109 81 

110Whether youre migrating games to a new stack, mobile apps to a new platform, or a codebase to a new framework, you can use `/goal` to have Codex run the migration:82Whether you're migrating games to a new stack, mobile apps to a new platform, or a codebase to a new framework, you can use `/goal` to have Codex run the migration:

111 

112/goal Migrate this project from [legacy stack or system] to [target stack or system]. Make sure all screens stay exactly the same visually, using playwright interactive to verify the output.

113 83 

114### Prototype creation84### Prototype creation

115 85 

116Whether youre creating a new app from scratch, a new game, or a new feature, you can use `/goal` to have Codex complete a polished first version. You can use a PLAN.md file to guide the creation of the first version, describing precisely what you want to build.86Whether you're creating a new app from scratch, a new game, or a new feature, you can use `/goal` to have Codex complete a polished first version. You can use a PLAN.md file to guide the creation of the first version, describing precisely what you want to build.

117 

118/goal Implement PLAN.md, creating tests for each milestone and verifying the output with playwright interactive. [include reference screens as needed]

119 87 

120### Prompt optimization88### Prompt optimization

121 89 

122When you have an eval suite, you can use `/goal` to optimize prompts against the eval results. Codex can inspect failures, update the prompt, rerun the evals, and keep iterating until the score improves or it reaches your stopping condition.90When you have an eval suite, you can use `/goal` to optimize prompts against the eval results. Codex can inspect failures, update the prompt, rerun the evals, and keep iterating until the score improves or it reaches your stopping condition.

123 

124/goal Optimize the prompts in [prompt file or directory] until the eval suite reaches [target score or pass rate]. After each change, run [eval command], inspect the failing cases, and keep the prompt edits minimal and targeted. Stop when the target is met or when further prompt changes would need product or policy guidance.

125 

126## Related use cases

127 

128[![](https://developers.openai.com/codex/use-cases/agent-friendly-clis.webp)

129 

130### Create a CLI Codex can use

131 

132Ask Codex to create a composable CLI it can run from any folder, combine with repo scripts...

133 

134Engineering Code](https://developers.openai.com/codex/use-cases/agent-friendly-clis)[![](https://developers.openai.com/codex/use-cases/browser-games.webp)

135 

136### Create browser-based games

137 

138Use Codex to turn a game brief into first a well-defined plan, and then a real browser-based...

139 

140Engineering Code](https://developers.openai.com/codex/use-cases/browser-games)[![](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog.webp)

141 

142### Remediate a vulnerability backlog

143 

144Bring in approved findings from ticketing tools or vulnerability reporting systems, then use...

145 

146Engineering Quality](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)

147 

Details

1# Build responsive front-end designs | Codex use cases1---

2name: Build responsive front-end designs

3tagline: Turn screenshots and visual references into responsive UI with visual checks.

4summary: Use Codex to translate screenshots and design briefs into code that

5 matches the repo's design system, then use Playwright to compare the

6 implementation to your references for different screen sizes and iterate until

7 it looks right.

8featured: true

9skills:

10 - token: $playwright

11 url: https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive

12 description: Open the app in a real browser to verify the implementation and

13 iterate on layout and behavior.

14bestFor:

15 - Creating new front-end projects from scratch

16 - Implementing already designed screens or flows from screenshots in an

17 existing codebase

18starterPrompt:

19 body: >-

20 Implement this UI in the current project using the screenshots and notes I

21 provide as the source of truth.

2 22 

3Codex use cases

4 23 

5![](/assets/OpenAI-black-wordmark.svg)24 Requirements:

6 25 

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)26 - Reuse the existing design system components and tokens.

8 27 

9Codex use case28 - Translate the screenshots into this repo's utilities and component

29 patterns instead of inventing a parallel system.

10 30 

11# Build responsive front-end designs31 - Match spacing, layout, hierarchy, and responsive behavior closely.

12 32 

13Turn screenshots and visual references into responsive UI with visual checks.33 - Respect the repo's routing, state, and data-fetch patterns.

14 34 

15Difficulty **Intermediate**35 - Make the page responsive on desktop and mobile.

16 36 

17Time horizon **1h**37 - If any screenshot detail is ambiguous, choose the simplest implementation

38 that still matches the overall direction and note the assumption briefly.

18 39 

19Use Codex to translate screenshots and design briefs into code that matches the repo's design system, then use Playwright to compare the implementation to your references for different screen sizes and iterate until it looks right.

20 40 

21## Best for41 Validation:

22 42 

23- Creating new front-end projects from scratch43 - Compare the finished UI against the provided screenshots for both look and

24- Implementing already designed screens or flows from screenshots in an existing codebase44 behavior.

25 45 

26# Contents46 - Use $playwright-interactive to check that the UI matches the references

27 47 and iterate as needed until it does.

28[← All use cases](https://developers.openai.com/codex/use-cases)48 suggestedEffort: medium

29 49relatedLinks:

30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/frontend-designs/?export=pdf)50 - label: Codex skills

31 51 url: /codex/skills

32Use Codex to translate screenshots and design briefs into code that matches the repo's design system, then use Playwright to compare the implementation to your references for different screen sizes and iterate until it looks right.52---

33 

34Intermediate

35 

361h

37 

38Related links

39 

40[Codex skills](https://developers.openai.com/codex/skills)

41 

42## Best for

43 

44- Creating new front-end projects from scratch

45- Implementing already designed screens or flows from screenshots in an existing codebase

46 

47## Skills & Plugins

48 

49- [Playwright](https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive)

50 

51 Open the app in a real browser to verify the implementation and iterate on layout and behavior.

52 

53| Skill | Why use it |

54| --- | --- |

55| [Playwright](https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive) | Open the app in a real browser to verify the implementation and iterate on layout and behavior. |

56 

57## Starter prompt

58 

59Implement this UI in the current project using the screenshots and notes I provide as the source of truth.

60Requirements:

61- Reuse the existing design system components and tokens.

62- Translate the screenshots into this repo's utilities and component patterns instead of inventing a parallel system.

63- Match spacing, layout, hierarchy, and responsive behavior closely.

64- Respect the repo's routing, state, and data-fetch patterns.

65- Make the page responsive on desktop and mobile.

66- If any screenshot detail is ambiguous, choose the simplest implementation that still matches the overall direction and note the assumption briefly.

67Validation:

68- Compare the finished UI against the provided screenshots for both look and behavior.

69- Use $playwright-interactive to check that the UI matches the references and iterate as needed until it does.

70 

71Open in the Codex app

72 

73Implement this UI in the current project using the screenshots and notes I provide as the source of truth.

74Requirements:

75- Reuse the existing design system components and tokens.

76- Translate the screenshots into this repo's utilities and component patterns instead of inventing a parallel system.

77- Match spacing, layout, hierarchy, and responsive behavior closely.

78- Respect the repo's routing, state, and data-fetch patterns.

79- Make the page responsive on desktop and mobile.

80- If any screenshot detail is ambiguous, choose the simplest implementation that still matches the overall direction and note the assumption briefly.

81Validation:

82- Compare the finished UI against the provided screenshots for both look and behavior.

83- Use $playwright-interactive to check that the UI matches the references and iterate as needed until it does.

84 53 

85## Introduction54## Introduction

86 55 


97## Be specific66## Be specific

98 67 

99The more specific you are about the expected interaction patterns and the style you want, the better the result will be.68The more specific you are about the expected interaction patterns and the style you want, the better the result will be.

100The model tends to default to high-frequency patterns and style so if its not obvious from your references that you want something else, the UI might look generic.69The model tends to default to high-frequency patterns and style so if it's not obvious from your references that you want something else, the UI might look generic.

101The more input you give, be it more reference inspiration or more specific instructions, the more you can expect to have a UI that stands out.70The more input you give, be it more reference inspiration or more specific instructions, the more you can expect to have a UI that stands out.

102 71 

103## Prepare the design system72## Prepare the design system

104 73 

105Codex works best when the target repo already has a clear component layer. Codex can automatically use your existing component and design system instead of recreating them from scratch.74Codex works best when the target repo already has a clear component layer. Codex can automatically use your existing component and design system instead of recreating them from scratch.

106 75 

107If you think its necessary (i.e. if youre not using a standard stack), specify to Codex which primitives to reuse, where your tokens live, and what the repo considers canonical for buttons, inputs, cards, typography, and icons.76If you think it's necessary (i.e. if you're not using a standard stack), specify to Codex which primitives to reuse, where your tokens live, and what the repo considers canonical for buttons, inputs, cards, typography, and icons.

108 77 

109If youre starting from an existing codebase, its very likely that Codex will understand on its own how to use your components and design system, but if starting from scratch, its a good idea to be explicit.78If you're starting from an existing codebase, it's very likely that Codex will understand on its own how to use your components and design system, but if starting from scratch, it's a good idea to be explicit.

110 79 

111Ask Codex to treat the screenshots as a visual target but to translate that target into the projects actual utilities, component wrappers, color system, typography scale, spacing tokens, routing, state management, and data-fetch patterns.80Ask Codex to treat the screenshots as a visual target but to translate that target into the project's actual utilities, component wrappers, color system, typography scale, spacing tokens, routing, state management, and data-fetch patterns.

112 81 

113## Leverage Playwright82## Leverage Playwright

114 83 


122 91 

123The first pass should already be directionally close to the screenshots. For complex layouts, interactions, or animation-heavy UI, expect a few rounds of adjustment.92The first pass should already be directionally close to the screenshots. For complex layouts, interactions, or animation-heavy UI, expect a few rounds of adjustment.

124 93 

125Ask Codex to compare the implementation back to the screenshots, not just whether the page builds. When conflicts come up, it should prefer the repos design-system tokens and only make minimal spacing or sizing adjustments needed to preserve the overall look of the design.94Ask Codex to compare the implementation back to the screenshots, not just whether the page builds. When conflicts come up, it should prefer the repo's design-system tokens and only make minimal spacing or sizing adjustments needed to preserve the overall look of the design.

126 95 

127Use additional screenshots or short notes if they help clarify states that are not obvious from one image.96Use additional screenshots or short notes if they help clarify states that are not obvious from one image.

128 97 

129### Suggested follow-up prompt98### Suggested follow-up prompt

130 

131[current implementation image] [reference image]

132This doesn't look right. Make sure to implement something that matches closely the reference:

133[if needed, specify what is different]

134 

135## Related use cases

136 

137[![](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept.webp)

138 

139### Get from idea to proof of concept

140 

141Use Codex with ImageGen to turn a rough idea into a visual direction, implement the smallest...

142 

143Front-end Engineering](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept)[![](https://developers.openai.com/codex/use-cases/figma-designs-to-code.webp)

144 

145### Turn Figma designs into code

146 

147Use Codex to pull design context, assets, and variants from Figma, translate them into code...

148 

149Front-end Design](https://developers.openai.com/codex/use-cases/figma-designs-to-code)[![](https://developers.openai.com/codex/use-cases/make-granular-ui-changes.webp)

150 

151### Make granular UI changes

152 

153Use Codex to make one small UI adjustment at a time in an existing app, verify it in the...

154 

155Front-end Design](https://developers.openai.com/codex/use-cases/make-granular-ui-changes)

156 

Details

1# Review GitHub pull requests | Codex use cases1---

2 2name: Review GitHub pull requests

3Codex use cases3tagline: Catch regressions and potential issues before human review.

4 4summary: Use Codex code review in GitHub to automatically surface regressions,

5![](/assets/OpenAI-black-wordmark.svg)5 missing tests, and documentation issues directly on a pull request.

6 6skills:

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7 - token: $security-best-practices

8 8 url: https://github.com/openai/skills/tree/main/skills/.curated/security-best-practices

9Codex use case9 description: Focus the review on risky surfaces such as secrets, auth, and

10 10 dependency changes.

11# Review GitHub pull requests11bestFor:

12 12 - Teams that want another review signal before human merge approval

13Catch regressions and potential issues before human review.13 - Large codebases for projects in production

14 14starterPrompt:

15Difficulty **Easy**15 title: Ask Codex to review a pull request

16 16 body: "@codex review for security regressions, missing tests, and risky behavior

17Time horizon **5s**17 changes."

18 18 suggestedModel: cloud

19Use Codex code review in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.19relatedLinks:

20 20 - label: Codex code review in GitHub

21## Best for21 url: /codex/integrations/github

22 22 - label: Custom instructions with AGENTS.md

23- Teams that want another review signal before human merge approval23 url: /codex/guides/agents-md

24- Large codebases for projects in production24---

25 

26# Contents

27 

28[← All use cases](https://developers.openai.com/codex/use-cases)

29 

30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/github-code-reviews/?export=pdf)

31 

32Use Codex code review in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.

33 

34Easy

35 

365s

37 

38Related links

39 

40[Codex code review in GitHub](https://developers.openai.com/codex/integrations/github) [Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md)

41 

42## Best for

43 

44- Teams that want another review signal before human merge approval

45- Large codebases for projects in production

46 

47## Skills & Plugins

48 

49- [Security Best Practices](https://github.com/openai/skills/tree/main/skills/.curated/security-best-practices)

50 

51 Focus the review on risky surfaces such as secrets, auth, and dependency changes.

52 

53| Skill | Why use it |

54| --- | --- |

55| [Security Best Practices](https://github.com/openai/skills/tree/main/skills/.curated/security-best-practices) | Focus the review on risky surfaces such as secrets, auth, and dependency changes. |

56 

57## Starter prompt

58 

59@codex review for security regressions, missing tests, and risky behavior changes.

60 

61@codex review for security regressions, missing tests, and risky behavior changes.

62 25 

63## How to use26## How to use

64 27 


75 38 

76To customize what Codex reviews, add or update a top-level `AGENTS.md` with a section like this:39To customize what Codex reviews, add or update a top-level `AGENTS.md` with a section like this:

77 40 

78```41```md

79## Review guidelines42## Review guidelines

80 43 

81- Flag typos and grammar issues as P0 issues.44- Flag typos and grammar issues as P0 issues.


85```48```

86 49 

87Codex applies guidance from the closest `AGENTS.md` to each changed file. You can place more specific instructions deeper in the tree when particular packages need extra scrutiny.50Codex applies guidance from the closest `AGENTS.md` to each changed file. You can place more specific instructions deeper in the tree when particular packages need extra scrutiny.

88 

89## Related use cases

90 

91[![](https://developers.openai.com/codex/use-cases/chatgpt-apps.webp)

92 

93### Bring your app to ChatGPT

94 

95Build one narrow ChatGPT app outcome end to end: define the tools, scaffold the MCP server...

96 

97Integrations Code](https://developers.openai.com/codex/use-cases/chatgpt-apps)[![](https://developers.openai.com/codex/use-cases/new-hire-onboarding.webp)

98 

99### Coordinate new-hire onboarding

100 

101Use Codex to gather approved new-hire context, stage tracker updates, draft team-by-team...

102 

103Integrations Data](https://developers.openai.com/codex/use-cases/new-hire-onboarding)[![](https://developers.openai.com/codex/use-cases/draft-prds-from-sources.webp)

104 

105### Draft PRDs from internal context

106 

107Use Codex with the $documents skill and connected apps such as Linear, Slack, Notion or...

108 

109Integrations Knowledge Work](https://developers.openai.com/codex/use-cases/draft-prds-from-sources)

110 

Details

1# Make granular UI changes | Codex use cases1---

2 2name: Make granular UI changes

3Codex use cases3tagline: Use Codex-Spark for fast, focused UI iteration in an existing app.

4 4summary: Use Codex to make one small UI adjustment at a time in an existing app,

5![](/assets/OpenAI-black-wordmark.svg)5 verify it in the browser, and keep iterating quickly from a popped-out chat

6 6 window near your preview.

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7skills:

8 8 - token: $playwright

9Codex use case9 url: https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive

10 10 description: Open the running app in a real browser, inspect the changed route,

11# Make granular UI changes11 and verify each small UI adjustment before the next iteration.

12 12bestFor:

13Use Codex-Spark for fast, focused UI iteration in an existing app.13 - Existing apps where the main structure is already built and you need small

14 14 visual adjustments

15Difficulty **Easy**15 - Fast product or design review loops where each note should become one

16 16 focused code change

17Time horizon **5m**17 - UI polish passes that need browser verification but should not turn into a

18 18 broad redesign

19Use Codex to make one small UI adjustment at a time in an existing app, verify it in the browser, and keep iterating quickly from a popped-out chat window near your preview.19starterPrompt:

20 20 title: Make One UI Change

21## Best for21 body: >-

22 22 Make this UI change in the existing app:

23- Existing apps where the main structure is already built and you need small visual adjustments23 

24- Fast product or design review loops where each note should become one focused code change24 [describe the exact spacing, alignment, color, copy, responsive, or

25- UI polish passes that need browser verification but should not turn into a broad redesign25 component-state adjustment]

26 26 

27# Contents27 

28 28 Constraints:

29[← All use cases](https://developers.openai.com/codex/use-cases)29 

30 30 - Change only the files needed for this UI adjustment.

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/make-granular-ui-changes/?export=pdf)31 

32 32 - Reuse existing components, tokens, icons, and layout patterns.

33Use Codex to make one small UI adjustment at a time in an existing app, verify it in the browser, and keep iterating quickly from a popped-out chat window near your preview.33 

34 34 - Keep behavior, data flow, and routing unchanged unless I explicitly ask

35Easy35 for it.

36 36 

375m37 - Start or reuse the dev server, inspect the current UI in the browser, make

38 38 the smallest patch, and verify the result visually.

39Related links39 

40 40 

41[Codex-Spark](https://developers.openai.com/codex/speed#codex-spark) [Floating pop-out window](https://developers.openai.com/codex/app/features#floating-pop-out-window)41 Stop after this one change and summarize the files changed plus the browser

42 42 check you ran.

43## Best for43 suggestedModel: gpt-5.3-codex-spark

44 44 suggestedEffort: low

45- Existing apps where the main structure is already built and you need small visual adjustments45relatedLinks:

46- Fast product or design review loops where each note should become one focused code change46 - label: Codex-Spark

47- UI polish passes that need browser verification but should not turn into a broad redesign47 url: /codex/speed#codex-spark

48 48 - label: Floating pop-out window

49## Skills & Plugins49 url: /codex/app/features#floating-pop-out-window

50 50---

51- [Playwright](https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive)

52 

53 Open the running app in a real browser, inspect the changed route, and verify each small UI adjustment before the next iteration.

54 

55| Skill | Why use it |

56| --- | --- |

57| [Playwright](https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive) | Open the running app in a real browser, inspect the changed route, and verify each small UI adjustment before the next iteration. |

58 

59## Starter prompt

60 

61Make this UI change in the existing app:

62[describe the exact spacing, alignment, color, copy, responsive, or component-state adjustment]

63Constraints:

64- Change only the files needed for this UI adjustment.

65- Reuse existing components, tokens, icons, and layout patterns.

66- Keep behavior, data flow, and routing unchanged unless I explicitly ask for it.

67- Start or reuse the dev server, inspect the current UI in the browser, make the smallest patch, and verify the result visually.

68Stop after this one change and summarize the files changed plus the browser check you ran.

69 

70Open in the Codex app

71 

72Make this UI change in the existing app:

73[describe the exact spacing, alignment, color, copy, responsive, or component-state adjustment]

74Constraints:

75- Change only the files needed for this UI adjustment.

76- Reuse existing components, tokens, icons, and layout patterns.

77- Keep behavior, data flow, and routing unchanged unless I explicitly ask for it.

78- Start or reuse the dev server, inspect the current UI in the browser, make the smallest patch, and verify the result visually.

79Stop after this one change and summarize the files changed plus the browser check you ran.

80 51 

81## Introduction52## Introduction

82 53 


85 56 

86This works best as a tight loop: one visual note, one focused edit, one browser check, then the next note.57This works best as a tight loop: one visual note, one focused edit, one browser check, then the next note.

87 58 

88You can use the [Codex Spark model](https://developers.openai.com/codex/models#gpt-53-codex-spark) for this59You can use the [Codex Spark model](https://developers.openai.com/codex/models) for this task. It is

89task. It is available on Pro plans.60 available on Pro plans.

90 61 

91## Pick your model62## Pick your model

92 63 

93For fast UI iteration, start with `gpt-5.3-codex-spark` if you have access to it. It is less capable that our general-purpose models, but is designed for real-time coding iteration. If you dont have access to it, use `gpt-5.5` with `medium` or `low` reasoning effort.64For fast UI iteration, start with `gpt-5.3-codex-spark` if you have access to it. It is less capable that our general-purpose models, but is designed for real-time coding iteration. If you don't have access to it, use `gpt-5.5` with `medium` or `low` reasoning effort.

94 65 

95That tradeoff is useful for granular UI work. You usually do not need the deepest model to move a button, tune a breakpoint, or adjust a component state. You need a model that responds quickly, understands the local code, edits the right file, and can repeat the loop without making the iteration feel heavy.66That tradeoff is useful for granular UI work. You usually do not need the deepest model to move a button, tune a breakpoint, or adjust a component state. You need a model that responds quickly, understands the local code, edits the right file, and can repeat the loop without making the iteration feel heavy.

96 67 


991. Open the existing app and get the relevant route or component visible.701. Open the existing app and get the relevant route or component visible.

1002. Pop out the active Codex conversation into a [floating window](https://developers.openai.com/codex/app/features#floating-pop-out-window) and keep it near your browser, editor, or design preview while you work.712. Pop out the active Codex conversation into a [floating window](https://developers.openai.com/codex/app/features#floating-pop-out-window) and keep it near your browser, editor, or design preview while you work.

1013. Give Codex one specific UI change at a time. Include the route, viewport, current screenshot, target screenshot, or exact product note if you have it.723. Give Codex one specific UI change at a time. Include the route, viewport, current screenshot, target screenshot, or exact product note if you have it.

1024. Ask Codex to inspect the current implementation, make the smallest defensible edit, and preserve the apps existing components, tokens, layout primitives, and data flow.734. Ask Codex to inspect the current implementation, make the smallest defensible edit, and preserve the app's existing components, tokens, layout primitives, and data flow.

1035. Review the result, then send the next small adjustment in the same thread.745. Review the result, then send the next small adjustment in the same thread.

104 75 

105## Write small prompts76## Write small prompts


108 79 

109If the result is close but not quite right, keep the follow-up equally specific:80If the result is close but not quite right, keep the follow-up equally specific:

110 81 

111The change is close. Keep the implementation, but adjust only this detail:

112[describe the remaining mismatch]

113Verify the same route and viewport again before you stop.

114 

115## When to slow down82## When to slow down

116 83 

117Do not keep using the fast loop if the task stops being granular. Switch to a stronger model and a more deliberate prompt when the change needs broad refactoring, a new design system primitive, non-trivial accessibility behavior, or a product decision that affects more than one screen.84Do not keep using the fast loop if the task stops being granular. Switch to a stronger model and a more deliberate prompt when the change needs broad refactoring, a new design system primitive, non-trivial accessibility behavior, or a product decision that affects more than one screen.

118 85 

119Fast UI iteration works best when Codex is adjusting an already-understood surface, not redesigning the app from scratch.86Fast UI iteration works best when Codex is adjusting an already-understood surface, not redesigning the app from scratch.

120 

121## Related use cases

122 

123[![](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept.webp)

124 

125### Get from idea to proof of concept

126 

127Use Codex with ImageGen to turn a rough idea into a visual direction, implement the smallest...

128 

129Front-end Engineering](https://developers.openai.com/codex/use-cases/idea-to-proof-of-concept)[![](https://developers.openai.com/codex/use-cases/build-and-deploy-internal-apps.webp)

130 

131### Build and deploy internal apps

132 

133Use Codex with Sites to build, test, and deploy internal apps, with built-in storage and...

134 

135Front-end Integrations](https://developers.openai.com/codex/use-cases/build-and-deploy-internal-apps)[![](https://developers.openai.com/codex/use-cases/frontend-designs.webp)

136 

137### Build responsive front-end designs

138 

139Use Codex to translate screenshots and design briefs into code that matches the repo's...

140 

141Front-end Design](https://developers.openai.com/codex/use-cases/frontend-designs)

142 

Details

1# Prepare meeting briefs | Codex use cases1---

2name: Prepare meeting briefs

3tagline: Turn calendar context into an agenda and notes plan.

4summary: Use Codex with Calendar, Drive, Slack, and Gmail to gather approved

5 sources before a meeting, then draft objectives, agenda, questions, and a

6 notes template.

7skills:

8 - token: google-calendar

9 url: https://github.com/openai/plugins/tree/main/plugins/google-calendar

10 description: Find the meeting, attendees, timing, and attached material that

11 should shape the brief.

12 - token: google-drive

13 url: https://github.com/openai/plugins/tree/main/plugins/google-drive

14 description: Read linked docs, interview notes, pre-reads, trackers, and source

15 artifacts.

16 - token: slack

17 url: https://github.com/openai/plugins/tree/main/plugins/slack

18 description: Pull the latest planning thread, decision context, or collaborator

19 updates when the meeting depends on them.

20 - token: gmail

21 url: https://github.com/openai/plugins/tree/main/plugins/gmail

22 description: Check related email threads for scheduling changes, attachments, or

23 external context.

24bestFor:

25 - Meetings where context is split across calendar invites, docs, Slack

26 threads, email, and notes.

27 - Managers, product teams, operators, and interviewers who want a

28 source-backed prep packet.

29starterPrompt:

30 title: Build the Prep Brief

31 body: >-

32 Help me prepare for [meeting] on [date].

2 33 

3Codex use cases

4 34 

5![](/assets/OpenAI-black-wordmark.svg)35 Use only these sources:

6 36 

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)37 - calendar event: [event name or date range]

8 38 

9Codex use case39 - docs or notes: [links or names]

10 40 

11# Prepare meeting briefs41 - Slack channels or threads: [optional]

12 42 

13Turn calendar context into an agenda and notes plan.43 - Gmail thread or sender: [optional]

14 44 

15Difficulty **Easy**

16 45 

17Time horizon **30m**46 First, inventory the sources you can access and name any source gaps.

18 47 

19Use Codex with Calendar, Drive, Slack, and Gmail to gather approved sources before a meeting, then draft objectives, agenda, questions, and a notes template.

20 48 

21## Best for49 Return:

22 50 

23- Meetings where context is split across calendar invites, docs, Slack threads, email, and notes.51 - meeting objective

24- Managers, product teams, operators, and interviewers who want a source-backed prep packet.

25 52 

26# Contents53 - attendee context

27 54 

28[← All use cases](https://developers.openai.com/codex/use-cases)55 - key source-backed facts

29 56 

30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/meeting-prep-briefs/?export=pdf)57 - likely agenda

31 58 

32Use Codex with Calendar, Drive, Slack, and Gmail to gather approved sources before a meeting, then draft objectives, agenda, questions, and a notes template.59 - open questions

33 60 

34Easy61 - decisions or follow-ups I may owe

35 62 

3630m63 - suggested notes template for the meeting

37 64 

38Related links

39 65 

40[Codex plugins](https://developers.openai.com/codex/plugins) [Use Codex with Google Calendar](https://developers.openai.com/codex/plugins) [Codex app](https://developers.openai.com/codex/app)66 Keep unsupported claims in a separate source gaps section. Do not update

41 67 docs, send messages, or share the brief until I approve it.

42## Best for68 suggestedEffort: low

43 69relatedLinks:

44- Meetings where context is split across calendar invites, docs, Slack threads, email, and notes.70 - label: Codex plugins

45- Managers, product teams, operators, and interviewers who want a source-backed prep packet.71 url: /codex/plugins

46 72 - label: Use Codex with Google Calendar

47## Skills & Plugins73 url: /codex/plugins

48 74 - label: Codex app

49- [Google Calendar](https://github.com/openai/plugins/tree/main/plugins/google-calendar)75 url: /codex/app

50 76---

51 Find the meeting, attendees, timing, and attached material that should shape the brief.

52- [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive)

53 

54 Read linked docs, interview notes, pre-reads, trackers, and source artifacts.

55- [Slack](https://github.com/openai/plugins/tree/main/plugins/slack)

56 

57 Pull the latest planning thread, decision context, or collaborator updates when the meeting depends on them.

58- [Gmail](https://github.com/openai/plugins/tree/main/plugins/gmail)

59 

60 Check related email threads for scheduling changes, attachments, or external context.

61 

62| Skill | Why use it |

63| --- | --- |

64| [Google Calendar](https://github.com/openai/plugins/tree/main/plugins/google-calendar) | Find the meeting, attendees, timing, and attached material that should shape the brief. |

65| [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive) | Read linked docs, interview notes, pre-reads, trackers, and source artifacts. |

66| [Slack](https://github.com/openai/plugins/tree/main/plugins/slack) | Pull the latest planning thread, decision context, or collaborator updates when the meeting depends on them. |

67| [Gmail](https://github.com/openai/plugins/tree/main/plugins/gmail) | Check related email threads for scheduling changes, attachments, or external context. |

68 

69## Starter prompt

70 

71Help me prepare for [meeting] on [date].

72Use only these sources:

73- calendar event: [event name or date range]

74- docs or notes: [links or names]

75- Slack channels or threads: [optional]

76- Gmail thread or sender: [optional]

77First, inventory the sources you can access and name any source gaps.

78Return:

79- meeting objective

80- attendee context

81- key source-backed facts

82- likely agenda

83- open questions

84- decisions or follow-ups I may owe

85- suggested notes template for the meeting

86Keep unsupported claims in a separate source gaps section. Do not update docs, send messages, or share the brief until I approve it.

87 

88Open in the Codex app

89 

90Help me prepare for [meeting] on [date].

91Use only these sources:

92- calendar event: [event name or date range]

93- docs or notes: [links or names]

94- Slack channels or threads: [optional]

95- Gmail thread or sender: [optional]

96First, inventory the sources you can access and name any source gaps.

97Return:

98- meeting objective

99- attendee context

100- key source-backed facts

101- likely agenda

102- open questions

103- decisions or follow-ups I may owe

104- suggested notes template for the meeting

105Keep unsupported claims in a separate source gaps section. Do not update docs, send messages, or share the brief until I approve it.

106 77 

107## Prepare from the sources you already have78## Prepare from the sources you already have

108 79 


124 99 

125Ask for the smallest output that will help. You should get something like this:100Ask for the smallest output that will help. You should get something like this:

126 101 

127![](/assets/OAI_Codex-Blossom_Fallback_Black.svg)

128Codex

129 

130**Objective:** decide whether the launch plan has enough owner

131coverage for the next two weeks.

132 

133**Context:** the pre-read has a draft owner map, but two

134follow-up items in Slack still need dates.

135 

136**Questions:** who owns partner review, and what is the latest

137date for the public copy freeze?

138 

139**Notes template:** decisions, owners, dates, risks, and

140follow-ups.

141 

142If the brief includes private or sensitive information, keep the output local to the thread and ask Codex to flag anything that doesn’t belong in a shared doc.

143 

144Turn this prep brief into a live notes template.

145Keep the source-backed context short, then add sections for:

146- decisions

147- owners and dates

148- risks

149- unanswered questions

150- follow-ups I owe

151- follow-ups other people own

152Flag anything private that doesn't belong in a shared meeting doc.

153 

154## Related use cases

155 

156[![](https://developers.openai.com/codex/use-cases/new-hire-onboarding.webp)

157 

158### Coordinate new-hire onboarding

159 

160Use Codex to gather approved new-hire context, stage tracker updates, draft team-by-team...

161 

162Integrations Data](https://developers.openai.com/codex/use-cases/new-hire-onboarding)[![](https://developers.openai.com/codex/use-cases/draft-prds-from-sources.webp)

163 

164### Draft PRDs from internal context

165 

166Use Codex with the $documents skill and connected apps such as Linear, Slack, Notion or...

167 102 

168Integrations Knowledge Work](https://developers.openai.com/codex/use-cases/draft-prds-from-sources)[![](https://developers.openai.com/codex/use-cases/event-launch-playbooks.webp)

169 103 

170### Run event playbooks104<p>

105 <strong>Objective:</strong> decide whether the launch plan has enough owner

106 coverage for the next two weeks.

107 </p>

108 <p>

109 <strong>Context:</strong> the pre-read has a draft owner map, but two

110 follow-up items in Slack still need dates.

111 </p>

112 <p>

113 <strong>Questions:</strong> who owns partner review, and what is the latest

114 date for the public copy freeze?

115 </p>

116 <p>

117 <strong>Notes template:</strong> decisions, owners, dates, risks, and

118 follow-ups.

119 </p>

171 120 

172Use Codex with Slack, Google Drive, and Calendar to gather planning context, draft...

173 121 

174Integrations Knowledge Work](https://developers.openai.com/codex/use-cases/event-launch-playbooks)

175 122 

123If the brief includes private or sensitive information, keep the output local to the thread and ask Codex to flag anything that doesn't belong in a shared doc.

Details

1# Remediate a vulnerability backlog | Codex use cases1---

2name: Remediate a vulnerability backlog

3tagline: Turn reviewed findings into minimal fixes with regression evidence.

4summary: Bring in approved findings from ticketing tools or vulnerability

5 reporting systems, then use the Codex Security plugin to validate and address

6 them one at a time with bounded patches and regression evidence.

7skills:

8 - token: $codex-security:fix-finding

9 url: /codex/security/plugin

10 description: Fix and verify one validated or plausible security finding with

11 focused tests or reproduction evidence.

12bestFor:

13 - Teams with reviewed findings from Codex Security, Linear or Jira tickets,

14 GitHub Security Advisories, HackerOne or Bugcrowd reports, penetration

15 tests, or internal security reviews.

16 - Vulnerability backlogs where every patch needs a minimal diff and repeatable

17 validation.

18 - Maintainers who want to separate security remediation from broader refactors

19 or cleanup.

20starterPrompt:

21 title: Fix One Reviewed Finding

22 body: >-

23 Use $codex-security:fix-finding to fix this security finding and verify the

24 issue no longer reproduces.

2 25 

3Codex use cases

4 26 

5![](/assets/OpenAI-black-wordmark.svg)27 Source: [Codex Security report / Linear or Jira ticket / GitHub Security

28 Advisory / HackerOne or Bugcrowd report / other authorized source]

6 29 

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)30 Title and affected component: [finding title and component]

8 31 

9Codex use case32 Vulnerable source, sink, or broken control: [known path or unknown]

10 33 

11# Remediate a vulnerability backlog34 Attacker-controlled input and impact: [input, prerequisites, and impact]

12 35 

13Turn reviewed findings into minimal fixes with regression evidence.36 Expected security invariant: [behavior the fix must enforce]

14 37 

15Difficulty **Advanced**38 Existing proof: [report path, PoC, reproducer, test, or validation notes]

16 39 

17Time horizon **1h**40 Affected files and lines: [paths and lines, or unknown]

18 41 

19Bring in approved findings from ticketing tools or vulnerability reporting systems, then use the Codex Security plugin to validate and address them one at a time with bounded patches and regression evidence.42 Constraints: [supported behavior to preserve, test command, rollout

43 requirement, or none]

20 44 

21## Best for

22 45 

23- Teams with reviewed findings from Codex Security, Linear or Jira tickets, GitHub Security Advisories, HackerOne or Bugcrowd reports, penetration tests, or internal security reviews.46 Requirements:

24- Vulnerability backlogs where every patch needs a minimal diff and repeatable validation.

25- Maintainers who want to separate security remediation from broader refactors or cleanup.

26 47 

27# Contents48 - Confirm that the issue still exists before changing code when feasible.

28 49 

29[← All use cases](https://developers.openai.com/codex/use-cases)50 - Make the smallest change that enforces the intended security invariant.

30 51 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog/?export=pdf)52 - Add focused regression coverage or the strongest repeatable validation

53 artifact available.

32 54 

33Bring in approved findings from ticketing tools or vulnerability reporting systems, then use the Codex Security plugin to validate and address them one at a time with bounded patches and regression evidence.55 - Verify legitimate behavior still works and the original issue no longer

56 reproduces.

34 57 

35Advanced58 - Keep unrelated backlog findings and refactors out of this change.

36 59 

371h

38 60 

39Related links61 Report the changed files, tests or validation artifacts, exact commands and

40 62 results, proof that the original issue no longer reproduces, and remaining

41[Codex Security plugin](https://developers.openai.com/codex/security/plugin) [Run a deep security scan](https://developers.openai.com/codex/use-cases/deep-security-scan) [Scan code changes for security](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security)63 uncertainty. If the issue is already fixed, show the evidence and do not

42 64 change code.

43## Best for65 suggestedEffort: high

44 66relatedLinks:

45- Teams with reviewed findings from Codex Security, Linear or Jira tickets, GitHub Security Advisories, HackerOne or Bugcrowd reports, penetration tests, or internal security reviews.67 - label: Codex Security plugin

46- Vulnerability backlogs where every patch needs a minimal diff and repeatable validation.68 url: /codex/security/plugin

47- Maintainers who want to separate security remediation from broader refactors or cleanup.69 - label: Run a deep security scan

48 70 url: /codex/use-cases/deep-security-scan

49## Skills & Plugins71 - label: Scan code changes for security

50 72 url: /codex/use-cases/scan-code-changes-for-security

51- [Codex Security:fix Finding](https://developers.openai.com/codex/security/plugin)73---

52 

53 Fix and verify one validated or plausible security finding with focused tests or reproduction evidence.

54 

55| Skill | Why use it |

56| --- | --- |

57| [Codex Security:fix Finding](https://developers.openai.com/codex/security/plugin) | Fix and verify one validated or plausible security finding with focused tests or reproduction evidence. |

58 

59## Starter prompt

60 

61Use $codex-security:fix-finding to fix this security finding and verify the issue no longer reproduces.

62Source: [Codex Security report / Linear or Jira ticket / GitHub Security Advisory / HackerOne or Bugcrowd report / other authorized source]

63Title and affected component: [finding title and component]

64Vulnerable source, sink, or broken control: [known path or unknown]

65Attacker-controlled input and impact: [input, prerequisites, and impact]

66Expected security invariant: [behavior the fix must enforce]

67Existing proof: [report path, PoC, reproducer, test, or validation notes]

68Affected files and lines: [paths and lines, or unknown]

69Constraints: [supported behavior to preserve, test command, rollout requirement, or none]

70Requirements:

71- Confirm that the issue still exists before changing code when feasible.

72- Make the smallest change that enforces the intended security invariant.

73- Add focused regression coverage or the strongest repeatable validation artifact available.

74- Verify legitimate behavior still works and the original issue no longer reproduces.

75- Keep unrelated backlog findings and refactors out of this change.

76Report the changed files, tests or validation artifacts, exact commands and results, proof that the original issue no longer reproduces, and remaining uncertainty. If the issue is already fixed, show the evidence and do not change code.

77 

78Open in the Codex app

79 

80Use $codex-security:fix-finding to fix this security finding and verify the issue no longer reproduces.

81Source: [Codex Security report / Linear or Jira ticket / GitHub Security Advisory / HackerOne or Bugcrowd report / other authorized source]

82Title and affected component: [finding title and component]

83Vulnerable source, sink, or broken control: [known path or unknown]

84Attacker-controlled input and impact: [input, prerequisites, and impact]

85Expected security invariant: [behavior the fix must enforce]

86Existing proof: [report path, PoC, reproducer, test, or validation notes]

87Affected files and lines: [paths and lines, or unknown]

88Constraints: [supported behavior to preserve, test command, rollout requirement, or none]

89Requirements:

90- Confirm that the issue still exists before changing code when feasible.

91- Make the smallest change that enforces the intended security invariant.

92- Add focused regression coverage or the strongest repeatable validation artifact available.

93- Verify legitimate behavior still works and the original issue no longer reproduces.

94- Keep unrelated backlog findings and refactors out of this change.

95Report the changed files, tests or validation artifacts, exact commands and results, proof that the original issue no longer reproduces, and remaining uncertainty. If the issue is already fixed, show the evidence and do not change code.

96 74 

97## Fix reviewed findings one at a time75## Fix reviewed findings one at a time

98 76 


103authorized source. Connect the source where supported, or provide the report,81authorized source. Connect the source where supported, or provide the report,

104ticket, or advisory with affected code and evidence whenever possible.82ticket, or advisory with affected code and evidence whenever possible.

105 83 

106Dont hand Codex a broad backlog and ask it to change everything at once. A84Don't hand Codex a broad backlog and ask it to change everything at once. A

107single-finding loop keeps the security invariant, patch, and validation85single-finding loop keeps the security invariant, patch, and validation

108evidence reviewable.86evidence reviewable.

109 87 


120 102 

121For each completed item, keep the original ticket, advisory, or report103For each completed item, keep the original ticket, advisory, or report

122reference; the exact code change; the checks run; and any proof gap. If Codex104reference; the exact code change; the checks run; and any proof gap. If Codex

123finds that the issue is already fixed or it cant reproduce it, record that105finds that the issue is already fixed or it can't reproduce it, record that

124evidence instead of forcing an unnecessary code change.106evidence instead of forcing an unnecessary code change.

125 

126## Related use cases

127 

128[![](https://developers.openai.com/codex/use-cases/deep-security-scan.webp)

129 

130### Run a deep security scan

131 

132Use the Codex Security plugin to run a higher-recall, repository-wide audit that repeats...

133 

134Engineering Quality](https://developers.openai.com/codex/use-cases/deep-security-scan)[![](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security.webp)

135 

136### Scan code changes for security

137 

138Use the Codex Security plugin to examine a Git-backed change set, validate plausible...

139 

140Engineering Quality](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security)[![](https://developers.openai.com/codex/use-cases/dependency-incident-audits.webp)

141 

142### Audit dependency incidents

143 

144Use Codex to turn a public package or supply chain advisory into a read-only audit, then...

145 

146Engineering Quality](https://developers.openai.com/codex/use-cases/dependency-incident-audits)

147 

Details

1# Scan code changes for security | Codex use cases1---

2 2name: Scan code changes for security

3Codex use cases3tagline: Review a pull request or local diff for security regressions.

4 4summary: Use the Codex Security plugin to examine a Git-backed change set,

5![](/assets/OpenAI-black-wordmark.svg)5 validate plausible security regressions, and produce an evidence-based report

6 6 before merge.

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7skills:

8 8 - token: $codex-security:security-diff-scan

9Codex use case9 url: /codex/security/plugin

10 10 description: Review a pull request, commit, branch diff, or working-tree patch

11# Scan code changes for security11 for security regressions with validation and attack-path evidence.

12 12bestFor:

13Review a pull request or local diff for security regressions.13 - Pull requests that touch authentication, authorization, parsing, file

14 14 access, secrets, or privileged workflows.

15Difficulty **Intermediate**15 - Release branches or local patches that need a security-focused check before

16 16 merge.

17Time horizon **30m**17 - Reviewers who need findings anchored to changed code and directly supporting

18 18 files.

19Use the Codex Security plugin to examine a Git-backed change set, validate plausible security regressions, and produce an evidence-based report before merge.19starterPrompt:

20 20 title: Review a Change for Security Regressions

21## Best for21 body: >-

22 22 /goal Scan this PR, commit, branch diff, or working-tree patch for security

23- Pull requests that touch authentication, authorization, parsing, file access, secrets, or privileged workflows.23 regressions. Do not stop until all in-scope changed files are covered and

24- Release branches or local patches that need a security-focused check before merge.24 all required steps are complete.

25- Reviewers who need findings anchored to changed code and directly supporting files.25 

26 26 

27# Contents27 Scope and rules:

28 28 

29[ All use cases](https://developers.openai.com/codex/use-cases)29 - Target: [this pull request / commit SHA / branch diff from BASE to HEAD /

30 30 the current working-tree patch]

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/scan-code-changes-for-security/?export=pdf)31 

32 32 - I am authorized to assess this repository and change set.

33Use the Codex Security plugin to examine a Git-backed change set, validate plausible security regressions, and produce an evidence-based report before merge.33 

34 34 - Pay particular attention to [auth, input handling, secrets, filesystem,

35Intermediate35 network, dependencies, or other sensitive surface].

36 36 

3730m37 - Keep this pass read-only; do not modify code or open a pull request.

38 38 

39Related links39 

40 40 Return the final Markdown report and any Codex app review directives for

41[Codex Security plugin](https://developers.openai.com/codex/security/plugin) [Review GitHub pull requests](https://developers.openai.com/codex/use-cases/github-code-reviews) [Agent approvals and security](https://developers.openai.com/codex/agent-approvals-security)41 findings that require human review.

42 42 suggestedEffort: high

43## Best for43relatedLinks:

44 44 - label: Codex Security plugin

45- Pull requests that touch authentication, authorization, parsing, file access, secrets, or privileged workflows.45 url: /codex/security/plugin

46- Release branches or local patches that need a security-focused check before merge.46 - label: Review GitHub pull requests

47- Reviewers who need findings anchored to changed code and directly supporting files.47 url: /codex/use-cases/github-code-reviews

48 48 - label: Agent approvals and security

49## Skills & Plugins49 url: /codex/agent-approvals-security

50 50---

51- [Codex Security:security Diff Scan](https://developers.openai.com/codex/security/plugin)

52 

53 Review a pull request, commit, branch diff, or working-tree patch for security regressions with validation and attack-path evidence.

54 

55| Skill | Why use it |

56| --- | --- |

57| [Codex Security:security Diff Scan](https://developers.openai.com/codex/security/plugin) | Review a pull request, commit, branch diff, or working-tree patch for security regressions with validation and attack-path evidence. |

58 

59## Starter prompt

60 

61/goal Scan this PR, commit, branch diff, or working-tree patch for security regressions. Do not stop until all in-scope changed files are covered and all required steps are complete.

62Scope and rules:

63- Target: [this pull request / commit SHA / branch diff from BASE to HEAD / the current working-tree patch]

64- I am authorized to assess this repository and change set.

65- Pay particular attention to [auth, input handling, secrets, filesystem, network, dependencies, or other sensitive surface].

66- Keep this pass read-only; do not modify code or open a pull request.

67Return the final Markdown report and any Codex app review directives for findings that require human review.

68 

69Open in the Codex app

70 

71/goal Scan this PR, commit, branch diff, or working-tree patch for security regressions. Do not stop until all in-scope changed files are covered and all required steps are complete.

72Scope and rules:

73- Target: [this pull request / commit SHA / branch diff from BASE to HEAD / the current working-tree patch]

74- I am authorized to assess this repository and change set.

75- Pay particular attention to [auth, input handling, secrets, filesystem, network, dependencies, or other sensitive surface].

76- Keep this pass read-only; do not modify code or open a pull request.

77Return the final Markdown report and any Codex app review directives for findings that require human review.

78 51 

79## Review the change instead of the whole repository52## Review the change instead of the whole repository

80 53 


102fix task with the finding identifier or the relevant report section.79fix task with the finding identifier or the relevant report section.

103See [Remediate a vulnerability backlog](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)80See [Remediate a vulnerability backlog](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)

104for the fix-and-validation loop.81for the fix-and-validation loop.

105 

106## Related use cases

107 

108[![](https://developers.openai.com/codex/use-cases/deep-security-scan.webp)

109 

110### Run a deep security scan

111 

112Use the Codex Security plugin to run a higher-recall, repository-wide audit that repeats...

113 

114Engineering Quality](https://developers.openai.com/codex/use-cases/deep-security-scan)[![](https://developers.openai.com/codex/use-cases/dependency-incident-audits.webp)

115 

116### Audit dependency incidents

117 

118Use Codex to turn a public package or supply chain advisory into a read-only audit, then...

119 

120Engineering Quality](https://developers.openai.com/codex/use-cases/dependency-incident-audits)[![](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog.webp)

121 

122### Remediate a vulnerability backlog

123 

124Bring in approved findings from ticketing tools or vulnerability reporting systems, then use...

125 

126Engineering Quality](https://developers.openai.com/codex/use-cases/remediate-vulnerability-backlog)

127 

Details

1# Annotate scRNA-seq data | Codex use cases1---

2 2name: Annotate scRNA-seq data

3Codex use cases3tagline: Review single-cell QC, annotations, and UMAPs in one thread.

4 4summary: Use Codex with the NGS Analysis plugin to turn a 10x-style matrix

5![](/assets/OpenAI-black-wordmark.svg)5 bundle into QC-filtered single-cell artifacts, threshold-justified filtering

6 6 summaries, annotations, and UMAPs you can inspect and revise in the same

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7 thread.

8 8skills:

9Codex use case9 - token: NGS Analysis

10 10 url: codex://plugins/ngs-analysis@openai-curated

11# Annotate scRNA-seq data11 description: Run single-cell post-count QC and return filtering, visualization,

12 12 annotation, and notebook artifacts.

13Review single-cell QC, annotations, and UMAPs in one thread.13bestFor:

14 14 - Single-cell teams doing matrix-level QC, annotation, and visualization after

15Difficulty **Intermediate**15 count generation.

16 16 - Researchers who need threshold-justified filtering and an auditable record

17Time horizon **1h**17 of cells removed or flagged.

18 18 - Teams that want a portable review surface with generated figures, a

19Use Codex with the NGS Analysis plugin to turn a 10x-style matrix bundle into QC-filtered single-cell artifacts, threshold-justified filtering summaries, annotations, and UMAPs you can inspect and revise in the same thread.19 visualization index, and a notebook or app handoff.

20 20starterPrompt:

21## Best for21 title: Run scRNA-seq Post-count QC

22 22 body: >-

23- Single-cell teams doing matrix-level QC, annotation, and visualization after count generation.23 Use the NGS Analysis plugin.

24- Researchers who need threshold-justified filtering and an auditable record of cells removed or flagged.24 

25- Teams that want a portable review surface with generated figures, a visualization index, and a notebook or app handoff.25 

26 26 Route this matrix-level input to scrna-seq-qc using the indicated 10x-style

27# Contents27 matrix bundle, plus the manifest and dataset metadata.

28 28 

29[← All use cases](https://developers.openai.com/codex/use-cases)29 

30 30 Choose QC thresholds from the observed distributions, preserve raw counts,

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc/?export=pdf)31 and generate global/per-group UMAPs.

32 32 

33Use Codex with the NGS Analysis plugin to turn a 10x-style matrix bundle into QC-filtered single-cell artifacts, threshold-justified filtering summaries, annotations, and UMAPs you can inspect and revise in the same thread.33 

34 34 Return:

35Intermediate35 

36 36 - summary.md

371h37 

38 38 - a QC summary table with cells removed or flagged per filter

39Related links39 

40 40 - threshold-justification plots

41[Request access to GPT-Rosalind](https://openai.com/form/life-sciences-access/)41 

42 42 - filtered .h5ad

43## Best for43 suggestedEffort: high

44 44relatedLinks:

45- Single-cell teams doing matrix-level QC, annotation, and visualization after count generation.45 - label: Request access to GPT-Rosalind

46- Researchers who need threshold-justified filtering and an auditable record of cells removed or flagged.46 url: https://openai.com/form/life-sciences-access/

47- Teams that want a portable review surface with generated figures, a visualization index, and a notebook or app handoff.47---

48 

49## Skills & Plugins

50 

51- [NGS Analysis](codex://plugins/ngs-analysis@openai-curated)

52 

53 Run single-cell post-count QC and return filtering, visualization, annotation, and notebook artifacts.

54 

55| Skill | Why use it |

56| --- | --- |

57| [NGS Analysis](codex://plugins/ngs-analysis@openai-curated) | Run single-cell post-count QC and return filtering, visualization, annotation, and notebook artifacts. |

58 

59## Starter prompt

60 

61Use the NGS Analysis plugin.

62Route this matrix-level input to scrna-seq-qc using the indicated 10x-style matrix bundle, plus the manifest and dataset metadata.

63Choose QC thresholds from the observed distributions, preserve raw counts, and generate global/per-group UMAPs.

64Return:

65- summary.md

66- a QC summary table with cells removed or flagged per filter

67- threshold-justification plots

68- filtered .h5ad

69 

70Open in the Codex app

71 

72Use the NGS Analysis plugin.

73Route this matrix-level input to scrna-seq-qc using the indicated 10x-style matrix bundle, plus the manifest and dataset metadata.

74Choose QC thresholds from the observed distributions, preserve raw counts, and generate global/per-group UMAPs.

75Return:

76- summary.md

77- a QC summary table with cells removed or flagged per filter

78- threshold-justification plots

79- filtered .h5ad

80 48 

81## Leverage skills49## Leverage skills

82 50 


116first pass.88first pass.

117 89 

118![Open cell-level QC metrics and filtering outcomes for review.](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc-screenshot-3.webp)90![Open cell-level QC metrics and filtering outcomes for review.](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc-screenshot-3.webp)

119 

120## Related use cases

121 

122[![](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc.webp)

123 

124### Validate bulk RNA-seq inputs

125 

126Use Codex with the NGS Analysis plugin to validate sample sheets, FASTQs, and references...

127 

128Sciences Data](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc)[![](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures.webp)

129 

130### Discover protein folding architectures

131 

132Use Codex with Goal Mode to research and implement novel architectural modifications to...

133 

134Sciences Engineering](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures)[![](https://developers.openai.com/codex/use-cases/target-prioritization.webp)

135 

136### Prioritize drug targets

137 

138Use Codex with the Life Science Research plugin to normalize entities, retrieve genetics...

139 

140Sciences Data](https://developers.openai.com/codex/use-cases/target-prioritization)

141 

Details

1# Prioritize drug targets | Codex use cases1---

2name: Prioritize drug targets

3tagline: Rank drug targets across multiple evidence lanes.

4summary: Use Codex with the Life Science Research plugin to normalize entities,

5 retrieve genetics, cohort, clinical, literature, and expression evidence in

6 parallel, score each lane, and produce a final ranking with reusable visuals.

7skills:

8 - token: Life Science Research

9 url: codex://plugins/life-science-research@openai-curated

10 description: Search scientific databases and literature to ground pathway,

11 translational, tractability, and competitive evidence.

12bestFor:

13 - Target prioritization questions that need more than one evidence family,

14 such as genetics, cohort replication, disease context, clinical precedent,

15 literature, and expression.

16 - Teams that want Codex to perform scientific research across multiple

17 evidence lanes, then reconcile the results into one conclusion.

18 - Scientists who want saved raw payloads, an explicit scoring rubric, and

19 visuals they can reuse in the next review or decision memo.

20starterPrompt:

21 title: Prioritize Asthma Drug Targets

22 body: >-

23 Use the Life Science Research plugin to compare TSLP, IL33, and IL1RL1 for

24 asthma target prioritization.

2 25 

3Codex use cases

4 26 

5![](/assets/OpenAI-black-wordmark.svg)27 Run these independent lanes in parallel with subagents:

6 28 

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)29 - Human genetics and GWAS: gwas-catalog-skill, opentargets-skill,

30 gnomad-graphql-skill

8 31 

9Codex use case32 - Cohort replication and PheWAS: finngen-phewas-skill,

33 ukb-topmed-phewas-skill, biobankjapan-phewas-skill, tpmi-phewas-skill

10 34 

11# Prioritize drug targets35 - Target-disease evidence and disease context: opentargets-skill,

36 efo-ontology-skill

12 37 

13Rank drug targets across multiple evidence lanes.38 - Clinical and regulatory precedent: clinicaltrials-skill,

39 opentargets-skill, chembl-skill, pharmgkb-skill

14 40 

15Difficulty **Advanced**41 - Literature and public-dataset context: ncbi-entrez-skill, ncbi-pmc-skill,

42 biorxiv-skill, ncbi-datasets-skill, biostudies-arrayexpress-skill

16 43 

17Time horizon **Long-running**44 - Expression and tissue/cell-type context: human-protein-atlas-skill,

45 gtex-eqtl-skill, cellxgene-skill, bgee-skill

18 46 

19Use Codex with the Life Science Research plugin to normalize entities, retrieve genetics, cohort, clinical, literature, and expression evidence in parallel, score each lane, and produce a final ranking with reusable visuals.

20 47 

21## Best for48 For each lane:

22 49 

23- Target prioritization questions that need more than one evidence family, such as genetics, cohort replication, disease context, clinical precedent, literature, and expression.50 - score TSLP, IL33, IL1RL1 on a 1-5 scale

24- Teams that want Codex to perform scientific research across multiple evidence lanes, then reconcile the results into one conclusion.

25- Scientists who want saved raw payloads, an explicit scoring rubric, and visuals they can reuse in the next review or decision memo.

26 51 

27# Contents52 - keep direct asthma evidence separate from adjacent allergic/atopic

53 phenotypes

28 54 

29[← All use cases](https://developers.openai.com/codex/use-cases)55 - save raw payloads when helpful

30 56 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/target-prioritization/?export=pdf)

32 57 

33Use Codex with the Life Science Research plugin to normalize entities, retrieve genetics, cohort, clinical, literature, and expression evidence in parallel, score each lane, and produce a final ranking with reusable visuals.58 Then synthesize:

34 59 

35Advanced60 - a lane-by-target score table

36 61 

37Long-running62 - a final rank of TSLP, IL33, IL1RL1

38 63 

39Related links64 - a confidence assessment and the main caveats

40 65 

41[Request access to GPT-Rosalind](https://openai.com/form/life-sciences-access/)66 - two visuals: a prioritization heatmap and a GWAS summary figure with the

42 67 lead asthma-linked variants for each target

43## Best for68 suggestedEffort: high

44 69relatedLinks:

45- Target prioritization questions that need more than one evidence family, such as genetics, cohort replication, disease context, clinical precedent, literature, and expression.70 - label: Request access to GPT-Rosalind

46- Teams that want Codex to perform scientific research across multiple evidence lanes, then reconcile the results into one conclusion.71 url: https://openai.com/form/life-sciences-access/

47- Scientists who want saved raw payloads, an explicit scoring rubric, and visuals they can reuse in the next review or decision memo.72---

48 

49## Skills & Plugins

50 

51- [Life Science Research](codex://plugins/life-science-research@openai-curated)

52 

53 Search scientific databases and literature to ground pathway, translational, tractability, and competitive evidence.

54 

55| Skill | Why use it |

56| --- | --- |

57| [Life Science Research](codex://plugins/life-science-research@openai-curated) | Search scientific databases and literature to ground pathway, translational, tractability, and competitive evidence. |

58 

59## Starter prompt

60 

61Use the Life Science Research plugin to compare TSLP, IL33, and IL1RL1 for asthma target prioritization.

62Run these independent lanes in parallel with subagents:

63- Human genetics and GWAS: gwas-catalog-skill, opentargets-skill, gnomad-graphql-skill

64- Cohort replication and PheWAS: finngen-phewas-skill, ukb-topmed-phewas-skill, biobankjapan-phewas-skill, tpmi-phewas-skill

65- Target-disease evidence and disease context: opentargets-skill, efo-ontology-skill

66- Clinical and regulatory precedent: clinicaltrials-skill, opentargets-skill, chembl-skill, pharmgkb-skill

67- Literature and public-dataset context: ncbi-entrez-skill, ncbi-pmc-skill, biorxiv-skill, ncbi-datasets-skill, biostudies-arrayexpress-skill

68- Expression and tissue/cell-type context: human-protein-atlas-skill, gtex-eqtl-skill, cellxgene-skill, bgee-skill

69For each lane:

70- score TSLP, IL33, IL1RL1 on a 1-5 scale

71- keep direct asthma evidence separate from adjacent allergic/atopic phenotypes

72- save raw payloads when helpful

73Then synthesize:

74- a lane-by-target score table

75- a final rank of TSLP, IL33, IL1RL1

76- a confidence assessment and the main caveats

77- two visuals: a prioritization heatmap and a GWAS summary figure with the lead asthma-linked variants for each target

78 

79Open in the Codex app

80 

81Use the Life Science Research plugin to compare TSLP, IL33, and IL1RL1 for asthma target prioritization.

82Run these independent lanes in parallel with subagents:

83- Human genetics and GWAS: gwas-catalog-skill, opentargets-skill, gnomad-graphql-skill

84- Cohort replication and PheWAS: finngen-phewas-skill, ukb-topmed-phewas-skill, biobankjapan-phewas-skill, tpmi-phewas-skill

85- Target-disease evidence and disease context: opentargets-skill, efo-ontology-skill

86- Clinical and regulatory precedent: clinicaltrials-skill, opentargets-skill, chembl-skill, pharmgkb-skill

87- Literature and public-dataset context: ncbi-entrez-skill, ncbi-pmc-skill, biorxiv-skill, ncbi-datasets-skill, biostudies-arrayexpress-skill

88- Expression and tissue/cell-type context: human-protein-atlas-skill, gtex-eqtl-skill, cellxgene-skill, bgee-skill

89For each lane:

90- score TSLP, IL33, IL1RL1 on a 1-5 scale

91- keep direct asthma evidence separate from adjacent allergic/atopic phenotypes

92- save raw payloads when helpful

93Then synthesize:

94- a lane-by-target score table

95- a final rank of TSLP, IL33, IL1RL1

96- a confidence assessment and the main caveats

97- two visuals: a prioritization heatmap and a GWAS summary figure with the lead asthma-linked variants for each target

98 

99[

100Your browser does not support the video tag.

101](https://cdn.openai.com/devhub/codex-use-cases/Target%20Prioritization%20Demo_es8.mp4)

102 73 

103## Leverage skills74## Leverage skills

104 75 


1202. Invoke the `Life Science Research` plugin and tell Codex to run the lanes in parallel with subagents so each evidence family stays bounded.932. Invoke the `Life Science Research` plugin and tell Codex to run the lanes in parallel with subagents so each evidence family stays bounded.

1213. Ask Codex to score each lane on a fixed 1-5 scale and to keep direct disease evidence separate from adjacent phenotypes.943. Ask Codex to score each lane on a fixed 1-5 scale and to keep direct disease evidence separate from adjacent phenotypes.

1224. Review the saved raw payloads, the lane-by-target score table, and the synthesized rank in the same thread.954. Review the saved raw payloads, the lane-by-target score table, and the synthesized rank in the same thread.

123 

124## Related use cases

125 

126[![](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc.webp)

127 

128### Annotate scRNA-seq data

129 

130Use Codex with the NGS Analysis plugin to turn a 10x-style matrix bundle into QC-filtered...

131 

132Sciences Data](https://developers.openai.com/codex/use-cases/scrna-seq-post-count-qc)[![](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc.webp)

133 

134### Validate bulk RNA-seq inputs

135 

136Use Codex with the NGS Analysis plugin to validate sample sheets, FASTQs, and references...

137 

138Sciences Data](https://developers.openai.com/codex/use-cases/bulk-rna-seq-fastq-qc)[![](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures.webp)

139 

140### Discover protein folding architectures

141 

142Use Codex with Goal Mode to research and implement novel architectural modifications to...

143 

144Sciences Engineering](https://developers.openai.com/codex/use-cases/discover-protein-folding-architectures)

145 

Details

1# Turn user stories into UI mocks | Codex use cases1---

2 2name: Turn user stories into UI mocks

3Codex use cases3tagline: Convert product feedback, issue threads, and design context into

4 4 mockups your team can react to and implement.

5![](/assets/OpenAI-black-wordmark.svg)5summary: Use Codex to gather product feedback from Slack, Linear, Google Drive,

6 6 normalize it into user stories and constraints, then generate UI mockups with

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7 ImageGen. When the direction is chosen, turn the mock into a working

8 8 prototype.

9Codex use case9skills:

10 10 - token: slack

11# Turn user stories into UI mocks11 url: https://github.com/openai/plugins/tree/main/plugins/slack

12 12 description: Search approved feedback channels and threads for user stories,

13Convert product feedback, issue threads, and design context into mockups your team can react to and implement.13 pain points, quotes, and open questions.

14 14 - token: linear

15Difficulty **Easy**15 url: https://github.com/openai/plugins/tree/main/plugins/linear

16 16 description: Pull feature requests, bug reports, labels, priorities, and project

17Time horizon **30m**17 context into the mock brief.

18 18 - token: google-drive

19Use Codex to gather product feedback from Slack, Linear, Google Drive, normalize it into user stories and constraints, then generate UI mockups with ImageGen. When the direction is chosen, turn the mock into a working prototype.19 url: https://github.com/openai/plugins/tree/main/plugins/google-drive

20 20 description: Read research notes, call summaries, docs, sheets, and slides that

21## Best for21 contain product feedback or design requirements.

22 22 - token: figma

23- Product teams turning scattered feedback into a visual direction for a feature.23 url: https://github.com/openai/plugins/tree/main/plugins/figma

24- Design and engineering teams that want mockups grounded in source material before building.24 description: Fetch design context, screenshots, and design-system references so

25- Teams who want to iterate fast based on user feedback.25 mocks do not drift away from the product's visual language.

26 26 - token: $imagegen

27# Contents27 description: Generate UI mockups, variations, and visual truth from the

28 28 synthesized stories and design constraints.

29[← All use cases](https://developers.openai.com/codex/use-cases)29 - token: build-web-apps

30 30 url: https://github.com/openai/plugins/tree/main/plugins/build-web-apps

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/user-stories-to-ui-mocks/?export=pdf)31 description: Turn the selected mock into a working web prototype and verify the

32 32 implementation against the mock.

33Use Codex to gather product feedback from Slack, Linear, Google Drive, normalize it into user stories and constraints, then generate UI mockups with ImageGen. When the direction is chosen, turn the mock into a working prototype.33bestFor:

34 34 - Product teams turning scattered feedback into a visual direction for a

35Easy35 feature.

36 36 - Design and engineering teams that want mockups grounded in source material

3730m37 before building.

38 38 - Teams who want to iterate fast based on user feedback.

39Related links39starterPrompt:

40 40 title: Create Mocks from User Stories

41[Codex plugins](https://developers.openai.com/codex/plugins)41 body: >-

42 42 Turn this [user story/set of user feedbacks] into a UI mock for a feature

43## Best for43 that would solve the problem, using these sources as context:

44 44 

45- Product teams turning scattered feedback into a visual direction for a feature.45 - @slack [channels or thread links]

46- Design and engineering teams that want mockups grounded in source material before building.46 

47- Teams who want to iterate fast based on user feedback.47 - @linear [issue links, project, team, or view]

48 48 

49## Skills & Plugins49 - @google-drive [research notes, survey export, doc, sheet, or slide deck]

50 50 

51- [Slack](https://github.com/openai/plugins/tree/main/plugins/slack)51 

52 52 Do that while respecting the current design system and existing UI [provide

53 Search approved feedback channels and threads for user stories, pain points, quotes, and open questions.53 Figma file or screenshot as reference].

54- [Linear](https://github.com/openai/plugins/tree/main/plugins/linear)54 suggestedEffort: medium

55 55relatedLinks:

56 Pull feature requests, bug reports, labels, priorities, and project context into the mock brief.56 - label: Codex plugins

57- [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive)57 url: /codex/plugins

58 58---

59 Read research notes, call summaries, docs, sheets, and slides that contain product feedback or design requirements.

60- [Figma](https://github.com/openai/plugins/tree/main/plugins/figma)

61 

62 Fetch design context, screenshots, and design-system references so mocks do not drift away from the product's visual language.

63- ImageGen

64 

65 Generate UI mockups, variations, and visual truth from the synthesized stories and design constraints.

66- [Build Web Apps](https://github.com/openai/plugins/tree/main/plugins/build-web-apps)

67 

68 Turn the selected mock into a working web prototype and verify the implementation against the mock.

69 

70| Skill | Why use it |

71| --- | --- |

72| [Slack](https://github.com/openai/plugins/tree/main/plugins/slack) | Search approved feedback channels and threads for user stories, pain points, quotes, and open questions. |

73| [Linear](https://github.com/openai/plugins/tree/main/plugins/linear) | Pull feature requests, bug reports, labels, priorities, and project context into the mock brief. |

74| [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive) | Read research notes, call summaries, docs, sheets, and slides that contain product feedback or design requirements. |

75| [Figma](https://github.com/openai/plugins/tree/main/plugins/figma) | Fetch design context, screenshots, and design-system references so mocks do not drift away from the product's visual language. |

76| ImageGen | Generate UI mockups, variations, and visual truth from the synthesized stories and design constraints. |

77| [Build Web Apps](https://github.com/openai/plugins/tree/main/plugins/build-web-apps) | Turn the selected mock into a working web prototype and verify the implementation against the mock. |

78 

79## Starter prompt

80 

81Turn this [user story/set of user feedbacks] into a UI mock for a feature that would solve the problem, using these sources as context:

82- @slack [channels or thread links]

83- @linear [issue links, project, team, or view]

84- @google-drive [research notes, survey export, doc, sheet, or slide deck]

85Do that while respecting the current design system and existing UI [provide Figma file or screenshot as reference].

86 

87Open in the Codex app

88 

89Turn this [user story/set of user feedbacks] into a UI mock for a feature that would solve the problem, using these sources as context:

90- @slack [channels or thread links]

91- @linear [issue links, project, team, or view]

92- @google-drive [research notes, survey export, doc, sheet, or slide deck]

93Do that while respecting the current design system and existing UI [provide Figma file or screenshot as reference].

94 59 

95## Introduction60## Introduction

96 61 


102 67 

103If you have a clear user story, you can start with that. If not, you can have a discussion with Codex first, gathering context from different sources and synthesizing it into a user story.68If you have a clear user story, you can start with that. If not, you can have a discussion with Codex first, gathering context from different sources and synthesizing it into a user story.

104 69 

105Then, you can ask Codex to use ImageGen to create a few mock directions. The mocks should preserve the products information architecture and design-system constraints.70Then, you can ask Codex to use ImageGen to create a few mock directions. The mocks should preserve the product's information architecture and design-system constraints.

106 71 

107If helpful, you can provide screenshots of the current UI or a Figma file as reference.72If helpful, you can provide screenshots of the current UI or a Figma file as reference.

108 73 


111## Move from mock to prototype76## Move from mock to prototype

112 77 

113Use the final mock image that you want Codex to implement. Re-attach this image in a new turn rather than continuing the conversation directly.78Use the final mock image that you want Codex to implement. Re-attach this image in a new turn rather than continuing the conversation directly.

114You can then ask Codex to implement the mock – optionally using the [Build Web Apps plugin](https://developers.openai.com/codex/plugins/build-web-apps) if youre building a web app – to turn it into a working prototype:79You can then ask Codex to implement the mock – optionally using the [Build Web Apps plugin](https://github.com/openai/plugins/tree/main/plugins/build-web-apps) if you're building a web app – to turn it into a working prototype:

115 

116Use this image as a reference and implement in this repository this feature. Use this conversation as context to help you implement it with the right constraints. Minimize the creation of new components: explore the codebase and reuse existing components and design system when possible.

117 

118## Related use cases

119 

120[![](https://developers.openai.com/codex/use-cases/new-hire-onboarding.webp)

121 

122### Coordinate new-hire onboarding

123 

124Use Codex to gather approved new-hire context, stage tracker updates, draft team-by-team...

125 

126Integrations Data](https://developers.openai.com/codex/use-cases/new-hire-onboarding)[![](https://developers.openai.com/codex/use-cases/draft-prds-from-sources.webp)

127 

128### Draft PRDs from internal context

129 

130Use Codex with the $documents skill and connected apps such as Linear, Slack, Notion or...

131 

132Integrations Knowledge Work](https://developers.openai.com/codex/use-cases/draft-prds-from-sources)[![](https://developers.openai.com/codex/use-cases/meeting-prep-briefs.webp)

133 

134### Prepare meeting briefs

135 

136Use Codex with Calendar, Drive, Slack, and Gmail to gather approved sources before a...

137 

138Integrations Knowledge Work](https://developers.openai.com/codex/use-cases/meeting-prep-briefs)

139 

Details

1# Run verified operations | Codex use cases1---

2name: Run verified operations

3tagline: Run repeatable workflows and verify the result.

4summary: Use Codex to normalize inputs, run approved scripts or APIs, retry

5 bounded failures, and verify the result from logs or artifacts before

6 reporting back.

7bestFor:

8 - Operations tasks with structured inputs, explicit approval, and a result

9 that should be auditable.

10 - Repeated workflows such as access updates, invite batches, quota changes,

11 customer setup tasks, routing checks, and migration follow-ups.

12 - Teams that need Codex to run a narrow scope and report exactly what

13 succeeded, failed, or needs a human decision.

14starterPrompt:

15 title: Run an Approved Workflow

16 body: >-

17 I need to run this workflow:

2 18 

3Codex use cases

4 19 

5![](/assets/OpenAI-black-wordmark.svg)20 Goal: [what should happen]

6 21 

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)22 Inputs: [CSV, Google Sheet, list, ticket, or file path]

8 23 

9Codex use case24 Approval or policy source: [Slack thread, doc, ticket, or none]

10 25 

11# Run verified operations26 Runner: [script, API, CLI, skill, or manual app workflow]

12 27 

13Run repeatable workflows and verify the result.28 Verification artifact: [result CSV, log, dashboard, screenshot, or other

29 proof]

14 30 

15Difficulty **Intermediate**

16 31 

17Time horizon **30m**32 Please:

18 33 

19Use Codex to normalize inputs, run approved scripts or APIs, retry bounded failures, and verify the result from logs or artifacts before reporting back.34 - inspect the inputs and ask only for missing required fields

20 35 

21## Best for36 - normalize dates, amounts, owners, and IDs before running the workflow

22 37 

23- Operations tasks with structured inputs, explicit approval, and a result that should be auditable.38 - run a dry run first when the workflow supports it

24- Repeated workflows such as access updates, invite batches, quota changes, customer setup tasks, routing checks, and migration follow-ups.

25- Teams that need Codex to run a narrow scope and report exactly what succeeded, failed, or needs a human decision.

26 39 

27# Contents40 - run only the approved scope

28 41 

29[← All use cases](https://developers.openai.com/codex/use-cases)42 - record one success or failure row per item

30 43 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/verified-operations-workflows/?export=pdf)44 - retry transient failures once without restarting successful rows

32 45 

33Use Codex to normalize inputs, run approved scripts or APIs, retry bounded failures, and verify the result from logs or artifacts before reporting back.46 - summarize totals, failures, retries, and verification artifacts

34 47 

35Intermediate

36 48 

3730m49 Pause before irreversible actions or scope changes.

38 50 suggestedEffort: medium

39Related links51relatedLinks:

40 52 - label: Codex plugins

41[Codex plugins](https://developers.openai.com/codex/plugins) [Codex automations](https://developers.openai.com/codex/app/automations) [Agent skills](https://developers.openai.com/codex/skills)53 url: /codex/plugins

42 54 - label: Codex automations

43## Best for55 url: /codex/app/automations

44 56 - label: Agent skills

45- Operations tasks with structured inputs, explicit approval, and a result that should be auditable.57 url: /codex/skills

46- Repeated workflows such as access updates, invite batches, quota changes, customer setup tasks, routing checks, and migration follow-ups.58---

47- Teams that need Codex to run a narrow scope and report exactly what succeeded, failed, or needs a human decision.

48 

49## Starter prompt

50 

51I need to run this workflow:

52Goal: [what should happen]

53Inputs: [CSV, Google Sheet, list, ticket, or file path]

54Approval or policy source: [Slack thread, doc, ticket, or none]

55Runner: [script, API, CLI, skill, or manual app workflow]

56Verification artifact: [result CSV, log, dashboard, screenshot, or other proof]

57Please:

58- inspect the inputs and ask only for missing required fields

59- normalize dates, amounts, owners, and IDs before running the workflow

60- run a dry run first when the workflow supports it

61- run only the approved scope

62- record one success or failure row per item

63- retry transient failures once without restarting successful rows

64- summarize totals, failures, retries, and verification artifacts

65Pause before irreversible actions or scope changes.

66 

67Open in the Codex app

68 

69I need to run this workflow:

70Goal: [what should happen]

71Inputs: [CSV, Google Sheet, list, ticket, or file path]

72Approval or policy source: [Slack thread, doc, ticket, or none]

73Runner: [script, API, CLI, skill, or manual app workflow]

74Verification artifact: [result CSV, log, dashboard, screenshot, or other proof]

75Please:

76- inspect the inputs and ask only for missing required fields

77- normalize dates, amounts, owners, and IDs before running the workflow

78- run a dry run first when the workflow supports it

79- run only the approved scope

80- record one success or failure row per item

81- retry transient failures once without restarting successful rows

82- summarize totals, failures, retries, and verification artifacts

83Pause before irreversible actions or scope changes.

84 59 

85## Run operations you can audit60## Run operations you can audit

86 61 


103 82 

104## Require proof to verify the result83## Require proof to verify the result

105 84 

106A useful operations run includes an artifact that you or a teammate can inspect, such as a result CSV, a log file, a dashboard link, a screenshot, a PR check, or any other proof that the operation was successful. When using the Codex app, you can inspect this [artifact](https://developers.openai.com/codex/app/artifacts) directly in the artifact viewer after the run to verify the result.85A useful operations run includes an artifact that you or a teammate can inspect, such as a result CSV, a log file, a dashboard link, a screenshot, a PR check, or any other proof that the operation was successful. When using the Codex app, you can inspect this [artifact](https://developers.openai.com/codex/app/features#artifact-viewer) directly in the artifact viewer after the run to verify the result.

107 86 

108## Turn the run into a reusable workflow87## Turn the run into a reusable workflow

109 88 

110After the first successful run, ask Codex to capture the repeatable parts. For common workflows, this can become a [skill](https://developers.openai.com/codex/skills), or an [automation](https://developers.openai.com/codex/app/automations) that runs on a schedule.89After the first successful run, ask Codex to capture the repeatable parts. For common workflows, this can become a [skill](https://developers.openai.com/codex/skills), or an [automation](https://developers.openai.com/codex/app/automations) that runs on a schedule.

111 90 

112Turn this operations run into a [reusable Codex skill/an automation].

113Capture:

114- required inputs

115- approval or policy source

116- runner command, API, skill, or app workflow

117- dry-run behavior if applicable

118- verification artifact

119- retry policy

120- final report format

121Keep the operation narrow and pause before irreversible actions.

122 

123For scheduled operations, use an automation only after the manual run produces reliable output. Keep sensitive actions that might affect access or data permanently draft-only unless you explicitly want Codex to take them.91For scheduled operations, use an automation only after the manual run produces reliable output. Keep sensitive actions that might affect access or data permanently draft-only unless you explicitly want Codex to take them.

124 

125## Related use cases

126 

127[![](https://developers.openai.com/codex/use-cases/manage-your-inbox.webp)

128 

129### Manage your inbox

130 

131Use Codex with Gmail to find emails that need attention, draft responses in your voice, pull...

132 

133Automation Integrations](https://developers.openai.com/codex/use-cases/manage-your-inbox)[![](https://developers.openai.com/codex/use-cases/slack-action-triage.webp)

134 

135### Prioritize Slack action items

136 

137Use Codex with Slack and the tools where work happens to find direct asks, implicit...

138 

139Automation Integrations](https://developers.openai.com/codex/use-cases/slack-action-triage)[![](https://developers.openai.com/codex/use-cases/proactive-teammate.webp)

140 

141### Set up a teammate

142 

143Connect the tools where work happens, teach one thread what matters, then add an automation...

144 

145Automation Integrations](https://developers.openai.com/codex/use-cases/proactive-teammate)

146 

Details

1# Turn meetings into follow-ups | Codex use cases1---

2 2name: Turn meetings into follow-ups

3Codex use cases3tagline: Convert Zoom meeting insights into actions across your tools.

4 4summary: Use Codex with Zoom transcripts and AI Companion summaries to draft

5![](/assets/OpenAI-black-wordmark.svg)5 customer follow-up emails, account plans, CRM updates, and team notifications

6 6 for review.

7![Codex](/assets/OAI_Codex-Lockup_Fallback_Black.svg)7skills:

8 8 - token: zoom

9Codex use case9 url: https://marketplace.zoom.us/apps/w7dWfj-UQ5ihAmKdi3fykg

10 10 description: Read accessible Zoom meetings, recordings, transcripts, and AI

11# Turn meetings into follow-ups11 Companion summaries after authentication and admin approval.

12 12 - token: google-drive

13Convert Zoom meeting insights into actions across your tools.13 url: https://github.com/openai/plugins/tree/main/plugins/google-drive

14 14 description: Create or draft account plans, meeting briefs, and other reviewable

15Difficulty **Intermediate**15 follow-up documents.

16 16 - token: slack

17Time horizon **5m**17 url: https://github.com/openai/plugins/tree/main/plugins/slack

18 18 description: Draft team updates after the user reviews and approves the message.

19Use Codex with Zoom transcripts and AI Companion summaries to draft customer follow-up emails, account plans, CRM updates, and team notifications for review.19bestFor:

20 20 - Teams that want repeatable post-meeting execution without copying notes

21## Best for21 between tools.

22 22 - Customer follow-ups after discovery, renewal, implementation, or executive

23- Teams that want repeatable post-meeting execution without copying notes between tools.23 sponsor calls.

24- Customer follow-ups after discovery, renewal, implementation, or executive sponsor calls.24 - Sales and customer success workflows that require updates across meeting

25- Sales and customer success workflows that require updates across meeting notes, docs, CRM, and team messages.25 notes, docs, CRM, and team messages.

26 26starterPrompt:

27# Contents27 title: Create a Post-Meeting Follow-Up Package

28 28 body: >-

29[← All use cases](https://developers.openai.com/codex/use-cases)29 Use my most recent Zoom meeting with [customer or account].

30 30 

31Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/zoom-meeting-follow-ups/?export=pdf)31 

32 32 Retrieve the Zoom transcript and AI Companion summary. Name anything you

33Use Codex with Zoom transcripts and AI Companion summaries to draft customer follow-up emails, account plans, CRM updates, and team notifications for review.33 cannot access before drafting.

34 34 

35Intermediate35 

36 36 Summarize the key takeaways, decisions, risks, opportunities, and action

375m37 items. Then draft:

38 38 

39Related links39 - a customer follow-up email

40 40 

41[Codex plugins](https://developers.openai.com/codex/plugins) [Codex automations](https://developers.openai.com/codex/app/automations)41 - a Google Docs account plan

42 42 

43## Best for43 - a CRM update with notes, risks, next steps, and owners

44 44 

45- Teams that want repeatable post-meeting execution without copying notes between tools.45 - a Slack message to [team/channel/person] with the most important details

46- Customer follow-ups after discovery, renewal, implementation, or executive sponsor calls.46 

47- Sales and customer success workflows that require updates across meeting notes, docs, CRM, and team messages.47 

48 48 Use evidence from the transcript where possible. Mark anything uncertain and

49## Skills & Plugins49 keep internal-only details out of the customer draft.

50 50 

51- [Zoom](https://marketplace.zoom.us/apps/w7dWfj-UQ5ihAmKdi3fykg)51 

52 52 Do not send emails, post Slack messages, create docs, update CRM records,

53 Read accessible Zoom meetings, recordings, transcripts, and AI Companion summaries after authentication and admin approval.53 assign owners, or expose private data until I review and approve each

54- [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive)54 action.

55 55 suggestedEffort: low

56 Create or draft account plans, meeting briefs, and other reviewable follow-up documents.56relatedLinks:

57- [Slack](https://github.com/openai/plugins/tree/main/plugins/slack)57 - label: Codex plugins

58 58 url: /codex/plugins

59 Draft team updates after the user reviews and approves the message.59 - label: Codex automations

60 60 url: /codex/app/automations

61| Skill | Why use it |61---

62| --- | --- |

63| [Zoom](https://marketplace.zoom.us/apps/w7dWfj-UQ5ihAmKdi3fykg) | Read accessible Zoom meetings, recordings, transcripts, and AI Companion summaries after authentication and admin approval. |

64| [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive) | Create or draft account plans, meeting briefs, and other reviewable follow-up documents. |

65| [Slack](https://github.com/openai/plugins/tree/main/plugins/slack) | Draft team updates after the user reviews and approves the message. |

66 

67## Starter prompt

68 

69Use my most recent Zoom meeting with [customer or account].

70Retrieve the Zoom transcript and AI Companion summary. Name anything you cannot access before drafting.

71Summarize the key takeaways, decisions, risks, opportunities, and action items. Then draft:

72- a customer follow-up email

73- a Google Docs account plan

74- a CRM update with notes, risks, next steps, and owners

75- a Slack message to [team/channel/person] with the most important details

76Use evidence from the transcript where possible. Mark anything uncertain and keep internal-only details out of the customer draft.

77Do not send emails, post Slack messages, create docs, update CRM records, assign owners, or expose private data until I review and approve each action.

78 

79Open in the Codex app

80 

81Use my most recent Zoom meeting with [customer or account].

82Retrieve the Zoom transcript and AI Companion summary. Name anything you cannot access before drafting.

83Summarize the key takeaways, decisions, risks, opportunities, and action items. Then draft:

84- a customer follow-up email

85- a Google Docs account plan

86- a CRM update with notes, risks, next steps, and owners

87- a Slack message to [team/channel/person] with the most important details

88Use evidence from the transcript where possible. Mark anything uncertain and keep internal-only details out of the customer draft.

89Do not send emails, post Slack messages, create docs, update CRM records, assign owners, or expose private data until I review and approve each action.

90 62 

91## Introduction63## Introduction

92 64 


134 110 

135After the first package is ready, use the same thread to tune it for the audience or next workflow.111After the first package is ready, use the same thread to tune it for the audience or next workflow.

136 112 

137Make the follow-up email shorter and more executive-facing.

138Keep:

139- the customer commitment

140- the risks we need to acknowledge

141- the next meeting date

142Remove internal-only details. Do not send it yet.

143 

144You can also ask Codex to compare this call with the last few weekly calls, turn action items into a mutual action plan, create a version for a sales engineer with only technical blockers, or draft CRM updates without saving them.113You can also ask Codex to compare this call with the last few weekly calls, turn action items into a mutual action plan, create a version for a sales engineer with only technical blockers, or draft CRM updates without saving them.

145 114 

146## Automate recurring meeting intelligence115## Automate recurring meeting intelligence

147 116 

148For weekly account check-ins or deal reviews, pin the thread and ask Codex to create a [thread automation](https://developers.openai.com/codex/app/automations#thread-automations).117For weekly account check-ins or deal reviews, pin the thread and ask Codex to create a [thread automation](https://developers.openai.com/codex/app/automations#thread-automations).

149 118 

150You dont necessarily want Codex to post automatically, but it can create drafts for your review that you can approve and post.119You don't necessarily want Codex to post automatically, but it can create drafts for your review that you can approve and post.

151 

152After each weekly Zoom call with [customer], compare the new transcript and AI Companion summary against the prior three calls.

153Draft:

154- what changed

155- new risks or opportunities

156- action items with owners and dates

157- CRM notes

158- a Slack update for [team/channel]

159Only update me when there is a meaningful change, a missing transcript, or a decision I need to make. Do not post, send, assign, or update external systems without approval.

160 

161## Related use cases

162 

163[![](https://developers.openai.com/codex/use-cases/slack-action-triage.webp)

164 

165### Prioritize Slack action items

166 

167Use Codex with Slack and the tools where work happens to find direct asks, implicit...

168 

169Automation Integrations](https://developers.openai.com/codex/use-cases/slack-action-triage)[![](https://developers.openai.com/codex/use-cases/proactive-teammate.webp)

170 

171### Set up a teammate

172 

173Connect the tools where work happens, teach one thread what matters, then add an automation...

174 

175Automation Integrations](https://developers.openai.com/codex/use-cases/proactive-teammate)[![](https://developers.openai.com/codex/use-cases/manage-your-inbox.webp)

176 

177### Manage your inbox

178 

179Use Codex with Gmail to find emails that need attention, draft responses in your voice, pull...

180 

181Automation Integrations](https://developers.openai.com/codex/use-cases/manage-your-inbox)

182 

windows.md +40 −40

Details

1# Windows – Codex1# Windows

2 2 

3Use Codex on Windows with the native [Codex app](https://developers.openai.com/codex/app/windows), the3Use Codex on Windows with the native [Codex app](https://developers.openai.com/codex/app/windows), the

4[CLI](https://developers.openai.com/codex/cli), or the [IDE extension](https://developers.openai.com/codex/ide).4[CLI](https://developers.openai.com/codex/cli), or the [IDE extension](https://developers.openai.com/codex/ide).


7worktrees, automations, Git functionality, the in-app browser, artifact previews,7worktrees, automations, Git functionality, the in-app browser, artifact previews,

8plugins, and skills.8plugins, and skills.

9 9 

10[![](/images/codex/codex-banner-icon.webp)10<div class="mb-8">

11 11 <CodexCallout

12Use the Codex app on Windows12 href="/codex/app/windows"

13 13 title="Use the Codex app on Windows"

14Work across projects, run parallel agent threads, and review results in one place with the native Windows app.](https://developers.openai.com/codex/app/windows)14 description="Work across projects, run parallel agent threads, and review results in one place with the native Windows app."

15 iconSrc="/images/codex/codex-banner-icon.webp"

16 />

17</div>

15 18 

16Depending on the surface and your setup, Codex can run on Windows in three19Depending on the surface and your setup, Codex can run on Windows in three

17practical ways:20practical ways:


29Native Windows sandbox support includes two modes that you can configure in32Native Windows sandbox support includes two modes that you can configure in

30`config.toml`:33`config.toml`:

31 34 

32```35```toml

33[windows]36[windows]

34sandbox = "elevated" # or "unelevated"37sandbox = "elevated" # or "unelevated"

35```38```


41`unelevated` is the fallback native Windows sandbox. It runs commands with a44`unelevated` is the fallback native Windows sandbox. It runs commands with a

42restricted Windows token derived from your current user, applies ACL-based45restricted Windows token derived from your current user, applies ACL-based

43filesystem boundaries, and uses environment-level offline controls instead of46filesystem boundaries, and uses environment-level offline controls instead of

44the dedicated offline-user firewall rule. Its weaker than `elevated`, but it47the dedicated offline-user firewall rule. It's weaker than `elevated`, but it

45is still useful when administrator-approved setup is blocked by local or48is still useful when administrator-approved setup is blocked by local or

46enterprise policy.49enterprise policy.

47 50 

48If both modes are available, use `elevated`. If the default native sandbox51If both modes are available, use `elevated`. If the default native sandbox

49doesnt work in your environment, use `unelevated` as a fallback while you52doesn't work in your environment, use `unelevated` as a fallback while you

50troubleshoot the setup.53troubleshoot the setup.

51 54 

52Enterprise administrators can constrain which native sandbox implementations55Enterprise administrators can constrain which native sandbox implementations

53Codex can use through [`requirements.toml`](https://developers.openai.com/codex/enterprise/managed-configuration#admin-enforced-requirements-requirementstoml):56Codex can use through [`requirements.toml`](https://developers.openai.com/codex/enterprise/managed-configuration#admin-enforced-requirements-requirementstoml):

54 57 

55```58```toml

56[windows]59[windows]

57allowed_sandbox_implementations = ["elevated"]60allowed_sandbox_implementations = ["elevated"]

58```61```


70### Sandbox permissions73### Sandbox permissions

71 74 

72Running Codex in full access mode means Codex is not limited to your project75Running Codex in full access mode means Codex is not limited to your project

73directory and might perform unintentional destructive actions that can lead to76 directory and might perform unintentional destructive actions that can lead to

74data loss. For safer automation, keep sandbox boundaries in place and use77 data loss. For safer automation, keep sandbox boundaries in place and use

75[rules](https://developers.openai.com/codex/rules) for specific exceptions, or set your [approval policy to78 [rules](https://developers.openai.com/codex/rules) for specific exceptions, or set your [approval policy to

76never](https://developers.openai.com/codex/agent-approvals-security#run-without-approval-prompts) to have79 never](https://developers.openai.com/codex/agent-approvals-security#run-without-approval-prompts) to have

77Codex attempt to solve problems without asking for escalated permissions,80 Codex attempt to solve problems without asking for escalated permissions,

78based on your [approval and security setup](https://developers.openai.com/codex/agent-approvals-security).81 based on your [approval and security setup](https://developers.openai.com/codex/agent-approvals-security).

79 82 

80### Windows version matrix83### Windows version matrix

81 84 

82| Windows version | Support level | Notes |85| Windows version | Support level | Notes |

83| --- | --- | --- |86| -------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

84| Windows 11 | Recommended | Best baseline for Codex on Windows. Use this if you are standardizing an enterprise deployment. |87| Windows 11 | Recommended | Best baseline for Codex on Windows. Use this if you are standardizing an enterprise deployment. |

85| Recent, fully updated Windows 10 | Best effort | Can work, but is less reliable than Windows 11. For Windows 10, Codex depends on modern console support, including ConPTY. In practice, Windows 10 version 1809 or newer is required. |88| Recent, fully updated Windows 10 | Best effort | Can work, but is less reliable than Windows 11. For Windows 10, Codex depends on modern console support, including ConPTY. In practice, Windows 10 version 1809 or newer is required. |

86| Older Windows 10 builds | Not recommended | More likely to miss required console components such as ConPTY and more likely to fail in enterprise setups. |89| Older Windows 10 builds | Not recommended | More likely to miss required console components such as ConPTY and more likely to fail in enterprise setups. |

87 90 

88Additional environment assumptions:91Additional environment assumptions:

89 92 

90- `winget` should be available. If its missing, update Windows or install93- `winget` should be available. If it's missing, update Windows or install

91 the Windows Package Manager before setting up Codex.94 the Windows Package Manager before setting up Codex.

92- The recommended native sandbox depends on administrator-approved setup.95- The recommended native sandbox depends on administrator-approved setup.

93- Some enterprise-managed devices block the required setup steps even when the96- Some enterprise-managed devices block the required setup steps even when the


95 98 

96### Grant sandbox read access99### Grant sandbox read access

97 100 

98When a command fails because the Windows sandbox cant read a directory, use:101When a command fails because the Windows sandbox can't read a directory, use:

99 102 

100```103```text

101/sandbox-add-read-dir C:\absolute\directory\path104/sandbox-add-read-dir C:\absolute\directory\path

102```105```

103 106 


128 131 

129#### Open VS Code from a WSL terminal132#### Open VS Code from a WSL terminal

130 133 

131```134```bash

132# From your WSL shell135# From your WSL shell

133cd ~/code/your-project136cd ~/code/your-project

134code .137code .


136 139 

137This opens a WSL remote window, installs the VS Code Server if needed, and ensures integrated terminals run in Linux.140This opens a WSL remote window, installs the VS Code Server if needed, and ensures integrated terminals run in Linux.

138 141 

139#### Confirm youre connected to WSL142#### Confirm you're connected to WSL

140 143 

141- Look for the green status bar that shows `WSL: <distro>`.144- Look for the green status bar that shows `WSL: <distro>`.

142- Integrated terminals should display Linux paths (such as `/home/...`) instead of `C:\`.145- Integrated terminals should display Linux paths (such as `/home/...`) instead of `C:\`.

143- You can verify with:146- You can verify with:

144 147 

145 ```148 ```bash

146 echo $WSL_DISTRO_NAME149 echo $WSL_DISTRO_NAME

147 ```150 ```

148 151 

149 This prints your distribution name.152 This prints your distribution name.

150 153 

151If you dont see WSL: …” in the status bar, press `Ctrl+Shift+P`, pick154If you don't see "WSL: ..." in the status bar, press `Ctrl+Shift+P`, pick

152`WSL: Reopen Folder in WSL`, and keep your repository under `/home/...` (not155 `WSL: Reopen Folder in WSL`, and keep your repository under `/home/...` (not

153`C:\`) for best performance.156 `C:\`) for best performance.

154 157 

155If the Windows app or project picker does not show your WSL repository, type158If the Windows app or project picker does not show your WSL repository, type

156`\wsl$` into the file picker or Explorer, then navigate to your159 <code>\\wsl$</code> into the file picker or Explorer, then navigate to your

157distros home directory.160 distro's home directory.

158 161 

159### Use Codex CLI with WSL162### Use Codex CLI with WSL

160 163 

161Run these commands from an elevated PowerShell or Windows Terminal:164Run these commands from an elevated PowerShell or Windows Terminal:

162 165 

163```166```powershell

164# Install default Linux distribution (like Ubuntu)167# Install default Linux distribution (like Ubuntu)

165wsl --install168wsl --install

166 169 


170 173 

171Then run these commands from your WSL shell:174Then run these commands from your WSL shell:

172 175 

173```176```bash

174# Install and run Codex in WSL177# Install and run Codex in WSL

175curl -fsSL https://chatgpt.com/codex/install.sh | sh178curl -fsSL https://chatgpt.com/codex/install.sh | sh

176codex179codex


178 181 

179### Working on code inside WSL182### Working on code inside WSL

180 183 

181- Working in Windows-mounted paths like `/mnt/c/…` can be slower than working in Windows-native paths. Keep your repositories under your Linux home directory (like `~/code/my-app`) for faster I/O and fewer symlink and permission issues:184- Working in Windows-mounted paths like <code>/mnt/c/...</code> can be slower than working in Windows-native paths. Keep your repositories under your Linux home directory (like <code>~/code/my-app</code>) for faster I/O and fewer symlink and permission issues:

182 185 ```bash

183 ```

184 mkdir -p ~/code && cd ~/code186 mkdir -p ~/code && cd ~/code

185 git clone https://github.com/your/repo.git187 git clone https://github.com/your/repo.git

186 cd repo188 cd repo

187 ```189 ```

188- If you need Windows access to files, theyre under `\wsl$\Ubuntu\home&lt;user>` in Explorer.190- If you need Windows access to files, they're under <code>\\wsl$\Ubuntu\home\&lt;user&gt;</code> in Explorer.

189 191 

190## Troubleshooting and FAQ192## Troubleshooting and FAQ

191 193 


326 328 

327Large repositories feel slow in WSL329Large repositories feel slow in WSL

328 330 

329- Make sure youre not working under `/mnt/c`. Move the repository to WSL (for example, `~/code/…`).331- Make sure you're not working under <code>/mnt/c</code>. Move the repository to WSL (for example, <code>~/code/...</code>).

330- Increase memory and CPU for WSL if needed; update WSL to the latest version:332- Increase memory and CPU for WSL if needed; update WSL to the latest version:

331 333 ```powershell

332 ```

333 wsl --update334 wsl --update

334 wsl --shutdown335 wsl --shutdown

335 ```336 ```


338 339 

339Verify the binary exists and is on PATH inside WSL:340Verify the binary exists and is on PATH inside WSL:

340 341 

341```342```bash

342which codex || echo "codex not found"343which codex || echo "codex not found"

343```344```

344 345 

345If the binary isnt found, install it by [following the instructions](#use-codex-cli-with-wsl) above.346If the binary isn't found, install it by [following the instructions](#use-codex-cli-with-wsl) above.

346