Commit Graph
18510 Commits
Author SHA1 Message Date
Michael Bolin 35f1b62930 merge commit for archive created by Sapling 2026-07-09 15:35:55 -07:00
Michael Bolin 9804d974b9 core-plugins: route remote requests through HTTP client factory 2026-07-09 15:34:38 -07:00
Michael Bolin bc05be0f72 core-plugins: route curated startup sync through HTTP client factory 2026-07-09 15:34:38 -07:00
Michael Bolin fb2c0ac189 app-server-daemon: route updater download through HTTP client factory 2026-07-09 15:34:38 -07:00
Michael Bolin 73c1d3851e cloud-tasks: route environment requests through HTTP client factory 2026-07-09 15:34:38 -07:00
Michael Bolin 7d7e2d9354 backend-client: route requests through HTTP client factory 2026-07-09 15:34:38 -07:00
Michael Bolin 6cc150c02e http-client: cover route-aware proxy and privacy behavior 2026-07-09 15:34:38 -07:00
Michael Bolin 42e741270b http-client: add safe route-aware request pool 2026-07-09 15:34:38 -07:00
Michael Bolin adecaf893d http-client: make proxy route fallback explicit 2026-07-09 15:34:38 -07:00
Michael Bolin ce89442235 Merge 9e2a06088a into sapling-pr-archive-bolinfest 2026-07-09 14:59:50 -07:00
Michael Bolin 9e2a06088a core-plugins: route requests through HTTP client factory 2026-07-09 14:59:02 -07:00
Michael Bolin 6779ccee9f app-server-daemon: route updater download through HTTP client factory 2026-07-09 14:59:01 -07:00
Michael Bolin 161d1616e1 cloud-tasks: route environment requests through HTTP client factory 2026-07-09 14:59:01 -07:00
Michael Bolin c3b6da709e backend-client: route requests through HTTP client factory 2026-07-09 14:59:01 -07:00
Michael Bolin 69124cd8fe http-client: cover route-aware proxy and privacy behavior 2026-07-09 14:59:01 -07:00
Michael Bolin d4265e8ffd http-client: add safe route-aware request pool 2026-07-09 14:59:01 -07:00
Michael Bolin 1de3075a49 http-client: make proxy route fallback explicit 2026-07-09 14:59:01 -07:00
Michael Bolin 477156a2fe merge commit for archive created by Sapling 2026-07-09 14:58:47 -07:00
Michael Bolin ce91a014bb core-plugins: route requests through HTTP client factory 2026-07-09 14:57:46 -07:00
Michael Bolin 7ccdb9f812 app-server-daemon: route updater download through HTTP client factory 2026-07-09 14:57:46 -07:00
Michael Bolin 2692df45eb cloud-tasks: route environment requests through HTTP client factory 2026-07-09 14:57:46 -07:00
Michael Bolin 0cdf75e6a5 backend-client: route requests through HTTP client factory 2026-07-09 14:57:46 -07:00
Michael Bolin 7d5fd46b8c http-client: cover route-aware proxy and privacy behavior 2026-07-09 14:57:20 -07:00
Michael Bolin 2fd8c58fab http-client: add safe route-aware request pool 2026-07-09 14:57:20 -07:00
Michael Bolin 3cff0ef556 http-client: make proxy route fallback explicit 2026-07-09 14:57:20 -07:00
Channing Conger 8cf9a1b1f8 code-mode: fall back to using in process v8 if we fail to resolve external process (#31899)
## Why

Not every Codex distribution currently includes the
`codex-code-mode-host` companion binary. Enabling the process-host
feature should not make code mode unavailable on those surfaces while
packaging support is being completed.

## What changed

- Fall back to an in-process code-mode session only when spawning the
companion binary returns `io::ErrorKind::NotFound`.
- Keep permission, handshake, timeout, and other host failures visible
instead of silently falling back.
- Store the provider's owned-process/in-process choice as one
enum-backed state so later sessions reuse the fallback decision.
- Preserve the underlying spawn `io::Error` while retaining the host
path in the displayed error.
- Update provider, `CodeModeService`, and end-to-end coverage to verify
successful fallback execution.

## Test plan

- `just test -p codex-code-mode`
- `just test -p codex-core missing_process_host`
2026-07-09 14:40:10 -07:00
thomas 8347b8de21 [codex-apps] Filter optional file fields by tool schema (#31686)
## Summary

Codex Apps file parameters are exposed to the model as local paths,
uploaded at execution time, and rewritten into provided-file payloads
before the MCP tool call.

The rewrite currently includes the documented optional fields
`mime_type` and `file_name` for every file parameter. Apps with strict
schemas can reject those fields when they are not declared.

## Changes

- Derive the supported optional file fields from each
`openai/fileParams` parameter's raw input schema before replacing it
with the model-visible local-path schema.
- Always include `download_url` and `file_id`.
- Include `mime_type` and `file_name` only when that specific file
parameter's schema accepts them, including schemas that allow additional
properties.
- Handle scalar and array file parameters, including items-only arrays,
composed schemas, and local JSON Schema references.
- Preserve the existing restriction that only the host-owned Codex Apps
MCP server can use this upload path.

This supports tools with different file contracts in the same app: one
parameter can accept the optional fields while another remains strict.

## Validation

- `just test -p codex-mcp`
- `just test -p codex-core mcp_openai_file`
- `just test -p codex-core codex_apps_file_params_`
- `just fix -p codex-mcp`
- `just fix -p codex-core`
- `just fmt`
- `git diff --check`
- Manually verified in the Codex Electron app that:
  - a strict file schema receives only `download_url` and `file_id`
  - a rich file schema also receives `mime_type` and `file_name`

Related: #31330
2026-07-09 14:32:23 -07:00
Michael Bolin 6d3cde7fcd login: route raw auth flows through HTTP client (#31637)
## Why

Login already honors `respect_system_proxy`, but several login-owned
auth flows still construct and pass around raw `reqwest::Client` values.
That keeps those request paths coupled to the underlying transport and
leaves `codex-login` on the temporary direct-`reqwest` allowlist
introduced by #31431.

Auth endpoints also have a stricter logging boundary than ordinary API
requests: custom issuer URLs and response headers may contain
credentials. Moving these requests behind the shared HTTP abstraction
must preserve that boundary while retaining route-aware proxy and
custom-CA behavior.

This is a bounded login migration. The separate Agent Identity and
shared default-client compatibility migrations remain follow-up work.

## What changed

- Add `HttpClientFactory::build_client` to construct the shared
`HttpClient` abstraction for a resolved destination and route class.
- Add a route-aware construction path that suppresses request URL,
response-header, and transport-error diagnostics for sensitive auth
endpoints.
- Route device-code user-code/polling requests, OAuth authorization-code
exchange, and API-key token exchange through `HttpClient`.
- Build the revoke timeout test client through the same factory API.
- Use the transport-neutral `http::StatusCode` in the migrated
device-code flow.
- Add an end-to-end log-capture regression test covering successful
responses and transport failures after `RequestBuilder` transformations.

## Review guidance

The request behavior is intended to be unchanged: each issuer/token
endpoint selects the same auth route, including the existing system/PAC
proxy and custom-CA handling, and raw auth clients still omit Codex
default headers. The intentional logging change is limited to raw auth
requests, whose URL userinfo, query credentials, response headers, and
transport errors must not cross the auth redaction boundary.

This PR deliberately does **not** remove `codex-login` from #31431's
allowlist. The remaining direct `reqwest` surface belongs primarily to:

- Agent Identity APIs that still accept `reqwest::Client`.
- Exported default-client compatibility helpers used by other workspace
crates.
- A small number of tests and concrete error/header types.

## Testing

- `cargo check -p codex-http-client -p codex-login --tests`
- `just test -p codex-http-client` (41 tests)
- `just test -p codex-login` (155 tests)
- `just bazel-lock-check`

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/31637).
* #31837
* #31828
* #31825
* #31821
* __->__ #31637
2026-07-09 14:26:20 -07:00
Konstantine Kahadze 37c6f2916f Update bundled OpenAI Docs skill for GPT-5.6 (#31842)
## Summary

Updates Codex's bundled OpenAI Docs skill for GPT-5.6.

- resolves latest/current/default-model requests through the
machine-readable `latest-model.md` contract
- fetches the exact prompting and migration guide URLs returned by the
live docs
- preserves explicitly named GPT-5 model targets
- adds bundled GPT-5.6 Sol, Terra, and Luna migration judgment
- adds a POSIX resolver wrapper plus a CommonJS entry point for Windows
- skips incompatible Node.js runtimes before trying Codex's
bundled/system fallbacks

## Developer impact

The bundled system skill follows the live GPT-5.6 docs contract and can
resolve current guidance after installation on POSIX and Windows
environments.

## Validation

- skill validator: passed
- live resolver smoke test returned `gpt-5.6-sol` and both standalone
guide URLs
- CommonJS and POSIX shell syntax checks: passed
- non-executable installed-wrapper invocation through `sh`: passed
- incompatible `$NODE` fallback to the bundled Node.js runtime: passed
- `git diff --check`: passed
- migration eval: 30/30 passed, 0 critical failures
- latest-model/prompting routing eval: 33/33 passed, 0 critical failures

`just fmt` was not run because `just` is unavailable in this
environment; the change only touches bundled Markdown and
JavaScript/shell assets.
2026-07-09 14:01:16 -07:00
Channing Conger 22781d4001 code-mode: fix installation on darwin (#31876)
Installer needs to symlink code-mode-host next to codex on install.
2026-07-09 13:11:28 -07:00
Michael Bolin ec07f4bd65 Merge 20d626c6a7 into sapling-pr-archive-bolinfest 2026-07-09 12:09:14 -07:00
Michael Bolin 4dd7f3cdf1 merge commit for archive created by Sapling 2026-07-09 12:08:59 -07:00
Michael Bolin fc0a88aa07 login: use route-aware HTTP client abstraction 2026-07-09 12:08:20 -07:00
Michael Bolin 20d626c6a7 core-plugins: route requests through HTTP client factory 2026-07-09 12:08:20 -07:00
Michael Bolin 37ff5183e9 app-server-daemon: route updater download through HTTP client factory 2026-07-09 12:08:20 -07:00
Michael Bolin e4ce38f20a cloud-tasks: route environment requests through HTTP client factory 2026-07-09 12:08:20 -07:00
Michael Bolin 1493a75867 backend-client: route requests through HTTP client factory 2026-07-09 12:08:20 -07:00
Michael Bolin f04684df98 merge commit for archive created by Sapling 2026-07-09 12:02:10 -07:00
Michael Bolin a1ef58123f login: use route-aware HTTP client abstraction 2026-07-09 12:01:00 -07:00
Michael Bolin d4b562fb9a Merge c50357588b into sapling-pr-archive-bolinfest 2026-07-09 11:53:36 -07:00
Michael Bolin c50357588b core-plugins: route requests through HTTP client factory 2026-07-09 11:53:23 -07:00
Michael Bolin bf21583df2 app-server-daemon: route updater download through HTTP client factory 2026-07-09 11:53:23 -07:00
Michael Bolin cfcc11db69 cloud-tasks: route environment requests through HTTP client factory 2026-07-09 11:53:23 -07:00
Michael Bolin 132bd72d99 backend-client: route requests through HTTP client factory 2026-07-09 11:53:23 -07:00
Michael Bolin a45cdd65cd login: use route-aware HTTP client abstraction 2026-07-09 11:53:23 -07:00
Michael Bolin 2e8c3756f9 build: ratchet direct reqwest dependencies (#31431)
## Why

The `codex-http-client` migration now has a shared implementation and
several migrated request paths, but nothing prevents a new crate from
adding another direct `reqwest` dependency while the remaining call
sites are being converted. The dependency graph should both enforce the
direction of travel and make the remaining scope visible.

This PR adds that ratchet on top of #31363. It does not claim the
migration is complete: the allowlist deliberately records all 18
first-party crates that still depend on `reqwest` directly.

## What changed

- Ban `reqwest` with cargo-deny unless its immediate parent is an
explicitly listed wrapper.
- Identify `codex-http-client` as the intended owner.
- Record the 18 current first-party direct dependents as temporary
migration exceptions.
- Separately allow six third-party integrations that own their `reqwest`
dependency: `oauth2`, `opentelemetry-http`, `opentelemetry-otlp`,
`rmcp`, `sentry`, and `webrtc-sys-build`.
- Cover both `reqwest` 0.12 and 0.13 with the same package-level rule.

## Migration rule

A new first-party crate cannot add `reqwest`. When a listed crate
finishes migrating, its direct Cargo dependency and its wrapper entry
should be removed in the same PR, so the first-party list can only
shrink.

## Review guide

The entire change is the new `reqwest` entry in `codex-rs/deny.toml`:

1. `codex-http-client` is the permanent intended wrapper.
2. The next 18 entries are the first-party migration backlog.
3. The final six entries are separately documented third-party parents
required by cargo-deny graph semantics.

## Validation

- `cargo deny check bans --hide-inclusion-graph` (`bans ok`; existing
duplicate-version warnings remain warnings)




























---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/31431).
* #31837
* #31828
* #31825
* #31821
* #31637
* __->__ #31431
2026-07-09 11:53:18 -07:00
Michael Bolin f5c3e9fa01 Merge bbc00eaa75 into sapling-pr-archive-bolinfest 2026-07-09 11:44:38 -07:00
Michael Bolin bbc00eaa75 core-plugins: route requests through HTTP client factory 2026-07-09 11:44:25 -07:00
Michael Bolin 79abb4882c app-server-daemon: route updater download through HTTP client factory 2026-07-09 11:44:25 -07:00
Michael Bolin d8735566ca cloud-tasks: route environment requests through HTTP client factory 2026-07-09 11:44:25 -07:00