2 2
3This guide is for ChatGPT Enterprise admins who want to set up Codex for their workspace.3This guide is for ChatGPT Enterprise admins who want to set up Codex for their workspace.
4 4
5Use this page as the step-by-step rollout guide. It focuses on setup order and decision points. For detailed policy, configuration, and monitoring details, use the linked pages: [Authentication](https://developers.openai.com/codex/auth), [Security](https://developers.openai.com/codex/security), [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration), and [Governance](https://developers.openai.com/codex/enterprise/governance).
6
5## Enterprise-grade security and privacy7## Enterprise-grade security and privacy
6 8
7Codex supports ChatGPT Enterprise security features, including:9Codex supports ChatGPT Enterprise security features, including:
8 10
9- No training on enterprise data11- No training on enterprise data
10- Zero data retention for the CLI and IDE12- Zero data retention for the App, CLI, and IDE (code remains in developer environment)
11- Residency and retention follow ChatGPT Enterprise policies13- Residency and retention that follow ChatGPT Enterprise policies
12- Granular user access controls14- Granular user access controls
13- Data encryption at rest (AES 256) and in transit (TLS 1.2+)15- Data encryption at rest (AES-256) and in transit (TLS 1.2+)
14 16
15For more, see [Security](https://developers.openai.com/codex/security).17For security controls and runtime protections, see [Security](https://developers.openai.com/codex/security). Refer to [Zero Data Retention (ZDR)](https://platform.openai.com/docs/guides/your-data#zero-data-retention) for more details.
16 18
17## Local vs. cloud setup19## Local vs. cloud setup
18 20
19Codex operates in two environments: local and cloud.21Codex operates in two environments: local and cloud.
20 22
211. Local use includes the Codex app, CLI, and IDE extension. The agent runs on the developer’s computer in a sandbox.231. **Codex local** includes the Codex app, CLI, and IDE extension. The agent runs on the developer’s computer in a sandbox.
222. Use in the cloud includes Codex cloud, iOS, Code Review, and tasks created by the [Slack integration](https://developers.openai.com/codex/integrations/slack). The agent runs remotely in a hosted container with your codebase.242. **Codex cloud** includes hosted Codex features (including Codex cloud, iOS, Code Review, and tasks created by the [Slack integration](https://developers.openai.com/codex/integrations/slack) or [Linear integration](https://developers.openai.com/codex/integrations/linear)). The agent runs remotely in a hosted container with your codebase.
23 25
24Use separate permissions and role-based access control (RBAC) to control access to local and cloud features. You can enable local, cloud, or both for all users or for specific groups.26You can enable local, cloud, or both, and control access with workspace settings and role-based access control (RBAC).
25 27
26## Codex local setup28## Step 0: Owners and rollout decision
27 29
28### Enable Codex app, CLI, and IDE extension in workspace settings30Ensure you have the following owners:
29 31
30To enable Codex locally for workspace members, go to [Workspace Settings > Settings and Permissions](https://chatgpt.com/admin/settings). Turn on **Allow members to use Codex Local**. This setting doesn’t require the GitHub connector.32- Workspace owner with access to ChatGPT Enterprise
33- IT management owner for managed configuration
34- Governance owner for analytics / compliance review
31 35
32After you turn this on, users can sign in to use the Codex app, CLI, and IDE extension with their ChatGPT account. If you turn off this setting, users who attempt to use the Codex app, CLI, or IDE will see the following error: “403 - Unauthorized. Contact your ChatGPT administrator for access.”36A rollout decision:
33 37
34## Team Config38- Codex local only (Codex app, CLI, and IDE extension)
39- Codex cloud only (Codex web, GitHub code review)
40- Both local + cloud
35 41
36Teams who want to standardize Codex across an organization can use Team Config to share defaults, rules, and skills without duplicating setup on every local configuration.42Review [authentication](https://developers.openai.com/codex/auth) before rollout:
37 43
38| Type | Path | Use it to |44- Codex local supports ChatGPT sign-in or API keys. Confirm MFA/SSO requirements and any managed login restrictions in authentication
39| ------------------------------------ | ------------- | ---------------------------------------------------------------------------- |45- Codex cloud requires ChatGPT sign-in
40| [Config basics](https://developers.openai.com/codex/config-basic) | `config.toml` | Set defaults for sandbox mode, approvals, model, reasoning effort, and more. |
41| [Rules](https://developers.openai.com/codex/rules) | `rules/` | Control which commands Codex can run outside the sandbox. |
42| [Skills](https://developers.openai.com/codex/skills) | `skills/` | Make shared skills available to your team. |
43 46
44For locations and precedence, see [Config basics](https://developers.openai.com/codex/config-basic#configuration-precedence).47## Step 1: Enable workspace toggles
48
49Turn on only the Codex features you plan to roll out in this phase.
50
51Go to [Workspace Settings > Settings and Permissions](https://chatgpt.com/admin/settings).
52
53### Codex local
54
55Turn on **Allow members to use Codex Local**.
56
57This enables use of the Codex app, CLI, and IDE extension for allowed users.
45 58
46## Codex cloud setup59If this toggle is off, users who attempt to use the Codex app, CLI, or IDE will see the following error: “403 - Unauthorized. Contact your ChatGPT administrator for access.”
60
61#### Enable device code authentication for Codex CLI
62
63Allow developers to sign in with device codes when using Codex CLI in a non-interactive environment. More details in [authentication](https://developers.openai.com/codex/auth/).
64
65
66
67### Codex cloud
47 68
48### Prerequisites69### Prerequisites
49 70
57 78
58Start by turning on the ChatGPT GitHub Connector in the Codex section of [Workspace Settings > Settings and Permissions](https://chatgpt.com/admin/settings).79Start by turning on the ChatGPT GitHub Connector in the Codex section of [Workspace Settings > Settings and Permissions](https://chatgpt.com/admin/settings).
59 80
60To enable Codex cloud for your workspace, turn on **Allow members to use Codex cloud**.81To enable Codex cloud for your workspace, turn on **Allow members to use Codex cloud**. Once enabled, users can access Codex directly from the left-hand navigation panel in ChatGPT.
82
83Note that it may take up to 10 minutes for Codex to appear in ChatGPT.
84
85#### Allow members to administer Codex
86
87Allows users to view overall Codex [workspace analytics](https://chatgpt.com/codex/settings/analytics), access [cloud-managed requirements](https://chatgpt.com/codex/settings/managed-configs), and manage Cloud environments (edit and delete).
88
89Codex cloud not required.
90
91#### Enable Codex Slack app to post answers on task completion
92
93Codex posts its full answer back to Slack when the task completes. Otherwise, Codex posts only a link to the task.
94
95To learn more, see [Codex in Slack](https://developers.openai.com/codex/integrations/slack).
96
97#### Enable Codex agent to access the internet
98
99By default, Codex cloud agents have no internet access during runtime to help protect against security and safety risks like prompt injection.
100
101This setting enables users to use an allowlist for common software dependency domains, add more domains and trusted sites, and specify allowed HTTP methods.
61 102
62Once enabled, users can access Codex directly from the left-hand navigation panel in ChatGPT.103For security implications of internet access and runtime controls, see [Security](https://developers.openai.com/codex/security).
63 104
64105
65 106
66After you turn on Codex in your Enterprise workspace settings, it may take up107## Step 2: Set up custom roles (RBAC)
67to 10 minutes for Codex to appear in ChatGPT.
68 108
69### Configure the GitHub Connector IP allow list109Use RBAC to control which users or groups can access Codex local and Codex cloud.
70 110
71To control which IP addresses can connect to your ChatGPT GitHub connector, configure these IP ranges:111### What RBAC lets you do
72 112
73- [ChatGPT egress IP ranges](https://openai.com/chatgpt-actions.json)113Workspace Owners can use RBAC in ChatGPT admin settings to:
74- [Codex container egress IP ranges](https://openai.com/chatgpt-agents.json)
75 114
76These IP ranges can change. Consider checking them automatically and updating your allow list based on the latest values.115- Set a default role for users who are not assigned any custom role
116- Create custom roles with granular permissions
117- Assign one or more custom roles to Groups (including SCIM-synced groups)
118- Manage roles centrally from the Custom Roles tab
77 119
78### Allow members to administer Codex120Users can inherit multiple roles, and permissions resolve to the maximum allowed across those roles.
79 121
80This toggle allows users to view Codex workspace analytics and manage environments (edit and delete).122### Important behavior to plan for
81 123
82Codex supports role-based access (see [Role-based access (RBAC)](#role-based-access-rbac)), so you can turn on this toggle for a specific subset of users.124Users in any custom role group do not use the workspace default permissions.
83 125
84### Enable Codex Slack app to post answers on task completion126If you are gradually rolling out Codex, one suggestion is to have a “Codex Users” group and a second “Codex Admin” group that has the “Allow members to administer Codex” toggle enabled.
85 127
86Codex integrates with Slack. When a user mentions `@Codex` in Slack, Codex starts a cloud task, gets context from the Slack thread, and responds with a link to a PR to review in the thread.128For RBAC setup details and the full permission model, see the [OpenAI RBAC Help Center article](https://help.openai.com/en/articles/11750701-rbac).
87 129
88To allow the Slack app to post answers on task completion, turn on **Allow Codex Slack app to post answers on task completion**. When enabled, Codex posts its full answer back to Slack when the task completes. Otherwise, Codex posts only a link to the task.130## Step 3: Configure Codex local managed settings
89 131
90To learn more, see [Codex in Slack](https://developers.openai.com/codex/integrations/slack).132For Codex local, set an admin-approved baseline for local behavior before broader rollout.
91 133
92### Enable Codex agent to access the internet134### Use managed configuration for two different goals
93 135
94By default, Codex cloud agents have no internet access during runtime to help protect against security and safety risks like prompt injection.136- **Requirements** (`requirements.toml`): Admin-enforced constraints users cannot override
137- **Managed defaults** (`managed_config.toml`): Starting values applied when Codex launches
95 138
96As an admin, you can allow users to enable agent internet access in their environments. To enable it, turn on **Allow Codex agent to access the internet**.139### Team Config
97 140
98When this setting is on, users can use an allow list for common software dependency domains, add more domains and trusted sites, and specify allowed HTTP methods.141Teams who want to standardize Codex across an organization can use Team Config to share defaults, rules, and skills without duplicating setup on every local configuration.
99 142
100### Enable code review with Codex cloud143| Type | Path | Use it to |
144| ------------------------------------ | ------------- | ---------------------------------------------------------------------------- |
145| [Config basics](https://developers.openai.com/codex/config-basic) | `config.toml` | Set defaults for sandbox mode, approvals, model, reasoning effort, and more. |
146| [Rules](https://developers.openai.com/codex/rules) | `rules/` | Control which commands Codex can run outside the sandbox. |
147| [Skills](https://developers.openai.com/codex/skills) | `skills/` | Make shared skills available to your team. |
148
149For locations and precedence, see [Config basics](https://developers.openai.com/codex/config-basic#configuration-precedence).
150
151### Recommended first decisions for local rollout
152
153Define a baseline for your pilot:
154
155- Approval policy posture
156- Sandbox mode posture
157- Web search posture
158- MCP / connectors policy
159- Local logging and telemetry posture
101 160
102To allow Codex to do code reviews, go to [Settings → Code review](https://chatgpt.com/codex/settings/code-review).161For exact keys, precedence, MDM deployment, and examples, see [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration) and [Security](https://developers.openai.com/codex/security).
103 162
104Users can specify whether they want Codex to review their pull requests. Users can also configure whether code review runs for all contributors to a repository.163If you plan to restrict login method or workspace for local clients, see the admin-managed authentication restrictions in [Authentication](https://developers.openai.com/codex/auth).
105 164
106Codex supports two types of code reviews:165## Step 4: Configure Codex cloud usage (if enabled)
107 166
1081. Automatically triggered code reviews when a user opens a PR for review.167This step covers repository and environment setup after the Codex cloud workspace toggle is enabled.
1092. Reactive code reviews when a user mentions @Codex to look at issues. For example, “@Codex fix this CI error” or “@Codex address that feedback.”
110 168
111## Role-based access (RBAC)169### Connect Codex cloud to repositories
112 170
113Codex supports role-based access. RBAC is a security and permissions model used to control access to systems or resources based on a user’s role assignments.1711. Navigate to [Codex](https://chatgpt.com/codex) and select **Get started**
1722. Select **Connect to GitHub** to install the ChatGPT GitHub Connector if you haven't already connected GitHub to ChatGPT
1733. Install or authorize the ChatGPT GitHub Connector
1744. Choose an installation target for the ChatGPT Connector (typically your main organization)
1755. Allow the repositories you want to connect to Codex
114 176
115To enable RBAC for Codex, navigate to Settings & Permissions → Custom Roles in [ChatGPT’s admin page](https://chatgpt.com/admin/settings) and assign roles to groups created in the Groups tab.177For more, see [Cloud environments](https://developers.openai.com/codex/cloud/environments).
116 178
117This simplifies permission management for Codex and improves security in your ChatGPT workspace. To learn more, see the [Help Center article](https://help.openai.com/en/articles/11750701-rbac).179Codex uses short-lived, least-privilege GitHub App installation tokens for each operation and respects the user's existing GitHub repository permissions and branch protection rules.
180
181### Configure IP addresses (as needed)
182
183Configure connector / IP allow lists if required by your network policy with these [egress IP ranges](https://openai.com/chatgpt-agents.json).
184
185These IP ranges can change. Consider checking them automatically and updating your allow list based on the latest values.
186
187### Enable code review with Codex cloud
118 188
119## Set up your first Codex cloud environment189To allow Codex to perform code reviews on GitHub, go to [Settings → Code review](https://chatgpt.com/codex/settings/code-review).
120 190
1211. Go to Codex cloud and select **Get started**.191Code review can be configured at the repository level. Users can also enable auto review for their PRs and choose when Codex automatically triggers a review. More details on [GitHub](https://developers.openai.com/codex/integrations/github) integration page.
1222. Select **Connect to GitHub** to install the ChatGPT GitHub Connector if you haven’t already connected GitHub to ChatGPT.
123 - Allow the ChatGPT Connector for your account.
124 - Choose an installation target for the ChatGPT Connector (typically your main organization).
125 - Allow the repositories you want to connect to Codex (a GitHub admin may need to approve this).
1263. Create your first environment by selecting the repository most relevant to your developers, then select **Create environment**.
127 - Add the email addresses of any environment collaborators to give them edit access.
1284. Start a few starter tasks (for example, writing tests, fixing bugs, or exploring code).
129 192
130You have now created your first environment. Users who connect to GitHub can create tasks using this environment. Users who have access to the repository can also push pull requests generated from their tasks.193Additional integration docs for [Slack](https://developers.openai.com/codex/integrations/slack), [GitHub](https://developers.openai.com/codex/integrations/github), and [Linear](https://developers.openai.com/codex/integrations/linear).
131 194
132### Environment management195## Step 5: Set up governance and observability
133 196
134As a ChatGPT workspace administrator, you can edit and delete Codex environments in your workspace.197Codex gives enterprise teams several options for visibility into adoption and impact. Set up governance early so your team can monitor adoption, investigate issues, and support compliance workflows.
135 198
136### Connect more GitHub repositories with Codex cloud199### Codex governance typically uses
137 200
1381. Select **Environments**, or open the environment selector and select **Manage Environments**.201- Analytics Dashboard for quick, self-serve visibility
1392. Select **Create Environment**.202- Analytics API for programmatic reporting and BI integration
1403. Select the repository you want to connect.203- Compliance API for audit and investigation workflows
1414. Enter a name and description.
1425. Select the environment visibility.
1436. Select **Create Environment**.
144 204
145Codex automatically optimizes your environment setup by reviewing your codebase. Avoid advanced environment configuration until you observe specific performance issues. For more, see [Codex cloud](https://developers.openai.com/codex/cloud).205### Recommended minimum setup
146 206
147### Share setup instructions with users207- Assign an owner for adoption reporting
208- Assign an owner for audit and compliance review
209- Define a review cadence
210- Decide what success looks like
148 211
149You can share these steps with end users:212For details and examples, see [Governance](https://developers.openai.com/codex/enterprise/governance).
150 213
1511. Go to [Codex](https://chatgpt.com/codex) in the left-hand panel of ChatGPT.214## Step 6: Confirm and validate setup
1522. Select **Connect to GitHub** in the prompt composer if you’re not already connected.
153 - Sign in to GitHub.
1543. You can now use shared environments with your workspace or create your own environment.
1554. Try a task in both Ask and Code mode. For example:
156 - Ask: Find bugs in this codebase.
157 - Write code: Improve test coverage following the existing test patterns.
158 215
159## Track Codex usage216### What to verify
160 217
161- For workspaces with rate limits, use [Settings → Usage](https://chatgpt.com/codex/settings/usage) to view workspace metrics for Codex.218- Users can sign in to Codex local (ChatGPT or API key)
162- For more detail on enterprise governance, refer to the [Governance](https://developers.openai.com/codex/enterprise/governance) page.219- (If enabled) Users can sign in to Codex cloud (ChatGPT sign-in required)
163- For enterprise workspaces with flexible pricing, you can see credit usage in the ChatGPT workspace billing console.220- MFA and SSO requirements match your enterprise security policy
221- RBAC and workspace toggles produce the expected access behavior
222- Managed configuration is applied for users
223- Governance data is visible for admins
164 224
165## Zero data retention (ZDR)225For authentication options and enterprise login restrictions, see [Authentication](https://developers.openai.com/codex/auth).
166 226
167Codex supports OpenAI organizations with [Zero Data Retention (ZDR)](https://platform.openai.com/docs/guides/your-data#zero-data-retention) enabled.227Once your team is confident with setup, you can confidently roll Codex out to additional teams and organizations.
168 228