Commit Graph

8987 Commits

Author SHA1 Message Date
Won Park
0dd88abbe5 Release 0.148.0-alpha.1 rust-v0.148.0-alpha.1 2026-08-06 19:02:38 -07:00
pakrym-oai
d0c8f422ea Configure the default code-mode exec yield timeout (#37352)
## What changed

- Add `features.code_mode.default_exec_yield_time_ms`, defaulting to 30 seconds.
- Apply the configured default to code-mode `exec` calls that omit `yield_time_ms` and reflect it in the tool description.
- Remove the `code_mode_buffered_exec` compatibility feature flag.

## Testing

- Cover config loading and tool descriptions for both default and custom yield timeouts.

GitOrigin-RevId: 581ffc737b04721c7b5fc81260b1da1cf7d87523
2026-08-07 01:41:54 +00:00
keith thornhill
9457f8f734 Allow ThreadManager to customize thread ID generation (#37350)
## What changed

- Add `ThreadManager::with_thread_id_generator` to configure ID allocation for new root, child, and forked threads.
- Keep the standard UUIDv7 generator as the default and preserve stored IDs when resuming threads.
- Add `ThreadId::from_u128` for constructing identifiers from UUID-compatible values.

## Testing

- Cover default allocation, custom IDs across roots, child agents, and forks, and ID preservation on resume.

GitOrigin-RevId: 6c38c862e30a50bad944a994bcbccf7d1e7ada24
2026-08-07 01:36:22 +00:00
viyatb-oai
912524d6fe Mount a minimal /dev in full-filesystem Bubblewrap sandboxes (#37349)
## Why

Binding the full host filesystem into a network-isolated Bubblewrap sandbox also
inherits the host's device tree.

## What changed

- Overlay `/dev` with Bubblewrap's minimal device filesystem while preserving
  the root bind's `nodev` behavior.
- Bind `/dev/shm` back into the sandbox when available so host and sandbox
  processes can continue to share memory files.

## Testing

Add a managed-proxy integration test that verifies standard device nodes remain
usable, `/dev` is not the host directory, and `/dev/shm` writes are shared with
the host.

GitOrigin-RevId: 1d91fe44affd792d2777adae8f2cce6d85d14103
2026-08-07 01:30:07 +00:00
Owen Lin
4bb7ee3472 Add rollout migration tooling and background migration (#37348)
## What changed

- Add `codex migrate-rollouts` with dry-run inspection by default, explicit `--apply`, thread filtering, optional I/O throttling, progress output, and JSON or verbose reports.
- Add the disabled-by-default `background_paginated_rollout_migration` feature to migrate legacy local sessions at startup before rollout compression begins.
- Persist a migration cursor and skipped-file fingerprints so later startups avoid full rescans while retrying changed files and recovering pending migrations.
- Coordinate migration with live writers and emit metrics for manual and startup runs.

## Testing

- Cover startup cursor advancement and lookback, pending migration recovery, live-writer coordination, changed empty rollouts, and progress reporting.

GitOrigin-RevId: 276ac506c50ebec5140fd319faca1bb998172061
2026-08-07 01:26:42 +00:00
Boyang Niu
69b6152c17 Track context windows per agent (#37347)
## Why

Forked subagents can inherit a parent's compacted history, but their context-window metadata needs to identify the child and start a distinct window lineage.

## What changed

- Always identify context windows by agent name and remove the `features.token_budget.mode` setting.
- Persist the agent path in world state and emit context-window metadata as a standalone developer message when the identity changes.
- Reset inherited compaction metadata to the forked subagent's initial context window and restore that window in session state.

## Testing

Extend the full-history subagent test to verify parent and child world-state snapshots, agent identities, distinct window IDs, and the reset child checkpoint.

GitOrigin-RevId: 6584201e57b3d2fba0ce626b89a8b3b0b3c752db
2026-08-07 01:05:33 +00:00
thorvald-oai
270d93268c Send model routing hints to the Codex backend (#37345)
## What changed

- Add an `x-codex-routing-hint` header containing the request model and, when selected, the service tier.
- Send the hint on Responses HTTP requests, remote compaction requests, and WebSocket handshakes, including prewarm connections.
- Limit the header to Codex-backend authentication with the OpenAI provider, omitting it for API-key and provider-specific credential paths.

## Testing

- Cover routing hints for HTTP, remote compaction, WebSocket streaming, and tiered prewarming, along with the credential paths where the header must be absent.

GitOrigin-RevId: d8d415d7fadddecf9a132d05920b856a35ac9960
2026-08-07 00:58:54 +00:00
jif
4ffeddcbcc Fix subagent MCP startup status settling (#37344)
## Why

Subagents can leave cached MCP servers deferred indefinitely, causing the TUI to keep showing MCP startup as running after every server that reported startup has settled.

## What changed

- Clear configured MCP startup expectations for active subagent threads so their status is driven by actual startup notifications.
- Preserve configured-server startup tracking for primary threads and side conversations.

## Testing

Add coverage for active and resumed subagents with deferred servers, plus the existing side-conversation behavior.

GitOrigin-RevId: 4d929a162dd067b4a76351652a764a79ce60f31f
2026-08-07 00:50:33 +00:00
jif
a9da0bdbac Stage Bazel app-server test binaries in TEST_TMPDIR (#37343)
## Why

Bazel test binaries can reside on a different filesystem from the default
temporary directory, forcing executable staging to fall back from hard links to
expensive copies.

## What changed

Create the app-server test install layout under Bazel's `TEST_TMPDIR` when it is
set. Continue using the default temporary directory outside that environment.

GitOrigin-RevId: 63172fbf913ddba06c7b9543b5bf0fea249c903c
2026-08-07 00:46:23 +00:00
jif
bcea6447ee Preserve foreign cwd URIs for turn-input contributors (#37342)
## Why

Converting each environment's working directory to a host-native path caused
turn-input contributors to omit environments with foreign path formats.

## What changed

- Expose `TurnInputEnvironment.cwd` as a `PathUri`.
- Pass every turn environment to contributors without host-path conversion.

## Testing

Added an integration test that submits a foreign working-directory URI and
verifies the contributor receives the environment unchanged.

GitOrigin-RevId: a122526be47f5331614381e9c6e4b85087a96bed
2026-08-07 00:42:06 +00:00
Philipp Spiess
29dce2db43 Support content references for inline visualizations (#37341)
## What changed

- Recognize structured `visualize` content references alongside the existing inline visualization directive in cached, streaming, and finalized TUI rendering.
- Resolve absolute visualization paths only when they belong to the active thread directory, and show the existing unavailable fallback for incomplete, invalid, or out-of-scope references.
- Let embedded visualizations inherit host color, typography, and radius tokens while retaining standalone defaults and legacy aliases. Keep Lucide icons at a stable size when model-authored chart styles are present.

## Testing

- Cover content-reference fallback, replay, render-cache bypass, and canonical streaming behavior.

GitOrigin-RevId: 887d13647df11c23d519e64d0958fdc41ef3f472
2026-08-07 00:37:50 +00:00
TAFOYA-OAI
f8ac8fa6c6 Consolidate deferred environment provisioning APIs (#37340)
## What changed

- Remove the separate deferred registration handle, direct readiness publisher,
  and Noise environment upsert API from `EnvironmentManager`.
- Use `report_environment_provisioning_status` and
  `materialize_pending_noise_environment` as the provisioning flow while keeping
  ordinary environments isolated from provisioning reports.
- Cover readiness updates, invalid reports, duplicate materialization, and
  conflicts with ordinary environments in the deferred environment tests.

GitOrigin-RevId: d14207c0abb0636d331be4f875fec6e53f3d2fe6
2026-08-07 00:32:59 +00:00
jif
d9eac10406 Reload app-server telemetry after account changes (#37339)
## Why

An account change can select different OpenTelemetry collector settings. The
long-running app server needs to stop exporting telemetry with the previous
account's configuration.

## What changed

- Rebuild and install the log, trace, and metrics exporters when authentication
  changes, and shut down the previous provider without blocking the app server.
- Make cached global metrics clients and the tracing layer follow the replacement
  provider so existing callers continue exporting through the current account's
  configuration.
- Clear the cached cloud configuration loader after login and logout so telemetry
  reloads from the new account context.

## Testing

- Add an app-server integration test that switches accounts and verifies logs,
  traces, and metrics reach the new collector while trace context is preserved.
- Add a metrics test covering cached clients after provider replacement.

GitOrigin-RevId: a74359777a35edbee5bbe0b2baccc155074cb172
2026-08-07 00:28:32 +00:00
yijiang12
842547640e Honor the configured ChatGPT origin in connector install URLs (#37338)
## What changed

- Build connector install URLs from `CODEX_APP_SERVER_CHATGPT_BASE_URL`, falling back to `https://chatgpt.com` when it is unset.
- Strip a trailing slash or `/backend-api` suffix before appending the `/apps/<slug>/<connector-id>` path.
- Add a test covering install URL generation with the configured origin.

GitOrigin-RevId: 854d15b7e322d2359684f974aaf27fe28205dd5a
2026-08-07 00:23:38 +00:00
jif
b3ffe3d001 Recover MCP servers after OAuth reauthentication (#37337)
## Why

An OAuth-backed Streamable HTTP MCP server can fail startup when its stored credentials are rejected. If a client then completes OAuth sign-in and replaces those credentials, the failed server needs to become available without restarting the Codex session.

## What changed

- Track the credential store and OAuth tokens used for each MCP connection, and detect replacements after authentication failures.
- Refresh affected MCP servers before the next turn and include their recovered tools in the model request.
- Classify HTTP authentication challenges and rejected refresh tokens as requiring reauthentication, with sign-in guidance appropriate to local and client-managed environments.

## Testing

- Cover recovery from expired credentials through an externally written replacement token.
- Cover authentication-error classification, startup messaging, and `Auto` store migration from file credentials to the keyring.

GitOrigin-RevId: 9b090089d4e7a44ffc182f4e25da20a18e97b70f
2026-08-07 00:17:46 +00:00
jif
7257826ab2 Use step environments for extension turn input (#37336)
## Why

Environment readiness can change between sampling requests. Extension turn-input contributors should receive the same refreshed environment snapshot used by the current step.

## What changed

Build `TurnInputContext.environments` from `StepContext` so newly ready environments are included in extension input for the current request.

GitOrigin-RevId: ee4444072162317974cd2bbfd57ffcf9a9445391
2026-08-07 00:13:31 +00:00
Felipe Coury
303a292581 Fully repaint inline viewports after history overlap (#37335)
## Why

During inline-mode resize reflow, replayed history can overlap a zero- or
one-row history region and leave stale terminal characters visible in the
composer. Resetting the previous render buffer is insufficient because
default-style spaces may still compare equal and be skipped.

## What changed

- Mark every cell in an invalidated viewport for unconditional repainting.
- Invalidate the viewport after flushing pending history when history can
  overlap it.

## Testing

Add regression coverage for repainting spaces over stale cells and a manual
`tmux` resize smoke test for preserving visible multiline draft text.

GitOrigin-RevId: 5a8a480e2fc50c801561de6a4598a3ab8c12b8d6
2026-08-07 00:05:41 +00:00
jif
57f42a8113 Avoid cloning immutable metadata on tool search cache hits (#37279)
## Why

Checking the tool search cache currently rebuilds search metadata for every deferred tool, even when an immutable tool runtime has not changed.

## What changed

- Track immutable deferred tools by runtime identity and dynamic tools by their current search metadata.
- Rebuild the search handler when the deferred registry, dynamic metadata, or source-listing mode changes.
- Keep only weak references to immutable runtimes in the cache.

## Testing

Added unit coverage for immutable handler reuse, registry and exposure changes, source-listing changes, and refreshed dynamic tool metadata.

GitOrigin-RevId: 024c6f4498d431e7bbfaecde420f77fcf8c0dba7
2026-08-06 14:11:35 +00:00
jif
e1831db7c3 Reuse MCP handlers across sampling steps (#37273)
## Why

MCP tool handlers and their Code Mode definitions are immutable for the lifetime
of a stable MCP binding, so rebuilding them for every sampling step repeats schema
construction unnecessarily.

## What changed

- Cache MCP handlers per session and reuse them while the same binding remains
  active, invalidating the cache when the binding changes.
- Lazily cache schema-free Code Mode definitions on MCP handlers while continuing
  to rebuild definitions for step-local tools whose specifications may change.
- Reapply current app enablement, tool policy, exposure, and plugin schema budgets
  whenever cached handlers are registered for a step.

## Testing

- Cover handler and Code Mode definition reuse, binding invalidation, changing app
  policy, stable continuation schemas, and step-local custom tool updates.

GitOrigin-RevId: 69c5011fb97c08580ac476e7fb2286b1e92e0359
2026-08-06 13:37:07 +00:00
felixxia-oai
bfb6a6ea22 Support plugin roots in the host skill loader (#37267)
## What changed

- Carry plugin identity, namespace, root, and discovery mode through host skill loading.
- Apply the owning plugin namespace and IDs to loaded skill metadata.
- Respect direct-child discovery for Agent Plugins and reject skills that resolve outside the plugin root or are not regular files.
- Preserve recursive discovery and symlink behavior for legacy plugin roots, and allow the full 64-character namespace plus 64-character skill name.

## Testing

Add host-loader coverage for plugin metadata, namespace ownership, direct-child filtering, path containment, recursive symlinks, shared assets, and maximum-length qualified names.

GitOrigin-RevId: cdde821643ce39bd030d0c3753b3304b75161690
2026-08-06 12:44:36 +00:00
jif
1151b23f01 Start cached MCP servers lazily for subagents (#37261)
## Why

Subagents can reuse cached MCP tool definitions without starting every optional
server before any of its tools are used.

## What changed

- Defer startup for subagent-owned, optional MCP servers when their cache has at
  least one visible, allowed tool, and trigger startup on the first operation
  that needs the live client.
- Keep root sessions, required servers, selected plugin servers, and explicit
  reconnects eager.
- Exclude empty catalogs from cache eligibility and keep dormant servers out of
  the initial startup summary.

## Testing

- Extend MCP tool-cache coverage for eager root startup, unused and filtered
  subagent servers, deferred startup status events, and startup that survives an
  interrupted first tool call.

GitOrigin-RevId: e7528ff08312583a6747cbc6550ea5b6eabda9a6
2026-08-06 11:18:24 +00:00
jif
a17da5e6e4 Fix first-turn model switching and rollback (#37260)
## Why

A model switch on the first turn has no prior turn settings to compare, and rolling that turn back could leave its model instructions in history.

## What changed

- Track the model that supplied the session's base instructions so first-turn switches inject the target model's instructions, including the selected personality.
- Preserve inherited custom base instructions when starting from an empty fork.
- Remove first-turn model-switch developer content during rollback so retries and cold resumes do not retain or duplicate stale instructions.

## Testing

Add integration coverage for first-turn switches, personality changes, empty-prefix forks, rollback retries, and cold resume.

GitOrigin-RevId: 9df532e9e337521ad3b315b77f8c98e039fb384e
2026-08-06 11:03:31 +00:00
jif
82b17bc724 Allow agent roles on full-history forks (#37252)
## Why

Multi-agent v2 rejected `agent_type` when `fork_turns` was `all`, forcing callers to choose between a configured role and the parent's full conversation context.

## What changed

- Apply an explicitly selected role to full-history forks, including its model and developer instructions.
- Preserve the parent's developer instructions when the selected role does not define its own.
- Keep the inherited conversation history and model-switch context intact.
- Update the `spawn_agent` schema to clarify that roles apply independently of history inheritance.

## Testing

- Cover full-history role overrides and developer-instruction precedence in multi-agent v2 tests.

GitOrigin-RevId: cd4f35e31d75f56289760f245bff38dd0233abe6
2026-08-06 10:27:33 +00:00
jif
74b8f8db93 Cover remote MCP discovery timeout cleanup (#37248)
## What changed

Extend the executor-backed Streamable HTTP timeout test to cover both legacy
`initialize` and MCP 2026 `server/discover` requests. Verify that each stalled
handshake times out and releases the serial executor for subsequent requests.

GitOrigin-RevId: 3493904433c95265b9f645813723e890b7610abb
2026-08-06 09:46:04 +00:00
kevinlin-openai
7a0e974e08 Harden network proxy MITM authorization (#37211)
## Why

MITM hooks authorize requests before the upstream server parses them. Paths that
can be decoded or normalized to a different resource must not match an allowed
path, and hosts that require MITM inspection must not bypass it through the
plain HTTP proxy path.

## What changed

- Reject ambiguous hook paths, including traversal segments, backslashes,
  malformed percent encodings, and encoded separators or percent signs.
- Block plain HTTP proxy requests for hosts whose policy always requires MITM,
  recording the decision as `mitm_required`.

## Testing

- Cover safe and ambiguous path forms, encoded traversal through repository
  allowlists, and absolute-form HTTPS requests sent to the HTTP proxy.

GitOrigin-RevId: 8812a980ac64a97cbac3a237376d29be5ded9220
2026-08-06 03:57:10 +00:00
Matthew Zeng
1ae82ce6a5 Fetch remote installed plugins across all scopes (#37210)
## What changed

- Fetch the paginated installed-plugin snapshot without a `scope` query instead of issuing separate requests for global, user, and workspace plugins.
- Use the combined snapshot for installed-plugin caching and bundle synchronization while continuing to reconcile each scope's marketplace independently.

## Testing

- Cover pagination across mixed scopes, request query parameters, marketplace reconciliation, stale cache cleanup, and discoverable-plugin filtering.

GitOrigin-RevId: 7428a9db81d7ec04e65cc4b236b652278b200956
2026-08-06 03:53:05 +00:00
Curtis 'Fjord' Hawthorne
0a0ebb8535 Add a unified image budget (#37206)
## What changed

- Add the gated `unified_image_budget` feature for models that support original image detail or Responses Lite.
- Apply one 6,000-pixel, 10,000-patch preprocessing limit regardless of legacy image detail hints.
- Hide detail controls from `view_image` and code mode while continuing to accept existing hints for compatibility.
- Preserve detail-based resizing and tool contracts for unsupported models.

## Testing

- Cover unified resizing limits, Responses Lite, legacy detail hints, unsupported models, and `view_image` integration in code mode.

GitOrigin-RevId: cb07bff1669a96599fdfd076b3d9ec80f2b6fff7
2026-08-06 03:15:08 +00:00
efrazer-oai
bc8b25ea02 Add durable user-message queue dispatch (#37204)
## What changed

- Add a storage-neutral queue extension for listing, adding, editing, reordering, deleting, and explicitly starting queued user messages.
- Dispatch queued messages in FIFO order when a thread becomes idle after a completed turn, while leaving them queued after interruptions or failures.
- Wait for user input to be persisted before removing its queue item, and report hook rejection, task termination, and persistence failures distinctly.
- Snapshot local image and audio attachments into validated data URLs before storing them, enforce input limits, and emit `ThreadQueueChanged` events after mutations.

## Testing

- Cover queue mutations, automatic and explicit dispatch, interruption and failure behavior, hook rejection, invalid records, input limits, and local attachment snapshotting.

GitOrigin-RevId: 14f39d7c8cbaccb767a6da84b82cced0edfcb4b9
2026-08-06 03:11:42 +00:00
Eddie Chen
70b4653232 Track thread archive analytics (#37199)
## What changed

- Emit `codex_thread_archive_event` when a thread is successfully archived or
  unarchived, including the thread ID, action, and producer timestamp.
- Route archive notifications through the analytics client while preserving
  normal app-server notification delivery.

## Testing

- Extend app-server coverage for archive and unarchive analytics, including
  descendant archives and a repeated archive request that fails without
  producing another event.

GitOrigin-RevId: 0d973c232fd795b7cd6cddd47ecc9446234c44dd
2026-08-06 02:30:18 +00:00
Brent Traut
547080e4d6 Prefer persisted cwd when reading local threads (#37198)
## Why

The `cwd` recorded in a rollout can become stale after thread metadata is
updated, causing thread reads and lists to disagree with the persisted state.

## What changed

- Overlay a non-empty state database `cwd` when reading a thread by ID.
- Apply the same overlay when reading by rollout path, but only when the
  metadata points to the requested rollout.
- Recompute the permission profile against the selected `cwd` and continue to
  fall back to rollout metadata when the persisted `cwd` is empty or belongs to
  another rollout.

## Testing

- Cover stale, empty, and mismatched persisted `cwd` metadata.
- Verify that `thread/read`, state-only `thread/list`, and `thread/resume`
  report the persisted thread `cwd` while the resumed session uses its requested
  live `cwd`.

GitOrigin-RevId: 50a3f187618ee3cadbad95196ee2976e2d5e9a5a
2026-08-06 02:26:24 +00:00
Owen Lin
aac9f84247 Preserve legacy semantics during rollout migration (#37191)
## Why

Legacy rollouts can contain historical rollbacks, compaction checkpoints, and
subagent copies of parent history. Migrating those records verbatim can change
the visible conversation or the model context used when a thread resumes, and
can retain large amounts of duplicated subagent history.

## What changed

- Plan and replay historical rollbacks by logical turn, preserving surviving
  lifecycle events and the correct compaction anchor for future resumes.
- Migrate subagent rollouts from a safe bounded replay when possible and record
  the history boundary so copied parent context is not projected as child turns.
- Include archived and compressed rollouts while keeping their storage form and
  location intact.
- Tolerate malformed, partial, oversized, and empty JSONL records during the
  migration scan.

## Testing

Add coverage for rollback and compaction combinations, subagent replay bounds,
archived and compressed rollouts, recovery, concurrent maintenance, and damaged
JSONL input.

GitOrigin-RevId: 3948e16d43f75df8571b0a92af12a181d1d08fdf
2026-08-06 00:54:14 +00:00
andrewgu-oai
f141dc77f0 Interrupt cyber model turns after one Guardian denial (#37190)
## What changed

- Add a Guardian circuit-breaker policy for models whose catalog specialty is
  `cyber`.
- Interrupt those models after the first Guardian denial while retaining the
  existing denial thresholds for other models.
- Centralize the `cyber` model-specialty identifier for use across core,
  protocol, app-server, and TUI code.

## Testing

- Cover the cyber-specific threshold in the circuit-breaker unit tests.
- Verify end to end that a denied command is not executed and the turn is
  interrupted after one denial.

GitOrigin-RevId: fad24c9e7aa280432580db1f0e39d13535779710
2026-08-06 00:37:46 +00:00
Adam Perry @ OpenAI
92b83e226d Track multi-agent usage hints in world state (#37189)
## Why

Resumed sessions need the current multi-agent usage instructions when configuration changes or the saved history predates usage-hint tracking.

## What changed

- Store multi-agent usage hints in world state and refresh changed or previously untracked hints before re-emitting the active multi-agent mode.
- Present `wait_agent` polling guidance in the overridable developer instructions only when the tool is enabled, instead of embedding it in the tool schema.

## Testing

- Cover cold resumes, changes to `wait_agent` availability, custom usage hints, message ordering, and tool-schema behavior.

GitOrigin-RevId: a9c6798d5dc2dedc8dadc49e0a80ff50a757ab83
2026-08-06 00:22:06 +00:00
tongzhou wang
98da2c4499 Reserve the tool_search namespace for the search tool (#37188)
## What changed

- Remove namespace tools named `tool_search` before registering the built-in
  search tool, preventing them from sharing its model-visible surface.
- Record removed namespace tools as collisions so strict collision handling
  reports their qualified tool names.

## Testing

- Cover direct and deferred MCP tools that use the reserved namespace.
- Cover strict collision errors for both direct and deferred conflicts.

GitOrigin-RevId: 28fff918b4358a67b167467d92728fa545b951d7
2026-08-06 00:16:57 +00:00
jimxie-oai
928bda82cf Preserve image transparency metadata in app-server items (#37178)
## What changed

- Add `transparentBackground` to image-generation items and legacy completion events.
- Map Images API backgrounds to `true` for transparent, `false` for opaque, and `null` for automatic or unavailable values.
- Preserve the metadata in live notifications and persisted or resumed thread history while continuing to deserialize older items that omit it.

## Testing

- Cover transparent, opaque, and automatic backgrounds, including image edits and thread read/resume flows.
- Verify the stable JSON shape and optional TypeScript field.

GitOrigin-RevId: 08527f37f23431df45fab1ed34eb82b2139b49d7
2026-08-05 23:42:29 +00:00
felixxia-oai
a3ebd19fa4 Move explicit skill selection into the skills crate (#37177)
## What changed

- Add `ExplicitSkillLookup` to decouple explicit mention selection from the
  core skill-loading model.
- Export `collect_explicit_skill_mentions` from `codex-skills` and implement
  the lookup interface for `SkillLoadOutcome`.
- Move the selection tests into `codex-skills` while keeping the prompt-size
  boundary test with prompt injection.

GitOrigin-RevId: 21105af31c9b519c231c5ea02464da560705c293
2026-08-05 23:23:21 +00:00
Owen Lin
6bb6e9045f Add legacy rollout migration to paginated history (#37175)
## What changed

- Add `LocalThreadStore::migrate_rollouts` with dry-run and apply modes,
  optional thread selection, throughput limiting, and per-rollout outcomes.
- Canonicalize legacy JSONL records into paginated history while preserving
  model-visible conversation context, including compressed rollouts and copied
  fork history.
- Publish replacements atomically and journal migrations so interrupted SQLite
  projections can be recovered. Coordinate migration with rollout compression
  and skip rollouts with active writers.
- Make paginated history a one-way SQLite promotion so stale metadata cannot
  downgrade a migrated thread.

## Testing

- Cover legacy record normalization, dry runs, idempotency, malformed input,
  compressed rollouts, active writers, interrupted migration recovery, and a
  cold app-server resume after migration.

GitOrigin-RevId: b9991b659f28ebb52da39ce62e8b4e0bae2ba2bb
2026-08-05 22:57:27 +00:00
felixxia-oai
e3465b48ad Centralize skill invocation helpers in codex-skills (#37174)
## What changed

- Move tool mention parsing, skill-name counting, and implicit invocation detection into `codex-skills` and expose them through its public API.
- Decouple implicit invocation detection from `SkillLoadOutcome` with an `ImplicitSkillLookup` trait, while preserving the existing `core-skills` interface through re-exports.
- Cover remote plugin attribution for both implicit `SKILL.md` reads and skill script runs.

GitOrigin-RevId: f3da85c9821868638ccfd2fc2e01e0869d2fd437
2026-08-05 22:26:59 +00:00
felixxia-oai
f380b48733 Move plugin skill snapshot integration tests into core (#37169)
## What changed

- Move the integration test for reusing plugin-manager skill snapshots into
  `codex-core`, which owns both the plugin manager and host skills service
  integration.
- Keep the `codex-core-plugins` test focused on resolving local and remote
  plugin identities on effective skill roots, and remove its skills-extension
  dev dependency.
- Use the skills extension's `HostSkillsSnapshot` type in its world-state
  catalog implementation.

## Testing

- Verify the host skills service reuses the plugin manager's parsed snapshot
  after the underlying skill file changes, while preserving plugin identity
  metadata.

GitOrigin-RevId: afc8a0ebccb629360c59a4546bdb9a134c74da4f
2026-08-05 21:56:25 +00:00
jif
e244a9d94e Bound remote MCP handshake HTTP requests (#37168)
## Why

A streamable HTTP MCP handshake could time out while its executor-backed HTTP
request continued running, leaving the serial executor blocked for later
requests.

## What changed

- Track the remaining initialization deadline for streamable HTTP transports.
- Apply it to `initialize`, `notifications/initialized`, and discovery HTTP
  requests, then clear it when the handshake finishes.

## Testing

- Added a regression test that stalls the remote MCP endpoint, waits for the
  handshake timeout, and verifies that a subsequent executor request completes.

GitOrigin-RevId: d4980a332e898309c885cbaa4fdd598924b440e1
2026-08-05 21:52:09 +00:00
Rasmus Rygaard
15ea598c6e Expose session sources to MCP contributors (#37167)
## What changed

- Add `session_source()` to `McpServerContributionContext` for thread-scoped MCP resolution.
- Propagate each thread's `SessionSource` through initial setup, per-step resolution, and runtime refreshes.

## Testing

- Verify global contexts omit the source while thread-scoped contexts retain it.
- Verify MCP contributors observe distinct sources for a root thread and its spawned subagent.

GitOrigin-RevId: 23da1509858e023fbd9e2d179034ddc83553f17b
2026-08-05 21:45:33 +00:00
Charlie Marsh
ad6e48ddd3 Keep textarea cursors and rendering inside the viewport (#37166)
## What changed

- Reserve a continuation row for the insertion point when a logical line exactly fills the textarea width.
- Wrap overflowing spaces and keep cursor movement aligned with the resulting visual rows.
- Clip plain, masked, and styled text rendering to the textarea bounds, and return no cursor position for empty viewports.

## Testing

Add regression coverage for full lines, trailing spaces, scrolling, multi-width graphemes, empty areas, and styled overlays at textarea boundaries.

GitOrigin-RevId: 4147530b523cf4bc300e50221d25d22dbfdfbefe
2026-08-05 21:40:50 +00:00
felixxia-oai
bd36d69aae Load host skill roots through the skills extension (#37162)
## What changed

- Load ordinary recursive host skill roots with the skills extension's host loader.
- Keep plugin-specific roots on the existing loader so plugin snapshot caching and namespacing continue to work.
- Merge both kinds of root snapshots through the existing precedence and deduplication logic, including discovery paths and source filesystem mappings.
- Move `HostSkillsSnapshot` into the skills extension as the owner of host skill loading.

## Testing

- Cover merged host and plugin catalogs, precedence for symlinked roots, discovery paths, and end-to-end rendering and invocation of host, repository, and plugin skills.

GitOrigin-RevId: c18080afb917c33c57bc17e36b40dd0f3c72d1d7
2026-08-05 21:17:54 +00:00
Charlie Marsh
c38a60ded2 Harden named session lookup in the TUI (#37157)
## What changed

- Share exact-name candidate lookup between resume and archive commands.
- Prefer valid SQLite names for local sessions, then recover legacy index names without overriding newer metadata.
- Validate rollout identity, collection, source, and model provider before selecting a local session, and choose the most recently modified eligible legacy duplicate.
- Preserve server-side lookup behavior for remote workspaces.

## Testing

- Cover stale and duplicate SQLite entries, legacy-name recovery, source and provider filtering, paginated histories, and duplicate legacy names.

GitOrigin-RevId: c69f86d64ff556bc7b463d13522a9241591eb070
2026-08-05 20:44:03 +00:00
TAFOYA-OAI
b6cddbf6d5 Test remote environments reported ready before selection (#37156)
## What changed

- Add end-to-end coverage for a remote environment whose provisioning status is
  reported ready before it is selected for a turn.
- Verify that `wait_for_environment` makes remote execution tools and selected
  capability-root context available once the transport is ready.
- Update pending-environment and relay tests to cover separate materialization
  and readiness reporting, including deferred connection and reconnection.

GitOrigin-RevId: d86d66e8f722e9bafac88b93d93e7c5244a7156e
2026-08-05 20:39:11 +00:00
Eric Burke
0c07c7ee47 Use Azure Key Vault for macOS notarization (#37154)
## Why

Keep the App Store Connect private key in Azure Key Vault instead of exporting it to release runners as a base64-encoded `.p8` secret.

## What changed

- Add a notarization client that creates notary-scoped Apple JWTs with a pinned Azure Key Vault key, submits and streams artifacts to Apple's notarization service, polls for completion, and saves developer diagnostics.
- Update the binary and DMG release wrappers to use the new client while continuing to staple accepted DMGs with `rcodesign`.
- Configure release jobs with the notarization vault key name and version instead of private-key material.

## Testing

- Add unit coverage for key validation, JWT signing, uploads, polling, diagnostic logs, and the binary and DMG wrapper contracts.

GitOrigin-RevId: 8f526c5691d774964fd33f847f8420cac0840b05
2026-08-05 20:31:46 +00:00
Adam Hupp
b6c3b51533 Coalesce concurrent Git status scans (#37151)
## What changed

- Share an in-flight `git status --porcelain` invocation among concurrent workspace metadata requests for the same canonical repository root.
- Keep scans for different repositories independent, and start a fresh scan after an in-flight request completes or loses all consumers.
- Pass the known repository root into dirty-worktree detection so requests from sibling directories and symlink aliases use the same key.

## Testing

- Add coverage for request coalescing, repository and symlink keying, completed scans, and consumer cancellation.

GitOrigin-RevId: 4c197c1d5bb94ca83c02979be34b17f24aefde08
2026-08-05 20:23:35 +00:00
rphilizaire-openai
a1890b6998 Project orchestrator skills through world state (#37149)
## What changed

- Move the orchestrator skill catalog from thread context into its own
  `orchestrator_skills` world-state section so unchanged catalogs remain
  incremental across turns.
- Discover executor, orchestrator, and host catalogs together and render them
  against one context-window-aware metadata budget, preserving executor entries
  before orchestrator and host entries under pressure.
- Emit catalog metrics and budget warnings when each world-state section is
  rendered.

## Testing

- Cover incremental orchestrator catalogs across production turns, combined
  catalog budgeting, disabled and unavailable providers, caching, warnings, and
  metrics.

GitOrigin-RevId: a0fb25d39dcaf43c978aff9da7972a1206f736e4
2026-08-05 20:14:31 +00:00
TAFOYA-OAI
f5345f1ee8 Track provisioned environment state across registration (#37147)
## What changed

- Add pending, ready, and failed provisioning states for Noise environments.
- Preserve the same environment instance whether provisioning is reported before or after materialization, and reject conflicts with ordinary environments.
- Make readiness and failure reports idempotent while rejecting contradictory terminal transitions.
- Delay connection attempts until a provisioned environment is selected and provisioning succeeds.

## Testing

- Cover status reports before and after materialization, terminal failures, repeated and contradictory reports, and replacement between ordinary and deferred environments.

GitOrigin-RevId: 4360a8f2a80c1a99a1dc9257e5d77c07b72b8eb3
2026-08-05 20:08:41 +00:00
rhan-oai
2b915a2eed Gate Apps usage instructions by model capability (#37145)
## What changed

- Add `include_apps_usage_instructions` to model metadata, defaulting to true for compatibility with existing metadata.
- Emit generic Apps guidance only when apps are available and the selected model enables it.
- Enable the capability for interactive model presets while leaving `codex-auto-review` and local models opted out.

## Testing

- Verify that missing metadata defaults to enabled and an explicit opt-out survives serialization.

GitOrigin-RevId: 6a20573cddfd3b80083d2b4b015829b49e6cc283
2026-08-05 20:03:13 +00:00