Commit Graph

8508 Commits

Author SHA1 Message Date
Adam Perry @ OpenAI
bbfc3f0152 Normalize Guardian review cwd reuse keys (#34824)
## What changed

- Store the spawned session's working directory as a `PathUri` in
  `GuardianReviewSessionReuseKey` so reuse comparisons use its canonical URI
  representation.
- Assert that the reuse key contains the converted working directory.

GitOrigin-RevId: 68d440a37ebb310c610dabbb3373ed0ceff88dfa
2026-07-22 20:53:32 +00:00
Channing Conger
7fd7a2f9a2 Run code-mode tests in non-Windows Bazel CI (#34823)
## What changed

- Remove the code-mode skip filter from the shared Bazel CI configuration so
  Linux and macOS run the full code-mode integration suite.
- Keep the hidden dynamic-tool callback and ConPTY Ctrl-C tests excluded on
  Windows, where they currently time out or cannot reliably interrupt
  foreground processes.
- Preserve those exclusions in the Windows cross-build configuration alongside
  its PowerShell parser-process exclusion.

GitOrigin-RevId: 1013b9c0c7273ac6618ec3b504d723350b293c1f
2026-07-22 20:47:01 +00:00
jay
88eb3a2b8a Enable git attribution across Codex entry points (#34819)
## What changed

- Install the git attribution extension in the app server, MCP server, and `codex debug prompt-input` so authenticated workspace policy controls the commit and pull request attribution instructions sent to the model.
- Resolve attribution settings from the process-level ChatGPT base URL, independent of per-thread or per-tool configuration overrides.
- Treat git attribution as contextual developer content when mapping model events.

## Testing

- Cover policy fetch retries, workspace switches, rollbacks, cold thread resumes with legacy instructions, MCP tool calls, and prompt-debug output.

GitOrigin-RevId: 57d182c432c20d7c1c6c429057b6163c9f32088d
2026-07-22 20:23:35 +00:00
jiayuhuang-openai
4ebd976312 Support configurable realtime BEM channel prefixes (#34816)
## What changed

- Route realtime V3 `bemTags` handoffs using `[ANALYSIS]`, `[COMMENTARY]`, and `[FINAL]` prefixes by default.
- Add `codexResponseHandoffChannelPrefixes` to realtime start requests so clients can replace the accepted prefixes for individual channels. Each channel may accept multiple prefixes, and omitted channels retain their defaults.
- Apply the configured prefixes to both complete and streamed handoff messages, without treating empty prefixes as matches.

## Testing

- Cover request deserialization, default and custom routing, partial streamed prefixes, empty-prefix handling, and end-to-end V3 handoffs.

GitOrigin-RevId: d0aef50aa71362a5beef2c6f6d28b8633da4e529
2026-07-22 19:43:35 +00:00
pakrym-oai
08ae0fc0ce Consolidate thread startup around StartThreadOptions (#34814)
## What changed

- Add `StartThreadOptions::new` to provide the standard configuration for a new thread.
- Make `ThreadManager::start_thread` the single thread-start entry point and migrate callers from the previous convenience methods.
- Derive default environment selections when `environments` is `None`, while preserving explicit selections, including an empty list.

GitOrigin-RevId: 8977dc11aed54c5e1215a81eaed2b2cf5fc6087a
2026-07-22 19:31:54 +00:00
rhan-oai
06782eded7 Fix network access rendering in sandbox prompts (#34811)
## What changed

Use the supported `{{ network_access }}` placeholder syntax in the built-in
`danger-full-access`, `read-only`, and `workspace-write` sandbox templates so
permission instructions render the active network access state.

GitOrigin-RevId: 9f8d851016bd7fbedcfc4a9479236b46aca470e8
2026-07-22 19:14:11 +00:00
Adam Perry @ OpenAI
946ed315a4 Centralize SQLite connection configuration (#34808)
## What changed

- Add `SqliteConfig` to own the resolved SQLite home, runtime database paths,
  and shared read/write and read-only pool settings.
- Pass the configuration through state and local thread-store consumers,
  replacing standalone path helpers and duplicated connection setup.

GitOrigin-RevId: 7351b08da94b5c8b6c0bbe492f86aeeca0699d3c
2026-07-22 18:45:47 +00:00
Adam Perry @ OpenAI
a59a419afa Use path URIs in shell approval keys (#34806)
## What changed

- Store the shell approval key's `cwd` as a `PathUri`, matching the URI representation used by approval actions.
- Extend the approval-key test to verify both the URI-based working directory and environment scoping.

## Testing

- Added `approval_key_uses_path_uri_and_includes_environment_id`.

GitOrigin-RevId: 4d7ba1a2e652f4ffe317242f52beb33513b01e6a
2026-07-22 18:41:11 +00:00
felixxia-oai
f343d1237d Suppress omission notices in core-compatible skill catalogs (#34797)
## Why

Core-compatible skill catalog output should match the core renderer when the
metadata budget omits entries.

## What changed

- Emit the bounded-catalog omission notice only for `ExtensionCompatible`
  rendering.
- Continue tracking omitted entries in `SkillRenderReport` for both policies,
  even when `CoreCompatible` produces no fragment because every entry is
  omitted.

## Testing

Cover policy-specific omission notices and the case where no minimum skill line
fits within the metadata budget.

GitOrigin-RevId: 79883c15a49c02ff83444ddc272030cb4ddb53c0
2026-07-22 17:40:34 +00:00
Eric Traut
5381edb133 Skip syntax highlighting for lines over 4 KiB (#34796)
## Why

Very long individual lines can make syntax highlighting consume excessive CPU or memory even when the overall input remains below the existing size and line-count limits.

## What changed

- Fall back to plain, unstyled text when any input line exceeds 4 KiB.
- Keep the existing 512 KiB total-size and 10,000-line guardrails.

## Testing

- Cover highlighting fallback and text preservation for a long single-line Bash command.
- Snapshot rendering of a command that exceeds the per-line limit.

GitOrigin-RevId: ba02997331a294d8a32ca89ee06acb12dd3bbd83
2026-07-22 17:38:11 +00:00
mandal-OAI
2c49493b5b Remove obsolete step store from git attribution tests (#34795)
Update the git attribution test helper to construct
`WorldStateContributionInput` without the removed `step_store` field.

GitOrigin-RevId: 396b5508f05798f0b43d93f7d02838acdbf97c9b
2026-07-22 17:33:10 +00:00
jif
66bd101fff Avoid unnecessary post-sampling token estimates (#34789)
## Why

The post-sampling trace calculated an estimated token count even when only the
always-on diagnostic and state log sinks were listening, adding unnecessary work
after every sample.

## What changed

- Move the estimate to a dedicated trace target and calculate it only when that
  event is enabled.
- Disable the target for the always-on diagnostic and state log sinks while
  keeping it available to explicitly configured subscribers.

## Testing

- Verify that the combined always-on subscribers do not enable the estimate
  event.

GitOrigin-RevId: ea572584597dda313e7719897d0ab1fdf7362745
2026-07-22 16:50:09 +00:00
pakrym-oai
10cc57c95c Simplify app-server integration test setup (#34786)
## What changed

- Add typed helpers for initialized app-server instances, JSON-RPC requests,
  responses, notifications, and thread startup.
- Add a composable `MockResponsesConfig` builder while preserving the existing
  mock config writers.
- Migrate the app-server integration suite to the shared helpers, removing
  repeated request ID management, deserialization, initialization, and config
  assembly.

## Testing

- Add unit coverage for composing mock provider, feature, and extra config, and
  for compatibility of the existing mock config writer.

GitOrigin-RevId: 62da177c1d6e8299400de64bd6766567bf1ba3d8
2026-07-22 16:30:12 +00:00
felixxia-oai
fe6aa9d16c Report skill catalog truncation during rendering (#34785)
## What changed

- Return a `SkillRenderReport` with total, included, and omitted skill counts,
  plus truncated description counts and character totals.
- Keep fragment construction separate from rendering so callers can inspect the
  report even when the metadata budget is too small to emit a fragment.

## Testing

- Cover partial description truncation, fully omitted entries, and catalogs
  whose omission marker does not fit the budget.

GitOrigin-RevId: e73fdbcf77ac73c7209100ff6c9b5862b6a59a54
2026-07-22 16:26:21 +00:00
jif
44436fd075 Reject dynamic environments named local (#34784)
## Why

`local` identifies the environment owned by `EnvironmentManager`, but dynamic
remote environment registration previously allowed that ID to be replaced.

## What changed

Reject `local` in the shared environment ID validator used by dynamic remote
environment registration.

GitOrigin-RevId: 2622551f78989c16c432e6dd3d7da9bd8b0527c5
2026-07-22 16:22:34 +00:00
zbarsky-openai
cc559bb971 Upgrade Bazel Rust and LLVM dependencies (#34781)
## What changed

- Upgrade `rules_rs` from `0.0.58` to `0.0.96` and LLVM from `0.7.9` to
  `0.8.11`, updating extension paths, platform constraints, and compatibility
  patches for the current APIs.
- Add native `windows-gnullvm` execution support for the argument-comment lint
  toolchain while retaining MSVC execution for existing cross-target builds.
- Build `aws-lc-sys` through the Bazel Central Registry `aws-lc` module and
  `rules_rs` integration, removing the replaced crate-specific patches.

GitOrigin-RevId: 9829bcdb6ac74e846b713568aac38ea2fa3c42a2
2026-07-22 16:18:08 +00:00
Owen Lin
c5779ed6bb Use the live parent history mode when forking agents (#34779)
## What changed

- Require the parent thread to be live before forking its history.
- Read the history mode and multi-agent usage hints from that live parent so
  the fork loads and filters history using the active configuration.
- Verify that forking a legacy parent keeps the child in legacy history mode.

GitOrigin-RevId: 79416b78544467a1801f21300d3fe8db4fef59df
2026-07-22 16:11:18 +00:00
Eric Traut
ff8d521ba1 Coalesce wrapped OSC 8 hyperlinks in the TUI terminal (#34778)
## What changed

- Track adjacent cells with the same OSC 8 destination and emit a single
  hyperlink around their visible text.
- Close active hyperlinks before non-link content and at the end of a draw.
- Cover a production-length browser authentication URL at narrow terminal
  width, including the remote-login guidance and cancellation footer.

GitOrigin-RevId: 9b87166ce78578137dfd2bf19db359ac83a908ee
2026-07-22 15:46:00 +00:00
Eric Traut
80f3c3141e Include the final agent message in turn completion summaries (#34777)
## Why

Streamed message deltas can be dropped when the transport is saturated, leaving
clients with a truncated final response.

## What changed

- Include the last non-empty final agent message in successful `turn/completed`
  notifications and mark the items as a summary.
- Treat completed message content as authoritative in the TUI, repairing an
  incomplete stream while avoiding duplicate messages when `item/completed` was
  already received.
- Continue backfilling full turn items for persisted `codex exec` threads when a
  completion contains only the summary view.

## Testing

Added coverage for completion summaries, dropped stream deltas, duplicate item
handling, and directive-only responses.

GitOrigin-RevId: ffe9d36d683d6b6690e4a468ff68aa9189fe6ab7
2026-07-22 15:41:47 +00:00
Eric Traut
730ec92003 Clamp session headers to narrow terminal widths (#34775)
## Why

Session header rows can exceed the available inner width when the terminal is
narrow, causing the bordered header to render wider than its requested width.

## What changed

Truncate each session header row to the available inner width and append an
ellipsis when content overflows.

## Testing

Add a snapshot test for a 44-column session header and assert that every
rendered line matches the requested width.

GitOrigin-RevId: 7cf0ea48aa95a6f1ddd1a9dbb7c7fb70bdbcb5a3
2026-07-22 15:38:08 +00:00
Eric Traut
c00e2e851c Normalize whitespace-only lines in agent messages (#34772)
## What changed

Apply the existing whitespace-only line normalization to both streaming and
finalized agent Markdown. Blank lines now discard indentation and stale
hyperlinks while preserving their line style.

GitOrigin-RevId: f6150190b02f8cd8c853220cae1a2dcd2f4578a5
2026-07-22 15:34:11 +00:00
Eric Traut
9ee63da142 Size unified mention popups to visible results (#34771)
## What changed

- Size the unified mention popup from its filtered row count, while keeping a one-row minimum and the existing maximum.
- Update composer snapshots to cover the compact layout when only one mention result is visible.

GitOrigin-RevId: 7cd30a5c53c7e81cf7158a6b3dda3c09bd024f29
2026-07-22 15:28:56 +00:00
viyatb-oai
32f4687b8c Enable exec-server network policy callbacks (#34770)
## What changed

- Let `exec-server` issue JSON-RPC requests to its client and correlate responses, with bounded concurrency, timeouts, and connection cleanup.
- When `request_policy_decisions` is enabled, forward proxy policy requests with the process ID and network destination, then apply the client's allow, deny, or ask decision.
- Fail closed for invalid inputs, unavailable or malformed responses, timeouts, process shutdown, and disconnects. Keep callbacks active while inherited process streams keep the proxy alive.

## Testing

- Cover response correlation, request limits, timeouts, disconnect cleanup, validation boundaries, decision forwarding, and process lifecycle behavior.

GitOrigin-RevId: 60e658102c50036589ca9de844760a8bffaa53b0
2026-07-22 15:22:21 +00:00
jay
ab816f3ca0 Add the git attribution extension (#34769)
## What changed

- Add a `codex-git-attribution` context contributor that resolves the workspace's `commit_attribution_enabled` setting and supplies matching commit and pull request instructions through World State.
- Cache resolved policy by authentication generation, recover from unauthorized responses, and fail disabled on timeouts or settings errors with deferred retries.
- Handle enabled, disabled, and legacy attribution fragments so policy changes replace stale instructions without duplicating attribution.

## Testing

- Cover World State transitions, policy resolution after unauthorized responses, and authentication changes during an in-flight settings request.

GitOrigin-RevId: 6f733e708b5c960ba5e90751110910a03d1ba2df
2026-07-22 15:19:15 +00:00
jif
e370d23691 Reduce typed app-server request serialization overhead (#34766)
## What changed

- Use `ClientRequest::method_name()` directly when preparing typed request
  diagnostics for in-process and remote clients.
- Allocate the owned method name only when constructing an error.
- Remove the serialization-based method lookup and the redundant allocating
  `ClientRequest::method()` helper.

GitOrigin-RevId: 93859e512a4f20204e0db4f929a2baebe4374ec5
2026-07-22 14:50:13 +00:00
jif
64dc1c7a01 Retry websocket requests when the previous response is missing (#34763)
## What changed

Treat `previous_response_not_found` websocket errors as retryable so Codex can
retry with the full request. Preserve the server-provided error message when
available, with a fallback message that explains the retry.

GitOrigin-RevId: 7fb6a1b4f396de561c491a16d793e2730b052f01
2026-07-22 14:22:33 +00:00
jif
f69dc49b15 Reduce app-server JSON serialization overhead (#34761)
## What changed

- Decode `JSONRPCRequest` into `ClientRequest` without serializing the entire request back into an intermediate JSON value.
- Define every client method's wire name explicitly and use it directly for request, response, and tracing method lookups.
- Serialize outgoing transport messages directly to JSON strings instead of first building a `serde_json::Value`.

## Testing

- Add regression coverage that compares direct request conversion with Serde decoding, including omitted and null parameters, legacy methods, and unknown methods.
- Verify that direct outgoing-message serialization preserves the notification wire shape.

GitOrigin-RevId: 304e14bcaea24e32743bf852a60a208e2f273db3
2026-07-22 14:16:51 +00:00
thomas
65ae4c26e0 Register the MCP 2026-07-28 feature flag (#34747)
## What changed

- Add the disabled-by-default, under-development `mcp_2026_07_28` feature.
- Include the feature in the configuration schema and app-server experimental
  feature enablement API.

GitOrigin-RevId: 869835ee72f063d79ca2ecd9f2655d2efc457292
2026-07-22 12:44:31 +00:00
felixxia-oai
2ffe8cd579 Match core skill ordering in extension catalogs (#34746)
## Why

Core-compatible catalog rendering needs to preserve the core renderer's skill
priority, including when metadata budgets omit lower-priority entries.

## What changed

- Carry each host skill's `SkillScope` into its catalog entry.
- Under `CoreCompatible`, order visible skills by system, admin, repo, and user
  scope, then by name and prompt resource ID.
- Preserve insertion order under `ExtensionCompatible`.

## Testing

Add coverage for propagating host skill scope and for both rendering policies.

GitOrigin-RevId: 9594a177edb2166abf1b5719c51a46fcee000600
2026-07-22 12:40:16 +00:00
felixxia-oai
f21f98936c Update skills budget tests for extension API changes (#34744)
## What changed

- Initialize the thread lifecycle input without an MCP resource client.
- Call `contribute_thread_context` without the removed step-scoped data argument.

GitOrigin-RevId: 689a982ba49c2788dde6bc2cbe0d6d7cae6c0a73
2026-07-22 12:27:36 +00:00
felixxia-oai
bd9a28a839 Drop skill descriptions before omitting catalog entries (#34738)
## What changed

When even the minimum skill catalog exceeds its metadata budget, render each
included entry without its description. This allows more skill names and
locators to fit before the remaining entries are omitted.

## Testing

Add coverage for extreme budget pressure and verify both the extension and
production-turn catalogs omit descriptions while staying within budget.

GitOrigin-RevId: 72cec10e9587beabbd3d8c6d53b931deb76824e6
2026-07-22 11:53:53 +00:00
jif
fd51e50540 Remove step-scoped data from extension contributors (#34734)
## What changed

- Remove the step-scoped `ExtensionData` argument from context, turn-input, and tool contributors.
- Pass the host's optional `McpResourceClient` through `ThreadStartInput` so extensions can retain session capabilities explicitly.
- Keep the MCP resource client in skills-owned session state for catalog loading and skill tools.

GitOrigin-RevId: bafa77bcd998aff408d6a396c5fd9ac268c4cce4
2026-07-22 11:17:28 +00:00
jif
84d2b203ed Make MCP resource clients follow the latest runtime (#34733)
## What changed

- Make `McpResourceClient` resolve resource operations and cache identity from
  the latest `McpRuntime` connection snapshot.
- Remove step-bound resource clients from `McpBinding` and the associated
  per-binding client identity tracking.

GitOrigin-RevId: ee59f5867308c5a63e6e232384a50cf1e0c2a011
2026-07-22 11:13:09 +00:00
felixxia-oai
6278742c41 Preserve skill catalog entries under metadata pressure (#34732)
## Why

Long skill descriptions can consume the catalog's metadata budget before later
skills are listed, hiding otherwise usable skills from the model.

## What changed

- Reserve space for every skill's name and locator when those minimum lines fit.
- Distribute the remaining token or character budget across descriptions in
  round-robin order.
- Fall back to omitting entries only when the minimum catalog cannot fit.

## Testing

Added extension and production-turn coverage that verifies moderate budget
pressure keeps every catalog entry, shortens descriptions evenly, and avoids an
omission marker.

GitOrigin-RevId: 41971e4b47a86863b3839707b5cffcd8d83b888c
2026-07-22 11:08:38 +00:00
zsol-openai
667b6bbaf1 Publish stable installer aliases to R2 (#34729)
## What changed

- Publish `install.sh` and `install.ps1` from stable release assets to the
  mutable `codex/install.sh` and `codex/install.ps1` R2 keys.
- Require both installer assets and verify each uploaded object's size,
  SHA-256 metadata, and CRC64 checksum before completing publication.
- Leave prerelease publication unchanged.

GitOrigin-RevId: 869f5fcd6c5f5d7fa4dc39c5216b31409d595fc9
2026-07-22 10:53:06 +00:00
acrognale-oai
33d394c69e Skip Git enrichment for prewarm and Guardian turns (#34728)
## Why

Startup prewarms and Guardian review sessions do not need workspace Git metadata. Collecting it for those requests performs redundant work, while user turns still need a fresh view of the repository.

## What changed

- Add a per-session Git enrichment policy.
- Skip enrichment for startup prewarm, preview, and Guardian review turns.
- Keep fresh enrichment enabled for regular sessions and one-shot delegated turns.

## Testing

- Cover prewarm and Guardian requests omitting workspace metadata while subsequent user turns observe repository changes.
- Cover concurrent repositories and worktrees retaining distinct metadata.
- Verify concurrent enrichment is coalesced and canceled enrichment can be retried.

GitOrigin-RevId: 4a68615288bb568c75f2e487d9c0776e3e80f191
2026-07-22 10:47:51 +00:00
jif
9fc715c086 Order unified exec lifecycle events reliably (#34713)
## What changed

- Treat output-task closure as the signal that trailing output is complete, drain any remaining chunks before publishing command completion, and retain the grace period as a fallback.
- Wait for deferred network-denial classification before emitting the final command result.
- Serialize `write_stdin` interaction and completion events so an interaction that exits a process is published first, and avoid pruning processes while their terminal events are being finalized.

## Testing

- Add coverage for late output, missing output-close signals, late network denials, interaction/completion ordering, cross-platform aggregated output, and pruning during finalization.

GitOrigin-RevId: 46a118552bb1a4658b78aa5a5ca76eb8c5fba571
2026-07-22 09:29:09 +00:00
jif
516f1e2aff Rename the MCP connection manager to McpConnectionSet (#34708)
## What changed

- Use `McpConnectionSet` as the primary name for the collection of active MCP
  server connections throughout `codex-mcp` and its callers.
- Keep `McpConnectionManager` as a backward-compatible type alias.

GitOrigin-RevId: 9753838b4fd0a0b6429a9c4af0c077137616f388
2026-07-22 09:25:22 +00:00
rhan-oai
6e5a2d6b8d Configure Codex Auto Review model metadata (#34687)
## What changed

- Add the action-risk review prompt template and default generic security policy to the `codex-auto-review` catalog entry.
- Define its `never` approval and `danger_full_access`, `workspace_write`, and `read_only` permission messages.

GitOrigin-RevId: 025bb609c12ae9d5235054747267a1ee46d118ef
2026-07-22 06:09:10 +00:00
Peter Bakkum
963cda85aa Add session headers to realtime conversation starts (#34681)
## What changed

- Include the Codex `session-id` and `thread-id` headers when starting realtime conversations over WebSocket or WebRTC.
- Add coverage confirming that WebRTC call creation forwards both identifiers while preserving the existing realtime request metadata and SDP payload.

GitOrigin-RevId: 668bee9a7d4797ad0a396e9ca4dc56b2c379cba7
2026-07-22 04:54:54 +00:00
Celia Chen
21db216db0 Route LM Studio requests through the shared HTTP client (#34678)
## What changed

- Use the configured route-aware HTTP client pool for LM Studio server requests.
- Add connection-timeout support to `HttpClientBuilder` and route-aware pools, and keep LM Studio's five-second limit scoped to connection establishment.
- Verify that LM Studio accepts a response that arrives after the connection timeout has elapsed once the connection is established.

GitOrigin-RevId: c4300f4b5d37c4418822783ab09cb50d506ee423
2026-07-22 04:17:34 +00:00
Michael Bolin
4f3852107e Expand codex-http-client usage guidance (#34669)
## What changed

- Document `codex-http-client` as the owner of direct `reqwest` integration and shared outbound request policies.
- Explain how to select outbound proxy policies, retain clients for connection reuse, and use route-aware pooling for multi-URL and redirecting traffic.
- Add examples for constructing policy-aware clients and transports, plus guidance for direct routing and sensitive request data.

GitOrigin-RevId: 892db4be92af5ec42eced8d7dec4651c9f464689
2026-07-22 03:01:50 +00:00
Celia Chen
661339bb09 Document PathUri drive letter canonicalization (#34667)
GitOrigin-RevId: 014acdb369f6861f4dc683282a56dce3a5eb4caf
2026-07-22 02:53:53 +00:00
Dylan Hurd
cefcffd692 Preserve approvals reviewer when forking threads (#34664)
## Why

Forking a persisted thread could lose its approvals reviewer and fall back to
configuration defaults.

## What changed

- Restore the latest persisted approvals reviewer from the full source history
  when creating a fork, while continuing to honor explicit overrides.
- Keep boundary-based history truncation independent from reviewer restoration,
  so a fork at an earlier turn retains the source thread's latest setting.

## Testing

- Add an app-server test that sets auto-review, forks at an earlier turn, and
  verifies the fork reports auto-review.

GitOrigin-RevId: 41c515755de7de600f71c1259f96908f2d169ca7
2026-07-22 02:47:33 +00:00
Michael Bolin
d4fcb2873b Honor configured proxy routes for auth refreshes (#34655)
## Why

ChatGPT token refresh requests need to follow the same configured routing policy as other authentication traffic, including environments that use the system proxy.

## What changed

- Require an `AuthRouteConfig` throughout login, logout, token refresh, personal access token, and agent identity flows.
- Build auth HTTP clients directly from that configuration instead of falling back to a default HTTP client when routing configuration is absent.

## Testing

- Add an integration test that refreshes a token through a cached system-proxy route and verifies the proxy receives the expected request.

GitOrigin-RevId: 7d54ab3219939a49921c51faf08cd4c2eabca51c
2026-07-22 02:26:16 +00:00
Adam Perry @ OpenAI
1823c13771 Render turn diffs for foreign environment paths (#34654)
## Why

Turn diffs need to render paths from remote environments whose path convention may differ from the Codex host.

## What changed

- Preserve `PathUri` values through applied patch deltas, display-root discovery, and turn-diff tracking.
- Add host-independent relative-path rendering and normalize Windows drive-letter case in `PathUri`.
- Render paths relative to each environment's repository root while keeping Git diff headers slash-separated.

## Testing

- Cover POSIX, Windows, UNC, encoded-separator, and opaque URI relative paths.
- Verify an applied patch in a remote Windows working directory emits a portable unified diff.

GitOrigin-RevId: 526f70ae36a40627de5496d375310d12295b69bb
2026-07-22 02:19:45 +00:00
Celia Chen
9fce9e13fd Migrate core test support to the shared HTTP client (#34651)
## What changed

- Send the streaming SSE request-body drain test through `HttpClientFactory`.
- Replace the test-support crate's direct `reqwest` dependency with
  `codex-http-client`.
- Remove `core_test_support` from the temporary direct-`reqwest` exceptions.

GitOrigin-RevId: 16ea4309d0b575592c2e59991eb6dce18d9467ed
2026-07-22 01:47:48 +00:00
Michael Bolin
a26bc337cf Require auth managers to receive routing configuration (#34650)
## Why

Auth managers should use the application's resolved HTTP client factory instead
of silently falling back to the transport's default proxy behavior.

## What changed

- Make `AuthRouteConfig` required when constructing an `AuthManager` or
  `AuthConfig`.
- Pass each production caller's resolved routing configuration through without
  wrapping it in an optional value.
- Add a test helper that explicitly selects the transport-default proxy policy
  for callers that do not exercise custom routing.

GitOrigin-RevId: d89a3b1f8b5d4007650cdac0aae241c94d598580
2026-07-22 01:35:06 +00:00
Michael Bolin
f899a79c03 Propagate resolved proxy policy through auth routing (#34649)
## Why

Auth routing represented the default proxy policy as an absent configuration,
leaving consumers to reconstruct the fallback HTTP client independently. Carry
the application's resolved policy explicitly so auth and related requests use
the same client configuration.

## What changed

- Build `AuthRouteConfig` from the resolved `HttpClientFactory` for both
  `ReqwestDefault` and `RespectSystemProxy` policies.
- Pass that route configuration through login, auth, cloud task, and cloud
  configuration flows, and reuse its factory when loading cloud configuration.
- Log cloud-task configuration load failures before falling back to the
  transport-default proxy policy.

## Testing

Extended configuration tests to verify that effective and bootstrap auth routes
select the expected proxy policy when system-proxy support is enabled or
disabled by feature requirements.

GitOrigin-RevId: d03802e2660f5cf6d940e8e718ec5c82ede7eab1
2026-07-22 01:30:44 +00:00
pakrym-oai
4a443994bd Always assign response item IDs (#34645)
## What changed

- Assign IDs to client-created response items in every session, including streamed items, forked history, compaction results, and non-OpenAI provider requests.
- Preserve server-provided IDs and stable generated IDs across persisted and resumed conversations while continuing to omit unprefixed server IDs from outbound requests.
- Retire `features.item_ids` as a configurable feature. Existing configuration and CLI toggles remain accepted as compatibility no-ops.

## Testing

- Cover default ID assignment, persistence and resume behavior, remote compaction, provider requests, WebSocket requests, and removed-feature compatibility.

GitOrigin-RevId: 7a09e2d07d2606c2ef1e8e2283d36cb555557eae
2026-07-22 01:23:44 +00:00