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

24- **Codex cloud**: Runs in isolated OpenAI-managed containers, preventing access to your host system or unrelated data. Uses a two-phase runtime model: setup runs before the agent phase and can access the network to install specified dependencies, then the agent phase runs offline by default unless you enable internet access for that environment. Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts.24- **Codex cloud**: Runs in isolated OpenAI-managed containers, preventing access to your host system or unrelated data. Uses a two-phase runtime model: setup runs before the agent phase and can access the network to install specified dependencies, then the agent phase runs offline by default unless you enable internet access for that environment. Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts.

25- **Codex CLI / IDE extension**: OS-level mechanisms enforce sandbox policies. Defaults include no network access and write permissions limited to the active workspace. You can configure the sandbox, approval policy, and network settings based on your risk tolerance.25- **Codex CLI / IDE extension**: OS-level mechanisms enforce sandbox policies. Defaults include no network access and write permissions limited to the active workspace. You can configure the sandbox, approval policy, and network settings based on your risk tolerance.

26 26 

27In the `Auto` preset (for example, `--full-auto`), Codex can read files, make edits, and run commands in the working directory automatically.27In the `Auto` preset (for example, `--sandbox workspace-write --ask-for-approval on-request`), Codex can read files, make edits, and run commands in the working directory automatically.

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 


73- `<writable_root>/.codex` is protected as read-only when it exists as a directory.73- `<writable_root>/.codex` is protected as read-only when it exists as a directory.

74- Protection is recursive, so everything under those paths is read-only.74- Protection is recursive, so everything under those paths is read-only.

75 75 

76### Deny reads with filesystem profiles

77 

78Named permission profiles can also deny reads for exact paths or glob patterns.

79This is useful when a workspace should stay writable but specific sensitive

80files, such as local environment files, must stay unreadable:

81 

82```toml

83default_permissions = "workspace"

84 

85[permissions.workspace.filesystem]

86":project_roots" = { "." = "write", "**/*.env" = "none" }

87glob_scan_max_depth = 3

88```

89 

90Use `"none"` for paths or globs that Codex shouldn't read. The sandbox policy

91evaluates globs for local macOS and Linux command execution. On platforms that

92pre-expand glob matches before the sandbox starts, set `glob_scan_max_depth` for

93unbounded `**` patterns, or list explicit depths such as `*.env`, `*/*.env`, and

94`*/*/*.env`.

95 

76### Run without approval prompts96### Run without approval prompts

77 97 

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


83 103 

84For a middle ground, `approval_policy = { granular = { ... } }` lets you keep specific approval prompt categories interactive while automatically rejecting others. The granular policy covers sandbox approvals, execpolicy-rule prompts, MCP prompts, `request_permissions` prompts, and skill-script approvals.104For a middle ground, `approval_policy = { granular = { ... } }` lets you keep specific approval prompt categories interactive while automatically rejecting others. The granular policy covers sandbox approvals, execpolicy-rule prompts, MCP prompts, `request_permissions` prompts, and skill-script approvals.

85 105 

86Set `approvals_reviewer = "guardian_subagent"` to route eligible approval reviews through the Guardian reviewer subagent instead of prompting the user directly. Admin requirements can constrain this with `allowed_approvals_reviewers`.106### Automatic approval reviews

107 

108By default, approval requests route to you:

109 

110```toml

111approvals_reviewer = "user"

112```

113 

114Automatic approval reviews apply when approvals are interactive, such as

115`approval_policy = "on-request"` or a granular approval policy. Set

116`approvals_reviewer = "auto_review"` to route eligible approval requests

117through a reviewer agent before Codex runs the request:

118 

119```toml

120approval_policy = "on-request"

121approvals_reviewer = "auto_review"

122```

123 

124The reviewer evaluates only actions that already need approval, such as sandbox

125escalations, network requests, `request_permissions` prompts, or side-effecting

126app and MCP tool calls. Actions that stay inside the sandbox continue without an

127extra review step.

128 

129The reviewer policy checks for data exfiltration, credential probing, persistent

130security weakening, and destructive actions. Low-risk and medium-risk actions

131can proceed when policy allows them. The policy denies critical-risk actions.

132High-risk actions require enough user authorization and no matching deny rule.

133Timeouts, parse failures, and review errors fail closed.

134 

135The [default reviewer policy](https://github.com/openai/codex/blob/main/codex-rs/core/src/guardian/policy.md)

136is in the open-source Codex repository. Enterprises can replace its

137tenant-specific section with `guardian_policy_config` in managed requirements.

138Local `[auto_review].policy` text is also supported, but managed requirements

139take precedence. For setup details, see

140[Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration#configure-automatic-review-policy).

141 

142In the Codex app, these reviews appear as automatic review items with a status such

143as Reviewing, Approved, Denied, Stopped, or Timed out. They can also include a

144risk level for the reviewed request.

145 

146Automatic review uses extra model calls, so it can add to Codex usage. Admins

147can constrain it with `allowed_approvals_reviewers`.

87 148 

88### Common sandbox and approval combinations149### Common sandbox and approval combinations

89 150 

90| Intent | Flags | Effect |151| Intent | Flags | Effect |

91| ----------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |152| ----------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |

92| Auto (preset) | *no flags needed* or `--full-auto` | Codex can read files, make edits, and run commands in the workspace. Codex requires approval to edit outside the workspace or to access network. |153| 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. |

93| 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. |154| 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. |

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

95| 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. |156| 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. |

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

97 158 

98`--full-auto` is a convenience alias for `--sandbox workspace-write --ask-for-approval on-request`.159For 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.

99 160 

100With `--ask-for-approval untrusted`, Codex runs only known-safe read operations automatically. Commands that can mutate state or trigger external execution paths (for example, destructive Git operations or Git output/config-override flags) require approval.161With `--ask-for-approval untrusted`, Codex runs only known-safe read operations automatically. Commands that can mutate state or trigger external execution paths (for example, destructive Git operations or Git output/config-override flags) require approval.

101 162 


141 202 

142```bash203```bash

143# macOS204# macOS

144codex sandbox macos [--full-auto] [--log-denials] [COMMAND]...205codex sandbox macos [--permissions-profile <name>] [--log-denials] [COMMAND]...

145# Linux206# Linux

146codex sandbox linux [--full-auto] [COMMAND]...207codex sandbox linux [--permissions-profile <name>] [COMMAND]...

208# Windows

209codex sandbox windows [--permissions-profile <name>] [COMMAND]...

147```210```

148 211 

149The `sandbox` command is also available as `codex debug`, and the platform helpers have aliases (for example `codex sandbox seatbelt` and `codex sandbox landlock`).212The `sandbox` command is also available as `codex debug`, and the platform helpers have aliases (for example `codex sandbox seatbelt` and `codex sandbox landlock`).


153Codex enforces the sandbox differently depending on your OS:216Codex enforces the sandbox differently depending on your OS:

154 217 

155- **macOS** uses Seatbelt policies and runs commands using `sandbox-exec` with a profile (`-p`) that corresponds to the `--sandbox` mode you selected. When restricted read access enables platform defaults, Codex appends a curated macOS platform policy (instead of broadly allowing `/System`) to preserve common tool compatibility.218- **macOS** uses Seatbelt policies and runs commands using `sandbox-exec` with a profile (`-p`) that corresponds to the `--sandbox` mode you selected. When restricted read access enables platform defaults, Codex appends a curated macOS platform policy (instead of broadly allowing `/System`) to preserve common tool compatibility.

156- **Linux** uses the `bwrap` pipeline plus `seccomp` by default. `use_legacy_landlock` is available when you need the older path. In managed proxy mode, the default `bwrap` pipeline routes egress through a proxy-only bridge and fails closed if it can’t build valid local proxy routes.219- **Linux** uses `bwrap` plus `seccomp` by default.

157- **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.220- **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.

158 221 

159If 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:222If 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:


176 239 

177See the [Windows setup guide](https://developers.openai.com/codex/windows#windows-sandbox) for details.240See the [Windows setup guide](https://developers.openai.com/codex/windows#windows-sandbox) for details.

178 241 

179When you run Linux in a containerized environment such as Docker, the sandbox may not work if the host or container configuration doesn’t support the required `Landlock` and `seccomp` features.242When you run Linux in a containerized environment such as Docker, the sandbox may not work if the host or container configuration blocks the namespace, setuid `bwrap`, or `seccomp` operations that Codex needs.

180 243 

181In that case, configure your Docker container to provide the isolation you need, then run `codex` with `--sandbox danger-full-access` (or the `--dangerously-bypass-approvals-and-sandbox` flag) inside the container.244In that case, configure your Docker container to provide the isolation you need, then run `codex` with `--sandbox danger-full-access` (or the `--dangerously-bypass-approvals-and-sandbox` flag) inside the container.

182 245 

246### Run Codex in Dev Containers

247 

248If your host cannot run the Linux sandbox directly, or if your organization already standardizes on containerized development, run Codex with Dev Containers and let Docker provide the outer isolation boundary. This works with Visual Studio Code Dev Containers and compatible tools.

249 

250Use 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.

251 

252Devcontainers provide substantial protection, but they do not prevent every

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

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

255 project can exfiltrate anything available inside the devcontainer, including

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

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

258 

259The reference implementation includes:

260 

261- an Ubuntu 24.04 base image with Codex and common development tools installed;

262- an allowlist-driven firewall profile for outbound access;

263- VS Code settings and extension recommendations for reopening the workspace in a container;

264- persistent mounts for command history and Codex configuration;

265- `bubblewrap`, so Codex can still use its Linux sandbox when the container grants the needed capabilities.

266 

267To try it:

268 

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

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

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

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

273 

274You can also start the container from the CLI:

275 

276```bash

277devcontainer up --workspace-folder . --config .devcontainer/devcontainer.secure.json

278```

279 

280The example has three main pieces:

281 

282- `.devcontainer/devcontainer.secure.json` controls container settings, capabilities, mounts, environment variables, and VS Code extensions.

283- `.devcontainer/Dockerfile.secure` defines the Ubuntu-based image and installed tools.

284- `.devcontainer/init-firewall.sh` applies the outbound network policy.

285 

286The reference firewall is intentionally a starting point. If you depend on domain allowlisting for isolation, implement DNS rebinding and DNS refresh protections that fit your environment, such as TTL-aware refreshes or a DNS-aware firewall.

287 

288Inside the container, choose one of these modes:

289 

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

291- 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.

292 

183## Version control293## Version control

184 294 

185Codex works best with a version control workflow:295Codex works best with a version control workflow:

app.md +5 −2

Details

12 12 

13The Codex app is available on macOS and Windows.13The Codex app is available on macOS and Windows.

14 14 

15Most Codex app features are available on both platforms. Platform-specific

16exceptions are noted in the relevant docs.

17 

151. Download and install the Codex app181. Download and install the Codex app

16 19 

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

18 21 

19 [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)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)

20 23 


63 66 

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

65 68 

66Open unauthenticated local or public pages and comment on rendered output.](https://developers.openai.com/codex/app/browser)[### Image generation69Open rendered pages, leave comments, or let Codex operate local browser flows.](https://developers.openai.com/codex/app/browser)[### Image generation

67 70 

68Generate or edit images in a thread while you work on the surrounding code and assets.](https://developers.openai.com/codex/app/features#image-generation)[### Automations71Generate or edit images in a thread while you work on the surrounding code and assets.](https://developers.openai.com/codex/app/features#image-generation)[### Automations

69 72 

app-server.md +238 −32

Details

12Supported transports:12Supported transports:

13 13 

14- `stdio` (`--listen stdio://`, default): newline-delimited JSON (JSONL).14- `stdio` (`--listen stdio://`, default): newline-delimited JSON (JSONL).

15- `websocket` (`--listen ws://IP:PORT`, experimental): one JSON-RPC message per WebSocket text frame.15- `websocket` (`--listen ws://IP:PORT`, experimental and unsupported): one JSON-RPC message per WebSocket text frame.

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

17 

18When you run with `--listen ws://IP:PORT`, the same listener also serves basic HTTP health probes:

19 

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

21- `GET /healthz` returns `200 OK` when the request doesn't include an `Origin` header.

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

23 

24WebSocket transport is experimental and unsupported. Loopback listeners such as `ws://127.0.0.1:PORT` are appropriate for localhost and SSH port-forwarding workflows. Non-loopback WebSocket listeners currently allow unauthenticated connections by default during rollout, so configure WebSocket auth before exposing one remotely.

25 

26Supported WebSocket auth flags:

27 

28- `--ws-auth capability-token --ws-token-file /absolute/path`

29- `--ws-auth capability-token --ws-token-sha256 HEX`

30- `--ws-auth signed-bearer-token --ws-shared-secret-file /absolute/path`

31 

32For signed bearer tokens, you can also set `--ws-issuer`, `--ws-audience`, and `--ws-max-clock-skew-seconds`. Clients present the credential as `Authorization: Bearer <token>` during the WebSocket handshake, and app-server enforces auth before JSON-RPC `initialize`.

33 

34Prefer `--ws-token-file` over passing raw bearer tokens on the command line. Use `--ws-token-sha256` only when the client keeps the raw high-entropy token in a separate local secret store; the hash is only a verifier, and clients still need the original token.

16 35 

17In WebSocket mode, app-server uses bounded queues. When request ingress is full, the server rejects new requests with JSON-RPC error code `-32001` and message `"Server overloaded; retry later."` Clients should retry with an exponentially increasing delay and jitter.36In WebSocket mode, app-server uses bounded queues. When request ingress is full, the server rejects new requests with JSON-RPC error code `-32001` and message `"Server overloaded; retry later."` Clients should retry with an exponentially increasing delay and jitter.

18 37 


199- `thread/resume` - reopen an existing thread by id so later `turn/start` calls append to it.218- `thread/resume` - reopen an existing thread by id so later `turn/start` calls append to it.

200- `thread/fork` - fork a thread into a new thread id by copying stored history; emits `thread/started` for the new thread.219- `thread/fork` - fork a thread into a new thread id by copying stored history; emits `thread/started` for the new thread.

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

202- `thread/list` - page through stored thread logs; supports cursor-based pagination plus `modelProviders`, `sourceKinds`, `archived`, and `cwd` filters. Returned `thread` objects include runtime `status`.221- `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`.

222- `thread/turns/list` - page through a stored thread's turn history without resuming it.

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

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

225- `thread/goal/set` - set the goal for a loaded thread (experimental; requires `capabilities.experimentalApi`); emits `thread/goal/updated`.

226- `thread/goal/get` - read the current goal for a loaded thread (experimental; requires `capabilities.experimentalApi`).

227- `thread/goal/clear` - clear the goal for a loaded thread (experimental; requires `capabilities.experimentalApi`); emits `thread/goal/cleared`.

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

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

206- `thread/unsubscribe` - unsubscribe this connection from thread turn/item events. If this was the last subscriber, the server unloads the thread and emits `thread/closed`.230- `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`.

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

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

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


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

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

213- `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."237- `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."

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

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

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

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


218- `command/exec/write` - write `stdin` bytes to a running `command/exec` session or close `stdin`.243- `command/exec/write` - write `stdin` bytes to a running `command/exec` session or close `stdin`.

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

220- `command/exec/terminate` - stop a running `command/exec` session.245- `command/exec/terminate` - stop a running `command/exec` session.

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

221- `model/list` - list available models (set `includeHidden: true` to include entries with `hidden: true`) with effort options, optional `upgrade`, and `inputModalities`.247- `model/list` - list available models (set `includeHidden: true` to include entries with `hidden: true`) with effort options, optional `upgrade`, and `inputModalities`.

248- `modelProvider/capabilities/read` - read provider capability bounds for model/provider combinations (experimental; requires `capabilities.experimentalApi`).

222- `experimentalFeature/list` - list feature flags with lifecycle stage metadata and cursor pagination.249- `experimentalFeature/list` - list feature flags with lifecycle stage metadata and cursor pagination.

250- `experimentalFeature/enablement/set` - patch in-memory runtime enablement for supported feature keys such as `apps` and `plugins`.

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

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

225- `plugin/list` - list discovered plugin marketplaces and plugin state, including install/auth policy metadata, marketplace errors, featured plugin ids, and the development-only `forceRemoteSync` option.253- `skills/changed` (notify) - emitted when watched local skill files change.

226- `plugin/read` - read one plugin by marketplace path and plugin name, including bundled skills, apps, and MCP server names.254- `marketplace/add` - add a remote plugin marketplace and persist it into the user's marketplace config.

227- `plugin/install` - install a plugin from a marketplace path.255- `marketplace/upgrade` - refresh a configured Git marketplace, or all configured Git marketplaces when you omit the marketplace name.

256- `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.

257- `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.

258- `plugin/install` - install a plugin from a marketplace path or remote marketplace name.

228- `plugin/uninstall` - uninstall an installed plugin.259- `plugin/uninstall` - uninstall an installed plugin.

229- `app/list` - list available apps (connectors) with pagination plus accessibility/enabled metadata.260- `app/list` - list available apps (connectors) with pagination plus accessibility/enabled metadata.

230- `skills/config/write` - enable or disable skills by path.261- `skills/config/write` - enable or disable skills by path.


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

234- `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.265- `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.

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

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

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

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

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

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

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

240- `externalAgentConfig/import` - apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home).273- `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`.

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

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

243- `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).276- `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).

244- `fs/readFile`, `fs/writeFile`, `fs/createDirectory`, `fs/getMetadata`, `fs/readDirectory`, `fs/remove`, and `fs/copy` - operate on absolute filesystem paths through the app-server v2 filesystem API.277- `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.

278 

279Plugin summaries include a `source` union. Local plugins return

280`{ "type": "local", "path": ... }`, Git-backed marketplace entries return

281`{ "type": "git", "url": ..., "path": ..., "refName": ..., "sha": ... }`,

282and remote catalog entries return `{ "type": "remote" }`. For remote-only

283catalog entries, `PluginMarketplaceEntry.path` can be `null`; pass

284`remoteMarketplaceName` instead of `marketplacePath` when reading or installing

285those plugins.

245 286 

246## Models287## Models

247 288 


310## Threads351## Threads

311 352 

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

313- `thread/list` supports cursor pagination plus `modelProviders`, `sourceKinds`, `archived`, and `cwd` filtering.354- `thread/turns/list` pages through a stored thread's turn history without resuming it.

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

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

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

316- `thread/unsubscribe` unsubscribes the current connection from a loaded thread and can trigger `thread/closed`.358- `thread/metadata/update` patches stored thread metadata, currently including persisted `gitInfo`.

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

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

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

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

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

320 364 

321### Start or resume a thread365### Start or resume a thread

322 366 


387 431 

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

389 433 

434### List thread turns

435 

436Use `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.

437 

438```json

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

440 "threadId": "thr_123",

441 "limit": 50,

442 "sortDirection": "desc"

443} }

444{ "id": 20, "result": {

445 "data": [],

446 "nextCursor": "older-turns-cursor-or-null",

447 "backwardsCursor": "newer-turns-cursor-or-null"

448} }

449```

450 

390### List threads (with pagination & filters)451### List threads (with pagination & filters)

391 452 

392`thread/list` lets you render a history UI. Results default to newest-first by `createdAt`. Filters apply before pagination. Pass any combination of:453`thread/list` lets you render a history UI. Results default to newest-first by `createdAt`. Filters apply before pagination. Pass any combination of:


398- `sourceKinds` - restrict results to specific thread sources. When omitted or `[]`, the server defaults to interactive sources only: `cli` and `vscode`.459- `sourceKinds` - restrict results to specific thread sources. When omitted or `[]`, the server defaults to interactive sources only: `cli` and `vscode`.

399- `archived` - when `true`, list archived threads only. When `false` or omitted, list non-archived threads (default).460- `archived` - when `true`, list archived threads only. When `false` or omitted, list non-archived threads (default).

400- `cwd` - restrict results to threads whose session current working directory exactly matches this path.461- `cwd` - restrict results to threads whose session current working directory exactly matches this path.

462- `searchTerm` - search stored thread summaries and metadata before pagination.

401 463 

402`sourceKinds` accepts the following values:464`sourceKinds` accepts the following values:

403 465 


431 493 

432When `nextCursor` is `null`, you have reached the final page.494When `nextCursor` is `null`, you have reached the final page.

433 495 

496### Update stored thread metadata

497 

498Use `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.

499 

500```json

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

502 "threadId": "thr_123",

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

504} }

505{ "id": 21, "result": {

506 "thread": {

507 "id": "thr_123",

508 "gitInfo": { "sha": null, "branch": "feature/sidebar-pr", "originUrl": null }

509 }

510} }

511```

512 

434### Track thread status changes513### Track thread status changes

435 514 

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


462- `notSubscribed` when the connection wasn't subscribed to that thread.541- `notSubscribed` when the connection wasn't subscribed to that thread.

463- `notLoaded` when the thread isn't loaded.542- `notLoaded` when the thread isn't loaded.

464 543 

465If this was the last subscriber, the server unloads the thread and emits a `thread/status/changed` transition to `notLoaded` plus `thread/closed`.544If 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`.

466 545 

467```json546```json

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

469{ "id": 22, "result": { "status": "unsubscribed" } }548{ "id": 22, "result": { "status": "unsubscribed" } }

549```

550 

551If the thread later expires:

552 

553```json

470{ "method": "thread/status/changed", "params": {554{ "method": "thread/status/changed", "params": {

471 "threadId": "thr_123",555 "threadId": "thr_123",

472 "status": { "type": "notLoaded" }556 "status": { "type": "notLoaded" }


615{ "id": 30, "result": { "turn": { "id": "turn_456", "status": "inProgress", "items": [], "error": null } } }699{ "id": 30, "result": { "turn": { "id": "turn_456", "status": "inProgress", "items": [], "error": null } } }

616```700```

617 701 

702### Inject items into a thread

703 

704Use `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.

705 

706```json

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

708 "threadId": "thr_123",

709 "items": [

710 {

711 "type": "message",

712 "role": "assistant",

713 "content": [{ "type": "output_text", "text": "Previously computed context." }]

714 }

715 ]

716} }

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

718```

719 

618### Steer an active turn720### Steer an active turn

619 721 

620Use `turn/steer` to append more user input to the active in-flight turn.722Use `turn/steer` to append more user input to the active in-flight turn.


796- `elevated` - run the elevated Windows sandbox setup path.898- `elevated` - run the elevated Windows sandbox setup path.

797- `unelevated` - run the legacy setup/preflight path.899- `unelevated` - run the legacy setup/preflight path.

798 900 

901## Filesystem

902 

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

904 

905```json

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

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

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

909} }

910{ "id": 54, "result": { "path": "/Users/me/project/.git/HEAD" } }

911{ "method": "fs/changed", "params": {

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

913 "changedPaths": ["/Users/me/project/.git/HEAD"]

914} }

915{ "method": "fs/unwatch", "id": 55, "params": {

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

917} }

918{ "id": 55, "result": {} }

919```

920 

921Watching a file emits `fs/changed` for that file path, including updates delivered by replace or rename operations.

922 

799## Events923## Events

800 924 

801Event notifications are the server-initiated stream for thread lifecycles, turn lifecycles, and the items within them. After you start or resume a thread, keep reading the active transport stream for `thread/started`, `thread/archived`, `thread/unarchived`, `thread/closed`, `thread/status/changed`, `turn/*`, `item/*`, and `serverRequest/resolved` notifications.925Event notifications are the server-initiated stream for thread lifecycles, turn lifecycles, and the items within them. After you start or resume a thread, keep reading the active transport stream for `thread/started`, `thread/archived`, `thread/unarchived`, `thread/closed`, `thread/status/changed`, `turn/*`, `item/*`, and `serverRequest/resolved` notifications.


1016} }1140} }

1017```1141```

1018 1142 

1143The server also emits `skills/changed` notifications when watched local skill files change. Treat this as an invalidation signal and rerun `skills/list` with your current params when needed.

1144 

1019To enable or disable a skill by path:1145To enable or disable a skill by path:

1020 1146 

1021```json1147```json


1222{ "id": 64, "result": {} }1348{ "id": 64, "result": {} }

1223```1349```

1224 1350 

1225Supported `itemType` values are `AGENTS_MD`, `CONFIG`, `SKILLS`, and `MCP_SERVER_CONFIG`. Detection returns only items that still have work to do. For example, AGENTS migration is skipped when `AGENTS.md` already exists and is non-empty, and skill imports don’t overwrite existing skill directories.1351When a request includes plugin imports, the server emits `externalAgentConfig/import/completed` after the import finishes. This notification may arrive immediately after the response or after background remote imports complete.

1352 

1353Supported `itemType` values are `AGENTS_MD`, `CONFIG`, `SKILLS`, `PLUGINS`,

1354and `MCP_SERVER_CONFIG`. For `PLUGINS` items, `details.plugins` lists each

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

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

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

1358don't overwrite existing skill directories.

1359 

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

1361marketplace sources from `extraKnownMarketplaces`. If `enabledPlugins` contains

1362plugins from `claude-plugins-official` but the marketplace source is missing,

1363Codex infers `anthropics/claude-plugins-official` as the source.

1226 1364 

1227## Auth endpoints1365## Auth endpoints

1228 1366 

1229The JSON-RPC auth/account surface exposes request/response methods plus server-initiated notifications (no `id`). Use these to determine auth state, start or cancel logins, logout, and inspect ChatGPT rate limits.1367The JSON-RPC auth/account surface exposes request/response methods plus server-initiated notifications (no `id`). Use these to determine auth state, start or cancel logins, logout, inspect ChatGPT rate limits, and notify workspace owners about depleted credits or usage limits.

1230 1368 

1231### Authentication modes1369### Authentication modes

1232 1370 

1233Codex supports three authentication modes. `account/updated.authMode` shows the active mode, and `account/read` also reports it.1371Codex supports these authentication modes. `account/updated.authMode` shows the active mode and includes the current ChatGPT `planType` when available. `account/read` also reports account and plan details.

1234 1372 

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

1236- **ChatGPT managed (`chatgpt`)** - Codex owns the ChatGPT OAuth flow, persists tokens, and refreshes them automatically.1374- **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.

1237- **ChatGPT external tokens (`chatgptAuthTokens`)** - a host app supplies `idToken` and `accessToken` directly. Codex stores these tokens in memory, and the host app must refresh them when asked.1375- **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.

1238 1376 

1239### API overview1377### API overview

1240 1378 

1241- `account/read` - fetch current account info; optionally refresh tokens.1379- `account/read` - fetch current account info; optionally refresh tokens.

1242- `account/login/start` - begin login (`apiKey`, `chatgpt`, or `chatgptAuthTokens`).1380- `account/login/start` - begin login (`apiKey`, `chatgpt`, `chatgptDeviceCode`, or experimental `chatgptAuthTokens`).

1243- `account/login/completed` (notify) - emitted when a login attempt finishes (success or error).1381- `account/login/completed` (notify) - emitted when a login attempt finishes (success or error).

1244- `account/login/cancel` - cancel a pending ChatGPT login by `loginId`.1382- `account/login/cancel` - cancel a pending managed ChatGPT login by `loginId`.

1245- `account/logout` - sign out; triggers `account/updated`.1383- `account/logout` - sign out; triggers `account/updated`.

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

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

1248- `account/rateLimits/read` - fetch ChatGPT rate limits.1386- `account/rateLimits/read` - fetch ChatGPT rate limits.

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

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

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

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

1251 1391 

1252### 1) Check auth state1392### 1) Check auth state

1253 1393 


1319 ```1459 ```

1320 1460 

1321 ```json1461 ```json

1322 { "method": "account/updated", "params": { "authMode": "apikey" } }1462 {

1463 "method": "account/updated",

1464 "params": { "authMode": "apikey", "planType": null }

1465 }

1323 ```1466 ```

1324 1467 

1325### 3) Log in with ChatGPT (browser flow)1468### 3) Log in with ChatGPT (browser flow)


1351 ```1494 ```

1352 1495 

1353 ```json1496 ```json

1354 { "method": "account/updated", "params": { "authMode": "chatgpt" } }1497 {

1498 "method": "account/updated",

1499 "params": { "authMode": "chatgpt", "planType": "plus" }

1500 }

1501 ```

1502 

1503### 3b) Log in with ChatGPT (device-code flow)

1504 

1505Use this flow when your client owns the sign-in ceremony or when a browser callback is brittle.

1506 

15071. Start:

1508 

1509 ```json

1510 {

1511 "method": "account/login/start",

1512 "id": 4,

1513 "params": { "type": "chatgptDeviceCode" }

1514 }

1515 ```

1516 

1517 ```json

1518 {

1519 "id": 4,

1520 "result": {

1521 "type": "chatgptDeviceCode",

1522 "loginId": "<uuid>",

1523 "verificationUrl": "https://auth.openai.com/codex/device",

1524 "userCode": "ABCD-1234"

1525 }

1526 }

1527 ```

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

15293. Wait for notifications:

1530 

1531 ```json

1532 {

1533 "method": "account/login/completed",

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

1535 }

1536 ```

1537 

1538 ```json

1539 {

1540 "method": "account/updated",

1541 "params": { "authMode": "chatgpt", "planType": "plus" }

1542 }

1355 ```1543 ```

1356 1544 

1357### 3b) Log in with externally managed ChatGPT tokens (`chatgptAuthTokens`)1545### 3c) Log in with externally managed ChatGPT tokens (`chatgptAuthTokens`)

1358 1546 

1359Use this mode when a host application owns the users ChatGPT auth lifecycle and supplies tokens directly.1547Use 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.

1360 1548 

13611. Send:15491. Send:

1362 1550 


1366 "id": 7,1554 "id": 7,

1367 "params": {1555 "params": {

1368 "type": "chatgptAuthTokens",1556 "type": "chatgptAuthTokens",

1369 "idToken": "<jwt>",1557 "accessToken": "<jwt>",

1370 "accessToken": "<jwt>"1558 "chatgptAccountId": "org-123",

1559 "chatgptPlanType": "business"

1371 }1560 }

1372 }1561 }

1373 ```1562 ```


1388 ```json1577 ```json

1389 {1578 {

1390 "method": "account/updated",1579 "method": "account/updated",

1391 "params": { "authMode": "chatgptAuthTokens" }1580 "params": { "authMode": "chatgptAuthTokens", "planType": "business" }

1392 }1581 }

1393 ```1582 ```

1394 1583 


1400 "id": 8,1589 "id": 8,

1401 "params": { "reason": "unauthorized", "previousAccountId": "org-123" }1590 "params": { "reason": "unauthorized", "previousAccountId": "org-123" }

1402}1591}

1403{ "id": 8, "result": { "idToken": "<jwt>", "accessToken": "<jwt>" } }1592{ "id": 8, "result": { "accessToken": "<jwt>", "chatgptAccountId": "org-123", "chatgptPlanType": "business" } }

1404```1593```

1405 1594 

1406The server retries the original request after a successful refresh response. Requests time out after about 10 seconds.1595The server retries the original request after a successful refresh response. Requests time out after about 10 seconds.


1417```json1606```json

1418{ "method": "account/logout", "id": 5 }1607{ "method": "account/logout", "id": 5 }

1419{ "id": 5, "result": {} }1608{ "id": 5, "result": {} }

1420{ "method": "account/updated", "params": { "authMode": null } }1609{ "method": "account/updated", "params": { "authMode": null, "planType": null } }

1421```1610```

1422 1611 

1423### 6) Rate limits (ChatGPT)1612### 6) Rate limits (ChatGPT)


1429 "limitId": "codex",1618 "limitId": "codex",

1430 "limitName": null,1619 "limitName": null,

1431 "primary": { "usedPercent": 25, "windowDurationMins": 15, "resetsAt": 1730947200 },1620 "primary": { "usedPercent": 25, "windowDurationMins": 15, "resetsAt": 1730947200 },

1432 "secondary": null1621 "secondary": null,

1622 "rateLimitReachedType": null

1433 },1623 },

1434 "rateLimitsByLimitId": {1624 "rateLimitsByLimitId": {

1435 "codex": {1625 "codex": {

1436 "limitId": "codex",1626 "limitId": "codex",

1437 "limitName": null,1627 "limitName": null,

1438 "primary": { "usedPercent": 25, "windowDurationMins": 15, "resetsAt": 1730947200 },1628 "primary": { "usedPercent": 25, "windowDurationMins": 15, "resetsAt": 1730947200 },

1439 "secondary": null1629 "secondary": null,

1630 "rateLimitReachedType": null

1440 },1631 },

1441 "codex_other": {1632 "codex_other": {

1442 "limitId": "codex_other",1633 "limitId": "codex_other",

1443 "limitName": "codex_other",1634 "limitName": "codex_other",

1444 "primary": { "usedPercent": 42, "windowDurationMins": 60, "resetsAt": 1730950800 },1635 "primary": { "usedPercent": 42, "windowDurationMins": 60, "resetsAt": 1730950800 },

1445 "secondary": null1636 "secondary": null,

1637 "rateLimitReachedType": null

1446 }1638 }

1447 }1639 }

1448} }1640} }


1463- `usedPercent` is current usage within the quota window.1655- `usedPercent` is current usage within the quota window.

1464- `windowDurationMins` is the quota window length.1656- `windowDurationMins` is the quota window length.

1465- `resetsAt` is a Unix timestamp (seconds) for the next reset.1657- `resetsAt` is a Unix timestamp (seconds) for the next reset.

1658- `planType` is included when the backend returns the ChatGPT plan associated with a bucket.

1659- `credits` is included when the backend returns remaining workspace credit details.

1660- `rateLimitReachedType` identifies the backend-classified limit state when one has been reached.

1661 

1662### 7) Notify a workspace owner about a limit

1663 

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

1665 

1666```json

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

1668{ "id": 7, "result": { "status": "sent" } }

1669```

1670 

1671Use `creditType: "credits"` when workspace credits are depleted, or `creditType: "usage_limit"` when the workspace usage limit has been reached. If the owner was already notified recently, the response status is `cooldown_active`.

app/browser.md +22 −0

Details

20 20 

21![Codex app showing a browser comment on a local web app preview](/images/codex/app/in-app-browser-light.webp)21![Codex app showing a browser comment on a local web app preview](/images/codex/app/in-app-browser-light.webp)

22 22 

23## Browser use

24 

25Browser use lets Codex operate the in-app browser directly. Use it for local

26development servers and file-backed previews when Codex needs to click, type,

27inspect rendered state, take screenshots, or verify a fix in the page.

28 

29To use it, install and enable the Browser plugin. Then ask Codex to use the

30browser in your task, or reference it directly with `@Browser`. The app keeps

31browser use inside the in-app browser and lets you manage allowed and blocked

32websites from settings.

33 

34Example:

35 

36```text

37Use the browser to open http://localhost:3000/settings, reproduce the layout

38bug, and fix only the overflowing controls.

39```

40 

41Codex asks before using a website unless you've allowed it. Removing a site from

42the allowed list means Codex asks again before using it; removing a site from the

43blocked list means Codex can ask again instead of treating it as blocked.

44 

23## Preview a page45## Preview a page

24 46 

251. 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).471. 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).

app/features.md +14 −1

Details

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.

5 5 

6Most Codex app features are available on both macOS and Windows.

7The sections below note platform-specific exceptions.

8 

6---9---

7 10 

8## Multitask across projects11## Multitask across projects


143Use browser comments to mark specific elements or areas on a page, then ask146Use browser comments to mark specific elements or areas on a page, then ask

144Codex to address that feedback.147Codex to address that feedback.

145 148 

149When you want Codex to operate the page directly, use

150[browser use](https://developers.openai.com/codex/app/browser#browser-use) for local development servers and

151file-backed pages. You can manage the Browser plugin, allowed websites, and

152blocked websites from settings.

153 

146![Codex app showing a browser comment on a local web app preview](/images/codex/app/in-app-browser-light.webp)154![Codex app showing a browser comment on a local web app preview](/images/codex/app/in-app-browser-light.webp)

147 155 

148## Computer use156## Computer use


222opening separate projects or using worktrees rather than asking Codex to roam230opening separate projects or using worktrees rather than asking Codex to roam

223outside the project root.231outside the project root.

224 232 

233If [automatic review](https://developers.openai.com/codex/agent-approvals-security#automatic-approval-reviews)

234is available in your workspace, you can choose it from the permissions selector.

235It keeps the same sandbox boundary but routes eligible approval requests through

236the configured review policy instead of waiting for you.

237 

225For a high-level overview, see [sandboxing](https://developers.openai.com/codex/concepts/sandboxing). For238For a high-level overview, see [sandboxing](https://developers.openai.com/codex/concepts/sandboxing). For

226configuration details, see the239configuration details, see the

227[agent approvals & security documentation](https://developers.openai.com/codex/agent-approvals-security).240[agent approvals & security documentation](https://developers.openai.com/codex/agent-approvals-security).


247 260 

248You can ask in natural language or explicitly invoke the image generation skill by including `$imagegen` in your prompt.261You can ask in natural language or explicitly invoke the image generation skill by including `$imagegen` in your prompt.

249 262 

250Built-in image generation uses `gpt-image-1.5`, counts toward your general Codex usage limits, and uses included limits 3-5x faster on average than similar turns without image generation, depending on image quality and size. For details, see [Pricing](https://developers.openai.com/codex/pricing#image-generation-usage-limits). For prompting tips and model details, see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation).263Built-in image generation uses `gpt-image-2`, counts toward your general Codex usage limits, and uses included limits 3-5x faster on average than similar turns without image generation, depending on image quality and size. For details, see [Pricing](https://developers.openai.com/codex/pricing#image-generation-usage-limits). For prompting tips and model details, see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation).

251 264 

252For larger batches of image generation, set `OPENAI_API_KEY` in your environment variables and ask Codex to generate images through the API so API pricing applies instead.265For larger batches of image generation, set `OPENAI_API_KEY` in your environment variables and ask Codex to generate images through the API so API pricing applies instead.

253 266 

app/settings.md +41 −2

Details

30 30 

31![Codex app Appearance settings showing theme selection, color controls, and font options](/images/codex/app/theme-selection-light.webp)31![Codex app Appearance settings showing theme selection, color controls, and font options](/images/codex/app/theme-selection-light.webp)

32 32 

33### Codex pets

34 

35 Codex pets are optional animated companions for the app. In **Settings**,

36choose **Pets** to select a built-in pet or refresh custom pets from your

37local Codex home. Type `/pet` in the composer, use **Wake Pet** or **Tuck Away Pet** in Settings, or

38 press <kbd>Cmd+K</kbd> or <kbd>Ctrl+K</kbd> and run the same commands to

39 toggle the floating overlay.

40 

41 The overlay keeps active Codex work visible while you use other apps. It

42 shows the active thread, reflects whether Codex is running, waiting for

43 input, or ready for review, and pairs that state with a short progress

44 prompt so you can glance at what changed without reopening the thread.

45 

461/8

47 

48CodexI found a tiny loose thread in settings. Want me to tug it?

49 

50To create your own pet, install the `hatch-pet` skill:

51 

52```text

53$skill-installer hatch-pet

54```

55 

56Reload skills from the command menu. Press <kbd>Cmd+K</kbd> or <kbd>Ctrl+K</kbd>,

57choose **Force Reload Skills**, then ask the skill to create a pet:

58 

59```text

60$hatch-pet create a new pet inspired by my recent projects

61```

62 

33## Git63## Git

34 64 

35Use Git settings to standardize branch naming and choose whether Codex uses force65Use Git settings to standardize branch naming and choose whether Codex uses force


43also apply to the Codex CLI and IDE extension because the MCP configuration lives in73also apply to the Codex CLI and IDE extension because the MCP configuration lives in

44`config.toml`. See the [Model Context Protocol docs](https://developers.openai.com/codex/mcp) for details.74`config.toml`. See the [Model Context Protocol docs](https://developers.openai.com/codex/mcp) for details.

45 75 

76## Browser use

77 

78Use these settings to install or enable the bundled Browser plugin and manage

79allowed and blocked websites. Codex asks before using a website unless you've

80allowed it. Removing a site from the blocked list lets Codex ask

81again before using it in the browser.

82 

83See [In-app browser](https://developers.openai.com/codex/app/browser) for browser preview, comment, and

84browser use workflows.

85 

46## Computer Use86## Computer Use

47 87 

48On macOS, check your Computer Use settings to review desktop-app access and related88On macOS, check your Computer Use settings to review desktop-app access and related

49preferences after setup. To revoke system-level access, update Screen Recording89preferences after setup. To revoke system-level access, update Screen Recording

50or Accessibility permissions in macOS Privacy & Security settings. The feature90or Accessibility permissions in macOS Privacy & Security settings. The feature

51isnt available in the European Economic Area, the United Kingdom, or Switzerland91isn't available in the EEA, the United Kingdom, or Switzerland at launch.

52at launch.

53 92 

54## Personalization93## Personalization

55 94 

app/windows.md +2 −0

Details

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.

5The Windows app supports core workflows such as worktrees, automations, Git

6functionality, the in-app browser, artifact previews, plugins, and skills.

5It runs natively on Windows using PowerShell and the7It runs natively on Windows using PowerShell and the

6[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

7run 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).

cli.md +4 −3

Details

43 43 

44 npm i -g @openai/codex@latestCopy44 npm i -g @openai/codex@latestCopy

45 45 

46The Codex CLI is available on macOS and Linux. Windows support is46The Codex CLI is available on macOS, Windows, and Linux. On Windows, run Codex

47experimental. For the best Windows experience, use Codex in a WSL2 workspace47 natively in PowerShell with the Windows sandbox, or use WSL2 when you need a

48and follow our [Windows setup guide](https://developers.openai.com/codex/windows).48Linux-native environment. For setup details, see the

49[Windows setup guide](https://developers.openai.com/codex/windows).

49 50 

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

51 52 

cli/features.md +13 −11

Details

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 <kbd>Ctrl</kbd>+<kbd>L</kbd> 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` 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 <kbd>Tab</kbd> while Codex is running to queue follow-up text, slash commands, or `!` shell commands for the next turn.

26- Navigate draft history in the composer with <kbd>Up</kbd>/<kbd>Down</kbd>; 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 <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.

27- Press <kbd>Ctrl</kbd>+<kbd>C</kbd> or use `/exit` to close the interactive session when you're done.29- Press <kbd>Ctrl</kbd>+<kbd>C</kbd> or use `/exit` to close the interactive session when you're done.

28 30 

29## Resuming conversations31## Resuming conversations


105 107 

106## Models and reasoning108## Models and reasoning

107 109 

108For most tasks in Codex, `gpt-5.4` is the recommended model. It brings the110For most tasks in Codex, `gpt-5.5` is the recommended model when it is

109industry-leading coding capabilities of `gpt-5.3-codex` to OpenAI’s flagship111available. It is OpenAI's newest frontier model for complex coding, computer

110frontier model, combining frontier coding performance with stronger reasoning,112use, knowledge work, and research workflows, with stronger planning, tool use,

111native computer use, and broader professional workflows. For extra fast tasks,113and follow-through on multi-step tasks. If `gpt-5.5` is not yet available,

112ChatGPT Pro subscribers have access to the GPT-5.3-Codex-Spark model in114continue using `gpt-5.4`. For extra fast tasks, ChatGPT Pro subscribers have

113research preview.115access to the GPT-5.3-Codex-Spark model in research preview.

114 116 

115Switch models mid-session with the `/model` command, or specify one when launching the CLI.117Switch models mid-session with the `/model` command, or specify one when launching the CLI.

116 118 

117```bash119```bash

118codex --model gpt-5.4120codex --model gpt-5.5

119```121```

120 122 

121[Learn more about the models available in Codex](https://developers.openai.com/codex/models).123[Learn more about the models available in Codex](https://developers.openai.com/codex/models).


160 162 

161You can ask in natural language or explicitly invoke the image generation skill by including `$imagegen` in your prompt.163You can ask in natural language or explicitly invoke the image generation skill by including `$imagegen` in your prompt.

162 164 

163Built-in image generation uses `gpt-image-1.5`, counts toward your general Codex usage limits, and uses included limits 3-5x faster on average than similar turns without image generation, depending on image quality and size. For details, see [Pricing](https://developers.openai.com/codex/pricing#image-generation-usage-limits). For prompting tips and model details, see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation).165Built-in image generation uses `gpt-image-2`, counts toward your general Codex usage limits, and uses included limits 3-5x faster on average than similar turns without image generation, depending on image quality and size. For details, see [Pricing](https://developers.openai.com/codex/pricing#image-generation-usage-limits). For prompting tips and model details, see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation).

164 166 

165For larger batches of image generation, set `OPENAI_API_KEY` in your environment variables and ask Codex to generate images through the API so API pricing applies instead.167For larger batches of image generation, set `OPENAI_API_KEY` in your environment variables and ask Codex to generate images through the API so API pricing applies instead.

166 168 


252 254 

253## Slash commands255## Slash commands

254 256 

255Slash commands give you quick access to specialized workflows like `/review`, `/fork`, or your own reusable prompts. Codex ships with a curated set of built-ins, and you can create custom ones for team-specific tasks or personal shortcuts.257Slash commands give you quick access to specialized workflows like `/review`, `/fork`, `/side`, or your own reusable prompts. Codex ships with a curated set of built-ins, and you can create custom ones for team-specific tasks or personal shortcuts.

256 258 

257See the [slash commands guide](https://developers.openai.com/codex/guides/slash-commands) to browse the catalog of built-ins, learn how to author custom commands, and understand where they live on disk.259See the [slash commands guide](https://developers.openai.com/codex/guides/slash-commands) to browse the catalog of built-ins, learn how to author custom commands, and understand where they live on disk.

258 260 


271## Tips and shortcuts273## Tips and shortcuts

272 274 

273- 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.275- 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.

274- Press `Enter` while Codex is running to inject new instructions into the current turn, or press `Tab` to queue a follow-up prompt for the next turn.276- 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.

275- 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.277- 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.

276- 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.278- 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.

277- 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.279- 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.

cli/reference.md +304 −33

Details

20| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Run every command without approvals or sandboxing. Only use inside an externally hardened environment. |20| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Run every command without approvals or sandboxing. Only use inside an externally hardened environment. |

21| `--disable` | `feature` | Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable. |21| `--disable` | `feature` | Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable. |

22| `--enable` | `feature` | Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable. |22| `--enable` | `feature` | Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable. |

23| `--full-auto` | `boolean` | Shortcut for low-friction local work: sets `--ask-for-approval on-request` and `--sandbox workspace-write`. |

24| `--image, -i` | `path[,path...]` | Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag. |23| `--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`). |24| `--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). |25| `--no-alt-screen` | `boolean` | Disable alternate screen mode for the TUI (overrides `tui.alternate_screen` for this run). |


118 117 

119Key118Key

120 119 

121`--full-auto`

122 

123Type / Values

124 

125`boolean`

126 

127Details

128 

129Shortcut for low-friction local work: sets `--ask-for-approval on-request` and `--sandbox workspace-write`.

130 

131Key

132 

133`--image, -i`120`--image, -i`

134 121 

135Type / Values122Type / Values


262| Key | Maturity | Details |249| Key | Maturity | Details |

263| --- | --- | --- |250| --- | --- | --- |

264| [`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. |251| [`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. |

265| [`codex app`](https://developers.openai.com/codex/cli/reference#codex-app) | Stable | Launch the Codex desktop app on macOS, optionally opening a specific workspace path. |252| [`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. |

266| [`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server) | Experimental | Launch the Codex app server for local development or debugging. |253| [`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server) | Experimental | Launch the Codex app server for local development or debugging. |

267| [`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`. |254| [`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`. |

268| [`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`. |255| [`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`. |

269| [`codex completion`](https://developers.openai.com/codex/cli/reference#codex-completion) | Stable | Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell. |256| [`codex completion`](https://developers.openai.com/codex/cli/reference#codex-completion) | Stable | Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell. |

270| [`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. |257| [`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. |

258| [`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. |

271| [`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. |259| [`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. |

272| [`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. |260| [`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. |

273| [`codex features`](https://developers.openai.com/codex/cli/reference#codex-features) | Stable | List feature flags and persistently enable or disable them in `config.toml`. |261| [`codex features`](https://developers.openai.com/codex/cli/reference#codex-features) | Stable | List feature flags and persistently enable or disable them in `config.toml`. |


276| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. |264| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. |

277| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). |265| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). |

278| [`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. |266| [`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. |

267| [`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace) | Experimental | Add, upgrade, or remove plugin marketplaces from Git or local sources. |

279| [`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. |268| [`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. |

280| [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS seatbelt or Linux bubblewrap sandboxes. |269| [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes. |

270| [`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. |

281 271 

282Key272Key

283 273 


301 291 

302Details292Details

303 293 

304Launch the Codex desktop app on macOS, optionally opening a specific workspace path.294Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open.

305 295 

306Key296Key

307 297 


365 355 

366Key356Key

367 357 

358[`codex debug models`](https://developers.openai.com/codex/cli/reference#codex-debug-models)

359 

360Maturity

361 

362Experimental

363 

364Details

365 

366Print the raw model catalog Codex sees, including an option to inspect only the bundled catalog.

367 

368Key

369 

368[`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec)370[`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec)

369 371 

370Maturity372Maturity


461 463 

462Key464Key

463 465 

466[`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace)

467 

468Maturity

469 

470Experimental

471 

472Details

473 

474Add, upgrade, or remove plugin marketplaces from Git or local sources.

475 

476Key

477 

464[`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume)478[`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume)

465 479 

466Maturity480Maturity


481 495 

482Details496Details

483 497 

484Run arbitrary commands inside Codex-provided macOS seatbelt or Linux bubblewrap sandboxes.498Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes.

499 

500Key

501 

502[`codex update`](https://developers.openai.com/codex/cli/reference#codex-update)

503 

504Maturity

505 

506Stable

507 

508Details

509 

510Check for and apply a Codex CLI update when the installed release supports self-update.

485 511 

486Expand to view all512Expand to view all

487 513 


489 515 

490### `codex` (interactive)516### `codex` (interactive)

491 517 

492Running `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 and `--full-auto` to let Codex run most commands without prompts.518Running `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`.

493 519 

494Use `--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`. Add `--remote-auth-token-env <ENV_VAR>` when the server requires a bearer token for WebSocket authentication. See [Codex CLI features](https://developers.openai.com/codex/cli/features#connect-the-tui-to-a-remote-app-server) for setup examples and authentication guidance.520Use `--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`. Add `--remote-auth-token-env <ENV_VAR>` when the server requires a bearer token for WebSocket authentication. See [Codex CLI features](https://developers.openai.com/codex/cli/features#connect-the-tui-to-a-remote-app-server) for setup examples and authentication guidance.

495 521 


595 621 

596### `codex app`622### `codex app`

597 623 

598Launch Codex Desktop from the terminal on macOS and optionally open a specific workspace path.624Launch 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.

599 625 

600| Key | Type / Values | Details |626| Key | Type / Values | Details |

601| --- | --- | --- |627| --- | --- | --- |

602| `--download-url` | `url` | Advanced override for the Codex desktop DMG download URL used during install. |628| `--download-url` | `url` | Advanced override for the Codex desktop installer URL used during install. |

603| `PATH` | `path` | Workspace path to open in Codex Desktop (`codex app` is available on macOS only). |629| `PATH` | `path` | Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path. |

604 630 

605Key631Key

606 632 


612 638 

613Details639Details

614 640 

615Advanced override for the Codex desktop DMG download URL used during install.641Advanced override for the Codex desktop installer URL used during install.

616 642 

617Key643Key

618 644 


624 650 

625Details651Details

626 652 

627Workspace path to open in Codex Desktop (`codex app` is available on macOS only).653Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path.

628 654 

629`codex app` installs/opens the desktop app on macOS, then opens the provided workspace path. This subcommand is macOS-only.655`codex app` opens an installed Codex Desktop app, or starts the installer when

656the app is missing. On macOS, Codex opens the provided workspace path; on

657Windows, it prints the path to open after installation.

630 658 

631### `codex debug app-server send-message-v2`659### `codex debug app-server send-message-v2`

632 660 


650 678 

651This 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.679This 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.

652 680 

681### `codex debug models`

682 

683Print the raw model catalog Codex sees as JSON.

684 

685| Key | Type / Values | Details |

686| --- | --- | --- |

687| `--bundled` | `boolean` | Skip refresh and print only the model catalog bundled with the current Codex binary. |

688 

689Key

690 

691`--bundled`

692 

693Type / Values

694 

695`boolean`

696 

697Details

698 

699Skip refresh and print only the model catalog bundled with the current Codex binary.

700 

701Use `--bundled` when you want to inspect only the catalog bundled with the current binary, without refreshing from the remote models endpoint.

702 

653### `codex apply`703### `codex apply`

654 704 

655Apply the most recent diff from a Codex cloud task to your local repository. You must authenticate and have access to the task.705Apply the most recent diff from a Codex cloud task to your local repository. You must authenticate and have access to the task.


857| `--color` | `always | never | auto` | Control ANSI color in stdout. |907| `--color` | `always | never | auto` | Control ANSI color in stdout. |

858| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner. |908| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner. |

859| `--ephemeral` | `boolean` | Run without persisting session rollout files to disk. |909| `--ephemeral` | `boolean` | Run without persisting session rollout files to disk. |

860| `--full-auto` | `boolean` | Apply the low-friction automation preset (`workspace-write` sandbox and `on-request` approvals). |910| `--full-auto` | `boolean` | Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used. |

911| `--ignore-rules` | `boolean` | Do not load user or project execpolicy `.rules` files for this run. |

912| `--ignore-user-config` | `boolean` | Do not load `$CODEX_HOME/config.toml`. Authentication still uses `CODEX_HOME`. |

861| `--image, -i` | `path[,path...]` | Attach images to the first message. Repeatable; supports comma-separated lists. |913| `--image, -i` | `path[,path...]` | Attach images to the first message. Repeatable; supports comma-separated lists. |

862| `--json, --experimental-json` | `boolean` | Print newline-delimited JSON events instead of formatted text. |914| `--json, --experimental-json` | `boolean` | Print newline-delimited JSON events instead of formatted text. |

863| `--model, -m` | `string` | Override the configured model for this run. |915| `--model, -m` | `string` | Override the configured model for this run. |


929 981 

930Details982Details

931 983 

932Apply the low-friction automation preset (`workspace-write` sandbox and `on-request` approvals).984Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used.

985 

986Key

987 

988`--ignore-rules`

989 

990Type / Values

991 

992`boolean`

993 

994Details

995 

996Do not load user or project execpolicy `.rules` files for this run.

997 

998Key

999 

1000`--ignore-user-config`

1001 

1002Type / Values

1003 

1004`boolean`

1005 

1006Details

1007 

1008Do not load `$CODEX_HOME/config.toml`. Authentication still uses `CODEX_HOME`.

933 1009 

934Key1010Key

935 1011 


1381 1457 

1382OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).1458OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).

1383 1459 

1460### `codex plugin marketplace`

1461 

1462Manage plugin marketplace sources that Codex can browse and install from.

1463 

1464| Key | Type / Values | Details |

1465| --- | --- | --- |

1466| `add <source>` | `[--ref REF] [--sparse PATH]` | 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. |

1467| `remove <marketplace-name>` | | Remove a configured plugin marketplace. |

1468| `upgrade [marketplace-name]` | | Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided. |

1469 

1470Key

1471 

1472`add <source>`

1473 

1474Type / Values

1475 

1476`[--ref REF] [--sparse PATH]`

1477 

1478Details

1479 

1480Install 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.

1481 

1482Key

1483 

1484`remove <marketplace-name>`

1485 

1486Details

1487 

1488Remove a configured plugin marketplace.

1489 

1490Key

1491 

1492`upgrade [marketplace-name]`

1493 

1494Details

1495 

1496Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided.

1497 

1498`codex plugin marketplace add` accepts GitHub shorthand such as `owner/repo` or

1499`owner/repo@ref`, HTTP or HTTPS Git URLs, SSH Git URLs, and local marketplace

1500root directories. Use `--ref` to pin a Git ref, and repeat `--sparse PATH` to

1501use a sparse checkout for Git-backed marketplace repositories.

1502 

1384### `codex mcp-server`1503### `codex mcp-server`

1385 1504 

1386Run Codex as an MCP server over stdio so that other tools can connect. This command inherits global configuration overrides and exits when the downstream client closes the connection.1505Run Codex as an MCP server over stdio so that other tools can connect. This command inherits global configuration overrides and exits when the downstream client closes the connection.


1485 1604 

1486| Key | Type / Values | Details |1605| Key | Type / Values | Details |

1487| --- | --- | --- |1606| --- | --- | --- |

1607| `--allow-unix-socket` | `path` | Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths. |

1608| `--cd, -C` | `DIR` | Working directory used for profile resolution and command execution. Requires `--permissions-profile`. |

1488| `--config, -c` | `key=value` | Pass configuration overrides into the sandboxed run (repeatable). |1609| `--config, -c` | `key=value` | Pass configuration overrides into the sandboxed run (repeatable). |

1489| `--full-auto` | `boolean` | Grant write access to the current workspace and `/tmp` without approvals. |1610| `--include-managed-config` | `boolean` | Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`. |

1611| `--log-denials` | `boolean` | Capture macOS sandbox denials with `log stream` while the command runs and print them after exit. |

1612| `--permissions-profile` | `NAME` | Apply a named permissions profile from the active configuration stack. |

1490| `COMMAND...` | `var-args` | Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded. |1613| `COMMAND...` | `var-args` | Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded. |

1491 1614 

1492Key1615Key

1493 1616 

1617`--allow-unix-socket`

1618 

1619Type / Values

1620 

1621`path`

1622 

1623Details

1624 

1625Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths.

1626 

1627Key

1628 

1629`--cd, -C`

1630 

1631Type / Values

1632 

1633`DIR`

1634 

1635Details

1636 

1637Working directory used for profile resolution and command execution. Requires `--permissions-profile`.

1638 

1639Key

1640 

1494`--config, -c`1641`--config, -c`

1495 1642 

1496Type / Values1643Type / Values


1503 1650 

1504Key1651Key

1505 1652 

1506`--full-auto`1653`--include-managed-config`

1654 

1655Type / Values

1656 

1657`boolean`

1658 

1659Details

1660 

1661Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.

1662 

1663Key

1664 

1665`--log-denials`

1507 1666 

1508Type / Values1667Type / Values

1509 1668 


1511 1670 

1512Details1671Details

1513 1672 

1514Grant write access to the current workspace and `/tmp` without approvals.1673Capture macOS sandbox denials with `log stream` while the command runs and print them after exit.

1674 

1675Key

1676 

1677`--permissions-profile`

1678 

1679Type / Values

1680 

1681`NAME`

1682 

1683Details

1684 

1685Apply a named permissions profile from the active configuration stack.

1515 1686 

1516Key1687Key

1517 1688 


1529 1700 

1530| Key | Type / Values | Details |1701| Key | Type / Values | Details |

1531| --- | --- | --- |1702| --- | --- | --- |

1703| `--cd, -C` | `DIR` | Working directory used for profile resolution and command execution. Requires `--permissions-profile`. |

1532| `--config, -c` | `key=value` | Configuration overrides applied before launching the sandbox (repeatable). |1704| `--config, -c` | `key=value` | Configuration overrides applied before launching the sandbox (repeatable). |

1533| `--full-auto` | `boolean` | Grant write access to the current workspace and `/tmp` inside the Landlock sandbox. |1705| `--include-managed-config` | `boolean` | Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`. |

1706| `--permissions-profile` | `NAME` | Apply a named permissions profile from the active configuration stack. |

1534| `COMMAND...` | `var-args` | Command to execute under Landlock + seccomp. Provide the executable after `--`. |1707| `COMMAND...` | `var-args` | Command to execute under Landlock + seccomp. Provide the executable after `--`. |

1535 1708 

1536Key1709Key

1537 1710 

1711`--cd, -C`

1712 

1713Type / Values

1714 

1715`DIR`

1716 

1717Details

1718 

1719Working directory used for profile resolution and command execution. Requires `--permissions-profile`.

1720 

1721Key

1722 

1538`--config, -c`1723`--config, -c`

1539 1724 

1540Type / Values1725Type / Values


1547 1732 

1548Key1733Key

1549 1734 

1550`--full-auto`1735`--include-managed-config`

1551 1736 

1552Type / Values1737Type / Values

1553 1738 


1555 1740 

1556Details1741Details

1557 1742 

1558Grant write access to the current workspace and `/tmp` inside the Landlock sandbox.1743Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.

1744 

1745Key

1746 

1747`--permissions-profile`

1748 

1749Type / Values

1750 

1751`NAME`

1752 

1753Details

1754 

1755Apply a named permissions profile from the active configuration stack.

1559 1756 

1560Key1757Key

1561 1758 


1569 1766 

1570Command to execute under Landlock + seccomp. Provide the executable after `--`.1767Command to execute under Landlock + seccomp. Provide the executable after `--`.

1571 1768 

1769#### Windows

1770 

1771| Key | Type / Values | Details |

1772| --- | --- | --- |

1773| `--cd, -C` | `DIR` | Working directory used for profile resolution and command execution. Requires `--permissions-profile`. |

1774| `--config, -c` | `key=value` | Configuration overrides applied before launching the sandbox (repeatable). |

1775| `--include-managed-config` | `boolean` | Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`. |

1776| `--permissions-profile` | `NAME` | Apply a named permissions profile from the active configuration stack. |

1777| `COMMAND...` | `var-args` | Command to execute under the native Windows sandbox. Provide the executable after `--`. |

1778 

1779Key

1780 

1781`--cd, -C`

1782 

1783Type / Values

1784 

1785`DIR`

1786 

1787Details

1788 

1789Working directory used for profile resolution and command execution. Requires `--permissions-profile`.

1790 

1791Key

1792 

1793`--config, -c`

1794 

1795Type / Values

1796 

1797`key=value`

1798 

1799Details

1800 

1801Configuration overrides applied before launching the sandbox (repeatable).

1802 

1803Key

1804 

1805`--include-managed-config`

1806 

1807Type / Values

1808 

1809`boolean`

1810 

1811Details

1812 

1813Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.

1814 

1815Key

1816 

1817`--permissions-profile`

1818 

1819Type / Values

1820 

1821`NAME`

1822 

1823Details

1824 

1825Apply a named permissions profile from the active configuration stack.

1826 

1827Key

1828 

1829`COMMAND...`

1830 

1831Type / Values

1832 

1833`var-args`

1834 

1835Details

1836 

1837Command to execute under the native Windows sandbox. Provide the executable after `--`.

1838 

1839### `codex update`

1840 

1841Check for and apply a Codex CLI update when the installed release supports self-update. Debug builds print a message telling you to install a release build instead.

1842 

1572## Flag combinations and safety tips1843## Flag combinations and safety tips

1573 1844 

1574- Set `--full-auto` for unattended local work, but avoid combining it with `--dangerously-bypass-approvals-and-sandbox` unless you are inside a dedicated sandbox VM.1845- Use `--sandbox workspace-write` for unattended local work that can stay inside the workspace, and avoid `--dangerously-bypass-approvals-and-sandbox` unless you are inside a dedicated sandbox VM.

1575- When you need to grant Codex write access to more directories, prefer `--add-dir` rather than forcing `--sandbox danger-full-access`.1846- When you need to grant Codex write access to more directories, prefer `--add-dir` rather than forcing `--sandbox danger-full-access`.

1576- Pair `--json` with `--output-last-message` in CI to capture machine-readable progress and a final natural-language summary.1847- Pair `--json` with `--output-last-message` in CI to capture machine-readable progress and a final natural-language summary.

1577 1848 

Details

16Codex ships with the following commands. Open the slash popup and start typing16Codex ships with the following commands. Open the slash popup and start typing

17the command name to filter the list.17the command name to filter the list.

18 18 

19When a task is already running, you can type a slash command and press `Tab` to

20queue it for the next turn. Codex parses queued slash commands when they run, so

21command menus and errors appear after the current turn finishes. Slash

22completion still works before you queue the command.

23 

19| Command | Purpose | When to use it |24| Command | Purpose | When to use it |

20| ------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |25| ------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |

21| [`/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. |


25| [`/plugins`](#browse-plugins-with-plugins) | Browse installed and discoverable plugins. | Inspect plugin tools, install suggested plugins, or manage plugin availability. |30| [`/plugins`](#browse-plugins-with-plugins) | Browse installed and discoverable plugins. | Inspect plugin tools, install suggested plugins, or manage plugin availability. |

26| [`/clear`](#clear-the-terminal-and-start-a-new-chat-with-clear) | Clear the terminal and start a fresh chat. | Reset the visible UI and conversation together when you want a fresh start. |31| [`/clear`](#clear-the-terminal-and-start-a-new-chat-with-clear) | Clear the terminal and start a fresh chat. | Reset the visible UI and conversation together when you want a fresh start. |

27| [`/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. |32| [`/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. |

28| [`/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. |33| [`/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`. |

29| [`/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. |34| [`/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. |

30| [`/exit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI (same as `/quit`). | Alternative spelling; both commands exit the session. |35| [`/exit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI (same as `/quit`). | Alternative spelling; both commands exit the session. |

31| [`/experimental`](#toggle-experimental-features-with-experimental) | Toggle experimental features. | Enable optional features such as subagents from the CLI. |36| [`/experimental`](#toggle-experimental-features-with-experimental) | Toggle experimental features. | Enable optional features such as subagents from the CLI. |

32| [`/feedback`](#send-feedback-with-feedback) | Send logs to the Codex maintainers. | Report issues or share diagnostics with support. |37| [`/feedback`](#send-feedback-with-feedback) | Send logs to the Codex maintainers. | Report issues or share diagnostics with support. |

33| [`/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. |38| [`/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. |

34| [`/logout`](#sign-out-with-logout) | Sign out of Codex. | Clear local credentials when using a shared machine. |39| [`/logout`](#sign-out-with-logout) | Sign out of Codex. | Clear local credentials when using a shared machine. |

35| [`/mcp`](#list-mcp-tools-with-mcp) | List configured Model Context Protocol (MCP) tools. | Check which external tools Codex can call during the session. |40| [`/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. |

36| [`/mention`](#highlight-files-with-mention) | Attach a file to the conversation. | Point Codex at specific files or folders you want it to inspect next. |41| [`/mention`](#highlight-files-with-mention) | Attach a file to the conversation. | Point Codex at specific files or folders you want it to inspect next. |

37| [`/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. |42| [`/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. |

38| [`/fast`](#toggle-fast-mode-with-fast) | Toggle Fast mode for GPT-5.4. | Turn Fast mode on or off, or check whether the current thread is using it. |43| [`/fast`](#toggle-fast-mode-with-fast) | Toggle Fast mode for supported models. | Turn Fast mode on or off, or check whether the current thread is using it. |

39| [`/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. |44| [`/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. |

40| [`/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. |45| [`/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. |

41| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |46| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |

42| [`/stop`](#stop-background-terminals-with-stop) | Stop all background terminals. | Cancel background terminal work started by the current session. |47| [`/stop`](#stop-background-terminals-with-stop) | Stop all background terminals. | Cancel background terminal work started by the current session. |

43| [`/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. |48| [`/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. |

49| [`/side`](#start-a-side-conversation-with-side) | Start an ephemeral side conversation. | Ask a focused follow-up without disrupting the main thread's transcript. |

44| [`/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. |50| [`/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. |

45| [`/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. |51| [`/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. |

46| [`/quit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI. | Leave the session immediately. |52| [`/quit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI. | Leave the session immediately. |


49| [`/debug-config`](#inspect-config-layers-with-debug-config) | Print config layer and requirements diagnostics. | Debug precedence and policy requirements, including experimental network constraints. |55| [`/debug-config`](#inspect-config-layers-with-debug-config) | Print config layer and requirements diagnostics. | Debug precedence and policy requirements, including experimental network constraints. |

50| [`/statusline`](#configure-footer-items-with-statusline) | Configure TUI status-line fields interactively. | Pick and reorder footer items (model/context/limits/git/tokens/session) and persist in config.toml. |56| [`/statusline`](#configure-footer-items-with-statusline) | Configure TUI status-line fields interactively. | Pick and reorder footer items (model/context/limits/git/tokens/session) and persist in config.toml. |

51| [`/title`](#configure-terminal-title-items-with-title) | Configure terminal window or tab title fields interactively. | Pick and reorder title items such as project, status, thread, branch, model, and task progress. |57| [`/title`](#configure-terminal-title-items-with-title) | Configure terminal window or tab title fields interactively. | Pick and reorder title items such as project, status, thread, branch, model, and task progress. |

58| [`/keymap`](#remap-tui-shortcuts-with-keymap) | Remap TUI keyboard shortcuts. | Inspect and persist custom shortcut bindings in `config.toml`. |

52 59 

53`/quit` and `/exit` both exit the CLI. Use them only after you have saved or60`/quit` and `/exit` both exit the CLI. Use them only after you have saved or

54committed any important work.61committed any important work.


138the in-progress response. The command is unavailable before the first completed145the in-progress response. The command is unavailable before the first completed

139Codex output and immediately after a rollback.146Codex output and immediately after a rollback.

140 147 

148You can also press <kbd>Ctrl</kbd>+<kbd>O</kbd> from the main TUI to copy the

149latest completed response without opening the slash command menu.

150 

141### Grant sandbox read access with `/sandbox-add-read-dir`151### Grant sandbox read access with `/sandbox-add-read-dir`

142 152 

143This command is available only when running the CLI natively on Windows.153This command is available only when running the CLI natively on Windows.


191Available title items include app name, project, spinner, status, thread, git201Available title items include app name, project, spinner, status, thread, git

192branch, model, and task progress.202branch, model, and task progress.

193 203 

204### Remap TUI shortcuts with `/keymap`

205 

206Use `/keymap` to inspect, update, and persist keyboard shortcut bindings for the TUI.

207 

2081. Type `/keymap`.

2092. Pick the shortcut context and action you want to change.

2103. Enter the new binding or remove the existing one.

211 

212Expected: Codex updates the active keymap and writes the custom binding to `tui.keymap` in `config.toml`.

213 

214Key bindings use names such as `ctrl-a`, `shift-enter`, and `page-down`. Context-specific bindings override `tui.keymap.global`; an empty binding list unbinds the action.

215 

194### Check background terminals with `/ps`216### Check background terminals with `/ps`

195 217 

1961. Type `/ps`.2181. Type `/ps`.


260If you need to fork a saved session instead of the current one, run282If you need to fork a saved session instead of the current one, run

261`codex fork` in your terminal to open the session picker.283`codex fork` in your terminal to open the session picker.

262 284 

285### Start a side conversation with `/side`

286 

287Use `/side` to start an ephemeral fork from the current conversation without switching away from the main task.

288 

2891. Type `/side` to open a side conversation.

2902. Optionally add inline text, for example `/side Check whether this plan has an obvious risk`.

2913. Return to the parent thread after the focused detour finishes.

292 

293Expected: Codex opens a side conversation whose transcript is separate from the parent thread. While you are in side mode, the TUI continues to show parent-thread status so you can see whether the main task is still running.

294 

295`/side` is unavailable inside another side conversation and during review mode.

296 

263### Generate `AGENTS.md` with `/init`297### Generate `AGENTS.md` with `/init`

264 298 

2651. Run `/init` in the directory where you want Codex to look for persistent instructions.2991. Run `/init` in the directory where you want Codex to look for persistent instructions.


284 318 

285Expected: You see the configured Model Context Protocol (MCP) tools Codex can call in this session.319Expected: You see the configured Model Context Protocol (MCP) tools Codex can call in this session.

286 320 

321Use `/mcp verbose` to include detailed server diagnostics. If you pass anything other than `verbose`, Codex shows the command usage.

322 

287### Browse apps with `/apps`323### Browse apps with `/apps`

288 324 

2891. Type `/apps`.3251. Type `/apps`.


295### Browse plugins with `/plugins`331### Browse plugins with `/plugins`

296 332 

2971. Type `/plugins`.3331. Type `/plugins`.

2982. Pick a plugin from the list to inspect its capabilities or available actions.3342. Choose a marketplace tab, then pick a plugin to inspect its capabilities or available actions.

299 335 

300Expected: Codex opens the plugin browser so you can review installed plugins and336Expected: Codex opens the plugin browser so you can review installed plugins,

301discoverable plugins that your configuration allows.337discoverable plugins that your configuration allows, and installed plugin state.

338Press <kbd>Space</kbd> on an installed plugin to toggle its enabled state.

302 339 

303### Switch agent threads with `/agent`340### Switch agent threads with `/agent`

304 341 

Details

67 67 

68Codex surfaces a startup warning when `bwrap` is missing or when the helper68Codex surfaces a startup warning when `bwrap` is missing or when the helper

69can't create the needed user namespace. On distributions that restrict this69can't create the needed user namespace. On distributions that restrict this

70AppArmor setting, you can enable it with:70AppArmor setting, prefer loading the `bwrap` AppArmor profile so `bwrap` can

71keep working without disabling the restriction globally.

72 

73**Ubuntu AppArmor note:** On Ubuntu 25.04, installing `bubblewrap` from

74 Ubuntu's package repository should work without extra AppArmor setup. The

75 `bwrap-userns-restrict` profile ships in the `apparmor` package at

76 `/etc/apparmor.d/bwrap-userns-restrict`.

77 

78On 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:

80 

81```bash

82sudo apt update

83sudo apt install apparmor-profiles apparmor-utils

84sudo install -m 0644 \

85 /usr/share/apparmor/extra-profiles/bwrap-userns-restrict \

86 /etc/apparmor.d/bwrap-userns-restrict

87sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict

88```

89 

90`apparmor_parser -r` loads the profile into the kernel without a reboot. You

91can also reload all AppArmor profiles:

92 

93```bash

94sudo systemctl reload apparmor.service

95```

96 

97If that profile is unavailable or does not resolve the issue, you can disable

98the AppArmor unprivileged user namespace restriction with:

71 99 

72```bash100```bash

73sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0101sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0


117- `never`: Codex doesn't stop for approval prompts.145- `never`: Codex doesn't stop for approval prompts.

118 146 

119Full access means using `sandbox_mode = "danger-full-access"` together with147Full access means using `sandbox_mode = "danger-full-access"` together with

120`approval_policy = "never"`. By contrast, `--full-auto` is the lower-risk local148`approval_policy = "never"`. By contrast, the lower-risk local automation

121automation preset: `sandbox_mode = "workspace-write"` and149preset is `sandbox_mode = "workspace-write"` together with

122`approval_policy = "on-request"`.150`approval_policy = "on-request"`, or the matching CLI flags

151`--sandbox workspace-write --ask-for-approval on-request`.

123 152 

124If you need Codex to work across more than one directory, writable roots let153If you need Codex to work across more than one directory, writable roots let

125you extend the places it can modify without removing the sandbox entirely. If154you extend the places it can modify without removing the sandbox entirely. If


131Managed network profiles use map tables such as160Managed network profiles use map tables such as

132`[permissions.<name>.network.domains]` and161`[permissions.<name>.network.domains]` and

133`[permissions.<name>.network.unix_sockets]` for domain and socket rules.162`[permissions.<name>.network.unix_sockets]` for domain and socket rules.

163Filesystem profiles can also deny reads for exact paths or glob patterns by

164setting matching entries to `"none"`; use this to keep files such as local

165secrets unreadable without turning off workspace writes.

134 166 

135When a workflow needs a specific exception, use [rules](https://developers.openai.com/codex/rules). Rules167When a workflow needs a specific exception, use [rules](https://developers.openai.com/codex/rules). Rules

136let you allow, prompt, or forbid command prefixes outside the sandbox, which is168let you allow, prompt, or forbid command prefixes outside the sandbox, which is


139[Codex app features](https://developers.openai.com/codex/app/features#approvals-and-sandboxing), and for the171[Codex app features](https://developers.openai.com/codex/app/features#approvals-and-sandboxing), and for the

140IDE-specific settings entry points, see [Codex IDE extension settings](https://developers.openai.com/codex/ide/settings).172IDE-specific settings entry points, see [Codex IDE extension settings](https://developers.openai.com/codex/ide/settings).

141 173 

174Automatic review, when available, doesn't change the sandbox boundary. It

175reviews approval requests, such as sandbox escalations or network access, while

176actions already allowed inside the sandbox run without extra review. See

177[Automatic approval reviews](https://developers.openai.com/codex/agent-approvals-security#automatic-approval-reviews)

178for the policy behavior.

179 

142Platform details live in the platform-specific docs. For native Windows setup,180Platform details live in the platform-specific docs. For native Windows setup,

143behavior, and troubleshooting, see [Windows](https://developers.openai.com/codex/windows). For admin181behavior, and troubleshooting, see [Windows](https://developers.openai.com/codex/windows). For admin

144requirements and organization-level constraints on sandboxing and approvals, see182requirements and organization-level constraints on sandboxing and approvals, see

Details

65 65 

66If you don't 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 favor67that balances intelligence, speed, and price for the task. It may favor

68`gpt-5.4-mini` for fast scans or a higher-effort `gpt-5.4`68`gpt-5.4-mini` for fast scans or a higher-effort `gpt-5.5` configuration for

69configuration for more demanding reasoning. When you want finer control, steer that69more demanding reasoning when that model is available. When you want finer

70choice in your prompt or set `model` and `model_reasoning_effort` directly in70control, steer that choice in your prompt or set `model` and

71the agent file.71`model_reasoning_effort` directly in the agent file.

72 72 

73For most tasks in Codex, start with `gpt-5.4`. Use `gpt-5.4-mini` when you73For most tasks in Codex, start with `gpt-5.5` when it is available. Continue

74want a faster, lower-cost option for lighter subagent work. If you have74 using `gpt-5.4` during the rollout if `gpt-5.5` is not yet available. Use

75ChatGPT Pro and want near-instant text-only iteration, `gpt-5.3-codex-spark`75 `gpt-5.4-mini` when you want a faster, lower-cost option for lighter subagent

76remains available in research preview.76 work. If you have ChatGPT Pro and want near-instant text-only iteration,

77 `gpt-5.3-codex-spark` remains available in research preview.

77 78 

78### Model choice79### Model choice

79 80 

80- **`gpt-5.4`**: Start here for most agents. It combines strong coding, reasoning, tool use, and broader workflows. The main agent and agents that coordinate ambiguous or multi-step work fit here.81- **`gpt-5.5`**: Start here for demanding agents when it is available. It is strongest for ambiguous, multi-step work that needs planning, tool use, validation, and follow-through across a larger context.

82- **`gpt-5.4`**: Use this when `gpt-5.5` is not yet available or when a workflow is pinned to GPT-5.4. It combines strong coding, reasoning, tool use, and broader workflows.

81- **`gpt-5.4-mini`**: Use for agents that favor speed and efficiency over depth, such as exploration, read-heavy scans, large-file review, or processing supporting documents. It works well for parallel workers that return distilled results to the main agent.83- **`gpt-5.4-mini`**: Use for agents that favor speed and efficiency over depth, such as exploration, read-heavy scans, large-file review, or processing supporting documents. It works well for parallel workers that return distilled results to the main agent.

82- **`gpt-5.3-codex-spark`**: If you have ChatGPT Pro, use this research preview model for near-instant, text-only iteration when latency matters more than broader capability.84- **`gpt-5.3-codex-spark`**: If you have ChatGPT Pro, use this research preview model for near-instant, text-only iteration when latency matters more than broader capability.

83 85 

config-advanced.md +213 −22

Details

84 84 

85In addition to your user config, Codex reads project-scoped overrides from `.codex/config.toml` files inside your repo. Codex walks from the project root to your current working directory and loads every `.codex/config.toml` it finds. If multiple files define the same key, the closest file to your working directory wins.85In addition to your user config, Codex reads project-scoped overrides from `.codex/config.toml` files inside your repo. Codex walks from the project root to your current working directory and loads every `.codex/config.toml` it finds. If multiple files define the same key, the closest file to your working directory wins.

86 86 

87For security, Codex loads project-scoped config files only when the project is trusted. If the project is untrusted, Codex ignores `.codex/config.toml` files in the project.87For security, Codex loads project-scoped config files only when the project is trusted. If the project is untrusted, Codex ignores project `.codex/` layers, including `.codex/config.toml`, project-local hooks, and project-local rules. User and system layers remain separate and still load.

88 88 

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

90 90 

91## Hooks (experimental)91## Hooks (experimental)

92 92 

93Codex can also load lifecycle hooks from `hooks.json` files that sit next to93Codex can also load lifecycle hooks from either `hooks.json` files or inline

94active config layers.94`[hooks]` tables in `config.toml` files that sit next to active config layers.

95 95 

96In practice, the two most useful locations are:96In practice, the two most useful locations are:

97 97 

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

99- `~/.codex/config.toml`

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

101- `<repo>/.codex/config.toml`

102 

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

104User-level hooks remain independent of project trust.

100 105 

101Turn hooks on with:106Turn hooks on with:

102 107 


105codex_hooks = true110codex_hooks = true

106```111```

107 112 

113Inline TOML hooks use the same event structure as `hooks.json`:

114 

115```toml

116[[hooks.PreToolUse]]

117matcher = "^Bash$"

118 

119[[hooks.PreToolUse.hooks]]

120type = "command"

121command = '/usr/bin/python3 "$(git rev-parse --show-toplevel)/.codex/hooks/pre_tool_use_policy.py"'

122timeout = 30

123statusMessage = "Checking Bash command"

124```

125 

126If a single layer contains both `hooks.json` and inline `[hooks]`, Codex loads

127both and warns. Prefer one representation per layer.

128 

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

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

110 131 


175 196 

176The auth command receives no `stdin` and must print the token to stdout. Codex trims surrounding whitespace, treats an empty token as an error, and refreshes proactively at `refresh_interval_ms`; set `refresh_interval_ms = 0` to refresh only after an authentication retry. Don't combine `[model_providers.<id>.auth]` with `env_key`, `experimental_bearer_token`, or `requires_openai_auth`.197The auth command receives no `stdin` and must print the token to stdout. Codex trims surrounding whitespace, treats an empty token as an error, and refreshes proactively at `refresh_interval_ms`; set `refresh_interval_ms = 0` to refresh only after an authentication retry. Don't combine `[model_providers.<id>.auth]` with `env_key`, `experimental_bearer_token`, or `requires_openai_auth`.

177 198 

199### Amazon Bedrock provider

200 

201Codex includes a built-in `amazon-bedrock` model provider. Set it directly as

202`model_provider`; unlike custom providers, this built-in provider supports only

203the nested AWS profile and region overrides.

204 

205```toml

206model_provider = "amazon-bedrock"

207model = "<bedrock-model-id>"

208 

209[model_providers.amazon-bedrock.aws]

210profile = "default"

211region = "eu-central-1"

212```

213 

214If you omit `profile`, Codex uses the standard AWS credential chain. Set

215`region` to the supported Bedrock region that should handle requests.

216 

178## OSS mode (local providers)217## OSS mode (local providers)

179 218 

180Codex can run against a local "open source" provider (for example, Ollama or LM Studio) when you pass `--oss`. If you pass `--oss` without specifying a provider, Codex uses `oss_provider` as the default.219Codex can run against a local "open source" provider (for example, Ollama or LM Studio) when you pass `--oss`. If you pass `--oss` without specifying a provider, Codex uses `oss_provider` as the default.


230 269 

231You can also use a granular approval policy (`approval_policy = { granular = { ... } }`) to allow or auto-reject individual prompt categories. This is useful when you want normal interactive approvals for some cases but want others, such as `request_permissions` or skill-script prompts, to fail closed automatically.270You can also use a granular approval policy (`approval_policy = { granular = { ... } }`) to allow or auto-reject individual prompt categories. This is useful when you want normal interactive approvals for some cases but want others, such as `request_permissions` or skill-script prompts, to fail closed automatically.

232 271 

233```272Set `approvals_reviewer = "auto_review"` to route eligible interactive approval

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

274boundary.

275 

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

277`guardian_policy_config` takes precedence.

278 

279```toml

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

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

235sandbox_mode = "workspace-write"282sandbox_mode = "workspace-write"

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

237 284 


249exclude_slash_tmp = false # Allow /tmp296exclude_slash_tmp = false # Allow /tmp

250writable_roots = ["/Users/YOU/.pyenv/shims"]297writable_roots = ["/Users/YOU/.pyenv/shims"]

251network_access = false # Opt in to outbound network298network_access = false # Opt in to outbound network

299 

300[auto_review]

301policy = """

302Use your organization's automatic review policy.

303"""

304```

305 

306### Named permission profiles

307 

308Set `default_permissions` to reuse a sandbox profile by name. Codex includes

309the built-in profiles `:read-only`, `:workspace`, and `:danger-no-sandbox`:

310 

311```toml

312default_permissions = ":workspace"

313```

314 

315For custom profiles, point `default_permissions` at a name you define under

316`[permissions.<name>]`:

317 

318```toml

319default_permissions = "workspace"

320 

321[permissions.workspace.filesystem]

322":project_roots" = { "." = "write", "**/*.env" = "none" }

323glob_scan_max_depth = 3

324 

325[permissions.workspace.network]

326enabled = true

327mode = "limited"

328 

329[permissions.workspace.network.domains]

330"api.openai.com" = "allow"

252```331```

253 332 

333Use built-in names with a leading colon. Custom names don't use a leading

334colon and must have matching `permissions` tables.

335 

254Need the complete key list (including profile-scoped overrides and requirements constraints)? See [Configuration Reference](https://developers.openai.com/codex/config-reference) and [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).336Need the complete key list (including profile-scoped overrides and requirements constraints)? See [Configuration Reference](https://developers.openai.com/codex/config-reference) and [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration).

255 337 

256In workspace-write mode, some environments keep `.git/` and `.codex/`338In workspace-write mode, some environments keep `.git/` and `.codex/`


370 452 

371#### Metrics catalog453#### Metrics catalog

372 454 

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

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

374If a metric includes the `tool` field, it reflects the internal tool used (for example, `apply_patch` or `shell`) and doesn't contain the actual shell command or patch `codex` is trying to apply.457If a metric includes the `tool` field, it reflects the internal tool used (for example, `apply_patch` or `shell`) and doesn't contain the actual shell command or patch `codex` is trying to apply.

375 458 

459#### Runtime and model transport

460 

461| Metric | Type | Fields | Description |

462| --- | --- | --- | --- |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

486 

487The `cloud_requirements.fetch_attempt` metric includes `trigger`, `attempt`, `outcome`, and `status_code` fields. The `cloud_requirements.fetch_final` metric includes `trigger`, `outcome`, `reason`, `attempt_count`, and `status_code` fields.

488 

489#### Turn and tool activity

490 

491| Metric | Type | Fields | Description |

492| --- | --- | --- | --- |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

511 

512The `mcp.call` and `mcp.call.duration_ms` metrics include `status`; normal tool-call emissions also include `tool`, plus `connector_id` and `connector_name` when available. Blocked Codex Apps MCP calls may emit `mcp.call` with only `status`.

513 

514#### Threads, tasks, and features

515 

376| Metric | Type | Fields | Description |516| Metric | Type | Fields | Description |

377| --- | --- | --- | --- |517| --- | --- | --- | --- |

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

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

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

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

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

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

381| `thread.rename` | counter | | Thread renamed. |524| `thread.rename` | counter | | Thread renamed. |

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

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

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

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

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

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

384| `task.review` | counter | | Number of reviews triggered. |530| `task.review` | counter | | Number of reviews triggered. |

385| `task.undo` | counter | | Number of undo actions triggered. |531| `task.undo` | counter | | Number of undo actions triggered. |

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

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

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

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

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

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

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

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

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

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

396| `shell_snapshot.duration_ms` | histogram | `success` | Time to take a shell snapshot. |534| `shell_snapshot.duration_ms` | histogram | `success` | Time to take a shell snapshot. |

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

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

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

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

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

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

541 

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

543 

544#### Memory and local state

545 

546| Metric | Type | Fields | Description |

547| --- | --- | --- | --- |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

401| `db.compare_error` | counter | `stage`, `reason` | State DB discrepancies detected during reconciliation. |562 

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

564 

565#### Windows sandbox

566 

567| Metric | Type | Fields | Description |

568| --- | --- | --- | --- |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

587 

588The elevated setup failure metrics include `code` and `message` when Windows setup failure details are available, and may include `originator` when emitted from the shared setup path. The `windows_sandbox.legacy_setup_preflight_failed` metric includes `originator` when emitted from the shared setup path, but fallback-prompt preflight failures may not include any fields.

402 589 

403### Feedback controls590### Feedback controls

404 591 


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

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

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

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

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

479 668 

480In `auto` mode, Codex prefers OSC 9 notifications (a terminal escape sequence some terminals interpret as a desktop notification) and falls back to BEL (`\x07`) otherwise.669In `auto` mode, Codex prefers OSC 9 notifications (a terminal escape sequence some terminals interpret as a desktop notification) and falls back to BEL (`\x07`) otherwise.

481 670 


522 711 

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

524- `tui.notification_method`: choose `auto`, `osc9`, or `bel` for terminal notifications713- `tui.notification_method`: choose `auto`, `osc9`, or `bel` for terminal notifications

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

715 notifications fire

525- `tui.animations`: enable/disable ASCII animations and shimmer effects716- `tui.animations`: enable/disable ASCII animations and shimmer effects

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

527- `tui.show_tooltips`: show or hide onboarding tooltips on the welcome screen718- `tui.show_tooltips`: show or hide onboarding tooltips on the welcome screen

config-basic.md +26 −5

Details

1# Config basics1# 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 config files 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 

5## Codex configuration file5## Codex configuration file

6 6 


27 27 

28Use that precedence to set shared defaults at the top level and keep profiles focused on the values that differ.28Use that precedence to set shared defaults at the top level and keep profiles focused on the values that differ.

29 29 

30If you mark a project as untrusted, Codex skips project-scoped `.codex/` layers (including `.codex/config.toml`) and falls back to user, system, and built-in defaults.30If you mark a project as untrusted, Codex skips project-scoped `.codex/` layers, including project-local config, hooks, and rules. User and system config still load, including user/global hooks and rules.

31 31 

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 


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```toml48```toml

49model = "gpt-5.4"49model = "gpt-5.5"

50```50```

51 51 

52#### Approval prompts52#### Approval prompts


69 69 

70For mode-by-mode behavior (including protected `.git`/`.codex` paths and network defaults), see [Sandbox and approvals](https://developers.openai.com/codex/agent-approvals-security#sandbox-and-approvals), [Protected paths in writable roots](https://developers.openai.com/codex/agent-approvals-security#protected-paths-in-writable-roots), and [Network access](https://developers.openai.com/codex/agent-approvals-security#network-access).70For mode-by-mode behavior (including protected `.git`/`.codex` paths and network defaults), see [Sandbox and approvals](https://developers.openai.com/codex/agent-approvals-security#sandbox-and-approvals), [Protected paths in writable roots](https://developers.openai.com/codex/agent-approvals-security#protected-paths-in-writable-roots), and [Network access](https://developers.openai.com/codex/agent-approvals-security#network-access).

71 71 

72#### Permission profiles

73 

74Use a named permission profile when you want one reusable filesystem or network policy across sessions:

75 

76```toml

77default_permissions = ":workspace"

78```

79 

80Built-in profiles include `:read-only`, `:workspace`, and `:danger-no-sandbox`. For custom filesystem or network rules, define `[permissions.<name>]` tables and set `default_permissions` to that name.

81 

72#### Windows sandbox mode82#### Windows sandbox mode

73 83 

74When 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.84When 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.


111 121 

112You can override this later in an active session with `/personality` or per thread/turn when using the app-server APIs.122You can override this later in an active session with `/personality` or per thread/turn when using the app-server APIs.

113 123 

124#### TUI keymap

125 

126Customize terminal shortcuts under `tui.keymap`. Context-specific bindings override `tui.keymap.global`, and an empty list unbinds the action.

127 

128```toml

129[tui.keymap.global]

130open_transcript = "ctrl-t"

131 

132[tui.keymap.composer]

133submit = ["enter", "ctrl-m"]

134```

135 

114#### Command environment136#### Command environment

115 137 

116Control which environment variables Codex forwards to spawned commands.138Control which environment variables Codex forwards to spawned commands.


148| Key | Default | Maturity | Description |170| Key | Default | Maturity | Description |

149| -------------------- | :-------------------: | ------------ | ---------------------------------------------------------------------------------------- |171| -------------------- | :-------------------: | ------------ | ---------------------------------------------------------------------------------------- |

150| `apps` | false | Experimental | Enable ChatGPT Apps/connectors support |172| `apps` | false | Experimental | Enable ChatGPT Apps/connectors support |

151| `codex_hooks` | false | Under development | Enable lifecycle hooks from `hooks.json`. See [Hooks](https://developers.openai.com/codex/hooks). |173| `codex_hooks` | true | Stable | Enable lifecycle hooks from `hooks.json` or inline `[hooks]`. See [Hooks](https://developers.openai.com/codex/hooks). |

152| `fast_mode` | true | Stable | Enable Fast mode selection and the `service_tier = "fast"` path |174| `fast_mode` | true | Stable | Enable Fast mode selection and the `service_tier = "fast"` path |

153| `memories` | false | Stable | Enable [Memories](https://developers.openai.com/codex/memories) |175| `memories` | false | Stable | Enable [Memories](https://developers.openai.com/codex/memories) |

154| `multi_agent` | true | Stable | Enable subagent collaboration tools |176| `multi_agent` | true | Stable | Enable subagent collaboration tools |

155| `personality` | true | Stable | Enable personality selection controls |177| `personality` | true | Stable | Enable personality selection controls |

156| `shell_snapshot` | true | Stable | Snapshot your shell environment to speed up repeated commands |178| `shell_snapshot` | true | Stable | Snapshot your shell environment to speed up repeated commands |

157| `shell_tool` | true | Stable | Enable the default `shell` tool |179| `shell_tool` | true | Stable | Enable the default `shell` tool |

158| `guardian_approval` | false | Experimental | Route eligible approval requests through the guardian reviewer subagent (set `approvals_reviewer = "guardian_subagent"`). |

159| `unified_exec` | `true` except Windows | Stable | Use the unified PTY-backed exec tool |180| `unified_exec` | `true` except Windows | Stable | Use the unified PTY-backed exec tool |

160| `undo` | false | Stable | Enable undo via per-turn git ghost snapshots |181| `undo` | false | Stable | Enable undo via per-turn git ghost snapshots |

161| `web_search` | true | Deprecated | Legacy toggle; prefer the top-level `web_search` setting |182| `web_search` | true | Deprecated | Legacy toggle; prefer the top-level `web_search` setting |

config-reference.md +342 −43

Details

24| `approval_policy.granular.rules` | `boolean` | When `true`, approvals triggered by execpolicy `prompt` rules are allowed to surface. |24| `approval_policy.granular.rules` | `boolean` | When `true`, approvals triggered by execpolicy `prompt` rules are allowed to surface. |

25| `approval_policy.granular.sandbox_approval` | `boolean` | When `true`, sandbox escalation approval prompts are allowed to surface. |25| `approval_policy.granular.sandbox_approval` | `boolean` | When `true`, sandbox escalation approval prompts are allowed to surface. |

26| `approval_policy.granular.skill_approval` | `boolean` | When `true`, skill-script approval prompts are allowed to surface. |26| `approval_policy.granular.skill_approval` | `boolean` | When `true`, skill-script approval prompts are allowed to surface. |

27| `approvals_reviewer` | `user | guardian_subagent` | Select who reviews eligible approval prompts. Defaults to `user`; `guardian_subagent` routes supported reviews through the Guardian reviewer subagent. |27| `approvals_reviewer` | `user | auto_review` | Who reviews eligible approval prompts under `on-request` or granular approval policies. Defaults to `user`; `auto_review` uses the reviewer subagent. This setting doesn't change sandboxing or review actions already allowed inside the sandbox. |

28| `apps._default.destructive_enabled` | `boolean` | Default allow/deny for app tools with `destructive_hint = true`. |28| `apps._default.destructive_enabled` | `boolean` | Default allow/deny for app tools with `destructive_hint = true`. |

29| `apps._default.enabled` | `boolean` | Default app enabled state for all apps unless overridden per app. |29| `apps._default.enabled` | `boolean` | Default app enabled state for all apps unless overridden per app. |

30| `apps._default.open_world_enabled` | `boolean` | Default allow/deny for app tools with `open_world_hint = true`. |30| `apps._default.open_world_enabled` | `boolean` | Default allow/deny for app tools with `open_world_hint = true`. |


35| `apps.<id>.open_world_enabled` | `boolean` | Allow or block tools in this app that advertise `open_world_hint = true`. |35| `apps.<id>.open_world_enabled` | `boolean` | Allow or block tools in this app that advertise `open_world_hint = true`. |

36| `apps.<id>.tools.<tool>.approval_mode` | `auto | prompt | approve` | Per-tool approval behavior override for a single app tool. |36| `apps.<id>.tools.<tool>.approval_mode` | `auto | prompt | approve` | Per-tool approval behavior override for a single app tool. |

37| `apps.<id>.tools.<tool>.enabled` | `boolean` | Per-tool enabled override for an app tool (for example `repos/list`). |37| `apps.<id>.tools.<tool>.enabled` | `boolean` | Per-tool enabled override for an app tool (for example `repos/list`). |

38| `auto_review.policy` | `string` | Local Markdown policy instructions for automatic review. Managed `guardian_policy_config` takes precedence. Blank values are ignored. |

38| `background_terminal_max_timeout` | `number` | Maximum poll window in milliseconds for empty `write_stdin` polls (background terminal polling). Default: `300000` (5 minutes). Replaces the older `background_terminal_timeout` key. |39| `background_terminal_max_timeout` | `number` | Maximum poll window in milliseconds for empty `write_stdin` polls (background terminal polling). Default: `300000` (5 minutes). Replaces the older `background_terminal_timeout` key. |

39| `chatgpt_base_url` | `string` | Override the base URL used during the ChatGPT login flow. |40| `chatgpt_base_url` | `string` | Override the base URL used during the ChatGPT login flow. |

40| `check_for_update_on_startup` | `boolean` | Check for Codex updates on startup (set to false only when updates are centrally managed). |41| `check_for_update_on_startup` | `boolean` | Check for Codex updates on startup (set to false only when updates are centrally managed). |

41| `cli_auth_credentials_store` | `file | keyring | auto` | Control where the CLI stores cached credentials (file-based auth.json vs OS keychain). |42| `cli_auth_credentials_store` | `file | keyring | auto` | Control where the CLI stores cached credentials (file-based auth.json vs OS keychain). |

42| `commit_attribution` | `string` | Override the commit co-author trailer text. Set an empty string to disable automatic attribution. |43| `commit_attribution` | `string` | Override the commit co-author trailer text. Set an empty string to disable automatic attribution. |

43| `compact_prompt` | `string` | Inline override for the history compaction prompt. |44| `compact_prompt` | `string` | Inline override for the history compaction prompt. |

44| `default_permissions` | `string` | Name of the default permissions profile to apply to sandboxed tool calls. |45| `default_permissions` | `string` | Name of the default permissions profile to apply to sandboxed tool calls. Built-ins are `:read-only`, `:workspace`, and `:danger-no-sandbox`; custom profile names require matching `[permissions.<name>]` tables. |

45| `developer_instructions` | `string` | Additional developer instructions injected into the session (optional). |46| `developer_instructions` | `string` | Additional developer instructions injected into the session (optional). |

46| `disable_paste_burst` | `boolean` | Disable burst-paste detection in the TUI. |47| `disable_paste_burst` | `boolean` | Disable burst-paste detection in the TUI. |

47| `experimental_compact_prompt_file` | `string (path)` | Load the compaction prompt override from a file (experimental). |48| `experimental_compact_prompt_file` | `string (path)` | Load the compaction prompt override from a file (experimental). |

48| `experimental_use_unified_exec_tool` | `boolean` | Legacy name for enabling unified exec; prefer `[features].unified_exec` or `codex --enable unified_exec`. |49| `experimental_use_unified_exec_tool` | `boolean` | Legacy name for enabling unified exec; prefer `[features].unified_exec` or `codex --enable unified_exec`. |

49| `features.apps` | `boolean` | Enable ChatGPT Apps/connectors support (experimental). |50| `features.apps` | `boolean` | Enable ChatGPT Apps/connectors support (experimental). |

50| `features.codex_hooks` | `boolean` | Enable lifecycle hooks loaded from `hooks.json` (under development; off by default). |51| `features.codex_hooks` | `boolean` | Enable lifecycle hooks loaded from `hooks.json` or inline `[hooks]` config. |

51| `features.enable_request_compression` | `boolean` | Compress streaming request bodies with zstd when supported (stable; on by default). |52| `features.enable_request_compression` | `boolean` | Compress streaming request bodies with zstd when supported (stable; on by default). |

52| `features.fast_mode` | `boolean` | Enable Fast mode selection and the `service_tier = "fast"` path (stable; on by default). |53| `features.fast_mode` | `boolean` | Enable Fast mode selection and the `service_tier = "fast"` path (stable; on by default). |

53| `features.guardian_approval` | `boolean` | Route eligible approval requests through the guardian reviewer subagent (experimental; off by default). Use with `approvals_reviewer = "guardian_subagent"`. |

54| `features.memories` | `boolean` | Enable [Memories](https://developers.openai.com/codex/memories) (off by default). |54| `features.memories` | `boolean` | Enable [Memories](https://developers.openai.com/codex/memories) (off by default). |

55| `features.multi_agent` | `boolean` | Enable multi-agent collaboration tools (`spawn_agent`, `send_input`, `resume_agent`, `wait_agent`, and `close_agent`) (stable; on by default). |55| `features.multi_agent` | `boolean` | Enable multi-agent collaboration tools (`spawn_agent`, `send_input`, `resume_agent`, `wait_agent`, and `close_agent`) (stable; on by default). |

56| `features.personality` | `boolean` | Enable personality selection controls (stable; on by default). |56| `features.personality` | `boolean` | Enable personality selection controls (stable; on by default). |


70| `hide_agent_reasoning` | `boolean` | Suppress reasoning events in both the TUI and `codex exec` output. |70| `hide_agent_reasoning` | `boolean` | Suppress reasoning events in both the TUI and `codex exec` output. |

71| `history.max_bytes` | `number` | If set, caps the history file size in bytes by dropping oldest entries. |71| `history.max_bytes` | `number` | If set, caps the history file size in bytes by dropping oldest entries. |

72| `history.persistence` | `save-all | none` | Control whether Codex saves session transcripts to history.jsonl. |72| `history.persistence` | `save-all | none` | Control whether Codex saves session transcripts to history.jsonl. |

73| `hooks` | `table` | Lifecycle hooks configured inline in `config.toml`. Uses the same event schema as `hooks.json`; see the Hooks guide for examples and supported events. |

73| `instructions` | `string` | Reserved for future use; prefer `model_instructions_file` or `AGENTS.md`. |74| `instructions` | `string` | Reserved for future use; prefer `model_instructions_file` or `AGENTS.md`. |

74| `log_dir` | `string (path)` | Directory where Codex writes log files (for example `codex-tui.log`); defaults to `$CODEX_HOME/log`. |75| `log_dir` | `string (path)` | Directory where Codex writes log files (for example `codex-tui.log`); defaults to `$CODEX_HOME/log`. |

75| `mcp_oauth_callback_port` | `integer` | Optional fixed port for the local HTTP callback server used during MCP OAuth login. When unset, Codex binds to an ephemeral port chosen by the OS. |76| `mcp_oauth_callback_port` | `integer` | Optional fixed port for the local HTTP callback server used during MCP OAuth login. When unset, Codex binds to an ephemeral port chosen by the OS. |


84| `mcp_servers.<id>.enabled_tools` | `array<string>` | Allow list of tool names exposed by the MCP server. |85| `mcp_servers.<id>.enabled_tools` | `array<string>` | Allow list of tool names exposed by the MCP server. |

85| `mcp_servers.<id>.env` | `map<string,string>` | Environment variables forwarded to the MCP stdio server. |86| `mcp_servers.<id>.env` | `map<string,string>` | Environment variables forwarded to the MCP stdio server. |

86| `mcp_servers.<id>.env_http_headers` | `map<string,string>` | HTTP headers populated from environment variables for an MCP HTTP server. |87| `mcp_servers.<id>.env_http_headers` | `map<string,string>` | HTTP headers populated from environment variables for an MCP HTTP server. |

87| `mcp_servers.<id>.env_vars` | `array<string>` | Additional environment variables to whitelist for an MCP stdio server. |88| `mcp_servers.<id>.env_vars` | `array<string | { name = string, source = "local" | "remote" }>` | Additional environment variables to whitelist for an MCP stdio server. String entries default to `source = "local"`; use `source = "remote"` only with executor-backed remote stdio. |

89| `mcp_servers.<id>.experimental_environment` | `local | remote` | Experimental placement for an MCP server. `remote` starts stdio servers through a remote executor environment; streamable HTTP remote placement is not implemented. |

88| `mcp_servers.<id>.http_headers` | `map<string,string>` | Static HTTP headers included with each MCP HTTP request. |90| `mcp_servers.<id>.http_headers` | `map<string,string>` | Static HTTP headers included with each MCP HTTP request. |

89| `mcp_servers.<id>.oauth_resource` | `string` | Optional RFC 8707 OAuth resource parameter to include during MCP login. |91| `mcp_servers.<id>.oauth_resource` | `string` | Optional RFC 8707 OAuth resource parameter to include during MCP login. |

90| `mcp_servers.<id>.required` | `boolean` | When true, fail startup/resume if this enabled MCP server cannot initialize. |92| `mcp_servers.<id>.required` | `boolean` | When true, fail startup/resume if this enabled MCP server cannot initialize. |


94| `mcp_servers.<id>.tool_timeout_sec` | `number` | Override the default 60s per-tool timeout for an MCP server. |96| `mcp_servers.<id>.tool_timeout_sec` | `number` | Override the default 60s per-tool timeout for an MCP server. |

95| `mcp_servers.<id>.url` | `string` | Endpoint for an MCP streamable HTTP server. |97| `mcp_servers.<id>.url` | `string` | Endpoint for an MCP streamable HTTP server. |

96| `memories.consolidation_model` | `string` | Optional model override for global memory consolidation. |98| `memories.consolidation_model` | `string` | Optional model override for global memory consolidation. |

99| `memories.disable_on_external_context` | `boolean` | When `true`, threads that use external context such as MCP tool calls, web search, or tool search are kept out of memory generation. Defaults to `false`. Legacy alias: `memories.no_memories_if_mcp_or_web_search`. |

97| `memories.extract_model` | `string` | Optional model override for per-thread memory extraction. |100| `memories.extract_model` | `string` | Optional model override for per-thread memory extraction. |

98| `memories.generate_memories` | `boolean` | When `false`, newly created threads are not stored as memory-generation inputs. Defaults to `true`. |101| `memories.generate_memories` | `boolean` | When `false`, newly created threads are not stored as memory-generation inputs. Defaults to `true`. |

99| `memories.max_raw_memories_for_consolidation` | `number` | Maximum recent raw memories retained for global consolidation. Defaults to `256` and is capped at `4096`. |102| `memories.max_raw_memories_for_consolidation` | `number` | Maximum recent raw memories retained for global consolidation. Defaults to `256` and is capped at `4096`. |

100| `memories.max_rollout_age_days` | `number` | Maximum age of threads considered for memory generation. Defaults to `30` and is clamped to `0`-`90`. |103| `memories.max_rollout_age_days` | `number` | Maximum age of threads considered for memory generation. Defaults to `30` and is clamped to `0`-`90`. |

101| `memories.max_rollouts_per_startup` | `number` | Maximum rollout candidates processed per startup pass. Defaults to `16` and is capped at `128`. |104| `memories.max_rollouts_per_startup` | `number` | Maximum rollout candidates processed per startup pass. Defaults to `16` and is capped at `128`. |

102| `memories.max_unused_days` | `number` | Maximum days since a memory was last used before it becomes ineligible for consolidation. Defaults to `30` and is clamped to `0`-`365`. |105| `memories.max_unused_days` | `number` | Maximum days since a memory was last used before it becomes ineligible for consolidation. Defaults to `30` and is clamped to `0`-`365`. |

106| `memories.min_rate_limit_remaining_percent` | `number` | Minimum remaining percentage required in Codex rate-limit windows before memory generation starts. Defaults to `25` and is clamped to `0`-`100`. |

103| `memories.min_rollout_idle_hours` | `number` | Minimum idle time before a thread is considered for memory generation. Defaults to `6` and is clamped to `1`-`48`. |107| `memories.min_rollout_idle_hours` | `number` | Minimum idle time before a thread is considered for memory generation. Defaults to `6` and is clamped to `1`-`48`. |

104| `memories.no_memories_if_mcp_or_web_search` | `boolean` | When `true`, threads that use MCP tool calls or web search are kept out of memory generation. Defaults to `false`. |

105| `memories.use_memories` | `boolean` | When `false`, Codex skips injecting existing memories into future sessions. Defaults to `true`. |108| `memories.use_memories` | `boolean` | When `false`, Codex skips injecting existing memories into future sessions. Defaults to `true`. |

106| `model` | `string` | Model to use (e.g., `gpt-5.4`). |109| `model` | `string` | Model to use (e.g., `gpt-5.5`). |

107| `model_auto_compact_token_limit` | `number` | Token threshold that triggers automatic history compaction (unset uses model defaults). |110| `model_auto_compact_token_limit` | `number` | Token threshold that triggers automatic history compaction (unset uses model defaults). |

108| `model_catalog_json` | `string (path)` | Optional path to a JSON model catalog loaded on startup. Profile-level `profiles.<name>.model_catalog_json` can override this per profile. |111| `model_catalog_json` | `string (path)` | Optional path to a JSON model catalog loaded on startup. Profile-level `profiles.<name>.model_catalog_json` can override this per profile. |

109| `model_context_window` | `number` | Context window tokens available to the active model. |112| `model_context_window` | `number` | Context window tokens available to the active model. |


130| `model_providers.<id>.stream_max_retries` | `number` | Retry count for SSE streaming interruptions (default: 5). |133| `model_providers.<id>.stream_max_retries` | `number` | Retry count for SSE streaming interruptions (default: 5). |

131| `model_providers.<id>.supports_websockets` | `boolean` | Whether that provider supports the Responses API WebSocket transport. |134| `model_providers.<id>.supports_websockets` | `boolean` | Whether that provider supports the Responses API WebSocket transport. |

132| `model_providers.<id>.wire_api` | `responses` | Protocol used by the provider. `responses` is the only supported value, and it is the default when omitted. |135| `model_providers.<id>.wire_api` | `responses` | Protocol used by the provider. `responses` is the only supported value, and it is the default when omitted. |

136| `model_providers.amazon-bedrock.aws.profile` | `string` | AWS profile name used by the built-in `amazon-bedrock` provider. |

137| `model_providers.amazon-bedrock.aws.region` | `string` | AWS region used by the built-in `amazon-bedrock` provider. |

133| `model_reasoning_effort` | `minimal | low | medium | high | xhigh` | Adjust reasoning effort for supported models (Responses API only; `xhigh` is model-dependent). |138| `model_reasoning_effort` | `minimal | low | medium | high | xhigh` | Adjust reasoning effort for supported models (Responses API only; `xhigh` is model-dependent). |

134| `model_reasoning_summary` | `auto | concise | detailed | none` | Select reasoning summary detail or disable summaries entirely. |139| `model_reasoning_summary` | `auto | concise | detailed | none` | Select reasoning summary detail or disable summaries entirely. |

135| `model_supports_reasoning_summaries` | `boolean` | Force Codex to send or not send reasoning metadata. |140| `model_supports_reasoning_summaries` | `boolean` | Force Codex to send or not send reasoning metadata. |


161| `otel.trace_exporter.<id>.tls.client-certificate` | `string` | Client certificate path for OTEL trace exporter TLS. |166| `otel.trace_exporter.<id>.tls.client-certificate` | `string` | Client certificate path for OTEL trace exporter TLS. |

162| `otel.trace_exporter.<id>.tls.client-private-key` | `string` | Client private key path for OTEL trace exporter TLS. |167| `otel.trace_exporter.<id>.tls.client-private-key` | `string` | Client private key path for OTEL trace exporter TLS. |

163| `permissions.<name>.filesystem` | `table` | Named filesystem permission profile. Each key is an absolute path or special token such as `:minimal` or `:project_roots`. |168| `permissions.<name>.filesystem` | `table` | Named filesystem permission profile. Each key is an absolute path or special token such as `:minimal` or `:project_roots`. |

164| `permissions.<name>.filesystem.":project_roots".<subpath>` | `"read" | "write" | "none"` | Scoped filesystem access relative to the detected project roots. Use `"."` for the root itself. |169| `permissions.<name>.filesystem.":project_roots".<subpath-or-glob>` | `"read" | "write" | "none"` | Scoped filesystem access relative to the detected project roots. Use `"."` for the root itself; glob subpaths such as `"**/*.env"` can deny reads with `"none"`. |

165| `permissions.<name>.filesystem.<path>` | `"read" | "write" | "none" | table` | Grant direct access for a path or special token, or scope nested entries under that root. |170| `permissions.<name>.filesystem.<path-or-glob>` | `"read" | "write" | "none" | table` | Grant direct access for a path, glob pattern, or special token, or scope nested entries under that root. Use `"none"` to deny reads for matching paths. |

171| `permissions.<name>.filesystem.glob_scan_max_depth` | `number` | Maximum depth for expanding deny-read glob patterns on platforms that snapshot matches before sandbox startup. Must be at least `1` when set. |

166| `permissions.<name>.network.allow_local_binding` | `boolean` | Permit local bind/listen operations through the managed proxy. |172| `permissions.<name>.network.allow_local_binding` | `boolean` | Permit local bind/listen operations through the managed proxy. |

167| `permissions.<name>.network.allow_upstream_proxy` | `boolean` | Allow the managed proxy to chain to another upstream proxy. |173| `permissions.<name>.network.allow_upstream_proxy` | `boolean` | Allow the managed proxy to chain to another upstream proxy. |

168| `permissions.<name>.network.dangerously_allow_all_unix_sockets` | `boolean` | Allow the proxy to use arbitrary Unix sockets instead of the default restricted set. |174| `permissions.<name>.network.dangerously_allow_all_unix_sockets` | `boolean` | Allow the proxy to use arbitrary Unix sockets instead of the default restricted set. |


193| `project_doc_fallback_filenames` | `array<string>` | Additional filenames to try when `AGENTS.md` is missing. |199| `project_doc_fallback_filenames` | `array<string>` | Additional filenames to try when `AGENTS.md` is missing. |

194| `project_doc_max_bytes` | `number` | Maximum bytes read from `AGENTS.md` when building project instructions. |200| `project_doc_max_bytes` | `number` | Maximum bytes read from `AGENTS.md` when building project instructions. |

195| `project_root_markers` | `array<string>` | List of project root marker filenames; used when searching parent directories for the project root. |201| `project_root_markers` | `array<string>` | List of project root marker filenames; used when searching parent directories for the project root. |

196| `projects.<path>.trust_level` | `string` | Mark a project or worktree as trusted or untrusted (`"trusted"` | `"untrusted"`). Untrusted projects skip project-scoped `.codex/` layers. |202| `projects.<path>.trust_level` | `string` | Mark a project or worktree as trusted or untrusted (`"trusted"` | `"untrusted"`). Untrusted projects skip project-scoped `.codex/` layers, including project-local config, hooks, and rules. |

197| `review_model` | `string` | Optional model override used by `/review` (defaults to the current session model). |203| `review_model` | `string` | Optional model override used by `/review` (defaults to the current session model). |

198| `sandbox_mode` | `read-only | workspace-write | danger-full-access` | Sandbox policy for filesystem and network access during command execution. |204| `sandbox_mode` | `read-only | workspace-write | danger-full-access` | Sandbox policy for filesystem and network access during command execution. |

199| `sandbox_workspace_write.exclude_slash_tmp` | `boolean` | Exclude `/tmp` from writable roots in workspace-write mode. |205| `sandbox_workspace_write.exclude_slash_tmp` | `boolean` | Exclude `/tmp` from writable roots in workspace-write mode. |


214| `sqlite_home` | `string (path)` | Directory where Codex stores the SQLite-backed state DB used by agent jobs and other resumable runtime state. |220| `sqlite_home` | `string (path)` | Directory where Codex stores the SQLite-backed state DB used by agent jobs and other resumable runtime state. |

215| `suppress_unstable_features_warning` | `boolean` | Suppress the warning that appears when under-development feature flags are enabled. |221| `suppress_unstable_features_warning` | `boolean` | Suppress the warning that appears when under-development feature flags are enabled. |

216| `tool_output_token_limit` | `number` | Token budget for storing individual tool/function outputs in history. |222| `tool_output_token_limit` | `number` | Token budget for storing individual tool/function outputs in history. |

223| `tool_suggest.disabled_tools` | `array<table>` | Disable suggestions for specific discoverable connectors or plugins. Each entry uses `type = "connector"` or `"plugin"` and an `id`. |

217| `tool_suggest.discoverables` | `array<table>` | Allow tool suggestions for additional discoverable connectors or plugins. Each entry uses `type = "connector"` or `"plugin"` and an `id`. |224| `tool_suggest.discoverables` | `array<table>` | Allow tool suggestions for additional discoverable connectors or plugins. Each entry uses `type = "connector"` or `"plugin"` and an `id`. |

218| `tools.view_image` | `boolean` | Enable the local-image attachment tool `view_image`. |225| `tools.view_image` | `boolean` | Enable the local-image attachment tool `view_image`. |

219| `tools.web_search` | `boolean | { context_size = "low|medium|high", allowed_domains = [string], location = { country, region, city, timezone } }` | Optional web search tool configuration. The legacy boolean form is still accepted, but the object form lets you set search context size, allowed domains, and approximate user location. |226| `tools.web_search` | `boolean | { context_size = "low|medium|high", allowed_domains = [string], location = { country, region, city, timezone } }` | Optional web search tool configuration. The legacy boolean form is still accepted, but the object form lets you set search context size, allowed domains, and approximate user location. |

220| `tui` | `table` | TUI-specific options such as enabling inline desktop notifications. |227| `tui` | `table` | TUI-specific options such as enabling inline desktop notifications. |

221| `tui.alternate_screen` | `auto | always | never` | Control alternate screen usage for the TUI (default: auto; auto skips it in Zellij to preserve scrollback). |228| `tui.alternate_screen` | `auto | always | never` | Control alternate screen usage for the TUI (default: auto; auto skips it in Zellij to preserve scrollback). |

222| `tui.animations` | `boolean` | Enable terminal animations (welcome screen, shimmer, spinner) (default: true). |229| `tui.animations` | `boolean` | Enable terminal animations (welcome screen, shimmer, spinner) (default: true). |

230| `tui.keymap.<context>.<action>` | `string | array<string>` | Keyboard shortcut binding for a TUI action. Supported contexts include `global`, `chat`, `composer`, `editor`, `pager`, `list`, and `approval`; context-specific bindings override `tui.keymap.global`. |

231| `tui.keymap.<context>.<action> = []` | `empty array` | Unbind the action in that keymap context. Key names use normalized strings such as `ctrl-a`, `shift-enter`, or `page-down`. |

223| `tui.model_availability_nux.<model>` | `integer` | Internal startup-tooltip state keyed by model slug. |232| `tui.model_availability_nux.<model>` | `integer` | Internal startup-tooltip state keyed by model slug. |

224| `tui.notification_method` | `auto | osc9 | bel` | Notification method for unfocused terminal notifications (default: auto). |233| `tui.notification_condition` | `unfocused | always` | Control whether TUI notifications fire only when the terminal is unfocused or regardless of focus. Defaults to `unfocused`. |

234| `tui.notification_method` | `auto | osc9 | bel` | Notification method for terminal notifications (default: auto). |

225| `tui.notifications` | `boolean | array<string>` | Enable TUI notifications; optionally restrict to specific event types. |235| `tui.notifications` | `boolean | array<string>` | Enable TUI notifications; optionally restrict to specific event types. |

226| `tui.show_tooltips` | `boolean` | Show onboarding tooltips in the TUI welcome screen (default: true). |236| `tui.show_tooltips` | `boolean` | Show onboarding tooltips in the TUI welcome screen (default: true). |

227| `tui.status_line` | `array<string> | null` | Ordered list of TUI footer status-line item identifiers. `null` disables the status line. |237| `tui.status_line` | `array<string> | null` | Ordered list of TUI footer status-line item identifiers. `null` disables the status line. |


406 416 

407Type / Values417Type / Values

408 418 

409`user | guardian_subagent`419`user | auto_review`

410 420 

411Details421Details

412 422 

413Select who reviews eligible approval prompts. Defaults to `user`; `guardian_subagent` routes supported reviews through the Guardian reviewer subagent.423Who reviews eligible approval prompts under `on-request` or granular approval policies. Defaults to `user`; `auto_review` uses the reviewer subagent. This setting doesn't change sandboxing or review actions already allowed inside the sandbox.

414 424 

415Key425Key

416 426 


534 544 

535Key545Key

536 546 

547`auto_review.policy`

548 

549Type / Values

550 

551`string`

552 

553Details

554 

555Local Markdown policy instructions for automatic review. Managed `guardian_policy_config` takes precedence. Blank values are ignored.

556 

557Key

558 

537`background_terminal_max_timeout`559`background_terminal_max_timeout`

538 560 

539Type / Values561Type / Values


614 636 

615Details637Details

616 638 

617Name of the default permissions profile to apply to sandboxed tool calls.639Name of the default permissions profile to apply to sandboxed tool calls. Built-ins are `:read-only`, `:workspace`, and `:danger-no-sandbox`; custom profile names require matching `[permissions.<name>]` tables.

618 640 

619Key641Key

620 642 


686 708 

687Details709Details

688 710 

689Enable lifecycle hooks loaded from `hooks.json` (under development; off by default).711Enable lifecycle hooks loaded from `hooks.json` or inline `[hooks]` config.

690 712 

691Key713Key

692 714 


714 736 

715Key737Key

716 738 

717`features.guardian_approval`

718 

719Type / Values

720 

721`boolean`

722 

723Details

724 

725Route eligible approval requests through the guardian reviewer subagent (experimental; off by default). Use with `approvals_reviewer = "guardian_subagent"`.

726 

727Key

728 

729`features.memories`739`features.memories`

730 740 

731Type / Values741Type / Values


954 964 

955Key965Key

956 966 

967`hooks`

968 

969Type / Values

970 

971`table`

972 

973Details

974 

975Lifecycle hooks configured inline in `config.toml`. Uses the same event schema as `hooks.json`; see the Hooks guide for examples and supported events.

976 

977Key

978 

957`instructions`979`instructions`

958 980 

959Type / Values981Type / Values


1126 1148 

1127Type / Values1149Type / Values

1128 1150 

1129`array<string>`1151`array<string | { name = string, source = "local" | "remote" }>`

1130 1152 

1131Details1153Details

1132 1154 

1133Additional environment variables to whitelist for an MCP stdio server.1155Additional environment variables to whitelist for an MCP stdio server. String entries default to `source = "local"`; use `source = "remote"` only with executor-backed remote stdio.

1156 

1157Key

1158 

1159`mcp_servers.<id>.experimental_environment`

1160 

1161Type / Values

1162 

1163`local | remote`

1164 

1165Details

1166 

1167Experimental placement for an MCP server. `remote` starts stdio servers through a remote executor environment; streamable HTTP remote placement is not implemented.

1134 1168 

1135Key1169Key

1136 1170 


1242 1276 

1243Key1277Key

1244 1278 

1279`memories.disable_on_external_context`

1280 

1281Type / Values

1282 

1283`boolean`

1284 

1285Details

1286 

1287When `true`, threads that use external context such as MCP tool calls, web search, or tool search are kept out of memory generation. Defaults to `false`. Legacy alias: `memories.no_memories_if_mcp_or_web_search`.

1288 

1289Key

1290 

1245`memories.extract_model`1291`memories.extract_model`

1246 1292 

1247Type / Values1293Type / Values


1314 1360 

1315Key1361Key

1316 1362 

1317`memories.min_rollout_idle_hours`1363`memories.min_rate_limit_remaining_percent`

1318 1364 

1319Type / Values1365Type / Values

1320 1366 


1322 1368 

1323Details1369Details

1324 1370 

1325Minimum idle time before a thread is considered for memory generation. Defaults to `6` and is clamped to `1`-`48`.1371Minimum remaining percentage required in Codex rate-limit windows before memory generation starts. Defaults to `25` and is clamped to `0`-`100`.

1326 1372 

1327Key1373Key

1328 1374 

1329`memories.no_memories_if_mcp_or_web_search`1375`memories.min_rollout_idle_hours`

1330 1376 

1331Type / Values1377Type / Values

1332 1378 

1333`boolean`1379`number`

1334 1380 

1335Details1381Details

1336 1382 

1337When `true`, threads that use MCP tool calls or web search are kept out of memory generation. Defaults to `false`.1383Minimum idle time before a thread is considered for memory generation. Defaults to `6` and is clamped to `1`-`48`.

1338 1384 

1339Key1385Key

1340 1386 


1358 1404 

1359Details1405Details

1360 1406 

1361Model to use (e.g., `gpt-5.4`).1407Model to use (e.g., `gpt-5.5`).

1362 1408 

1363Key1409Key

1364 1410 


1674 1720 

1675Key1721Key

1676 1722 

1723`model_providers.amazon-bedrock.aws.profile`

1724 

1725Type / Values

1726 

1727`string`

1728 

1729Details

1730 

1731AWS profile name used by the built-in `amazon-bedrock` provider.

1732 

1733Key

1734 

1735`model_providers.amazon-bedrock.aws.region`

1736 

1737Type / Values

1738 

1739`string`

1740 

1741Details

1742 

1743AWS region used by the built-in `amazon-bedrock` provider.

1744 

1745Key

1746 

1677`model_reasoning_effort`1747`model_reasoning_effort`

1678 1748 

1679Type / Values1749Type / Values


2046 2116 

2047Key2117Key

2048 2118 

2049`permissions.<name>.filesystem.":project_roots".<subpath>`2119`permissions.<name>.filesystem.":project_roots".<subpath-or-glob>`

2050 2120 

2051Type / Values2121Type / Values

2052 2122 


2054 2124 

2055Details2125Details

2056 2126 

2057Scoped filesystem access relative to the detected project roots. Use `"."` for the root itself.2127Scoped filesystem access relative to the detected project roots. Use `"."` for the root itself; glob subpaths such as `"**/*.env"` can deny reads with `"none"`.

2058 2128 

2059Key2129Key

2060 2130 

2061`permissions.<name>.filesystem.<path>`2131`permissions.<name>.filesystem.<path-or-glob>`

2062 2132 

2063Type / Values2133Type / Values

2064 2134 


2066 2136 

2067Details2137Details

2068 2138 

2069Grant direct access for a path or special token, or scope nested entries under that root.2139Grant direct access for a path, glob pattern, or special token, or scope nested entries under that root. Use `"none"` to deny reads for matching paths.

2140 

2141Key

2142 

2143`permissions.<name>.filesystem.glob_scan_max_depth`

2144 

2145Type / Values

2146 

2147`number`

2148 

2149Details

2150 

2151Maximum depth for expanding deny-read glob patterns on platforms that snapshot matches before sandbox startup. Must be at least `1` when set.

2070 2152 

2071Key2153Key

2072 2154 


2438 2520 

2439Details2521Details

2440 2522 

2441Mark a project or worktree as trusted or untrusted (`"trusted"` | `"untrusted"`). Untrusted projects skip project-scoped `.codex/` layers.2523Mark a project or worktree as trusted or untrusted (`"trusted"` | `"untrusted"`). Untrusted projects skip project-scoped `.codex/` layers, including project-local config, hooks, and rules.

2442 2524 

2443Key2525Key

2444 2526 


2682 2764 

2683Key2765Key

2684 2766 

2767`tool_suggest.disabled_tools`

2768 

2769Type / Values

2770 

2771`array<table>`

2772 

2773Details

2774 

2775Disable suggestions for specific discoverable connectors or plugins. Each entry uses `type = "connector"` or `"plugin"` and an `id`.

2776 

2777Key

2778 

2685`tool_suggest.discoverables`2779`tool_suggest.discoverables`

2686 2780 

2687Type / Values2781Type / Values


2754 2848 

2755Key2849Key

2756 2850 

2851`tui.keymap.<context>.<action>`

2852 

2853Type / Values

2854 

2855`string | array<string>`

2856 

2857Details

2858 

2859Keyboard shortcut binding for a TUI action. Supported contexts include `global`, `chat`, `composer`, `editor`, `pager`, `list`, and `approval`; context-specific bindings override `tui.keymap.global`.

2860 

2861Key

2862 

2863`tui.keymap.<context>.<action> = []`

2864 

2865Type / Values

2866 

2867`empty array`

2868 

2869Details

2870 

2871Unbind the action in that keymap context. Key names use normalized strings such as `ctrl-a`, `shift-enter`, or `page-down`.

2872 

2873Key

2874 

2757`tui.model_availability_nux.<model>`2875`tui.model_availability_nux.<model>`

2758 2876 

2759Type / Values2877Type / Values


2766 2884 

2767Key2885Key

2768 2886 

2887`tui.notification_condition`

2888 

2889Type / Values

2890 

2891`unfocused | always`

2892 

2893Details

2894 

2895Control whether TUI notifications fire only when the terminal is unfocused or regardless of focus. Defaults to `unfocused`.

2896 

2897Key

2898 

2769`tui.notification_method`2899`tui.notification_method`

2770 2900 

2771Type / Values2901Type / Values


2774 2904 

2775Details2905Details

2776 2906 

2777Notification method for unfocused terminal notifications (default: auto).2907Notification method for terminal notifications (default: auto).

2778 2908 

2779Key2909Key

2780 2910 


2909| Key | Type / Values | Details |3039| Key | Type / Values | Details |

2910| --- | --- | --- |3040| --- | --- | --- |

2911| `allowed_approval_policies` | `array<string>` | Allowed values for `approval_policy` (for example `untrusted`, `on-request`, `never`, and `granular`). |3041| `allowed_approval_policies` | `array<string>` | Allowed values for `approval_policy` (for example `untrusted`, `on-request`, `never`, and `granular`). |

2912| `allowed_approvals_reviewers` | `array<string>` | Allowed values for `approvals_reviewer` (for example `user` and `guardian_subagent`). |3042| `allowed_approvals_reviewers` | `array<string>` | Allowed values for `approvals_reviewer`, such as `user` and `auto_review`. |

2913| `allowed_sandbox_modes` | `array<string>` | Allowed values for `sandbox_mode`. |3043| `allowed_sandbox_modes` | `array<string>` | Allowed values for `sandbox_mode`. |

2914| `allowed_web_search_modes` | `array<string>` | Allowed values for `web_search` (`disabled`, `cached`, `live`). `disabled` is always allowed; an empty list effectively allows only `disabled`. |3044| `allowed_web_search_modes` | `array<string>` | Allowed values for `web_search` (`disabled`, `cached`, `live`). `disabled` is always allowed; an empty list effectively allows only `disabled`. |

2915| `features` | `table` | Pinned feature values keyed by the canonical names from `config.toml`'s `[features]` table. |3045| `features` | `table` | Pinned feature values keyed by the canonical names from `config.toml`'s `[features]` table. |

2916| `features.<name>` | `boolean` | Require a specific canonical feature key to stay enabled or disabled. |3046| `features.<name>` | `boolean` | Require a specific canonical feature key to stay enabled or disabled. |

3047| `features.browser_use` | `boolean` | Set to `false` in `requirements.toml` to disable Browser Use and Browser Agent availability. |

3048| `features.computer_use` | `boolean` | Set to `false` in `requirements.toml` to disable Computer Use availability and related install or enablement flows. |

3049| `features.in_app_browser` | `boolean` | Set to `false` in `requirements.toml` to disable the in-app browser pane. |

3050| `guardian_policy_config` | `string` | Managed Markdown policy instructions for automatic review. This takes precedence over local `[auto_review].policy`. Blank values are ignored. |

3051| `hooks` | `table` | Admin-enforced managed lifecycle hooks. Requires a managed hook directory and uses the same event schema as inline `[hooks]` in `config.toml`. |

3052| `hooks.<Event>` | `array<table>` | Matcher groups for a hook event such as `PreToolUse`, `PostToolUse`, `PermissionRequest`, `SessionStart`, `UserPromptSubmit`, or `Stop`. |

3053| `hooks.<Event>[].hooks` | `array<table>` | Hook handlers for a matcher group. Command hooks are currently supported; prompt and agent hook handlers are parsed but skipped. |

3054| `hooks.managed_dir` | `string (absolute path)` | Directory containing managed hook scripts on macOS and Linux. Codex validates that it is absolute and exists before loading managed hooks. |

3055| `hooks.windows_managed_dir` | `string (absolute path)` | Directory containing managed hook scripts on Windows. Codex validates that it is absolute and exists before loading managed hooks. |

2917| `mcp_servers` | `table` | Allowlist of MCP servers that may be enabled. Both the server name (`<id>`) and its identity must match for the MCP server to be enabled. Any configured MCP server not in the allowlist (or with a mismatched identity) is disabled. |3056| `mcp_servers` | `table` | Allowlist of MCP servers that may be enabled. Both the server name (`<id>`) and its identity must match for the MCP server to be enabled. Any configured MCP server not in the allowlist (or with a mismatched identity) is disabled. |

2918| `mcp_servers.<id>.identity` | `table` | Identity rule for a single MCP server. Set either `command` (stdio) or `url` (streamable HTTP). |3057| `mcp_servers.<id>.identity` | `table` | Identity rule for a single MCP server. Set either `command` (stdio) or `url` (streamable HTTP). |

2919| `mcp_servers.<id>.identity.command` | `string` | Allow an MCP stdio server when its `mcp_servers.<id>.command` matches this command. |3058| `mcp_servers.<id>.identity.command` | `string` | Allow an MCP stdio server when its `mcp_servers.<id>.command` matches this command. |

2920| `mcp_servers.<id>.identity.url` | `string` | Allow an MCP streamable HTTP server when its `mcp_servers.<id>.url` matches this URL. |3059| `mcp_servers.<id>.identity.url` | `string` | Allow an MCP streamable HTTP server when its `mcp_servers.<id>.url` matches this URL. |

3060| `permissions.filesystem.deny_read` | `array<string>` | Admin-enforced filesystem read denials. Entries can be paths or glob patterns, and users cannot weaken them with local config. |

3061| `remote_sandbox_config` | `array<table>` | Host-specific sandbox requirements. The first entry whose `hostname_patterns` match the resolved host name overrides top-level `allowed_sandbox_modes` for that requirements source. Host-specific entries currently override sandbox modes only. |

3062| `remote_sandbox_config[].allowed_sandbox_modes` | `array<string>` | Allowed sandbox modes to apply when this host-specific entry matches. |

3063| `remote_sandbox_config[].hostname_patterns` | `array<string>` | Case-insensitive host name patterns. Supports `*` for any sequence of characters and `?` for one character. |

2921| `rules` | `table` | Admin-enforced command rules merged with `.rules` files. Requirements rules must be restrictive. |3064| `rules` | `table` | Admin-enforced command rules merged with `.rules` files. Requirements rules must be restrictive. |

2922| `rules.prefix_rules` | `array<table>` | List of enforced prefix rules. Each rule must include `pattern` and `decision`. |3065| `rules.prefix_rules` | `array<table>` | List of enforced prefix rules. Each rule must include `pattern` and `decision`. |

2923| `rules.prefix_rules[].decision` | `prompt | forbidden` | Required. Requirements rules can only prompt or forbid (not allow). |3066| `rules.prefix_rules[].decision` | `prompt | forbidden` | Required. Requirements rules can only prompt or forbid (not allow). |


2948 3091 

2949Details3092Details

2950 3093 

2951Allowed values for `approvals_reviewer` (for example `user` and `guardian_subagent`).3094Allowed values for `approvals_reviewer`, such as `user` and `auto_review`.

2952 3095 

2953Key3096Key

2954 3097 


3000 3143 

3001Key3144Key

3002 3145 

3146`features.browser_use`

3147 

3148Type / Values

3149 

3150`boolean`

3151 

3152Details

3153 

3154Set to `false` in `requirements.toml` to disable Browser Use and Browser Agent availability.

3155 

3156Key

3157 

3158`features.computer_use`

3159 

3160Type / Values

3161 

3162`boolean`

3163 

3164Details

3165 

3166Set to `false` in `requirements.toml` to disable Computer Use availability and related install or enablement flows.

3167 

3168Key

3169 

3170`features.in_app_browser`

3171 

3172Type / Values

3173 

3174`boolean`

3175 

3176Details

3177 

3178Set to `false` in `requirements.toml` to disable the in-app browser pane.

3179 

3180Key

3181 

3182`guardian_policy_config`

3183 

3184Type / Values

3185 

3186`string`

3187 

3188Details

3189 

3190Managed Markdown policy instructions for automatic review. This takes precedence over local `[auto_review].policy`. Blank values are ignored.

3191 

3192Key

3193 

3194`hooks`

3195 

3196Type / Values

3197 

3198`table`

3199 

3200Details

3201 

3202Admin-enforced managed lifecycle hooks. Requires a managed hook directory and uses the same event schema as inline `[hooks]` in `config.toml`.

3203 

3204Key

3205 

3206`hooks.<Event>`

3207 

3208Type / Values

3209 

3210`array<table>`

3211 

3212Details

3213 

3214Matcher groups for a hook event such as `PreToolUse`, `PostToolUse`, `PermissionRequest`, `SessionStart`, `UserPromptSubmit`, or `Stop`.

3215 

3216Key

3217 

3218`hooks.<Event>[].hooks`

3219 

3220Type / Values

3221 

3222`array<table>`

3223 

3224Details

3225 

3226Hook handlers for a matcher group. Command hooks are currently supported; prompt and agent hook handlers are parsed but skipped.

3227 

3228Key

3229 

3230`hooks.managed_dir`

3231 

3232Type / Values

3233 

3234`string (absolute path)`

3235 

3236Details

3237 

3238Directory containing managed hook scripts on macOS and Linux. Codex validates that it is absolute and exists before loading managed hooks.

3239 

3240Key

3241 

3242`hooks.windows_managed_dir`

3243 

3244Type / Values

3245 

3246`string (absolute path)`

3247 

3248Details

3249 

3250Directory containing managed hook scripts on Windows. Codex validates that it is absolute and exists before loading managed hooks.

3251 

3252Key

3253 

3003`mcp_servers`3254`mcp_servers`

3004 3255 

3005Type / Values3256Type / Values


3048 3299 

3049Key3300Key

3050 3301 

3302`permissions.filesystem.deny_read`

3303 

3304Type / Values

3305 

3306`array<string>`

3307 

3308Details

3309 

3310Admin-enforced filesystem read denials. Entries can be paths or glob patterns, and users cannot weaken them with local config.

3311 

3312Key

3313 

3314`remote_sandbox_config`

3315 

3316Type / Values

3317 

3318`array<table>`

3319 

3320Details

3321 

3322Host-specific sandbox requirements. The first entry whose `hostname_patterns` match the resolved host name overrides top-level `allowed_sandbox_modes` for that requirements source. Host-specific entries currently override sandbox modes only.

3323 

3324Key

3325 

3326`remote_sandbox_config[].allowed_sandbox_modes`

3327 

3328Type / Values

3329 

3330`array<string>`

3331 

3332Details

3333 

3334Allowed sandbox modes to apply when this host-specific entry matches.

3335 

3336Key

3337 

3338`remote_sandbox_config[].hostname_patterns`

3339 

3340Type / Values

3341 

3342`array<string>`

3343 

3344Details

3345 

3346Case-insensitive host name patterns. Supports `*` for any sequence of characters and `?` for one character.

3347 

3348Key

3349 

3051`rules`3350`rules`

3052 3351 

3053Type / Values3352Type / Values

config-sample.md +67 −8

Details

27# Core Model Selection27# Core Model Selection

28################################################################################28################################################################################

29 29 

30# Primary model used by Codex. Recommended example for most users: "gpt-5.4".30# Primary model used by Codex. Recommended example for most users: "gpt-5.5".

31model = "gpt-5.4"31model = "gpt-5.5"

32 32 

33# Communication style for supported models. Allowed values: none | friendly | pragmatic33# Communication style for supported models. Allowed values: none | friendly | pragmatic

34# personality = "pragmatic"34# personality = "pragmatic"

35 35 

36# Optional model override for /review. Default: unset (uses current session model).36# Optional model override for /review. Default: unset (uses current session model).

37# review_model = "gpt-5.4"37# review_model = "gpt-5.5"

38 38 

39# Provider id selected from [model_providers]. Default: "openai".39# Provider id selected from [model_providers]. Default: "openai".

40model_provider = "openai"40model_provider = "openai"


109# - never: never prompt (risky)109# - never: never prompt (risky)

110# - { granular = { ... } }: allow or auto-reject selected prompt categories110# - { granular = { ... } }: allow or auto-reject selected prompt categories

111approval_policy = "on-request"111approval_policy = "on-request"

112# Who reviews eligible approval prompts: user (default) | guardian_subagent112# Who reviews eligible approval prompts: user (default) | auto_review

113# approvals_reviewer = "user"113# approvals_reviewer = "user"

114 114 

115# Example granular policy:115# Example granular policy:


130# - workspace-write130# - workspace-write

131# - danger-full-access (no sandbox; extremely risky)131# - danger-full-access (no sandbox; extremely risky)

132sandbox_mode = "read-only"132sandbox_mode = "read-only"

133# Named permissions profile to apply by default. Required before using [permissions.<name>].133# Named permissions profile to apply by default. Built-ins:

134# default_permissions = "workspace"134# :read-only | :workspace | :danger-no-sandbox

135# Use a custom name such as "workspace" only when you also define [permissions.workspace].

136# default_permissions = ":workspace"

137 

138# Example filesystem profile. Use `"none"` to deny reads for exact paths or

139# glob patterns. On platforms that need pre-expanded glob matches, set

140# glob_scan_max_depth when using unbounded patterns such as `**`.

141# [permissions.workspace.filesystem]

142# glob_scan_max_depth = 3

143# ":project_roots" = { "." = "write", "**/*.env" = "none" }

144# "/absolute/path/to/secrets" = "none"

135 145 

136################################################################################146################################################################################

137# Authentication & Login147# Authentication & Login


323# Notification mechanism for terminal alerts: auto | osc9 | bel. Default: "auto"333# Notification mechanism for terminal alerts: auto | osc9 | bel. Default: "auto"

324# notification_method = "auto"334# notification_method = "auto"

325 335 

336# When notifications fire: unfocused (default) | always

337# notification_condition = "unfocused"

338 

326# Enables welcome/status/spinner animations. Default: true339# Enables welcome/status/spinner animations. Default: true

327animations = true340animations = true

328 341 


347# You can also add custom .tmTheme files under $CODEX_HOME/themes.360# You can also add custom .tmTheme files under $CODEX_HOME/themes.

348# theme = "catppuccin-mocha"361# theme = "catppuccin-mocha"

349 362 

363# Custom key bindings. Context-specific bindings override [tui.keymap.global].

364# Use [] to unbind an action.

365# [tui.keymap.global]

366# open_transcript = "ctrl-t"

367# open_external_editor = []

368#

369# [tui.keymap.composer]

370# submit = ["enter", "ctrl-m"]

371 

350# Internal tooltip state keyed by model slug. Usually managed by Codex.372# Internal tooltip state keyed by model slug. Usually managed by Codex.

351# [tui.model_availability_nux]373# [tui.model_availability_nux]

352# "gpt-5.4" = 1374# "gpt-5.4" = 1


382# multi_agent = true404# multi_agent = true

383# personality = true405# personality = true

384# fast_mode = true406# fast_mode = true

385# guardian_approval = false

386# enable_request_compression = true407# enable_request_compression = true

387# skill_mcp_dependency_install = true408# skill_mcp_dependency_install = true

388# prevent_idle_sleep = false409# prevent_idle_sleep = false

389 410 

411################################################################################

412# Memories (table)

413################################################################################

414 

415# Enable memories with [features].memories, then tune memory behavior here.

416# [memories]

417# generate_memories = true

418# use_memories = true

419# disable_on_external_context = false # legacy alias: no_memories_if_mcp_or_web_search

420 

421################################################################################

422# Lifecycle hooks can be configured here inline or in a sibling hooks.json.

423################################################################################

424 

425# [hooks]

426# [[hooks.PreToolUse]]

427# matcher = "^Bash$"

428#

429# [[hooks.PreToolUse.hooks]]

430# type = "command"

431# command = 'python3 "/absolute/path/to/pre_tool_use_policy.py"'

432# timeout = 30

433# statusMessage = "Checking Bash command"

434 

390################################################################################435################################################################################

391# Define MCP servers under this table. Leave empty to disable.436# Define MCP servers under this table. Leave empty to disable.

392################################################################################437################################################################################


400# command = "docs-server" # required445# command = "docs-server" # required

401# args = ["--port", "4000"] # optional446# args = ["--port", "4000"] # optional

402# env = { "API_KEY" = "value" } # optional key/value pairs copied as-is447# env = { "API_KEY" = "value" } # optional key/value pairs copied as-is

403# env_vars = ["ANOTHER_SECRET"] # optional: forward these from the parent env448# env_vars = ["ANOTHER_SECRET"] # optional: forward local parent env vars

449# env_vars = ["LOCAL_TOKEN", { name = "REMOTE_TOKEN", source = "remote" }]

404# cwd = "/path/to/server" # optional working directory override450# cwd = "/path/to/server" # optional working directory override

451# experimental_environment = "remote" # experimental: run stdio via a remote executor

405# startup_timeout_sec = 10.0 # optional; default 10.0 seconds452# startup_timeout_sec = 10.0 # optional; default 10.0 seconds

406# # startup_timeout_ms = 10000 # optional alias for startup timeout (milliseconds)453# # startup_timeout_ms = 10000 # optional alias for startup timeout (milliseconds)

407# tool_timeout_sec = 60.0 # optional; default 60.0 seconds454# tool_timeout_sec = 60.0 # optional; default 60.0 seconds


432# - openai479# - openai

433# - ollama480# - ollama

434# - lmstudio481# - lmstudio

482# - amazon-bedrock

435# These IDs are reserved. Use a different ID for custom providers.483# These IDs are reserved. Use a different ID for custom providers.

436 484 

437[model_providers]485[model_providers]

438 486 

487# --- Example: built-in Amazon Bedrock provider options ---

488# model_provider = "amazon-bedrock"

489# model = "<bedrock-model-id>"

490# [model_providers.amazon-bedrock.aws]

491# profile = "default"

492# region = "eu-central-1"

493 

439# --- Example: OpenAI data residency with explicit base URL or headers ---494# --- Example: OpenAI data residency with explicit base URL or headers ---

440# [model_providers.openaidr]495# [model_providers.openaidr]

441# name = "OpenAI Data Residency"496# name = "OpenAI Data Residency"


506# { type = "connector", id = "gmail" },561# { type = "connector", id = "gmail" },

507# { type = "plugin", id = "figma@openai-curated" },562# { type = "plugin", id = "figma@openai-curated" },

508# ]563# ]

564# disabled_tools = [

565# { type = "plugin", id = "slack@openai-curated" },

566# { type = "connector", id = "connector_googlecalendar" },

567# ]

509 568 

510################################################################################569################################################################################

511# Profiles (named presets)570# Profiles (named presets)

Details

139 139 

140Codex Admins can deploy admin-enforced `requirements.toml` policies from the Codex [Policies page](https://chatgpt.com/codex/settings/policies).140Codex Admins can deploy admin-enforced `requirements.toml` policies from the Codex [Policies page](https://chatgpt.com/codex/settings/policies).

141 141 

142Use 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, MCP server allowlists, feature pins, and restrictive command rules.142Use 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, 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).

143 143 

144![Codex policies and configurations page](/images/codex/enterprise/policies_and_configurations_page.png)144![Codex policies and configurations page](/images/codex/enterprise/policies_and_configurations_page.png)

145 145 


166allowed_approval_policies = ["on-request"]166allowed_approval_policies = ["on-request"]

167```167```

168 168 

169Example: disable Browser Use, the in-app browser, and Computer Use:

170 

171```toml

172[features]

173browser_use = false

174in_app_browser = false

175computer_use = false

176```

177 

169Example: add a restrictive command rule when you want admins to block or gate specific commands:178Example: add a restrictive command rule when you want admins to block or gate specific commands:

170 179 

171```toml180```toml

Details

7 7 

8## Admin-enforced requirements (requirements.toml)8## Admin-enforced requirements (requirements.toml)

9 9 

10Requirements constrain security-sensitive settings (approval policy, sandbox mode, web search mode, and optionally which MCP servers users can enable). When resolving configuration (for example from `config.toml`, 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, web search mode, managed hooks, and optionally which MCP servers users can enable). When resolving configuration (for example from `config.toml`, 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 aren't 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 


19 19 

201. Cloud-managed requirements (ChatGPT Business or Enterprise)201. Cloud-managed requirements (ChatGPT Business or Enterprise)

212. macOS managed preferences (MDM) via `com.openai.codex:requirements_toml_base64`212. macOS managed preferences (MDM) via `com.openai.codex:requirements_toml_base64`

223. System `requirements.toml` (`/etc/codex/requirements.toml` on Unix systems, including Linux/macOS)223. System `requirements.toml` (`/etc/codex/requirements.toml` on Unix systems, including Linux/macOS, or `%ProgramData%\OpenAI\Codex\requirements.toml` on Windows)

23 23 

24Across layers, Codex merges requirements per field: if an earlier layer sets a field (including an empty list), later layers don't override that field, but lower layers can still fill fields that remain unset.24Across layers, Codex merges requirements per field: if an earlier layer sets a field (including an empty list), later layers don't override that field, but lower layers can still fill fields that remain unset.

25 25 


72allowed_sandbox_modes = ["read-only", "workspace-write"]72allowed_sandbox_modes = ["read-only", "workspace-write"]

73```73```

74 74 

75### Override sandbox requirements by host

76 

77Use `[[remote_sandbox_config]]` when one managed policy should apply different

78sandbox requirements on different hosts. For example, you can keep a stricter

79default for laptops while allowing workspace writes on matching devboxes or CI

80runners. Host-specific entries currently override `allowed_sandbox_modes` only:

81 

82```toml

83allowed_sandbox_modes = ["read-only"]

84 

85[[remote_sandbox_config]]

86hostname_patterns = ["*.devbox.example.com", "runner-??.ci.example.com"]

87allowed_sandbox_modes = ["read-only", "workspace-write"]

88```

89 

90Codex compares each `hostname_patterns` entry against the best-effort resolved

91host name. It prefers the fully qualified domain name when available and falls

92back to the local host name. Matching is case-insensitive; `*` matches any

93sequence of characters, and `?` matches one character.

94 

95The first matching `[[remote_sandbox_config]]` entry wins within the same

96requirements source. If no entry matches, Codex keeps the top-level

97`allowed_sandbox_modes`. Hostname matching is for policy selection only; don't

98treat it as authenticated device proof.

99 

75You can also constrain web search mode:100You can also constrain web search mode:

76 101 

77```toml102```toml


81`allowed_web_search_modes = []` allows only `"disabled"`.106`allowed_web_search_modes = []` allows only `"disabled"`.

82For example, `allowed_web_search_modes = ["cached"]` prevents live web search even in `danger-full-access` sessions.107For example, `allowed_web_search_modes = ["cached"]` prevents live web search even in `danger-full-access` sessions.

83 108 

84You can also pin [feature flags](https://developers.openai.com/codex/config-basic/#feature-flags):109### Pin feature flags

85 110 

86```111You can also pin [feature flags](https://developers.openai.com/codex/config-basic/#feature-flags) for users

112receiving a managed `requirements.toml`:

113 

114```toml

87[features]115[features]

88personality = true116personality = true

89unified_exec = false117unified_exec = false

118 

119# Disable specific Codex feature surfaces when needed.

120browser_use = false

121in_app_browser = false

122computer_use = false

90```123```

91 124 

92Use 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-scoped feature settings.125Use 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-scoped feature settings.

93 126 

127- `in_app_browser = false` disables the in-app browser pane.

128- `browser_use = false` disables Browser Use and Browser Agent availability.

129- `computer_use = false` disables Computer Use availability and related

130 install or enablement flows.

131 

132If omitted, these features are allowed by policy, subject to normal client,

133platform, and rollout availability.

134 

135### Configure automatic review policy

136 

137Use `allowed_approvals_reviewers` to require or allow automatic review. Set it

138to `["auto_review"]` to require automatic review, or include `"user"` when users

139can choose manual approval.

140 

141Set `guardian_policy_config` to replace the tenant-specific section of the

142automatic review policy. Codex still uses the built-in reviewer template and

143output contract. Managed `guardian_policy_config` takes precedence over local

144`[auto_review].policy`.

145 

146```toml

147allowed_approval_policies = ["on-request"]

148allowed_approvals_reviewers = ["auto_review"]

149 

150guardian_policy_config = """

151## Environment Profile

152- Trusted internal destinations include github.com/my-org, artifacts.example.com,

153 and internal CI systems.

154 

155## Tenant Risk Taxonomy and Allow/Deny Rules

156- Treat uploads to unapproved third-party file-sharing services as high risk.

157- Deny actions that expose credentials or private source code to untrusted

158 destinations.

159"""

160```

161 

162### Enforce deny-read requirements

163 

164Admins can deny reads for exact paths or glob patterns with

165`[permissions.filesystem]`. Users can't weaken these requirements with local

166configuration.

167 

168```toml

169[permissions.filesystem]

170deny_read = [

171 "/Users/alice/.ssh",

172 "./private/**/*.txt",

173]

174```

175 

176When deny-read requirements are present, Codex constrains local sandbox mode to

177`read-only` or `workspace-write` so Codex can enforce them. On native

178Windows, managed `deny_read` applies to direct file tools; shell subprocess

179reads don't use this sandbox rule.

180 

181### Enforce managed hooks from requirements

182 

183Admins can also define managed lifecycle hooks directly in `requirements.toml`.

184Use `[hooks]` for the hook configuration itself, and point `managed_dir` at the

185directory where your MDM or endpoint-management tooling installs the referenced

186scripts.

187 

188```toml

189[features]

190codex_hooks = true

191 

192[hooks]

193managed_dir = "/enterprise/hooks"

194windows_managed_dir = 'C:\enterprise\hooks'

195 

196[[hooks.PreToolUse]]

197matcher = "^Bash$"

198 

199[[hooks.PreToolUse.hooks]]

200type = "command"

201command = "python3 /enterprise/hooks/pre_tool_use_policy.py"

202timeout = 30

203statusMessage = "Checking managed Bash command"

204```

205 

206Notes:

207 

208- Codex enforces the hook configuration from `requirements.toml`, but it does

209 not distribute the scripts in `managed_dir`.

210- Deliver those scripts separately with your MDM or device-management solution.

211- Managed hook commands should reference absolute script paths under the

212 configured managed directory.

213 

94### Enforce command rules from requirements214### Enforce command rules from requirements

95 215 

96Admins can also enforce restrictive command rules from `requirements.toml`216Admins can also enforce restrictive command rules from `requirements.toml`

Details

84Fine-tune how Codex runs by setting the action inputs that map to `codex exec` options:84Fine-tune how Codex runs by setting the action inputs that map to `codex exec` options:

85 85 

86- `prompt` or `prompt-file` (choose one): Inline instructions or a repository path to Markdown or text with your task. Consider storing prompts in `.github/codex/prompts/`.86- `prompt` or `prompt-file` (choose one): Inline instructions or a repository path to Markdown or text with your task. Consider storing prompts in `.github/codex/prompts/`.

87- `codex-args`: Extra CLI flags. Provide a JSON array (for example `["--full-auto"]`) or a shell string (`--full-auto --sandbox danger-full-access`) to allow edits, streaming, or MCP configuration.87- `codex-args`: Extra CLI flags. Provide a JSON array (for example `["--json"]`) or a shell string (`--sandbox workspace-write --json`) to allow edits, streaming, or MCP configuration.

88- `model` and `effort`: Pick the Codex agent configuration you want; leave empty for defaults.88- `model` and `effort`: Pick the Codex agent configuration you want; leave empty for defaults.

89- `sandbox`: Match the sandbox mode (`workspace-write`, `read-only`, `danger-full-access`) to the permissions Codex needs during the run.89- `sandbox`: Match the sandbox mode (`workspace-write`, `read-only`, `danger-full-access`) to the permissions Codex needs during the run.

90- `output-file`: Save the final Codex message to disk so later steps can upload or diff it.90- `output-file`: Save the final Codex message to disk so later steps can upload or diff it.

hooks.md +191 −50

Details

1# Hooks1# Hooks

2 2 

3Experimental. Hooks are under active development. Windows support temporarily

4disabled.

5 

6Hooks are an extensibility framework for Codex. They allow3Hooks are an extensibility framework for Codex. They allow

7you 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:

8 5 

9- Send the conversation to a custom logging/analytics engine6- Send the conversation to a custom logging/analytics engine

10- Scan your team's prompts to block accidentally pasting API keys7- Scan your team's prompts to block accidentally pasting API keys

11- Summarize conversations to create persistent memories automatically8- Summarize conversations to create persistent memories automatically

12- Run a custom validator when a conversation turn stops, enforcing standards9- Run a custom validation check when a conversation turn stops, enforcing standards

13- Customize prompting when in a certain directory10- Customize prompting when in a certain directory

14 11 

15Hooks are behind a feature flag in `config.toml`:12Hooks are behind a feature flag in `config.toml`:


24- Matching hooks from multiple files all run.21- Matching hooks from multiple files all run.

25- Multiple matching command hooks for the same event are launched concurrently,22- Multiple matching command hooks for the same event are launched concurrently,

26 so one hook cannot prevent another matching hook from starting.23 so one hook cannot prevent another matching hook from starting.

27- `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, and `Stop` run at turn24- `PreToolUse`, `PermissionRequest`, `PostToolUse`, `UserPromptSubmit`, and

28 scope.25 `Stop` run at turn scope.

29- Hooks are currently disabled on Windows.

30 26 

31## Where Codex looks for hooks27## Where Codex looks for hooks

32 28 

33Codex discovers `hooks.json` next to active config layers.29Codex discovers hooks next to active config layers in either of these forms:

30 

31- `hooks.json`

32- inline `[hooks]` tables inside `config.toml`

33 

34Installed plugins can also bundle lifecycle config through their plugin

35manifest or a default `hooks/hooks.json` file. See [Build

36plugins](https://developers.openai.com/codex/plugins/build#bundled-mcp-servers-and-lifecycle-config) for the

37plugin packaging rules.

34 38 

35In practice, the two most useful locations are:39In practice, the four most useful locations are:

36 40 

37- `~/.codex/hooks.json`41- `~/.codex/hooks.json`

42- `~/.codex/config.toml`

38- `<repo>/.codex/hooks.json`43- `<repo>/.codex/hooks.json`

44- `<repo>/.codex/config.toml`

39 45 

40If more than one `hooks.json` file exists, Codex loads all matching hooks.46If more than one hook source exists, Codex loads all matching hooks.

41Higher-precedence config layers do not replace lower-precedence hooks.47Higher-precedence config layers do not replace lower-precedence hooks.

48If a single layer contains both `hooks.json` and inline `[hooks]`, Codex

49merges them and warns at startup. Prefer one representation per layer.

50 

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

52untrusted projects, Codex still loads user and system hooks from their own

53active config layers.

42 54 

43## Config shape55## Config shape

44 56 


75 ]87 ]

76 }88 }

77 ],89 ],

90 "PermissionRequest": [

91 {

92 "matcher": "Bash",

93 "hooks": [

94 {

95 "type": "command",

96 "command": "/usr/bin/python3 \"$(git rev-parse --show-toplevel)/.codex/hooks/permission_request.py\"",

97 "statusMessage": "Checking approval request"

98 }

99 ]

100 }

101 ],

78 "PostToolUse": [102 "PostToolUse": [

79 {103 {

80 "matcher": "Bash",104 "matcher": "Bash",


115Notes:139Notes:

116 140 

117- `timeout` is in seconds.141- `timeout` is in seconds.

118- `timeoutSec` is also accepted as an alias.

119- If `timeout` is omitted, Codex uses `600` seconds.142- If `timeout` is omitted, Codex uses `600` seconds.

120- `statusMessage` is optional.143- `statusMessage` is optional.

121- Commands run with the session `cwd` as their working directory.144- Commands run with the session `cwd` as their working directory.


123 relative path such as `.codex/hooks/...`. Codex may be started from a146 relative path such as `.codex/hooks/...`. Codex may be started from a

124 subdirectory, and a git-root-based path keeps the hook location stable.147 subdirectory, and a git-root-based path keeps the hook location stable.

125 148 

149Equivalent inline TOML in `config.toml`:

150 

151```toml

152[features]

153codex_hooks = true

154 

155[[hooks.PreToolUse]]

156matcher = "^Bash$"

157 

158[[hooks.PreToolUse.hooks]]

159type = "command"

160command = '/usr/bin/python3 "$(git rev-parse --show-toplevel)/.codex/hooks/pre_tool_use_policy.py"'

161timeout = 30

162statusMessage = "Checking Bash command"

163 

164[[hooks.PostToolUse]]

165matcher = "^Bash$"

166 

167[[hooks.PostToolUse.hooks]]

168type = "command"

169command = '/usr/bin/python3 "$(git rev-parse --show-toplevel)/.codex/hooks/post_tool_use_review.py"'

170timeout = 30

171statusMessage = "Reviewing Bash output"

172```

173 

174## Managed hooks from `requirements.toml`

175 

176Enterprise-managed requirements can also define hooks inline under `[hooks]`.

177This is useful when admins want to enforce the hook configuration while

178delivering the actual scripts through MDM or another device-management system.

179 

180```toml

181[features]

182codex_hooks = true

183 

184[hooks]

185managed_dir = "/enterprise/hooks"

186windows_managed_dir = 'C:\enterprise\hooks'

187 

188[[hooks.PreToolUse]]

189matcher = "^Bash$"

190 

191[[hooks.PreToolUse.hooks]]

192type = "command"

193command = "python3 /enterprise/hooks/pre_tool_use_policy.py"

194timeout = 30

195statusMessage = "Checking managed Bash command"

196```

197 

198Notes for managed hooks:

199 

200- `managed_dir` is used on macOS and Linux.

201- `windows_managed_dir` is used on Windows.

202- Codex does not distribute the scripts in `managed_dir`; your enterprise

203 tooling must install and update them separately.

204- Managed hook commands should use absolute script paths under the configured

205 managed directory.

206 

126## Matcher patterns207## Matcher patterns

127 208 

128The `matcher` field is a regex string that filters when hooks fire. Use `"*"`,209The `matcher` field is a regex string that filters when hooks fire. Use `"*"`,


133 214 

134| Event | What `matcher` filters | Notes |215| Event | What `matcher` filters | Notes |

135| --- | --- | --- |216| --- | --- | --- |

136| `PostToolUse` | tool name | Current Codex runtime only emits `Bash`. |217| `PermissionRequest` | tool name | Support includes `Bash`, `apply_patch`\*, and MCP tool names |

137| `PreToolUse` | tool name | Current Codex runtime only emits `Bash`. |218| `PostToolUse` | tool name | Support includes `Bash`, `apply_patch`\*, and MCP tool names |

138| `SessionStart` | start source | Current runtime values are `startup` and `resume`. |219| `PreToolUse` | tool name | Support includes `Bash`, `apply_patch`\*, and MCP tool names |

139| `UserPromptSubmit` | not supported | Any configured `matcher` is ignored for this event. |220| `SessionStart` | start source | Current runtime values are `startup`, `resume`, and `clear` |

140| `Stop` | not supported | Any configured `matcher` is ignored for this event. |221| `UserPromptSubmit` | not supported | Any configured `matcher` is ignored for this event |

222| `Stop` | not supported | Any configured `matcher` is ignored for this event |

223 

224\*For `apply_patch`, matchers can also use `Edit` or `Write`.

141 225 

142Examples:226Examples:

143 227 

144- `Bash`228- `Bash`

145- `startup|resume`229- `^apply_patch$`

146- `Edit|Write`230- `Edit|Write`

147 231- `mcp__filesystem__read_file`

148That last example is still a valid regex, but current Codex `PreToolUse` and232- `mcp__filesystem__.*`

149`PostToolUse` events only emit `Bash`, so it will not match anything today.233- `startup|resume|clear`

150 234 

151## Common input fields235## Common input fields

152 236 


189 273 

190Exit `0` with no output is treated as success and Codex continues.274Exit `0` with no output is treated as success and Codex continues.

191 275 

192`PreToolUse` supports `systemMessage`, but `continue`, `stopReason`, and276`PreToolUse` and `PermissionRequest` support `systemMessage`, but `continue`,

193`suppressOutput` are not currently supported for that event.277`stopReason`, and `suppressOutput` aren't currently supported for those events.

194 278 

195`PostToolUse` supports `systemMessage`, `continue: false`, and `stopReason`.279`PostToolUse` supports `systemMessage`, `continue: false`, and `stopReason`.

196`suppressOutput` is parsed but not currently supported for that event.280`suppressOutput` is parsed but not currently supported for that event.


225 309 

226### PreToolUse310### PreToolUse

227 311 

228Work in progress312`PreToolUse` can intercept Bash, file edits performed through `apply_patch`,

229 313and MCP tool calls. It is still a guardrail rather than a complete enforcement

230Currently `PreToolUse` only supports Bash tool interception. The model can314boundary because Codex can often perform equivalent work through another

231still work around this by writing its own script to disk and then running that315supported tool path.

232script with Bash, so treat this as a useful guardrail rather than a complete

233enforcement boundary

234 316 

235This doesn't intercept all shell calls yet, only the simple ones. The newer317This doesn't intercept all shell calls yet, only the simple ones. The newer

236 `unified_exec` mechanism allows richer streaming stdin/stdout handling of318 `unified_exec` mechanism allows richer streaming stdin/stdout handling of

237shell, but interception is incomplete. Similarly, this doesnt intercept MCP,319 shell, but interception is incomplete. Similarly, this doesn't intercept

238Write, WebSearch, or other non-shell tool calls.320 `WebSearch` or other non-shell, non-MCP tool calls.

239 321 

240`matcher` is applied to `tool_name`, which currently always equals `Bash`.322`matcher` is applied to `tool_name` and matcher aliases. For file edits through

323`apply_patch`, matchers can use `apply_patch`, `Edit`, or `Write`; hook input

324still reports `tool_name: "apply_patch"`.

241 325 

242Fields in addition to [Common input fields](#common-input-fields):326Fields in addition to [Common input fields](#common-input-fields):

243 327 

244| Field | Type | Meaning |328| Field | Type | Meaning |

245| --- | --- | --- |329| --- | --- | --- |

246| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |330| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

247| `tool_name` | `string` | Currently always `Bash` |331| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |

248| `tool_use_id` | `string` | Tool-call id for this invocation |332| `tool_use_id` | `string` | Tool-call id for this invocation |

249| `tool_input.command` | `string` | Shell command Codex is about to run |333| `tool_input` | `JSON value` | Tool-specific input. `Bash` and `apply_patch` use `tool_input.command` while MCP tools send all the args. |

250 334 

251Plain text on `stdout` is ignored.335Plain text on `stdout` is ignored.

252 336 


278`updatedInput`, `additionalContext`, `continue: false`, `stopReason`, and362`updatedInput`, `additionalContext`, `continue: false`, `stopReason`, and

279`suppressOutput` are parsed but not supported yet, so they fail open.363`suppressOutput` are parsed but not supported yet, so they fail open.

280 364 

281### PostToolUse365### PermissionRequest

366 

367`PermissionRequest` runs when Codex is about to ask for approval, such as a

368shell escalation or managed-network approval. It can allow the request, deny

369the request, or decline to decide and let the normal approval prompt continue.

370It doesn't run for commands that don't need approval.

371 

372`matcher` is applied to `tool_name` and matcher aliases. Current canonical

373values include `Bash`, `apply_patch`, and MCP tool names such as

374`mcp__server__tool`; `apply_patch` also matches `Edit` and `Write`.

375 

376Fields in addition to [Common input fields](#common-input-fields):

377 

378| Field | Type | Meaning |

379| --- | --- | --- |

380| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

381| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |

382| `tool_input` | `JSON value` | Tool-specific input. `Bash` and `apply_patch` use `tool_input.command` while MCP tools send all the args. |

383| `tool_input.description` | `string | null` | Human-readable approval reason, when Codex has one |

384 

385Plain text on `stdout` is ignored.

282 386 

283Work in progress387To approve the request, return:

388 

389```json

390{

391 "hookSpecificOutput": {

392 "hookEventName": "PermissionRequest",

393 "decision": {

394 "behavior": "allow"

395 }

396 }

397}

398```

399 

400To deny the request, return:

401 

402```json

403{

404 "hookSpecificOutput": {

405 "hookEventName": "PermissionRequest",

406 "decision": {

407 "behavior": "deny",

408 "message": "Blocked by repository policy."

409 }

410 }

411}

412```

413 

414If multiple matching hooks return decisions, any `deny` wins. Otherwise, an

415`allow` lets the request proceed without surfacing the approval prompt. If no

416matching hook decides, Codex uses the normal approval flow.

417 

418Don't return `updatedInput`, `updatedPermissions`, or `interrupt` for

419`PermissionRequest`; those fields are reserved for future behavior and fail

420closed today.

421 

422### PostToolUse

284 423 

285Currently `PostToolUse` only supports Bash tool results. It is not limited to424`PostToolUse` runs after supported tools produce output, including Bash,

286commands that exit successfully: non-interactive `exec_command` calls can still425`apply_patch`, and MCP tool calls. For Bash, it also runs after commands that

287trigger `PostToolUse` when Codex emits a Bash post-tool payload. It cannot undo426exit with a non-zero status. It can't undo side effects from the tool that

288side effects from the command that already ran.427already ran.

289 428 

290This doesn't intercept all shell calls yet, only the simple ones. The newer429This doesn't intercept all shell calls yet, only the simple ones. The newer

291 `unified_exec` mechanism allows richer streaming stdin/stdout handling of430 `unified_exec` mechanism allows richer streaming stdin/stdout handling of

292shell, but interception is incomplete. Similarly, this doesnt intercept MCP,431 shell, but interception is incomplete. Similarly, this doesn't intercept

293Write, WebSearch, or other non-shell tool calls.432 `WebSearch` or other non-shell, non-MCP tool calls.

294 433 

295`matcher` is applied to `tool_name`, which currently always equals `Bash`.434`matcher` is applied to `tool_name` and matcher aliases. For file edits through

435`apply_patch`, matchers can use `apply_patch`, `Edit`, or `Write`; hook input

436still reports `tool_name: "apply_patch"`.

296 437 

297Fields in addition to [Common input fields](#common-input-fields):438Fields in addition to [Common input fields](#common-input-fields):

298 439 

299| Field | Type | Meaning |440| Field | Type | Meaning |

300| --- | --- | --- |441| --- | --- | --- |

301| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |442| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

302| `tool_name` | `string` | Currently always `Bash` |443| `tool_name` | `string` | Canonical hook tool name, such as `Bash`, `apply_patch`, or an MCP name like `mcp__fs__read` |

303| `tool_use_id` | `string` | Tool-call id for this invocation |444| `tool_use_id` | `string` | Tool-call id for this invocation |

304| `tool_input.command` | `string` | Shell command Codex just ran |445| `tool_input` | `JSON value` | Tool-specific input. `Bash` and `apply_patch` use `tool_input.command` while MCP tools send all the args. |

305| `tool_response` | `JSON value` | Bash tool output payload. Today this is usually a JSON string |446| `tool_response` | `JSON value` | Tool-specific output. For MCP tools, this is the MCP call result. |

306 447 

307Plain text on `stdout` is ignored.448Plain text on `stdout` is ignored.

308 449 


321 462 

322That `additionalContext` text is added as extra developer context.463That `additionalContext` text is added as extra developer context.

323 464 

324For this event, `decision: "block"` does not undo the completed Bash command.465For this event, `decision: "block"` doesn't undo the completed Bash command.

325Instead, Codex records the feedback, replaces the tool result with that466Instead, Codex records the feedback, replaces the tool result with that

326feedback, and continues the model from the hook-provided message.467feedback, and continues the model from the hook-provided message.

327 468 


336 477 

337### UserPromptSubmit478### UserPromptSubmit

338 479 

339`matcher` is not currently used for this event.480`matcher` isn't currently used for this event.

340 481 

341Fields in addition to [Common input fields](#common-input-fields):482Fields in addition to [Common input fields](#common-input-fields):

342 483 

343| Field | Type | Meaning |484| Field | Type | Meaning |

344| --- | --- | --- |485| --- | --- | --- |

345| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |486| `turn_id` | `string` | Codex-specific extension. Active Codex turn id |

346| `prompt` | `string` | User prompt that is about to be sent |487| `prompt` | `string` | User prompt that's about to be sent |

347 488 

348Plain text on `stdout` is added as extra developer context.489Plain text on `stdout` is added as extra developer context.

349 490 


374 515 

375### Stop516### Stop

376 517 

377`matcher` is not currently used for this event.518`matcher` isn't currently used for this event.

378 519 

379Fields in addition to [Common input fields](#common-input-fields):520Fields in addition to [Common input fields](#common-input-fields):

380 521 


399 540 

400You can also use exit code `2` and write the continuation reason to `stderr`.541You can also use exit code `2` and write the continuation reason to `stderr`.

401 542 

402For this event, `decision: "block"` does not reject the turn. Instead, it tells543For this event, `decision: "block"` doesn't reject the turn. Instead, it tells

403Codex to continue and automatically creates a new continuation prompt that acts544Codex to continue and automatically creates a new continuation prompt that acts

404as a new user prompt, using your `reason` as that prompt text.545as a new user prompt, using your `reason` as that prompt text.

405 546 

ide.md +4 −3

Details

16- [Download for Visual Studio Code Insiders](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt)16- [Download for Visual Studio Code Insiders](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt)

17- [Download for JetBrains IDEs](#jetbrains-ide-integration)17- [Download for JetBrains IDEs](#jetbrains-ide-integration)

18 18 

19The Codex VS Code extension is available on macOS and Linux. Windows support19Codex IDE integrations for VS Code-compatible editors and JetBrains IDEs are

20is experimental. For the best Windows experience, use Codex in a WSL220 available on macOS, Windows, and Linux. On Windows, run Codex natively with

21workspace and follow our [Windows setup guide](https://developers.openai.com/codex/windows).21 the Windows sandbox, or use WSL2 when you need a Linux-native environment. For

22setup details, see the [Windows setup guide](https://developers.openai.com/codex/windows).

22 23 

23After you install it, you'll find Codex in your editor sidebar.24After you install it, you'll find Codex in your editor sidebar.

24In VS Code, Codex opens in the right sidebar by default.25In VS Code, Codex opens in the right sidebar by default.

ide/features.md +1 −1

Details

73 73 

74You can ask in natural language or explicitly invoke the image generation skill by including `$imagegen` in your prompt.74You can ask in natural language or explicitly invoke the image generation skill by including `$imagegen` in your prompt.

75 75 

76Built-in image generation uses `gpt-image-1.5`, counts toward your general Codex usage limits, and uses included limits 3-5x faster on average than similar turns without image generation, depending on image quality and size. For details, see [Pricing](https://developers.openai.com/codex/pricing#image-generation-usage-limits). For prompting tips and model details, see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation).76Built-in image generation uses `gpt-image-2`, counts toward your general Codex usage limits, and uses included limits 3-5x faster on average than similar turns without image generation, depending on image quality and size. For details, see [Pricing](https://developers.openai.com/codex/pricing#image-generation-usage-limits). For prompting tips and model details, see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation).

77 77 

78For larger batches of image generation, set `OPENAI_API_KEY` in your environment variables and ask Codex to generate images through the API so API pricing applies instead.78For larger batches of image generation, set `OPENAI_API_KEY` in your environment variables and ask Codex to generate images through the API so API pricing applies instead.

79 79 

ide/settings.md +1 −1

Details

24| `chatgpt.commentCodeLensEnabled` | Show CodeLens above to-do comments so you can complete them with Codex. |24| `chatgpt.commentCodeLensEnabled` | Show CodeLens above to-do comments so you can complete them with Codex. |

25| `chatgpt.localeOverride` | Preferred language for the Codex UI. Leave empty to detect automatically. |25| `chatgpt.localeOverride` | Preferred language for the Codex UI. Leave empty to detect automatically. |

26| `chatgpt.openOnStartup` | Focus the Codex sidebar when the extension finishes starting. |26| `chatgpt.openOnStartup` | Focus the Codex sidebar when the extension finishes starting. |

27| `chatgpt.runCodexInWindowsSubsystemForLinux` | Windows only: Run Codex in WSL when Windows Subsystem for Linux (WSL) is available. Recommended for improved sandbox security and better performance. Codex agent mode on Windows currently requires WSL. Changing this setting reloads VS Code to apply the change. |27| `chatgpt.runCodexInWindowsSubsystemForLinux` | Windows only: Run Codex in WSL when Windows Subsystem for Linux (WSL) is available. Use this when your repositories and tooling live in WSL2 or when you need Linux-native tooling. Otherwise, Codex can run natively on Windows with the Windows sandbox. Changing this setting reloads VS Code to apply the change. |

Details

1# Use Codex in GitHub1# Codex code review in GitHub

2 2 

3Use Codex to review pull requests without leaving GitHub. Add a pull request comment with `@codex review`, and Codex replies with a standard GitHub code review.3Use Codex code review to get another high-signal review pass on GitHub pull

4requests. Codex reviews the pull request diff, follows your repository guidance,

5and posts a standard GitHub code review focused on serious issues.

4 6 

5## Set up code review7## Before you start

8 

9Make sure you have:

10 

11- [Codex cloud](https://developers.openai.com/codex/cloud) set up for the repository you want to review.

12- Access to [Codex code review settings](https://chatgpt.com/codex/settings/code-review).

13- An `AGENTS.md` file if you want Codex to follow repository-specific review guidance.

14 

15## Set up Codex code review

6 16 

71. Set up [Codex cloud](https://developers.openai.com/codex/cloud).171. Set up [Codex cloud](https://developers.openai.com/codex/cloud).

82. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review) and turn on **Code review** for your repository.182. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

193. Turn on **Code review** for your repository.

9 20 

10![Codex settings showing the Code review toggle](/images/codex/code-review/code-review-settings.png)21![Codex settings showing the Code review toggle](/images/codex/code-review/code-review-settings.png)

11 22 

12## Request a review23## Request a Codex review

13 24 

141. In a pull request comment, mention `@codex review`.251. In a pull request comment, mention `@codex review`.

152. Wait for Codex to react (👀) and post a review.262. Wait for Codex to react (👀) and post a review.

16 27 

17![A pull request comment with @codex review](/images/codex/code-review/review-trigger.png)28![A pull request comment with @codex review](/images/codex/code-review/review-trigger.png)

18 29 

19Codex posts a review on the pull request, just like a teammate would.30Codex posts a review on the pull request, just like a teammate would. In

31GitHub, Codex flags only P0 and P1 issues so review comments stay focused on

32high-priority risks.

20 33 

21![Example Codex code review on a pull request](/images/codex/code-review/review-example.png)34![Example Codex code review on a pull request](/images/codex/code-review/review-example.png)

22 35 

23## Enable automatic reviews36## Enable automatic reviews

24 37 

25If you want Codex to review every pull request automatically, turn on **Automatic reviews** in [Codex settings](https://chatgpt.com/codex/settings/code-review). Codex will post a review whenever a new PR is opened for review, without needing an `@codex review` comment.38If you want Codex to review every pull request automatically, turn on

39**Automatic reviews** in [Codex settings](https://chatgpt.com/codex/settings/code-review).

40Codex will post a review whenever someone opens a new PR for review, without

41needing an `@codex review` comment.

26 42 

27## Customize what Codex reviews43## Customize what Codex reviews

28 44 


39 55 

40Codex 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.56Codex 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.

41 57 

42For a one-off focus, add it to your pull request comment, for example:58For a one-off focus, add it to your pull request comment:

43 59 

44`@codex review for security regressions`60`@codex review for security regressions`

45 61 

46In GitHub, Codex flags only P0 and P1 issues. If you want Codex to flag typos in documentation, add guidance in `AGENTS.md` (for example, “Treat typos in docs as P1.”).62If you want Codex to flag typos in documentation, add guidance in `AGENTS.md`

63(for example, “Treat typos in docs as P1.”).

64 

65## Act on review findings

66 

67After Codex posts a review, you can ask it to fix issues in the same pull

68request by leaving another comment:

69 

70```md

71@codex fix the P1 issue

72```

73 

74Codex starts a cloud task with the pull request as context and can push a fix

75back to the branch when it has permission to do so.

47 76 

48## Give Codex other tasks77## Give Codex other tasks

49 78 


52```md81```md

53@codex fix the CI failures82@codex fix the CI failures

54```83```

84 

85## Troubleshoot code review

86 

87If Codex doesn't react or post a review:

88 

89- Confirm you turned on **Code review** for the repository in [Codex settings](https://chatgpt.com/codex/settings/code-review).

90- Confirm the pull request belongs to a repository with [Codex cloud](https://developers.openai.com/codex/cloud) set up.

91- Use the exact trigger `@codex review` in a pull request comment.

92- For automatic reviews, check that you turned on **Automatic reviews** and that

93 the pull request event matches your review trigger settings.

mcp.md +14 −1

Details

58- `env` (optional): Environment variables to set for the server.58- `env` (optional): Environment variables to set for the server.

59- `env_vars` (optional): Environment variables to allow and forward.59- `env_vars` (optional): Environment variables to allow and forward.

60- `cwd` (optional): Working directory to start the server from.60- `cwd` (optional): Working directory to start the server from.

61- `experimental_environment` (optional): Set to `remote` to start the stdio

62 server through a remote executor environment when one is available.

63 

64`env_vars` can contain plain variable names or objects with a source:

65 

66```toml

67env_vars = ["LOCAL_TOKEN", { name = "REMOTE_TOKEN", source = "remote" }]

68```

69 

70String entries and `source = "local"` read from Codex's local environment.

71`source = "remote"` reads from the remote executor environment and requires

72remote MCP stdio.

61 73 

62#### Streamable HTTP servers74#### Streamable HTTP servers

63 75 


77 89 

78If your OAuth provider requires a fixed callback port, set the top-level `mcp_oauth_callback_port` in `config.toml`. If unset, Codex binds to an ephemeral port.90If your OAuth provider requires a fixed callback port, set the top-level `mcp_oauth_callback_port` in `config.toml`. If unset, Codex binds to an ephemeral port.

79 91 

80If your MCP OAuth flow must use a specific callback URL (for example, a remote devbox ingress URL or a custom callback path), set `mcp_oauth_callback_url`. Codex uses this value as the OAuth `redirect_uri` while still using `mcp_oauth_callback_port` for the callback listener port. Local callback URLs (for example `localhost`) bind on loopback; non-local callback URLs bind on `0.0.0.0` so the callback can reach the host.92If your MCP OAuth flow must use a specific callback URL (for example, a remote Devbox ingress URL or a custom callback path), set `mcp_oauth_callback_url`. Codex uses this value as the OAuth `redirect_uri` while still using `mcp_oauth_callback_port` for the callback listener port. Local callback URLs (for example `localhost`) bind on the local interface; non-local callback URLs bind on `0.0.0.0` so the callback can reach the host.

81 93 

82If the MCP server advertises `scopes_supported`, Codex prefers those94If the MCP server advertises `scopes_supported`, Codex prefers those

83server-advertised scopes during OAuth login. Otherwise, Codex falls back to the95server-advertised scopes during OAuth login. Otherwise, Codex falls back to the


89[mcp_servers.context7]101[mcp_servers.context7]

90command = "npx"102command = "npx"

91args = ["-y", "@upstash/context7-mcp"]103args = ["-y", "@upstash/context7-mcp"]

104env_vars = ["LOCAL_TOKEN"]

92 105 

93[mcp_servers.context7.env]106[mcp_servers.context7.env]

94MY_ENV_VAR = "MY_ENV_VALUE"107MY_ENV_VAR = "MY_ENV_VALUE"

memories.md +13 −0

Details

14memories as a helpful local recall layer, not as the only source for rules that14memories as a helpful local recall layer, not as the only source for rules that

15must always apply.15must always apply.

16 16 

17[Chronicle](https://developers.openai.com/codex/memories/chronicle) helps Codex recover recent working

18context from your screen to build up memory.

19 

17## Enable memories20## Enable memories

18 21 

19In the Codex app, enable Memories in settings.22In the Codex app, enable Memories in settings.


39thread has been idle long enough to avoid summarizing work that's still in42thread has been idle long enough to avoid summarizing work that's still in

40progress.43progress.

41 44 

45Memory generation can also skip a background pass when your Codex rate-limit

46remaining percentage is below the configured threshold, so Codex doesn't spend

47quota when you're near a limit.

48 

42## Memory storage49## Memory storage

43 50 

44Codex stores memories under your Codex home directory. By default, that's51Codex stores memories under your Codex home directory. By default, that's


75 stored as memory-generation inputs.82 stored as memory-generation inputs.

76- `memories.use_memories`: controls whether Codex injects existing memories into83- `memories.use_memories`: controls whether Codex injects existing memories into

77 future sessions.84 future sessions.

85- `memories.disable_on_external_context`: when `true`, keeps threads that used

86 external context such as MCP tool calls, web search, or tool search out of

87 memory generation. The older `memories.no_memories_if_mcp_or_web_search` key

88 is still accepted as an alias.

89- `memories.min_rate_limit_remaining_percent`: controls the minimum remaining

90 Codex rate-limit percentage required before memory generation starts.

78- `memories.extract_model`: overrides the model used for per-thread memory91- `memories.extract_model`: overrides the model used for per-thread memory

79 extraction.92 extraction.

80- `memories.consolidation_model`: overrides the model used for global memory93- `memories.consolidation_model`: overrides the model used for global memory

memories/chronicle.md +155 −0 added

Details

1# Chronicle

2 

3Chronicle is in an **opt-in research preview**. It is only available for

4 ChatGPT Pro subscribers on macOS, and is not yet available in the EU, UK and

5 Switzerland. Please review the [Privacy and Security](#privacy-and-security)

6 section for details and to understand the current risks before enabling.

7 

8Chronicle augments Codex memories with context from your screen. When you prompt

9Codex, those memories can help it understand what you’ve been working on with

10less need for you to restate context.

11 

12Chronicle is available as an opt-in research preview in the Codex app on macOS.

13It requires macOS Screen Recording and Accessibility permissions. Before

14enabling, be aware that Chronicle uses rate limits quickly, increases risk of

15prompt injection, and stores memories unencrypted on your device.

16 

17## How Chronicle helps

18 

19We’ve designed Chronicle to reduce the amount of context you have to restate

20when you work with Codex. By using recent screen context to improve memory

21building, Chronicle can help Codex understand what you’re referring to, identify

22the right source to use, and pick up on the tools and workflows you rely on.

23 

24### Use what’s on screen

25 

26With Chronicle Codex can understand what you are currently looking at, saving

27you time and context switching.

28 

29### Fill in missing context

30 

31No need to carefully craft your context and start from zero. Chronicle lets

32Codex fill in the gaps in your context.

33 

34### Remember tools and workflows

35 

36No need to explain to Codex which tools to use to perform your work. Codex

37learns as you work to save you time in the long run.

38 

39In these cases, Codex uses Chronicle to provide additional context. When another

40source is better for the job, such as reading the specific file, Slack thread,

41Google Doc, dashboard, or pull request, Codex uses Chronicle to identify the

42source and then use that source directly.

43 

44## Enable Chronicle

45 

461. Open Settings in the Codex app.

472. Go to **Personalization** and make sure **Memories** is enabled.

483. Turn on **Chronicle** below the Memories setting.

494. Review the consent dialog and choose **Continue**.

505. Grant macOS Screen Recording and Accessibility permissions when prompted.

516. When setup completes, choose **Try it out** or start a new thread.

52 

53If macOS reports that Screen Recording or Accessibility permission is denied,

54open System Settings > Privacy & Security > Screen Recording or

55Accessibility and enable Codex. If a permission is restricted by macOS or your

56organization, Chronicle will start after the restriction is removed and Codex

57receives the required permission.

58 

59## Pause or disable Chronicle at any time

60 

61You control when Chronicle generates memories using screen context. Use the

62Codex menu bar icon to choose **Pause Chronicle** or **Resume Chronicle**. Pause

63Chronicle before meetings or when viewing sensitive content that you do not want

64Codex to use as context. To disable Chronicle, return to **Settings >

65Personalization > Memories** and turn off **Chronicle**.

66 

67You can also control whether memories are used in a given thread. [Learn

68more](https://developers.openai.com/codex/memories#control-memories-per-thread).

69 

70## Rate limits

71 

72Chronicle works by running sandboxed agents in the background to generate

73memories from captured screen images. These agents currently consume rate limits

74quickly.

75 

76## Privacy and security

77 

78Chronicle uses screen captures, which can include sensitive information visible

79on your screen. It does not have access to your microphone or system audio.

80Don’t use Chronicle to record meetings or communications with others without

81their consent. Pause Chronicle when viewing content you do not want remembered

82in memories.

83 

84### Where does Chronicle store my data?

85 

86Screen captures are ephemeral and will only be saved temporarily on your

87computer. Temporary screen capture files may appear under

88`$TMPDIR/chronicle/screen_recording/` while Chronicle is running. Screen captures

89that are older than 6 hours will be deleted while Chronicle is running.

90 

91The memories that Chronicle generates are just like other Codex memories:

92unencrypted markdown files that you can read and modify if needed. You can also

93ask Codex to search them. If you want to have Codex forget something you can

94delete the respective file inside the folder or selectively edit the markdown

95files to remove the information you’d like to remove. You should not manually

96add new information. The generated Chronicle memories are stored locally on your

97computer under `$CODEX_HOME/memories_extensions/chronicle/` (typically

98`~/.codex/memories_extensions/chronicle`).

99 

100Both directories for your screen captures and memories might contain sensitive information. Make sure you do not share content with others, and be aware that other programs on your computer can also access these files.

101 

102### What data gets shared with OpenAI?

103 

104Chronicle captures screen context locally, then periodically uses Codex to

105summarize recent activity into memories. To generate those memories, Chronicle

106starts an ephemeral Codex session with access to this screen context. That

107session may process selected screenshot frames, OCR text extracted from

108screenshots, timing information, and local file paths for the relevant time

109window.

110 

111Screen captures used for memory generation are stored temporarily on your device. They are processed on our

112servers to generate memories, which are then stored locally on device. We do not

113store the screenshots on our servers after processing unless required by law,

114and do not use them for training.

115 

116The generated memories are Markdown files stored locally under

117`$CODEX_HOME/memories_extensions/chronicle/`. When Codex uses memories in a

118future session, relevant memory contents may be included as context for that

119session, and may be used to improve our models if allowed in your ChatGPT

120settings. [Learn more](https://help.openai.com/en/articles/7730893-data-controls-faq).

121 

122## Prompt injection risk

123 

124Using Chronicle increases risk to prompt injection attacks from screen content.

125For instance, if you browse a site with malicious agent instructions, Codex may

126follow those instructions.

127 

128## Troubleshooting

129 

130### How do I enable Chronicle?

131 

132If you do not see the Chronicle setting, make sure you are using a Codex app

133build that includes Chronicle and that you have Memories enabled inside Settings

134> Personalization.

135 

136Chronicle is currently only available for ChatGPT Pro subscribers on macOS.

137Chronicle is not available in the EU, UK and Switzerland.

138 

139If setup does not complete:

140 

1411. Confirm that Codex has Screen Recording and Accessibility permissions.

1422. Quit and reopen the Codex app.

1433. Open **Settings > Personalization** and check the Chronicle status.

144 

145### Which model is used for generating the Chronicle memories?

146 

147Chronicle uses the same model as your other [Memories](https://developers.openai.com/codex/memories). If you

148did not configure a specific model it uses your default Codex model. To choose a

149specific model, update the `consolidation_model` in your

150[configuration](https://developers.openai.com/codex/config-basic).

151 

152```toml

153[memories]

154consolidation_model = "gpt-5.4-mini"

155```

models.md +38 −9

Details

2 2 

3## Recommended models3## Recommended models

4 4 

5![gpt-5.5](/images/api/models/gpt-5.5.jpg)

6 

7gpt-5.5

8 

9OpenAI's newest frontier model for complex coding, computer use, knowledge work, and research workflows in Codex.

10 

11codex -m gpt-5.5

12 

13Copy command

14 

15Capability

16 

17Speed

18 

19Codex CLI & SDK

20 

21Codex app & IDE extension

22 

23Codex Cloud

24 

25ChatGPT Credits

26 

27API Access

28 

5![gpt-5.4](/images/api/models/gpt-5.4.jpg)29![gpt-5.4](/images/api/models/gpt-5.4.jpg)

6 30 

7gpt-5.431gpt-5.4


98 122 

99API Access123API Access

100 124 

101For most tasks in Codex, start with `gpt-5.4`. It combines strong coding,125For most tasks in Codex, start with `gpt-5.5` when it appears in your model

102reasoning, native computer use, and broader professional workflows in one126 picker. It is strongest for complex coding, computer use, knowledge work, and

103model. Use `gpt-5.4-mini` when you want a faster, lower-cost option for127 research workflows. GPT-5.5 is currently available in Codex when you sign in

104lighter coding tasks or subagents. The `gpt-5.3-codex-spark` model is128 with ChatGPT; it isn't available with API-key authentication. During the

105available in research preview for ChatGPT Pro subscribers and is optimized for129 rollout, continue using `gpt-5.4` if `gpt-5.5` is not yet available. Use

106near-instant, real-time coding iteration.130 `gpt-5.4-mini` when you want a faster, lower-cost option for lighter coding

131 tasks or subagents. The `gpt-5.3-codex-spark` model is available in research

132 preview for ChatGPT Pro subscribers and is optimized for near-instant,

133 real-time coding iteration.

107 134 

108## Alternative models135## Alternative models

109 136 


134 161 

135The 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.162The 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.

136 163 

137```164```toml

138model = "gpt-5.4"165model = "gpt-5.5"

139```166```

140 167 

168If `gpt-5.5` isn't available in your account yet, use `gpt-5.4`.

169 

141### Choosing a different local model temporarily170### Choosing a different local model temporarily

142 171 

143In the Codex CLI, you can use the `/model` command during an active thread to change the model. In the IDE extension, you can use the model selector below the input box to choose your model.172In the Codex CLI, you can use the `/model` command during an active thread to change the model. In the IDE extension, you can use the model selector below the input box to choose your model.


145To 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:174To 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:

146 175 

147```bash176```bash

148codex -m gpt-5.4177codex -m gpt-5.5

149```178```

150 179 

151### Choosing your model for cloud tasks180### Choosing your model for cloud tasks

Details

50 50 

51By default, `codex exec` runs in a read-only sandbox. In automation, set the least permissions needed for the workflow:51By default, `codex exec` runs in a read-only sandbox. In automation, set the least permissions needed for the workflow:

52 52 

53- Allow edits: `codex exec --full-auto "<task>"`53- Allow edits: `codex exec --sandbox workspace-write "<task>"`

54- Allow broader access: `codex exec --sandbox danger-full-access "<task>"`54- Allow broader access: `codex exec --sandbox danger-full-access "<task>"`

55 55 

56Use `danger-full-access` only in a controlled environment (for example, an isolated CI runner or container).56Use `danger-full-access` only in a controlled environment (for example, an isolated CI runner or container).

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.

59 

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 

58If 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.

59 63 

60## Make output machine-readable64## Make output machine-readable


76{"type":"turn.started"}80{"type":"turn.started"}

77{"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"}}

78{"type":"item.completed","item":{"id":"item_3","type":"agent_message","text":"Repo contains docs, sdk, and examples directories."}}82{"type":"item.completed","item":{"id":"item_3","type":"agent_message","text":"Repo contains docs, sdk, and examples directories."}}

79{"type":"turn.completed","usage":{"input_tokens":24763,"cached_input_tokens":24448,"output_tokens":122}}83{"type":"turn.completed","usage":{"input_tokens":24763,"cached_input_tokens":24448,"output_tokens":122,"reasoning_output_tokens":0}}

80```84```

81 85 

82If you only need the final message, write it to a file with `-o <path>`/`--output-last-message <path>`. This writes the final message to the file and still prints it to `stdout` (see [`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec) for details).86If you only need the final message, write it to a file with `-o <path>`/`--output-last-message <path>`. This writes the final message to the file and still prints it to `stdout` (see [`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec) for details).


230 234 

231 - name: Run Codex235 - name: Run Codex

232 run: |236 run: |

233 codex exec --full-auto --sandbox workspace-write \237 codex exec --sandbox workspace-write \

234 "Read the repository, run the test suite, identify the minimal change needed to make all tests pass, implement only that change, and stop. Do not refactor unrelated files."238 "Read the repository, run the test suite, identify the minimal change needed to make all tests pass, implement only that change, and stop. Do not refactor unrelated files."

235 239 

236 - name: Verify tests240 - name: Verify tests

plugins.md +5 −0

Details

43 43 

44![Plugins list in Codex CLI](/images/codex/plugins/cli_light.png)44![Plugins list in Codex CLI](/images/codex/plugins/cli_light.png)

45 45 

46The CLI plugin browser groups plugins by marketplace. Use the marketplace tabs

47to switch sources, open a plugin to inspect details, install or uninstall

48marketplace entries, and press <kbd>Space</kbd> on an installed plugin to toggle

49its enabled state.

50 

46### Install and use a plugin51### Install and use a plugin

47 52 

48Once you open the plugin directory:53Once you open the plugin directory:

plugins/build.md +106 −12

Details

40 40 

41![custom local marketplace in the plugin directory](/images/codex/plugins/codex-local-plugin-light.png)41![custom local marketplace in the plugin directory](/images/codex/plugins/codex-local-plugin-light.png)

42 42 

43### Add a marketplace from the CLI

44 

45Use `codex plugin marketplace add` when you want Codex to install and track a

46marketplace source for you instead of editing `config.toml` by hand.

47 

48```bash

49codex plugin marketplace add owner/repo

50codex plugin marketplace add owner/repo --ref main

51codex plugin marketplace add https://github.com/example/plugins.git --sparse .agents/plugins

52codex plugin marketplace add ./local-marketplace-root

53```

54 

55Marketplace sources can be GitHub shorthand (`owner/repo` or

56`owner/repo@ref`), HTTP or HTTPS Git URLs, SSH Git URLs, or local marketplace root

57directories. Use `--ref` to pin a Git ref, and repeat `--sparse PATH` to use a

58sparse checkout for Git-backed marketplace repos. `--sparse` is valid only for

59Git marketplace sources.

60 

61To refresh or remove configured marketplaces:

62 

63```bash

64codex plugin marketplace upgrade

65codex plugin marketplace upgrade marketplace-name

66codex plugin marketplace remove marketplace-name

67```

68 

43### Create a plugin manually69### Create a plugin manually

44 70 

45Start with a minimal plugin that packages one skill.71Start with a minimal plugin that packages one skill.


211 personal installs, a common pattern is `./.codex/plugins/<plugin-name>`.237 personal installs, a common pattern is `./.codex/plugins/<plugin-name>`.

212- Keep `source.path` relative to the marketplace root, start it with `./`, and238- Keep `source.path` relative to the marketplace root, start it with `./`, and

213 keep it inside that root.239 keep it inside that root.

240- For local entries, `source` can also be a plain string path such as

241 `"./plugins/my-plugin"`.

214- Always include `policy.installation`, `policy.authentication`, and242- Always include `policy.installation`, `policy.authentication`, and

215 `category` on each plugin entry.243 `category` on each plugin entry.

216- Use `policy.installation` values such as `AVAILABLE`,244- Use `policy.installation` values such as `AVAILABLE`,


218- Use `policy.authentication` to decide whether auth happens on install or246- Use `policy.authentication` to decide whether auth happens on install or

219 first use.247 first use.

220 248 

221The marketplace controls where Codex loads the plugin from. `source.path` can249The marketplace controls where Codex loads the plugin from. A local

222point somewhere else if your plugin lives outside those example directories. A250`source.path` can point somewhere else if your plugin lives outside those

223marketplace file can live in the repo where you are developing the plugin or in251example directories. A marketplace file can live in the repo where you are

224a separate marketplace repo, and one marketplace file can point to one plugin252developing the plugin or in a separate marketplace repo, and one marketplace

225or many.253file can point to one plugin or many.

254 

255Marketplace entries can also point at Git-backed plugin sources. Use

256`"source": "url"` when the plugin lives at the repository root, or

257`"source": "git-subdir"` when the plugin lives in a subdirectory:

258 

259```json

260{

261 "name": "remote-helper",

262 "source": {

263 "source": "git-subdir",

264 "url": "https://github.com/example/codex-plugins.git",

265 "path": "./plugins/remote-helper",

266 "ref": "main"

267 },

268 "policy": {

269 "installation": "AVAILABLE",

270 "authentication": "ON_INSTALL"

271 },

272 "category": "Productivity"

273}

274```

275 

276Git-backed entries may use `ref` or `sha` selectors. If Codex can't resolve a

277marketplace entry's source, it skips that plugin entry instead of failing the

278whole marketplace.

226 279 

227### How Codex uses marketplaces280### How Codex uses marketplaces

228 281 


233 286 

234- the curated marketplace that powers the official Plugin Directory287- the curated marketplace that powers the official Plugin Directory

235- a repo marketplace at `$REPO_ROOT/.agents/plugins/marketplace.json`288- a repo marketplace at `$REPO_ROOT/.agents/plugins/marketplace.json`

289- a Claude-style marketplace at `$REPO_ROOT/.claude-plugin/marketplace.json`

236- a personal marketplace at `~/.agents/plugins/marketplace.json`290- a personal marketplace at `~/.agents/plugins/marketplace.json`

237 291 

238You can install any plugin exposed through a marketplace. Codex installs292You can install any plugin exposed through a marketplace. Codex installs


250 304 

251Every plugin has a manifest at `.codex-plugin/plugin.json`. It can also include305Every plugin has a manifest at `.codex-plugin/plugin.json`. It can also include

252a `skills/` directory, an `.app.json` file that points at one or more apps or306a `skills/` directory, an `.app.json` file that points at one or more apps or

253connectors, an `.mcp.json` file that configures MCP servers, and assets used to307connectors, an `.mcp.json` file that configures MCP servers, lifecycle config,

254present the plugin across supported surfaces.308and assets used to present the plugin across supported surfaces.

255 309 

256- my-plugin/310- my-plugin/

257 311 


265 - SKILL.md Optional: skill instructions319 - SKILL.md Optional: skill instructions

266 - .app.json Optional: app or connector mappings320 - .app.json Optional: app or connector mappings

267 - .mcp.json Optional: MCP server configuration321 - .mcp.json Optional: MCP server configuration

322 - hooks/

323 

324 - hooks.json Optional: lifecycle configuration

268 - assets/ Optional: icons, logos, screenshots325 - assets/ Optional: icons, logos, screenshots

269 326 

270Only `plugin.json` belongs in `.codex-plugin/`. Keep `skills/`, `assets/`,327Only `plugin.json` belongs in `.codex-plugin/`. Keep `skills/`, `assets/`,

271`.mcp.json`, and `.app.json` at the plugin root.328`.mcp.json`, `.app.json`, and lifecycle config files at the plugin root.

272 329 

273Published plugins typically use a richer manifest than the minimal example that330Published plugins typically use a richer manifest than the minimal example that

274appears in quick-start scaffolds. The manifest has three jobs:331appears in quick-start scaffolds. The manifest has three jobs:


297 "skills": "./skills/",354 "skills": "./skills/",

298 "mcpServers": "./.mcp.json",355 "mcpServers": "./.mcp.json",

299 "apps": "./.app.json",356 "apps": "./.app.json",

357 "hooks": "./hooks/hooks.json",

300 "interface": {358 "interface": {

301 "displayName": "My Plugin",359 "displayName": "My Plugin",

302 "shortDescription": "Reusable skills and apps",360 "shortDescription": "Reusable skills and apps",


330- `name`, `version`, and `description` identify the plugin.388- `name`, `version`, and `description` identify the plugin.

331- `author`, `homepage`, `repository`, `license`, and `keywords` provide389- `author`, `homepage`, `repository`, `license`, and `keywords` provide

332 publisher and discovery metadata.390 publisher and discovery metadata.

333- `skills`, `mcpServers`, and `apps` point to bundled components relative to391- `skills`, `mcpServers`, `apps`, and `hooks` point to bundled components

334 the plugin root.392 relative to the plugin root.

335- `interface` controls how install surfaces present the plugin.393- `interface` controls how install surfaces present the plugin.

336 394 

337Use the `interface` object for install-surface metadata:395Use the `interface` object for install-surface metadata:


350- Keep manifest paths relative to the plugin root and start them with `./`.408- Keep manifest paths relative to the plugin root and start them with `./`.

351- Store visual assets such as `composerIcon`, `logo`, and `screenshots` under409- Store visual assets such as `composerIcon`, `logo`, and `screenshots` under

352 `./assets/` when possible.410 `./assets/` when possible.

353- Use `skills` for bundled skill folders, `apps` for `.app.json`, and411- Use `skills` for bundled skill folders, `apps` for `.app.json`,

354 `mcpServers` for `.mcp.json`.412 `mcpServers` for `.mcp.json`, and `hooks` for lifecycle config.

413- If you omit `hooks` and the plugin includes `./hooks/hooks.json`, Codex loads

414 that default lifecycle config automatically.

415 

416### Bundled MCP servers and lifecycle config

417 

418`mcpServers` can point to an `.mcp.json` file that contains either a direct

419server map or a wrapped `mcp_servers` object.

420 

421Direct server map:

422 

423```json

424{

425 "docs": {

426 "command": "docs-mcp",

427 "args": ["--stdio"]

428 }

429}

430```

431 

432Wrapped server map:

433 

434```json

435{

436 "mcp_servers": {

437 "docs": {

438 "command": "docs-mcp",

439 "args": ["--stdio"]

440 }

441 }

442}

443```

444 

445`hooks` can point to one lifecycle JSON file, an array of lifecycle JSON files,

446an inline lifecycle object, or an array of inline lifecycle objects. File paths

447must follow the same `./`-prefixed plugin-root path rules as other manifest

448paths. If you omit the manifest field, Codex still checks `./hooks/hooks.json`.

355 449 

356### Publish official public plugins450### Publish official public plugins

357 451 

quickstart.md +4 −1

Details

8 8 

9The Codex app is available on macOS and Windows.9The Codex app is available on macOS and Windows.

10 10 

11Most Codex app features are available on both platforms. Platform-specific

12exceptions are noted in the relevant docs.

13 

111. Download and install the Codex app141. Download and install the Codex app

12 15 

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

14 17 

15 [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)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)

16 19 

Details

1# Remote connections1# Remote connections

2 2 

3SSH remote connections are currently in alpha. We are gradually rolling out3SSH remote connections are currently in alpha. To enable them today, set

4access. Availability, setup flows, and supported environments may change as4 `remote_connections = true` in the `[features]` table in

5the feature improves.5 `~/.codex/config.toml`. Availability, setup flows, and supported environments

6 may change as the feature improves.

6 7 

7Remote connections let Codex work with projects that live on another8Remote connections let Codex work with projects that live on another

8SSH-accessible machine. Use them when the codebase, credentials, services, or9SSH-accessible machine. Use them when the codebase, credentials, services, or


424. In the Codex app, open **Settings > Connections**, add or enable the SSH host,434. In the Codex app, open **Settings > Connections**, add or enable the SSH host,

43 then choose a remote project folder.44 then choose a remote project folder.

44 45 

46If remote connections don't appear yet, enable the alpha feature flag in

47`~/.codex/config.toml`:

48 

49```toml

50[features]

51remote_connections = true

52```

53 

45Remote project threads run commands, read files, and write changes on the54Remote project threads run commands, read files, and write changes on the

46remote host.55remote host.

47 56 

rules.md +4 −2

Details

6 6 

7## Create a rules file7## Create a rules file

8 8 

91. Create a `.rules` file under `./codex/rules/` (for example, `~/.codex/rules/default.rules`).91. Create a `.rules` file under a `rules/` folder next to an active config layer (for example, `~/.codex/rules/default.rules`).

102. Add a rule. This example prompts before allowing `gh pr view` to run outside the sandbox.102. Add a rule. This example prompts before allowing `gh pr view` to run outside the sandbox.

11 11 

12 ```python12 ```python


36 ```36 ```

373. Restart Codex.373. Restart Codex.

38 38 

39Codex scans `rules/` under every [Team Config](https://developers.openai.com/codex/enterprise/admin-setup#team-config) location at startup. When you add a command to the allow list in the TUI, Codex writes to the user layer at `~/.codex/rules/default.rules` so future runs can skip the prompt.39Codex scans `rules/` under every active config layer at startup, including [Team Config](https://developers.openai.com/codex/enterprise/admin-setup#team-config) locations and the user layer at `~/.codex/rules/`. Project-local rules under `<repo>/.codex/rules/` load only when the project `.codex/` layer is trusted.

40 

41When you add a command to the allow list in the TUI, Codex writes to the user layer at `~/.codex/rules/default.rules` so future runs can skip the prompt.

40 42 

41When Smart approvals are enabled (the default), Codex may propose a43When Smart approvals are enabled (the default), Codex may propose a

42`prefix_rule` for you during escalation requests. Review the suggested prefix44`prefix_rule` for you during escalation requests. Review the suggested prefix

skills.md +6 −2

Details

6 6 

7Skills are available in the Codex CLI, IDE extension, and Codex app.7Skills are available in the Codex CLI, IDE extension, and Codex app.

8 8 

9Skills use **progressive disclosure** to manage context efficiently: Codex starts with each skills metadata (`name`, `description`, file path, and optional metadata from `agents/openai.yaml`). Codex loads the full `SKILL.md` instructions only when it decides to use a skill.9Skills use **progressive disclosure** to manage context efficiently: Codex starts with each skill's name, description, and file path. Codex loads the full `SKILL.md` instructions only when it decides to use a skill.

10 

11Codex includes an initial list of available skills in context so it can choose the right skill for a task. To avoid crowding out the rest of the prompt, this list is capped at roughly 2% of the model’s context window, or 8,000 characters when the context window is unknown. If many skills are installed, Codex shortens skill descriptions first. For very large skill sets, some skills may be omitted from the initial list, and Codex will show a warning.

12 

13This budget applies only to the initial skills list. When Codex selects a skill, it still reads the full SKILL.md instructions for that skill.

10 14 

11A skill is a directory with a `SKILL.md` file plus optional scripts and references. The `SKILL.md` file must include `name` and `description`.15A skill is a directory with a `SKILL.md` file plus optional scripts and references. The `SKILL.md` file must include `name` and `description`.

12 16 


271. **Explicit invocation:** Include the skill directly in your prompt. In CLI/IDE, run `/skills` or type `$` to mention a skill.311. **Explicit invocation:** Include the skill directly in your prompt. In CLI/IDE, run `/skills` or type `$` to mention a skill.

282. **Implicit invocation:** Codex can choose a skill when your task matches the skill `description`.322. **Implicit invocation:** Codex can choose a skill when your task matches the skill `description`.

29 33 

30Because implicit matching depends on `description`, write descriptions with clear scope and boundaries.34Because implicit matching depends on `description`, write concise descriptions with clear scope and boundaries. Front-load the key use case and trigger words so Codex can still match the skill if descriptions are shortened.

31 35 

32## Create a skill36## Create a skill

33 37 

speed.md +8 −4

Details

5Codex offers the ability to increase the speed of the model for increased5Codex offers the ability to increase the speed of the model for increased

6credit consumption.6credit consumption.

7 7 

8Fast mode is currently supported on GPT-5.4. When enabled, speed is increased8Fast mode increases supported model speed by 1.5x and consumes credits at a

9by 1.5x and credits are consumed at a 2x rate.9higher rate than Standard mode. It currently supports GPT-5.5 and GPT-5.4,

10consuming credits at 2.5x the Standard rate for GPT-5.5 and 2x the Standard

11rate for GPT-5.4.

10 12 

11Use `/fast on`, `/fast off`, or `/fast status` in the CLI to change or inspect13Use `/fast on`, `/fast off`, or `/fast status` in the CLI to change or inspect

12the current setting. You can also persist the default with `service_tier = "fast"` plus `[features].fast_mode = true` in `config.toml`. Fast mode is14the current setting. You can also persist the default with `service_tier = "fast"` plus `[features].fast_mode = true` in `config.toml`. Fast mode is


20 22 

21## Codex-Spark23## Codex-Spark

22 24 

23GPT-5.3-Codex-Spark is a separate fast, less-capable Codex model optimized for near-instant, real-time coding iteration. Unlike fast mode, which speeds up GPT-5.4 at a higher credit rate,25GPT-5.3-Codex-Spark is a separate fast, less-capable Codex model optimized for

24Codex-Spark is its own model choice and has its own usage limits.26near-instant, real-time coding iteration. Unlike fast mode, which speeds up a

27supported model at a higher credit rate, Codex-Spark is its own model choice

28and has its own usage limits.

25 29 

26During research preview Codex-Spark is only available for ChatGPT Pro subscribers.30During research preview Codex-Spark is only available for ChatGPT Pro subscribers.

Details

46 46 

47## Skills & Plugins47## Skills & Plugins

48 48 

49- [Spreadsheet](https://github.com/openai/skills/tree/main/skills/.curated/spreadsheet)49- Spreadsheet

50 50 

51 Inspect tabular data, run calculations, and create charts or tables.51 Inspect tabular data, run calculations, and create charts or tables.

52- [Google Sheets](https://developers.openai.com/codex/plugins)52- [Google Sheets](https://developers.openai.com/codex/plugins)


55 55 

56| Skill | Why use it |56| Skill | Why use it |

57| --- | --- |57| --- | --- |

58| [Spreadsheet](https://github.com/openai/skills/tree/main/skills/.curated/spreadsheet) | Inspect tabular data, run calculations, and create charts or tables. |58| Spreadsheet | Inspect tabular data, run calculations, and create charts or tables. |

59| [Google Sheets](https://developers.openai.com/codex/plugins) | Analyze approved Google Sheets when the data lives in a shared spreadsheet. |59| [Google Sheets](https://developers.openai.com/codex/plugins) | Analyze approved Google Sheets when the data lives in a shared spreadsheet. |

60 60 

61## Starter prompt61## Starter prompt

Details

46 46 

47## Skills & Plugins47## Skills & Plugins

48 48 

49- [Spreadsheet](https://github.com/openai/skills/tree/main/skills/.curated/spreadsheet)49- Spreadsheet

50 50 

51 Inspect tabular files, clean columns, and produce reviewable outputs.51 Inspect tabular files, clean columns, and produce reviewable outputs.

52 52 

53| Skill | Why use it |53| Skill | Why use it |

54| --- | --- |54| --- | --- |

55| [Spreadsheet](https://github.com/openai/skills/tree/main/skills/.curated/spreadsheet) | Inspect tabular files, clean columns, and produce reviewable outputs. |55| Spreadsheet | Inspect tabular files, clean columns, and produce reviewable outputs. |

56 56 

57## Starter prompt57## Starter prompt

58 58 

Details

57 57 

58[![](/images/codex/codex-wallpaper-1.webp)58[![](/images/codex/codex-wallpaper-1.webp)

59 59 

60### Review pull requests faster60### Codex code review for GitHub pull requests

61 61 

62Use Codex in GitHub to automatically surface regressions, missing tests, and documentation...62Use Codex code review in GitHub to automatically surface regressions, missing tests, and...

63 63 

64Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)64Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)

Details

76 76 

77[![](/images/codex/codex-wallpaper-1.webp)77[![](/images/codex/codex-wallpaper-1.webp)

78 78 

79### Review pull requests faster79### Codex code review for GitHub pull requests

80 80 

81Use Codex in GitHub to automatically surface regressions, missing tests, and documentation...81Use Codex code review in GitHub to automatically surface regressions, missing tests, and...

82 82 

83Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)[![](/images/codex/codex-wallpaper-1.webp)83Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)[![](/images/codex/codex-wallpaper-1.webp)

84 84 

Details

63 63 

64[![](/images/codex/codex-wallpaper-1.webp)64[![](/images/codex/codex-wallpaper-1.webp)

65 65 

66### Review pull requests faster66### Codex code review for GitHub pull requests

67 67 

68Use Codex in GitHub to automatically surface regressions, missing tests, and documentation...68Use Codex code review in GitHub to automatically surface regressions, missing tests, and...

69 69 

70Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)70Integrations Workflow](https://developers.openai.com/codex/use-cases/github-code-reviews)

Details

48 48 

49## Skills & Plugins49## Skills & Plugins

50 50 

51- [Slides](https://github.com/openai/skills/tree/main/skills/.curated/slides)51- Slides

52 52 

53 Create and edit `.pptx` decks in JavaScript with PptxGenJS, bundled helpers, and render and validation scripts for overflow, overlap, and font checks.53 Create and edit `.pptx` decks in JavaScript with PptxGenJS, bundled helpers, and render and validation scripts for overflow, overlap, and font checks.

54- [ImageGen](https://github.com/openai/skills/tree/main/skills/.curated/imagegen)54- ImageGen

55 55 

56 Generate illustrations, cover art, diagrams, and slide visuals that match one reusable visual direction.56 Generate illustrations, cover art, diagrams, and slide visuals that match one reusable visual direction.

57 57 

58| Skill | Why use it |58| Skill | Why use it |

59| --- | --- |59| --- | --- |

60| [Slides](https://github.com/openai/skills/tree/main/skills/.curated/slides) | Create and edit `.pptx` decks in JavaScript with PptxGenJS, bundled helpers, and render and validation scripts for overflow, overlap, and font checks. |60| Slides | Create and edit `.pptx` decks in JavaScript with PptxGenJS, bundled helpers, and render and validation scripts for overflow, overlap, and font checks. |

61| [ImageGen](https://github.com/openai/skills/tree/main/skills/.curated/imagegen) | Generate illustrations, cover art, diagrams, and slide visuals that match one reusable visual direction. |61| ImageGen | Generate illustrations, cover art, diagrams, and slide visuals that match one reusable visual direction. |

62 62 

63## Starter prompt63## Starter prompt

64 64 

65Use $slides with $imagegen to edit this slide deck in the following way:65Use the $slides and $imagegen skills to edit this slide deck in the following way:

66 - If present, add logo.png in the bottom right corner on every slide66 - If present, add logo.png in the bottom right corner on every slide

67- On slides X, Y and Z, move the text to the left and use image generation to generate an illustration (style: abstract, digital art) on the right67- On slides X, Y and Z, move the text to the left and use image generation to generate an illustration (style: abstract, digital art) on the right

68- Preserve text as text and simple charts as native PowerPoint charts where practical.68- Preserve text as text and simple charts as native PowerPoint charts where practical.


75 - A copy of the slide deck with the changes applied75 - A copy of the slide deck with the changes applied

76 - notes on which slides were generated, rewritten, or left unchanged76 - notes on which slides were generated, rewritten, or left unchanged

77 77 

78[Open in the Codex app](codex://new?prompt=Use+%24slides+with+%24imagegen+to+edit+this+slide+deck+in+the+following+way%3A+%0A-+If+present%2C+add+logo.png+in+the+bottom+right+corner+on+every+slide%0A-+On+slides+X%2C+Y+and+Z%2C+move+the+text+to+the+left+and+use+image+generation+to+generate+an+illustration+%28style%3A+abstract%2C+digital+art%29+on+the+right%0A-+Preserve+text+as+text+and+simple+charts+as+native+PowerPoint+charts+where+practical.%0A-+Add+these+slides%3A+%5Bdescribe+new+slides+here%5D%0A-+Use+the+existing+branding+on+new+slides+and+new+text+%28colors%2C+fonts%2C+layout%2C+etc.%29+%0A-+Render+the+updated+deck+to+slide+images%2C+review+the+output%2C+and+fix+layout+issues+before+delivery.%0A-+Run+overflow+and+font-substitution+checks+before+delivery%2C+especially+if+the+deck+is+dense.%0A-+Save+reusable+prompts+or+generation+notes+when+you+create+a+batch+of+related+images.%0A%0AOutput%3A%0A-+A+copy+of+the+slide+deck+with+the+changes+applied%0A-+notes+on+which+slides+were+generated%2C+rewritten%2C+or+left+unchanged "Open in the Codex app")78[Open in the Codex app](codex://new?prompt=Use+the+%24slides+and+%24imagegen+skills+to+edit+this+slide+deck+in+the+following+way%3A%0A-+If+present%2C+add+logo.png+in+the+bottom+right+corner+on+every+slide%0A-+On+slides+X%2C+Y+and+Z%2C+move+the+text+to+the+left+and+use+image+generation+to+generate+an+illustration+%28style%3A+abstract%2C+digital+art%29+on+the+right%0A-+Preserve+text+as+text+and+simple+charts+as+native+PowerPoint+charts+where+practical.%0A-+Add+these+slides%3A+%5Bdescribe+new+slides+here%5D%0A-+Use+the+existing+branding+on+new+slides+and+new+text+%28colors%2C+fonts%2C+layout%2C+etc.%29+%0A-+Render+the+updated+deck+to+slide+images%2C+review+the+output%2C+and+fix+layout+issues+before+delivery.%0A-+Run+overflow+and+font-substitution+checks+before+delivery%2C+especially+if+the+deck+is+dense.%0A-+Save+reusable+prompts+or+generation+notes+when+you+create+a+batch+of+related+images.%0A%0AOutput%3A%0A-+A+copy+of+the+slide+deck+with+the+changes+applied%0A-+notes+on+which+slides+were+generated%2C+rewritten%2C+or+left+unchanged "Open in the Codex app")

79 79 

80Use $slides with $imagegen to edit this slide deck in the following way:80Use the $slides and $imagegen skills to edit this slide deck in the following way:

81 - If present, add logo.png in the bottom right corner on every slide81 - If present, add logo.png in the bottom right corner on every slide

82- On slides X, Y and Z, move the text to the left and use image generation to generate an illustration (style: abstract, digital art) on the right82- On slides X, Y and Z, move the text to the left and use image generation to generate an illustration (style: abstract, digital art) on the right

83- Preserve text as text and simple charts as native PowerPoint charts where practical.83- Preserve text as text and simple charts as native PowerPoint charts where practical.


92 92 

93## Introduction93## Introduction

94 94 

95You can use Codex to manipulate PowerPoint decks in a systematic way, using the Slides skill to create and edit decks with PptxGenJS, and using image generation to generate visuals for the slides.95You can use Codex to manipulate PowerPoint decks in a systematic way, using the slides system skill, which comes with Codex by default, to create and edit decks with PptxGenJS, and using image generation to generate visuals for the slides.

96 96 

97Skills can be installed directly from the Codex app–see our [skills documentation](https://developers.openai.com/codex/skills) for more details.97Skills can be installed directly from the Codex app–see our [skills documentation](https://developers.openai.com/codex/skills) for more details.

98 98 


102 102 

103If a deck already exists, ask Codex to inspect it before making changes.103If a deck already exists, ask Codex to inspect it before making changes.

104 104 

105The slides skill is opinionated here: match the source aspect ratio before you rebuild layout, and default to 16:9 only when the source material does not already define the deck size. If the references are screenshots or a PDF, ask Codex to render or inspect them first so it can compare slide geometry visually instead of guessing.105The slides system skill is opinionated here: match the source aspect ratio before you rebuild layout, and default to 16:9 only when the source material does not already define the deck size. If the references are screenshots or a PDF, ask Codex to render or inspect them first so it can compare slide geometry visually instead of guessing.

106 106 

107## Keep the deck editable107## Keep the deck editable

108 108 


112 112 

113## Generate visuals intentionally113## Generate visuals intentionally

114 114 

115Image generation is most useful when the slides need a cover image, a concept illustration, or a lightweight diagram that would otherwise take manual design work. Ask Codex to define the visual direction first, then reuse that direction consistently across the whole deck.115The imagegen system skill is already installed with Codex and is most useful when the slides need a cover image, a concept illustration, or a lightweight diagram that would otherwise take manual design work. Ask Codex to define the visual direction first, then reuse that direction consistently across the whole deck.

116 116 

117When several slides need related visuals, have Codex save the prompts or generation notes it used. That makes the deck easier to extend later without starting over stylistically.117When several slides need related visuals, have Codex save the prompts or generation notes it used. That makes the deck easier to extend later without starting over stylistically.

118 118 


120 120 

121Deck automation works better when Codex treats each slide as its own decision. Some slides should preserve exact copy, some need a stronger headline and cleaner structure, and some should stay mostly untouched apart from asset cleanup or formatting fixes.121Deck automation works better when Codex treats each slide as its own decision. Some slides should preserve exact copy, some need a stronger headline and cleaner structure, and some should stay mostly untouched apart from asset cleanup or formatting fixes.

122 122 

123The slides skill also ships with bundled layout helpers. Ask Codex to copy those helpers into the working directory and reuse them instead of reimplementing spacing, text-sizing, and image-placement logic on every deck.123The slides system skill also ships with bundled layout helpers. Ask Codex to copy those helpers into the working directory and reuse them instead of reimplementing spacing, text-sizing, and image-placement logic on every deck.

124 124 

125## Validation before delivery125## Validation before delivery

126 126 

127Decks are easy to get almost right and still ship with clipped text, substituted fonts, or layout drift that only shows up after export. The slides skill includes scripts to render decks to per-slide PNGs, build a quick montage for review, detect overflow beyond the slide canvas, and report missing or substituted fonts.127Decks are easy to get almost right and still ship with clipped text, substituted fonts, or layout drift that only shows up after export. The slides system skill includes scripts to render decks to per-slide PNGs, build a quick montage for review, detect overflow beyond the slide canvas, and report missing or substituted fonts.

128 128 

129Ask Codex to use those checks before it hands back the final deck, especially when slides are dense or margins are tight.129Ask Codex to use those checks before it hands back the final deck, especially when slides are dense or margins are tight.

130 130 

Details

1# Review pull requests faster | Codex use cases1# Codex code review for GitHub pull requests | Codex use cases

2 2 

3Codex use cases3Codex use cases

4 4 


8 8 

9Codex use case9Codex use case

10 10 

11# Review pull requests faster11# Codex code review for GitHub pull requests

12 12 

13Catch regressions and potential issues before human review.13Catch regressions and potential issues before human review.

14 14 


16 16 

17Time horizon **5s**17Time horizon **5s**

18 18 

19Use Codex in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.19Use Codex code review in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.

20 20 

21## Best for21## Best for

22 22 


29 29 

30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/github-code-reviews/?export=pdf)30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/github-code-reviews/?export=pdf)

31 31 

32Use Codex in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.32Use Codex code review in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.

33 33 

34Easy34Easy

35 35 


37 37 

38Related links38Related links

39 39 

40[Use Codex in GitHub](https://developers.openai.com/codex/integrations/github) [Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md)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 41 

42## Best for42## Best for

43 43 


62 62 

63## How to use63## How to use

64 64 

65Start by adding Codex code review to your GitHub organization or repository. See [Use Codex in GitHub](https://developers.openai.com/codex/integrations/github) for more details.65Start by adding Codex code review to your GitHub organization or repository.

66See [Codex code review in GitHub](https://developers.openai.com/codex/integrations/github) for more details.

66 67 

67You can set up Codex to automatically review every pull request, or you can request a review with `@codex review` in a pull request comment.68You can set up Codex to automatically review every pull request, or you can request a review with `@codex review` in a pull request comment.

68 69 


70 71 

71This will start a new cloud task that will fix the issue and update the pull request.72This will start a new cloud task that will fix the issue and update the pull request.

72 73 

73## Define additional guidance74## Define review guidance

74 75 

75To customize what Codex reviews, add or update a top-level `AGENTS.md` with a section like this:76To customize what Codex reviews, add or update a top-level `AGENTS.md` with a section like this:

76 77 

Details

6 6 

7Default options7Default options

8 8 

9[SwiftUI](https://developer.apple.com/xcode/swiftui/) with `glassEffect`, `GlassEffectContainer`, and glass button styles9[SwiftUI](https://developer.apple.com/documentation/swiftui/) with `glassEffect`, `GlassEffectContainer`, and glass button styles

10 10 

11Why it's needed11Why it's needed

12 12 

Details

48 48 

49## Skills & Plugins49## Skills & Plugins

50 50 

51- [ImageGen](https://github.com/openai/skills/tree/main/skills/.curated/imagegen)51- ImageGen

52 52 

53 Generate illustrative, non-exact visual assets when a Markdown-native diagram is not enough.53 Generate illustrative, non-exact visual assets when a Mermaid diagram is not enough.

54 54 

55| Skill | Why use it |55| Skill | Why use it |

56| --- | --- |56| --- | --- |

57| [ImageGen](https://github.com/openai/skills/tree/main/skills/.curated/imagegen) | Generate illustrative, non-exact visual assets when a Markdown-native diagram is not enough. |57| ImageGen | Generate illustrative, non-exact visual assets when a Mermaid diagram is not enough. |

58 58 

59## Starter prompt59## Starter prompt

60 60 


163- An experiment map that connects datasets, metrics, baselines, and reported claims.163- An experiment map that connects datasets, metrics, baselines, and reported claims.

164- A limitations diagram that separates assumptions, failure modes, and open questions.164- A limitations diagram that separates assumptions, failure modes, and open questions.

165 165 

166For Markdown-first reports, ask for Mermaid when the destination supports it, or a small checked-in SVG/PNG asset when it does not. Ask Codex to use imagegen only when you need an illustrative, non-exact visual or something that doesnt fit in a Markdown-native diagram.166For Markdown-first reports, ask for Mermaid when the destination supports it, or a small checked-in SVG/PNG asset when it does not. Ask Codex to use the imagegen system skill, which comes with Codex by default, only when you need an illustrative, non-exact visual or something that doesn't fit in a Markdown-native diagram.

167 167 

168## Write the Markdown report168## Write the Markdown report

169 169 

Details

48 48 

49## Skills & Plugins49## Skills & Plugins

50 50 

51- [Spreadsheet](https://github.com/openai/skills/tree/main/skills/.curated/spreadsheet)51- Spreadsheet

52 52 

53 Inspect CSV, TSV, and Excel trackers; stage spreadsheet updates; and review tabular operations data before it becomes a source of truth.53 Inspect CSV, TSV, and Excel trackers, stage spreadsheet updates, and review tabular operations data before it becomes a source of truth.

54- [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive)54- [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive)

55 55 

56 Bring approved docs, tracker templates, exports, and shared onboarding folders into the task context.56 Bring approved docs, tracker templates, exports, and shared onboarding folders into the task context.


60 60 

61| Skill | Why use it |61| Skill | Why use it |

62| --- | --- |62| --- | --- |

63| [Spreadsheet](https://github.com/openai/skills/tree/main/skills/.curated/spreadsheet) | Inspect CSV, TSV, and Excel trackers; stage spreadsheet updates; and review tabular operations data before it becomes a source of truth. |63| Spreadsheet | Inspect CSV, TSV, and Excel trackers, stage spreadsheet updates, and review tabular operations data before it becomes a source of truth. |

64| [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive) | Bring approved docs, tracker templates, exports, and shared onboarding folders into the task context. |64| [Google Drive](https://github.com/openai/plugins/tree/main/plugins/google-drive) | Bring approved docs, tracker templates, exports, and shared onboarding folders into the task context. |

65| [Notion](https://github.com/openai/plugins/tree/main/plugins/notion) | Reference onboarding plans, project pages, checklists, and team wikis that already live in Notion. |65| [Notion](https://github.com/openai/plugins/tree/main/plugins/notion) | Reference onboarding plans, project pages, checklists, and team wikis that already live in Notion. |

66 66 

Details

115 115 

116## Use skills for repeatable patterns116## Use skills for repeatable patterns

117 117 

118[Skills](https://developers.openai.com/codex/guides/skills) are useful when the same cleanup rules repeat across repos, services, or teams. Use framework-specific skills when available, add security and CI skills around risky cleanups, and create a team skill when you have a proven checklist for unused-code removal, module extraction, or legacy-pattern modernization.118[Skills](https://developers.openai.com/codex/skills) are useful when the same cleanup rules repeat across repos, services, or teams. Use framework-specific skills when available, add security and CI skills around risky cleanups, and create a team skill when you have a proven checklist for unused-code removal, module extraction, or legacy-pattern modernization.

119If you end up doing the same modernization pass across more than one codebase, Codex can help turn the first successful pass into a reusable skill.119If you end up doing the same modernization pass across more than one codebase, Codex can help turn the first successful pass into a reusable skill.

120 120 

121## Related use cases121## Related use cases

windows.md +4 −0

Details

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

5 5 

6The Codex app on Windows supports core workflows such as parallel agent threads,

7worktrees, automations, Git functionality, the in-app browser, artifact previews,

8plugins, and skills.

9 

6[![](/images/codex/codex-banner-icon.webp)10[![](/images/codex/codex-banner-icon.webp)

7 11 

8Use the Codex app on Windows12Use the Codex app on Windows