enterprise/admin-setup.md +145 −85
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
1012- Zero data retention for the CLI and IDE- Zero data retention for the App, CLI, and IDE (code remains in developer environment)
1113- Residency and retention follow ChatGPT Enterprise policies- Residency and retention that follow ChatGPT Enterprise policies
12- Granular user access controls14- Granular user access controls
1315- Data encryption at rest (AES 256) and in transit (TLS 1.2+)- Data encryption at rest (AES-256) and in transit (TLS 1.2+)
14 16
1517For more, see [Security](https://developers.openai.com/codex/security).For 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
21231. Local use includes the Codex app, CLI, and IDE extension. The agent runs on the developer’s computer in a sandbox.1. **Codex local** includes the Codex app, CLI, and IDE extension. The agent runs on the developer’s computer in a sandbox.
22242. 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.2. **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
2426Use 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.You can enable local, cloud, or both, and control access with workspace settings and role-based access control (RBAC).
25 27
2628## Codex local setup## Step 0: Owners and rollout decision
27 29
2830### Enable Codex app, CLI, and IDE extension in workspace settingsEnsure you have the following owners:
29 31
3032To 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.- Workspace owner with access to ChatGPT Enterprise
33- IT management owner for managed configuration
34- Governance owner for analytics / compliance review
31 35
3236After 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.”A rollout decision:
33 37
3438## Team Config- Codex local only (Codex app, CLI, and IDE extension)
39- Codex cloud only (Codex web, GitHub code review)
40- Both local + cloud
35 41
3642Teams 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.Review [authentication](https://developers.openai.com/codex/auth) before rollout:
37 43
3844| Type | Path | Use it to |- Codex local supports ChatGPT sign-in or API keys. Confirm MFA/SSO requirements and any managed login restrictions in authentication
3945| ------------------------------------ | ------------- | ---------------------------------------------------------------------------- |- 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
4447For locations and precedence, see [Config basics](https://developers.openai.com/codex/config-basic#configuration-precedence).## 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
4659## Codex cloud setupIf 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
6081To enable Codex cloud for your workspace, turn on **Allow members to use Codex cloud**.To 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
62103Once enabled, users can access Codex directly from the left-hand navigation panel in ChatGPT.For security implications of internet access and runtime controls, see [Security](https://developers.openai.com/codex/security).
63 104
64105
65 106
66107After you turn on Codex in your Enterprise workspace settings, it may take up## Step 2: Set up custom roles (RBAC)
67to 10 minutes for Codex to appear in ChatGPT.
68 108
69109### Configure the GitHub Connector IP allow listUse RBAC to control which users or groups can access Codex local and Codex cloud.
70 110
71111To control which IP addresses can connect to your ChatGPT GitHub connector, configure these IP ranges:### What RBAC lets you do
72 112
73113- [ChatGPT egress IP ranges](https://openai.com/chatgpt-actions.json)Workspace Owners can use RBAC in ChatGPT admin settings to:
74- [Codex container egress IP ranges](https://openai.com/chatgpt-agents.json)
75 114
76115These IP ranges can change. Consider checking them automatically and updating your allow list based on the latest values.- 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
78120### Allow members to administer CodexUsers can inherit multiple roles, and permissions resolve to the maximum allowed across those roles.
79 121
80122This toggle allows users to view Codex workspace analytics and manage environments (edit and delete).### Important behavior to plan for
81 123
82124Codex 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.Users in any custom role group do not use the workspace default permissions.
83 125
84126### Enable Codex Slack app to post answers on task completionIf 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
86128Codex 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.For 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
88130To 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.## Step 3: Configure Codex local managed settings
89 131
90132To learn more, see [Codex in Slack](https://developers.openai.com/codex/integrations/slack).For Codex local, set an admin-approved baseline for local behavior before broader rollout.
91 133
92134### Enable Codex agent to access the internet### Use managed configuration for two different goals
93 135
94136By default, Codex cloud agents have no internet access during runtime to help protect against security and safety risks like prompt injection.- **Requirements** (`requirements.toml`): Admin-enforced constraints users cannot override
137- **Managed defaults** (`managed_config.toml`): Starting values applied when Codex launches
95 138
96139As 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**.### Team Config
97 140
98141When 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.Teams 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
100143### Enable code review with Codex cloud| 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
102161To allow Codex to do code reviews, go to [Settings → Code review](https://chatgpt.com/codex/settings/code-review).For 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
104163Users 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.If 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
106165Codex supports two types of code reviews:## Step 4: Configure Codex cloud usage (if enabled)
107 166
1081671. Automatically triggered code reviews when a user opens a PR for review.This 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
111169## Role-based access (RBAC)### Connect Codex cloud to repositories
112 170
113171Codex 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.1. 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
115177To 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.For more, see [Cloud environments](https://developers.openai.com/codex/cloud/environments).
116 178
117179This 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).Codex 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
119189## Set up your first Codex cloud environmentTo allow Codex to perform code reviews on GitHub, go to [Settings → Code review](https://chatgpt.com/codex/settings/code-review).
120 190
1211911. Go to Codex cloud and select **Get started**.Code 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
130193You 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.Additional 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
132195### Environment management## Step 5: Set up governance and observability
133 196
134197As a ChatGPT workspace administrator, you can edit and delete Codex environments in your workspace.Codex 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
136199### Connect more GitHub repositories with Codex cloud### Codex governance typically uses
137 200
1382011. Select **Environments**, or open the environment selector and select **Manage Environments**.- Analytics Dashboard for quick, self-serve visibility
1392022. Select **Create Environment**.- Analytics API for programmatic reporting and BI integration
1402033. Select the repository you want to connect.- Compliance API for audit and investigation workflows
1414. Enter a name and description.
1425. Select the environment visibility.
1436. Select **Create Environment**.
144 204
145205Codex 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).### Recommended minimum setup
146 206
147207### Share setup instructions with users- 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
149212You can share these steps with end users:For details and examples, see [Governance](https://developers.openai.com/codex/enterprise/governance).
150 213
1512141. Go to [Codex](https://chatgpt.com/codex) in the left-hand panel of ChatGPT.## 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
159216## Track Codex usage### What to verify
160 217
161218- For workspaces with rate limits, use [Settings → Usage](https://chatgpt.com/codex/settings/usage) to view workspace metrics for Codex.- Users can sign in to Codex local (ChatGPT or API key)
162219- For more detail on enterprise governance, refer to the [Governance](https://developers.openai.com/codex/enterprise/governance) page.- (If enabled) Users can sign in to Codex cloud (ChatGPT sign-in required)
163220- For enterprise workspaces with flexible pricing, you can see credit usage in the ChatGPT workspace billing console.- 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
165225## Zero data retention (ZDR)For authentication options and enterprise login restrictions, see [Authentication](https://developers.openai.com/codex/auth).
166 226
167227Codex supports OpenAI organizations with [Zero Data Retention (ZDR)](https://platform.openai.com/docs/guides/your-data#zero-data-retention) enabled.Once your team is confident with setup, you can confidently roll Codex out to additional teams and organizations.