codex-manual.md +194 −89
3909 3909
3910#### How do deep-scan time limits work3910#### How do deep-scan time limits work
3911 3911
39123912Set a discovery deadline when starting a deep scan:Set a worker deadline when starting a deep scan:
3913 3913
3914```bash3914```bash
3915npx @openai/codex-security scan . --mode deep --max-time-hours 1.53915npx @openai/codex-security scan . --mode deep --max-time-hours 1.5
3916```3916```
3917 3917
3918The default is `96` hours. Use any positive value up to `96`, including3918The default is `96` hours. Use any positive value up to `96`, including
39193919fractions. The limit applies only to discovery, so validation and reportingfractions. At the deadline, Codex Security stops unfinished workers, keeps
39203920can continue after the deadline. If no source review finishes, the reportcompleted standard-scan results, and aggregates them into the final report. If
39213921records partial coverage and the CLI returns exit code `2`.no worker finishes source review, the report records partial coverage and the
3922CLI returns exit code `2`.
3922 3923
3923For persistent settings or bulk campaigns, set `max_time_hours` under3924For persistent settings or bulk campaigns, set `max_time_hours` under
3924`[deep_scan]` in the [deep-scan3925`[deep_scan]` in the [deep-scan
3933```3934```
3934 3935
3935The limit is an estimate, not a hard spending cap. Requests already in3936The limit is an estimate, not a hard spending cap. Requests already in
39363937progress can finish above it. If a deep scan reaches the limit after discoveryprogress can finish above it. If a deep scan reaches the limit after Codex
39373938finishes, the CLI saves the completed report with partial coverage and exitsSecurity aggregates completed worker results, the CLI saves the completed
39383939with code `2`. Otherwise, it preserves any available partial output.report with partial coverage and exits with code `2`. Otherwise, it preserves
3940any available partial output.
3939 3941
3940#### Can scans check commits and pull requests3942#### Can scans check commits and pull requests
3941 3943
4191npx @openai/codex-security scan "$REPOSITORY" --mode deep4193npx @openai/codex-security scan "$REPOSITORY" --mode deep
4192```4194```
4193 4195
41944196To control discovery workers, subagents, and when the scan stops:To control workers, subagents, and when the scan stops:
4195 4197
4196```bash4198```bash
4197npx @openai/codex-security scan "$REPOSITORY" \4199npx @openai/codex-security scan "$REPOSITORY" \
4204```4206```
4205 4207
4206These options require deep mode, which supports repository and path targets,4208These options require deep mode, which supports repository and path targets,
42074209not diff or working-tree scans. Here, `--workers` controls discovery workersnot diff or working-tree scans. Here, `--workers` controls independent
42084210within one scan; `bulk-scan --workers` controls concurrent repository scans.standard-scan workers within one scan; `bulk-scan --workers` controls concurrent
42094211`--max-time-hours` accepts a positive number up to `96`, including fractionalrepository scans. `--max-time-hours` accepts a positive number up to `96`,
42104212hours. When discovery reaches that limit, the scan preserves completed workincluding fractional hours. At the limit, the scan stops unfinished workers,
42114213and continues with validation and reporting.preserves completed scan results, and aggregates them into the final report.
4212 4214
4213#### Add architecture and security context4215#### Add architecture and security context
4214 4216
4249```4251```
4250 4252
4251Requests already in progress can finish slightly above the limit. If a deep4253Requests already in progress can finish slightly above the limit. If a deep
42524254scan reaches the limit after discovery finishes, the CLI saves the completedscan reaches the limit after Codex Security aggregates completed worker
42534255report, marks its coverage as `partial`, and returns exit code `2`. If theresults, the CLI saves the completed report, marks its coverage as `partial`,
42544256scan can't produce a completed report, any available partial output stays onand returns exit code `2`. If the scan can't produce a completed report, any
42554257disk.available partial output stays on disk.
4256 4258
4257#### Scan changes before each commit4259#### Scan changes before each commit
4258 4260
4638 4640
4639#### Configure deep scans4641#### Configure deep scans
4640 4642
46414643Use these options with `--mode deep` to control discovery concurrency andUse these options with `--mode deep` to control worker concurrency and runtime:
4642runtime:
4643 4644
4644| Argument | Description |4645| Argument | Description |
46454646| ------------------------ | ----------------------------------------------------------------------- || ------------------------ | -------------------------------------------------------------------------------------- |
46464647| `--workers N` | Limit on concurrent discovery workers. Defaults to automatic selection. || `--workers N` | Limit on concurrent independent standard-scan workers. Defaults to `4`. |
46474648| `--subagents N` | Subagents available to each discovery worker. Defaults to `3`. || `--subagents N` | Subagents available to each worker. Defaults to `3`. |
46484649| `--stop-after-no-new N` | Stop after `N` consecutive runs find no new issues. Defaults to `6`. || `--stop-after-no-new N` | Stop after `N` consecutive completed worker scans find no new issues. Defaults to `4`. |
46494650| `--max-discovery-runs N` | Limit on total discovery runs. Defaults to `60`. || `--max-discovery-runs N` | Limit on total independent standard-scan runs. Defaults to `40`. |
46504651| `--max-time-hours HOURS` | Discovery time limit in hours. Defaults to `96`; accepts fractions. || `--max-time-hours HOURS` | Worker execution time limit in hours. Defaults to `96`; accepts fractions. |
4651 4652
4652`--subagents` accepts zero or a positive integer. `--max-time-hours` accepts a4653`--subagents` accepts zero or a positive integer. `--max-time-hours` accepts a
4653positive number no greater than `96`. The remaining options require a positive4654positive number no greater than `96`. The remaining options require a positive
4654integer. These options aren't available for standard scans.4655integer. These options aren't available for standard scans.
4655 4656
46564657For example, use two discovery workers, allow up to ten runs, and stopFor example, use two workers, allow up to ten runs, and stop worker execution
46574658discovery after 1.5 hours:after 1.5 hours:
4658 4659
4659```bash4660```bash
4660npx @openai/codex-security scan . \4661npx @openai/codex-security scan . \
4666 --max-time-hours 1.54667 --max-time-hours 1.5
4667```4668```
4668 4669
46694670The time limit applies only to discovery. When it expires, the scan stopsWhen the time limit expires, the scan stops unfinished workers, keeps completed
46704671unfinished discovery, keeps completed discovery results, and continues withscan results, and aggregates them into the final report. If no worker finishes
46714672validation and reporting. If no source review finishes, the scan recordssource review, the scan records partial coverage and returns exit code `2`.
4672partial coverage and returns exit code `2`.
4673 4673
4674Set persistent defaults in `~/.codex/codex-security/config.toml`, or in4674Set persistent defaults in `~/.codex/codex-security/config.toml`, or in
4675`$CODEX_HOME/codex-security/config.toml` when you set `CODEX_HOME`:4675`$CODEX_HOME/codex-security/config.toml` when you set `CODEX_HOME`:
4684```4684```
4685 4685
4686Command-line options override these defaults. `scan --workers` controls4686Command-line options override these defaults. `scan --workers` controls
46874687discovery workers within one scan; `bulk-scan --workers` controls concurrentindependent standard-scan workers within one deep scan; `bulk-scan --workers`
46884688repository scans. Set `stop_after_consecutive_errors` only in the TOML file;controls concurrent repository scans. Set `stop_after_consecutive_errors` only
46894689its default is `3`.in the TOML file; its default is `3`.
4690 4690
4691#### Add security context4691#### Add security context
4692 4692
4743 4743
4744The cost limit is an estimate, not a hard spending cap. Requests already in4744The cost limit is an estimate, not a hard spending cap. Requests already in
4745progress can finish slightly above the limit. If a deep scan reaches the limit4745progress can finish slightly above the limit. If a deep scan reaches the limit
47464746after discovery finishes, the CLI seals the available results, marks coverageafter Codex Security aggregates completed worker results, the CLI seals the
47474747as `partial`, and returns exit code `2`. Otherwise, it returns `2` and leavesavailable results, marks coverage as `partial`, and returns exit code `2`.
47484748any available partial output on disk.Otherwise, it returns `2` and leaves any available partial output on disk.
4749 4749
4750When you omit `--output-dir`, results persist under4750When you omit `--output-dir`, results persist under
4751`$CODEX_HOME/state/plugins/codex-security/scans/`. `CODEX_HOME`4751`$CODEX_HOME/state/plugins/codex-security/scans/`. `CODEX_HOME`
5643 5643
5644Use this changelog to see what changed in the Codex Security plugin.5644Use this changelog to see what changed in the Codex Security plugin.
5645 5645
56465646**Latest plugin version:** `0.1.19`.**Latest plugin version:** `0.1.20`.
5647 5647
5648Check the plugin version in your current Codex environment before you use a5648Check the plugin version in your current Codex environment before you use a
5649feature from a newer release.5649feature from a newer release.
5652SDK users can run `npx @openai/codex-security info --json` to check the5652SDK users can run `npx @openai/codex-security info --json` to check the
5653package and bundled plugin versions together.5653package and bundled plugin versions together.
5654 5654
5655#### 0.1.20 (August 17, 2026)
5656
5657#### Run deep scans as complete independent audits
5658
5659- Run each deep scan worker through the same end-to-end audit used by standard
5660 scans, including threat modeling, validation, attack-path analysis, and
5661 coverage reporting.
5662- Combine completed worker reports into one scan while preserving configured
5663 time limits, partial coverage, restart recovery, and cancellation.
5664- Use four concurrent workers by default, stop after four consecutive completed
5665 scans add no new findings, and limit a deep scan to 40 worker runs. Existing
5666 `workers = "auto"` settings now resolve to four workers. See
5667 [Configure deep-scan runtime](https://learn.chatgpt.com/docs/security/plugin/deep-scans#configure-deep-scan-runtime).
5668- Resume workers that finished source review but lost their final draft instead
5669 of repeating the complete audit.
5670
5671#### Check Trusted Access for Cyber before hosted scans
5672
5673- In Codex hosts that expose the Codex Security Access app, check Trusted Access
5674 status before standard, change, and deep scans begin.
5675- See a prominent warning when protected scan output might not be available,
5676 with an enrollment link when access isn't granted.
5677- Continue the scan when the check can't verify Trusted Access status or access
5678 isn't granted; the advisory doesn't control whether the scan runs.
5679- The public CLI and SDK packages don't run this advisory in `0.1.20`.
5680
5681#### Run deep scans in more environments
5682
5683- Launch deep scan workers from packaged CLI and SDK installations, including
5684 Windows installations without a global `codex` executable.
5685- Keep standalone CLI and SDK deep scan settings isolated from other running
5686 scans.
5687- Keep non-interactive approval settings in nested deep scan workers.
5688
5689#### Preserve scan results through more failures
5690
5691- Preserve more saved scans and completed worker results across restart,
5692 archive, and handoff recovery paths.
5693- Recover valid findings from older or incomplete scan data.
5694- Complete scans when independent coverage reports overlap.
5695- Report cached input correctly in token usage totals across current and older
5696 provider responses.
5697
5655#### 0.1.19 (August 13, 2026)5698#### 0.1.19 (August 13, 2026)
5656 5699
5657#### Set a time limit for deep scans5700#### Set a time limit for deep scans
6327```6370```
6328 6371
6329Deep mode supports repository and path targets. Use standard mode for diff and6372Deep mode supports repository and path targets. Use standard mode for diff and
63306373working-tree scans. The optional settings control concurrent discovery workers,working-tree scans. The optional settings control concurrent independent
63316374subagents per worker, consecutive discovery runs without new findings, and thestandard-scan workers, subagents per worker, consecutive completed worker scans
63326375total number and duration of discovery runs. They require `mode: "deep"`.without new findings, and the total number and duration of worker runs. They
6376require `mode: "deep"`.
6333 6377
6334`maxTimeHours` defaults to `96` and accepts a positive number up to `96`,6378`maxTimeHours` defaults to `96` and accepts a positive number up to `96`,
6335including fractional hours. At the deadline, Codex Security stops unfinished6379including fractional hours. At the deadline, Codex Security stops unfinished
63366380discovery, keeps completed discovery results, and continues with validationworkers, keeps completed scan results, and aggregates them into the final
63376381and reporting. Review `result.coverage.completeness` before treating areport. Review `result.coverage.completeness` before treating a time-limited
63386382time-limited scan as evidence of full coverage.scan as evidence of full coverage.
6339 6383
6340#### Add a security knowledge base6384#### Add a security knowledge base
6341 6385
6389 6433
6390The limit estimates spending but isn't a hard cap, so requests already in6434The limit estimates spending but isn't a hard cap, so requests already in
6391progress can finish slightly above it. If a deep scan reaches the limit after6435progress can finish slightly above it. If a deep scan reaches the limit after
63926436discovery finishes, `run` returns a result with `coverage.completeness` set toCodex Security aggregates completed worker results, `run` returns a result
63936437`"partial"` and reports the budget warning through `onWarning`.with `coverage.completeness` set to `"partial"` and reports the budget warning
6438through `onWarning`.
6394 6439
6395If the scan can't produce a completed partial result, `run` throws6440If the scan can't produce a completed partial result, `run` throws
6396`ScanCostLimitExceededError` and preserves any available output.6441`ScanCostLimitExceededError` and preserves any available output.
7557```7602```
7558 7603
7559| Setting | Default | Description |7604| Setting | Default | Description |
75607605| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------ || ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
75617606| `workers` | `auto` | Number of discovery workers allowed to run at the same time. Set a positive integer or `"auto"`. || `workers` | `4` | Number of independent standard-scan workers allowed to run at the same time. Legacy `"auto"` also resolves to `4`. |
75627607| `subagents` | `3` | Number of subagents each discovery worker may start. Set `0` to disable them. || `subagents` | `3` | Number of subagents each worker may start. Set `0` to disable them. |
75637608| `stop_after_no_new` | `6` | Stop discovery after this many consecutive runs produce no new candidates. || `stop_after_no_new` | `4` | Stop after this many consecutive completed worker scans produce no new findings. |
75647609| `stop_after_consecutive_errors` | `3` | Stop discovery after this many consecutive worker errors. || `stop_after_consecutive_errors` | `3` | Stop after this many consecutive worker errors. |
75657610| `max_discovery_runs` | `60` | Limit on discovery runs before the scan moves to validation. || `max_discovery_runs` | `40` | Limit the number of independent standard-scan runs before aggregation. |
75667611| `max_time_hours` | `96` | Limit discovery to a positive number of hours up to `96`; use fractions as needed. || `max_time_hours` | `96` | Limit worker execution to a positive number of hours up to `96`; use fractions as needed. |
7567 7612
7568Lower values can reduce scan time and token use but may miss findings.7613Lower values can reduce scan time and token use but may miss findings.
7569Configuration changes apply to new deep scans, not scans already in progress.7614Configuration changes apply to new deep scans, not scans already in progress.
7570 7615
75717616The time limit applies only to discovery. When it expires, Codex SecurityWhen the time limit expires, Codex Security stops unfinished workers, keeps
75727617stops unfinished discovery, keeps completed results, and continues withcompleted scan results, and aggregates them into the final report. If no worker
75737618validation and reporting. If no source review finishes before the deadline,finishes source review before the deadline, the report records partial
75747619the report records partial coverage.coverage.
7575 7620
7576The `max_time_hours` setting requires plugin version `0.1.19` or later. See the7621The `max_time_hours` setting requires plugin version `0.1.19` or later. See the
7577[plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) for release details.7622[plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) for release details.
76094. Open **Additional context** for concrete attack vectors, sensitive76544. Open **Additional context** for concrete attack vectors, sensitive
7610 application areas, or repository context that the code can't reveal.7655 application areas, or repository context that the code can't reveal.
76115. Select **Start scan**.76565. Select **Start scan**.
76126. Review any setup or capability warning before you approve a configuration
7613 change.
7614 7657
76157658Deep scans require delegated workers. If the current runtime doesn't meet theDeep scan workers inherit your selected model and reasoning settings. Each
76167659capability requirements, use a standard scan or try again when enough capacityworker runs a complete standard scan, and Codex Security aggregates the
76177660is available.completed results. Follow the saved scan from **Scans**, or select **View
76187661 activity** to inspect its Codex task. Check the [plugin
76197662Discovery workers inherit your selected model and reasoning settings. Followchangelog](https://learn.chatgpt.com/docs/security/plugin/changelog) before you update the plugin or
76207663the saved scan from **Scans**, or select **View activity** to inspect its Codexstart a long-running scan.
7621task. Check the [plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) before you
7622update the plugin or start a long-running scan.
7623 7664
7624 Track the active deep-scan phase and inspect its Codex activity before7665 Track the active deep-scan phase and inspect its Codex activity before
7625 reviewing the completed result.7666 reviewing the completed result.
7745```7786```
7746 7787
7747`--workers` controls concurrent repository scans and defaults to `4`. It does7788`--workers` controls concurrent repository scans and defaults to `4`. It does
77487789not set the number of discovery workers within each deep scan; configure thosenot set the number of independent standard-scan workers within each deep scan;
77497790limits through [`[deep_scan]`](/codex/security/cli/reference#configure-deep-scans).configure those limits through
77507791Use `--mode deep` to select deep scanning for rows without their own `mode`.[`[deep_scan]`](/codex/security/cli/reference#configure-deep-scans). Use `--mode
77517792Each CSV row can still choose its own scan mode and repository scope.deep` to select deep scanning for rows without their own `mode`. Each CSV row
7793can still choose its own scan mode and repository scope.
7752 7794
77537795Set `[deep_scan].max_time_hours` to limit discovery for each deep scan in theSet `[deep_scan].max_time_hours` to limit worker execution for each deep scan in
77547796campaign. The `--max-time-hours` flag works with `scan`, not `bulk-scan`.the campaign. The `--max-time-hours` flag works with `scan`, not `bulk-scan`.
7755 7797
7756The CLI checks out each pinned revision, scans the selected target, records the7798The CLI checks out each pinned revision, scans the selected target, records the
7757result, and removes the temporary repository checkout. A repository counts as7799result, and removes the temporary repository checkout. A repository counts as
14166 14208
14167[Computer History](https://learn.chatgpt.com/docs/customization/computer-history) is an opt-in macOS14209[Computer History](https://learn.chatgpt.com/docs/customization/computer-history) is an opt-in macOS
14168desktop feature that can turn activity across allowed apps and websites into14210desktop feature that can turn activity across allowed apps and websites into
1416914211memories and a timeline. It records interaction events rather than screenshotsmemories and a timeline. It uses interaction events, along with text and other
1417014212or audio.context available through macOS accessibility features. It does not include
14213screenshots in your history or record audio.
14171 14214
14172Review what Computer History includes before enabling it. You can pause it,14215Review what Computer History includes before enabling it. You can pause it,
14173exclude apps and websites, inspect or delete individual timeline items, and14216exclude apps and websites, inspect or delete individual timeline items, and
18518 18561
18519Source: [Sites](https://learn.chatgpt.com/docs/sites.md)18562Source: [Sites](https://learn.chatgpt.com/docs/sites.md)
18520 18563
1852118564Sites is in public beta. Availability can depend on your plan, region, andSites is in public beta and is available with ChatGPT Plus, Pro, Business,
1852218565workspace settings. Plan-specific usage limits apply across all Sites duringEnterprise and Edu plans. Plan-specific usage limits apply across all Sites
1852318566the beta. ChatGPT shows the current limits and notifies you as you approachduring the beta. ChatGPT shows the current limits and notifies you as you
1852418567one. Reaching a limit can prevent you from creating a Site, adding storage, orapproach one. Reaching a limit can prevent you from creating a Site, adding
1852518568keeping a high-usage Site public, but you can still edit and manage existingstorage, or keeping a high-usage Site public, but you can still edit and
1852618569Sites.manage existing Sites.
18527 18570
18528Sites lets ChatGPT create, host, refine, and share websites, web apps, and games.18571Sites lets ChatGPT create, host, refine, and share websites, web apps, and games.
18529Use Sites when you want to turn a prompt or compatible existing project into a18572Use Sites when you want to turn a prompt or compatible existing project into a
18824frameworks, private networks, databases, background services, and hosting18867frameworks, private networks, databases, background services, and hosting
18825patterns aren't supported.18868patterns aren't supported.
18826 18869
18870Each Site has these storage limits:
18871
18872| Resource | Limit |
18873| ------------------- | ---------------------- |
18874| D1 database storage | 10 GB |
18875| R2 object storage | No fixed storage limit |
18876
18827Sites doesn't support data residency or inference residency at launch. This18877Sites doesn't support data residency or inference residency at launch. This
18828includes deployed Sites, Site code, D1 and R2 data and file storage, generated18878includes deployed Sites, Site code, D1 and R2 data and file storage, generated
18829artifacts, and logs.18879artifacts, and logs.
21347and can inspect or delete your history at any time.21397and can inspect or delete your history at any time.
21348 21398
21349Computer History replaces the earlier Chronicle research preview, but it is a21399Computer History replaces the earlier Chronicle research preview, but it is a
2135021400rebuilt system rather than a rename. Chronicle used screenshots. Computerrebuilt system rather than a rename. It uses interaction events, along with
2135121401History records interaction events and does not capture your screen or audio.text and other context available through macOS accessibility features, to
21402create summaries you can review and delete. It does not include screenshots in
21403your history or record audio, and private-mode web browsing activity is never
21404included.
21352 21405
21353#### How Computer History helps21406#### How Computer History helps
21354 21407
21380History periodically turns these events into text summaries and local memory21433History periodically turns these events into text summaries and local memory
21381files.21434files.
21382 21435
2138321436Computer History does **not** capture screenshots, screen recordings,Computer History does not include screenshots in your history or record
2138421437microphone input, or system audio. Private-mode web browsing activity is nevermicrophone input or system audio. Private-mode web browsing activity is never
21385included.21438included.
21386 21439
21387In **Settings > Computer history > History**, the timeline groups summaries by21440In **Settings > Computer history > History**, the timeline groups summaries by
21494#### Privacy and local storage21547#### Privacy and local storage
21495 21548
21496Computer History stores the interaction-event stream temporarily on your Mac so21549Computer History stores the interaction-event stream temporarily on your Mac so
2149721550ChatGPT and Codex can generate memories and build suggested workflows. It doesChatGPT and Codex can generate memories and build suggested workflows. The
2149821551**not** capture screenshots, screen recordings, microphone input, or systemstream can include activity such as clicks and typing, along with text and other
2149921552audio.context available through macOS accessibility features. Computer History does
21553not include screenshots in your history or record microphone input or system
21554audio. Private-mode web browsing activity is never included.
21500 21555
21501Temporary event files are retained for up to 48 hours. Generated memory files21556Temporary event files are retained for up to 48 hours. Generated memory files
21502remain on your filesystem until you delete or clear them, and you can reveal21557remain on your filesystem until you delete or clear them, and you can reveal
24579 - Environment variables24634 - Environment variables
24580- **Streamable HTTP servers**: Servers that you access at an address.24635- **Streamable HTTP servers**: Servers that you access at an address.
24581 - Bearer token authentication24636 - Bearer token authentication
2458224637 - OAuth authentication - OAuth authentication, including Client ID Metadata Documents (CIMD) and
24638 Dynamic Client Registration (DCR)
24583 - ChatGPT session authentication for trusted first-party servers24639 - ChatGPT session authentication for trusted first-party servers
24584- **Server instructions**: Codex reads the MCP `instructions` field returned during initialization and uses it as server-wide guidance alongside the server's tools.24640- **Server instructions**: Codex reads the MCP `instructions` field returned during initialization and uses it as server-wide guidance alongside the server's tools.
24585 24641
24715server-advertised scopes during OAuth login. Otherwise, Codex falls back to the24771server-advertised scopes during OAuth login. Otherwise, Codex falls back to the
24716scopes configured in `config.toml`.24772scopes configured in `config.toml`.
24717 24773
24774#### OAuth client registration
24775
24776Codex supports [OAuth Client ID Metadata Documents (CIMD)](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/)
24777and Dynamic Client Registration (DCR). By default, Codex automatically chooses
24778CIMD when the authorization server advertises
24779`client_id_metadata_document_supported: true`, includes `none` in
24780`token_endpoint_auth_methods_supported`, and the callback uses a supported
24781loopback URL. Otherwise, Codex uses DCR when available. A configured OAuth client
24782ID always takes precedence and skips client registration.
24783
24784For CIMD, Codex uses a ChatGPT-hosted metadata document specific to the MCP
24785server:
24786
24787```text
24788https://chatgpt.com/oauth/codex/<callback_id>/client.json
24789```
24790
24791Codex derives ``from the MCP server URL and includes it in the
24792loopback redirect URI, such as`http://127.0.0.1:/callback/`. The metadata document registers
24793the matching loopback URI without a port. Authorization servers must accept the
24794port selected at login while matching the host and path exactly, as required by
24795[RFC 8252](https://www.rfc-editor.org/rfc/rfc8252.html#section-7.3). Custom
24796callback hosts, paths, or query parameters require DCR or a configured OAuth
24797client ID.
24798
24799Support for a stable, shared CIMD document is in development and coming soon:
24800
24801```text
24802https://chatgpt.com/oauth/codex/client.json
24803```
24804
24805Codex will use the stable document with the shared `/callback` path when the
24806authorization server advertises
24807`authorization_response_iss_parameter_supported: true`, provides a valid
24808`issuer` in its metadata, and includes a matching `iss` in authorization
24809responses. Servers without issuer-bound responses will continue using the
24810callback-specific document.
24811
24812To choose a registration method for one CLI login, use
24813`--oauth-client-registration`:
24814
24815```bash
24816codex mcp login <server-name> --oauth-client-registration cimd
24817codex mcp login <server-name> --oauth-client-registration dcr
24818```
24819
24820The default is `auto`. Registration choices apply only to the current login and
24821aren't stored in `config.toml`.
24822
24718#### config.toml examples24823#### config.toml examples
24719 24824
24720```toml24825```toml