Commit Graph

8629 Commits

Author SHA1 Message Date
felixxia-oai
51ebf5b184 Truncate Guardian instructions after rendering the policy (#39985)
## Why

Legacy classifier prompts without a `{{ tenant_policy_config }}` placeholder
append the security policy during rendering. Truncating the prompt before and
after that step can unnecessarily truncate the final classifier instructions
twice.

## What changed

Keep configured classifier instructions intact until the policy has been
rendered, then apply `max_classifier_instruction_tokens` once to the complete
prompt.

## Testing

Add an extension test that verifies the bounded developer message sent for a
legacy prompt with an appended policy.

GitOrigin-RevId: 3d776a159340f4dffb6e3c2d7a10b33392fa2240
2026-08-21 17:54:23 +00:00
felixxia-oai
c517cc6d84 Bypass risk scoring for models that require automatic review (#39981)
## Why

Models listed in `auto_review.required_on_models` must always use the full
automatic review path, regardless of any cached Guardian v2 risk score.

## What changed

- Skip Guardian v2 risk classification for models that require automatic
  review and clear any cached `SecurityRiskScore` before review routing.
- Count thread lookup failures as failed scoring attempts so stale scores
  cannot continue approving later tool calls.

## Testing

- Verify required-review models do not start a classifier and always run full
  reviews.
- Verify failed thread lookups advance score lag and fall back to strict review.

GitOrigin-RevId: 048d9a80ac2a282e05437a3abb0c46ec21391be8
2026-08-21 17:33:45 +00:00
sayan-oai
f580dd886f Enforce environment network policies for remote execution (#39980)
## Why

`EnvironmentConfig.network_policy` could describe attachment-owned traffic
restrictions, but core rejected every configured policy because execution did
not enforce it.

## What changed

- Resolve each remote environment's network policy for the selected command
  and apply it to the execution-scoped proxy.
- Compose owner rules with controller constraints and saved network decisions
  while preserving inherited domain and Unix-socket denials.
- Keep strict allowlists non-expandable, allow reviewable policies to use
  network approvals, and reject sandbox escalation that would bypass an owner
  policy.
- Reject policies for local execution, disabled managed enforcement, or a
  disabled controller proxy.

## Testing

Added coverage for policy composition, scoped remote proxy behavior, approval
and denial flows, offline execution, and unsupported environment authority.

GitOrigin-RevId: d9331f616df24de6cd13ed68196f0ff7b0ca4dd9
2026-08-21 17:29:41 +00:00
jif
8edb95f274 Preserve MCP compatibility with older executors (#39979)
## Why

Older executors do not support resolving HTTP header values from their own
environment. Sending environment-backed bearer tokens to them can prevent MCP
servers from starting.

## What changed

- Advertise executor support for environment-backed HTTP headers with the
  `httpHeaderEnvVars` capability.
- Delegate bearer-token resolution only when the selected executor advertises
  that capability; otherwise, resolve tokens available in the host environment.
- Exclude executor-owned MCP servers that require environment-backed bearer
  tokens when the executor cannot resolve them, while retaining compatible
  host-owned and executor-owned servers.

## Testing

Added protocol and environment-variable coverage plus an end-to-end test that
simulates an older executor and verifies compatible MCP servers remain usable.

GitOrigin-RevId: 43545926f6f7e0f3b1091eb29d34647f6372bc4a
2026-08-21 17:21:30 +00:00
viyatb-oai
696b4502df Allow semaphore limit queries in the macOS sandbox (#39976)
## Why

Python's `ProcessPoolExecutor` queries `SEM_NSEMS_MAX` through `sysconf`, which reads the `kern.sysv.semmns` sysctl on macOS.

## What changed

- Allow reads of `kern.sysv.semmns` in the base Seatbelt policy.
- Verify `/usr/bin/getconf SEM_NSEMS_MAX` succeeds with both read-only and workspace-write sandbox policies.

GitOrigin-RevId: ab3ae92dc8991729f90a47c1994eedb6c7a2b9cd
2026-08-21 17:16:51 +00:00
jif
d12a7f3fd8 Preserve root user authorization in subagent Guardian reviews (#39975)
## Why

MultiAgent V2 workers can be reviewed after the root conversation has received
new user authorization that is absent from the worker's own transcript. Guardian
reviews need that genuine user context without treating forwarded or
assistant-authored claims as authorization.

## What changed

- Add the bounded root conversation to Guardian prompts for worker reviews.
- Preserve user and assistant roles, and explicitly treat only root user messages
  as authorization evidence.
- Exclude summaries, review artifacts, and assistant commentary from the root
  conversation evidence.
- Apply the same evidence to both core Guardian prompts and Guardian V2
  classification.

## Testing

Add an integration test covering late root-user authorization, forged role text,
forwarded agent claims, and filtered synthetic authorization.

GitOrigin-RevId: 8846de69ba214a88f58f70675798d324e213427c
2026-08-21 17:12:42 +00:00
zm-oai
41ab01a2ea Fix elevated Windows sandbox setup activation (#39971)
## Why

Sandbox setup runs on a Tokio worker thread without a Windows message loop, so
`ShellExecuteExW` requires synchronous activation when launching the elevated
setup helper.

## What changed

Add `SEE_MASK_NOASYNC` to the shell execution flags while retaining
`SEE_MASK_NOCLOSEPROCESS` for helper process tracking.

GitOrigin-RevId: 875cc1d49bb19f92f940633b6315711143beeae7
2026-08-21 16:56:42 +00:00
felixxia-oai
16e2722c50 Consolidate code mode output helper tests (#39969)
## What changed

- Cover object serialization through the `text()` helper directly in the code
  mode runtime suite.
- Remove redundant core integration coverage for serialized text and rejected
  image outputs.

GitOrigin-RevId: f465b8361e9d725a7246994d9c41e9d01c969011
2026-08-21 16:50:34 +00:00
Zanie Blue
3432d3f2c9 Upgrade pnpm to 10.34.5 (#39967)
## What changed

- Pin pnpm 10.34.5 across the root, dev container, CLI, TypeScript SDK,
  and responses API proxy packages.
- Scope the allowed build for `@modelcontextprotocol/conformance` to its
  pinned GitHub tarball and refresh its lockfile resolution metadata.

GitOrigin-RevId: 28e385f8f07bd064888f763b16aa3c902e66c5f1
2026-08-21 16:45:05 +00:00
jif
e482cc66ae Keep Guardian reviews isolated from executor MCP servers (#39962)
## Why

Executor-owned MCP configuration can include required servers that are unavailable. Guardian review sessions should not attempt to discover those servers or let them block an approval review.

## What changed

- Skip projecting MCP servers from selected executors when the session source is a Guardian reviewer.
- Preserve executor MCP discovery for regular thread sessions.

## Testing

Added an app-server integration test that configures an unreachable required executor MCP server and verifies that Guardian can still review an escalated command and return its decision.

GitOrigin-RevId: 5b712a3ee04e6896d5ca0cff39a32dd8e0fe0132
2026-08-21 15:44:52 +00:00
jif
8ce27647fb Test browser MCP bearer tokens over executor WebSockets (#39961)
## Why

Browser MCP bearer tokens live in the executor environment and are not
inherited when an executor is spawned.

## What changed

Update the executor MCP integration test to launch `exec-server` over a
WebSocket, provide the bearer token only to that process, and configure the
MCP server with `bearer_token_env_var`. Register the running executor by URL
and verify the token is absent from the app-server test environment.

GitOrigin-RevId: 319b073d2eb1dbca015d4e6fea8ca714e78f3246
2026-08-21 15:34:19 +00:00
jif
4e6ef3b418 Stop advertising shell snapshots from local exec servers (#39958)
Set the local exec-server's `shellSnapshotV2` capability to `false` on all
platforms.

GitOrigin-RevId: 4faca33e62b736e7cd2b9587e7992b0723f915fb
2026-08-21 15:29:35 +00:00
jif
3882ced09c Add in-memory shell snapshots to unified exec (#39957)
## What changed

- Add the under-development `shell_snapshot_v2` feature and advertise executor support through environment capabilities.
- Use executor-managed, in-memory snapshots for eligible direct `bash`, `zsh`, and `sh` login commands, while applying the configured shell environment policy and avoiding duplicate automatic startup-file effects.
- Keep file-backed snapshots available for user-shell commands and fall back to the existing execution path when in-memory snapshots are unsupported or inapplicable.

## Testing

- Cover policy filtering, snapshot reuse without snapshot files, automatic startup files, local and remote execution, and legacy user-shell snapshots.

GitOrigin-RevId: 4ad6cdf13824913ac8c393ba38b9844230677579
2026-08-21 15:24:56 +00:00
Benjamin Carlsson
d446960657 Support voice-aware configuration and version-skew builds (#39953)
## What changed

- Add `chat.toggle_voice_mute` to the configurable TUI keymap and generated configuration schema.
- Let the exec-server version-skew harness build the voice-enabled CLI on Debian-like Linux hosts without preinstalled development metadata by assembling a temporary package sysroot.
- Preserve the existing build path on other Linux environments when the Debian package tools are unavailable.

## Testing

- Add a shell test that verifies a non-Debian Linux environment without voice metadata still proceeds to the Cargo build.

GitOrigin-RevId: 95c5ebc3f85d152a5217dee561286f2be662f79a
2026-08-21 15:19:48 +00:00
jif
054588acfe Honor required MCP servers from selected executors (#39952)
## What changed

- Preserve the `required` setting on HTTP MCP servers discovered from a selected executor.
- Cover delayed startup for a required executor MCP server and verify its tool is available on the first turn.

GitOrigin-RevId: df66e12233b8e1aaa7744e29c154157af8dc4776
2026-08-21 15:15:05 +00:00
jif
00a7b888b2 Discover HTTP MCP servers from selected executors (#39941)
## What changed

- Read `mcp_servers` configuration and requirements from each selected remote
  executor and add eligible HTTP servers to the thread's MCP runtime.
- Bind discovered servers to the thread's concrete executor snapshot and apply
  environment MCP policy and requirements. Discovery is best effort, and
  executor-local servers are not treated as required at startup.
- Ignore unsupported stdio servers and HTTP configurations that depend on
  environment-provided headers or header helpers.

## Testing

- Added an app-server integration test covering discovery, authenticated HTTP
  tool invocation, requirements enforcement, and exclusion of stdio servers.

GitOrigin-RevId: 6e1cdcebdbb1cc21a5a2285fbc5617d8d5997182
2026-08-21 14:23:33 +00:00
felixxia-oai
275ef855fa Allow more time for local code-mode host startup (#39940)
## What changed

Use a 30-second handshake timeout for locally spawned code-mode hosts while
retaining the existing 10-second timeout for WebSocket connections.

GitOrigin-RevId: de1801c062b5c71d4c7b2c33a53b51e0b672445e
2026-08-21 14:14:00 +00:00
Tamir Duberstein
748d8ac834 Bound unified exec output delta frames (#39937)
## What changed

- Cap each `ExecCommandOutputDelta` frame at 8 KiB and stop building frames once the per-call delta quota is exhausted.
- Preserve complete UTF-8 scalars across producer chunks while passing malformed or incomplete trailing bytes through without losing them.
- Append all process output to the transcript independently of delta emission.

## Testing

- Cover split multibyte characters, malformed and trailing bytes, frame and event limits, transcript preservation, and interactive PTY output.

GitOrigin-RevId: ef4100e353df01569a8fbae650c70f439920a2fd
2026-08-21 14:04:33 +00:00
jif
7f9832d0d0 Enforce issuer binding for MCP OAuth endpoints (#39935)
## Why

Interactive MCP OAuth must not trust authorization metadata that could route an
authorization code or PKCE verifier to an unrelated token endpoint.

## What changed

- Require an advertised issuer to match the origin that served authorization
  metadata.
- Validate authorization and token endpoint origins before starting both
  pre-registered and dynamically registered client flows.
- Allow delegated endpoint origins when the server advertises issuer-bound
  authorization responses, while retaining narrow compatibility exceptions for
  existing providers.

## Testing

Add coverage for rejected untrusted metadata, accepted issuer-bound delegation,
legacy provider exceptions, and both client registration paths.

GitOrigin-RevId: 43c9f94c9f6ba2d23d7e373576cf9fa26861cfc3
2026-08-21 13:28:28 +00:00
jif
9c3da20b3f Track remote MCP header environment variables (#39930)
## Why

Remote HTTP MCP connections can source header values from the host environment,
so those variables must remain part of the connection identity even when the MCP
server runs in an executor environment.

## What changed

- Track `env_http_headers` variables for remote HTTP MCP connections.
- Continue tracking `bearer_token_env_var` only for local environments, where the
  host resolves the token.

## Testing

Add coverage that verifies remote connections track host header variables without
tracking executor bearer-token variables, while local connections track both.

GitOrigin-RevId: 8fe175c54a101721a27b76495dcd298f0c2bc6a3
2026-08-21 13:22:25 +00:00
jif
93c54bca38 Resolve HTTP MCP bearer tokens in executor environments (#39926)
## Why

Executor-owned HTTP MCP servers need to read their bearer credentials from the
selected executor environment instead of the host process.

## What changed

- Preserve `bearer_token_env_var` for executor-owned HTTP MCP configurations and
  resolve it when the executor sends each request.
- Extend delegated HTTP headers with executor-local environment references while
  rejecting missing, empty, or protected credential variables.
- Keep transport-provided bearer authentication compatible with MCP redirect and
  OAuth handling without sending a placeholder authorization value.

## Testing

- Cover authenticated executor-owned MCP requests end to end.
- Cover delegated header resolution and rejection of protected variables.
- Cover parsing executor-owned bearer configuration and transport-provided bearer
  behavior.

GitOrigin-RevId: 442bf7382198ffb69eba797eb36d4c74faabda88
2026-08-21 12:50:15 +00:00
jif
ff0e95007c Honor request PATH in exec-server shell snapshots (#39917)
## What changed

- Apply all per-request environment overrides, including `PATH`, after restoring
  the captured shell environment.
- Remove `runtime_path_prepends` from `ShellSnapshotRequest` and the associated
  PATH replay and deduplication logic.
- Keep the shell snapshot integration test's runtime PATH setup in the command
  being executed.

GitOrigin-RevId: a6f8d2e144bf9977c7434bc58b60ac972f7e0449
2026-08-21 12:08:02 +00:00
Zahan Malkani
536f86e5cc Support attaching to existing realtime calls (#39876)
## Why

Clients that create and negotiate realtime calls themselves need Codex to join
those calls without creating another call or overwriting the client-owned
session configuration.

## What changed

- Add the `existingCall` transport to `thread/realtime/start`, accepting a
  client-provided `callId` and optional `realtimeSessionId`.
- Attach Codex over the call's sideband WebSocket without SDP negotiation or a
  session update, and reconnect that sideband while preserving transcript
  state.
- Default existing calls to realtime v1, support v1 and v3, and reject v2 or
  options that would reconfigure the client-owned session.
- Encode call IDs as a single URL path segment for v3 sideband connections.

## Testing

Add protocol, app-server, core, reconnection, authentication-header, and URL
encoding coverage for existing-call attachments.

GitOrigin-RevId: 2046b70566f98efa55381bb1e461ea3cc68256c5
2026-08-21 06:41:28 +00:00
Eric Traut
2aaefa32b0 Add keybindings for cycling TUI permission modes (#39873)
## What changed

- Add unbound `previous_permission_mode` and `next_permission_mode` actions to
  `tui.keymap.chat` so users can configure shortcuts that cycle through the
  available built-in permission modes.
- Apply shortcut selections only to the active session, without writing them
  to `config.toml`, and report update failures in the transcript.
- Exclude modes disallowed by managed requirements or platform safety checks,
  reject printable-key bindings, and ignore these bindings in project config.

## Testing

- Cover mode cycling, unavailable modes, session-only updates, server errors,
  stale threads, keymap validation, and project-config sanitization.

GitOrigin-RevId: c3cfdf1e732b7b7bfe8f53fcac19a37e593bbfab
2026-08-21 06:19:23 +00:00
Eric Traut
44e95c857f Allow session configuration with codex agents (#39870)
## Why

`codex agents` rejected invocation-specific configuration, preventing the
dashboard from applying settings when starting a shared thread.

## What changed

- Accept interactive options such as model, approval, sandbox, search, working
  directory, and configuration overrides when opening the agents dashboard.
- Forward supported session-flag configuration into threads started through an
  embedded or remote app server, while excluding unrelated values.
- Continue to reject initial prompts and images, along with local provider and
  additional-directory settings that cannot be applied to a remote server.

## Testing

- Cover accepted dashboard options and rejected incompatible inputs.
- Verify that explicit feature and sandbox overrides reach shared threads in
  both embedded and remote modes.

GitOrigin-RevId: f10aa1e16ff62b49d55679e987d9e458438ba3f8
2026-08-21 06:08:26 +00:00
Benjamin Carlsson
9ab176f488 Limit pending input preview wrapping work (#39864)
## Why

Pending input previews display at most three wrapped rows, but previously wrapped every logical line before truncating the result. This made rendering do unnecessary work for very large multiline inputs.

## What changed

Limit pending steers, rejected steers, and queued follow-up inputs to four source lines before wrapping: three for the preview and one to detect overflow and render the ellipsis.

## Testing

Keep multiline preview coverage for queued messages and pending steers, including blank lines near the truncation boundary.

GitOrigin-RevId: 4c300b13532983ff9c3bdfbd62d6ca722ea3a5aa
2026-08-21 05:35:35 +00:00
richardopenai
2151d3a5b7 Reset registry retries when refreshing Noise bundles (#39852)
## Why

Refreshing a Noise rendezvous bundle after an unauthorized handshake inherited
the initial registry lookup's retry count. If that lookup had exhausted its
retries, a transient registry error during the refresh failed immediately.

## What changed

Reset the registry retry count along with the operation deadline before
requesting a replacement bundle after a `401` handshake response.

## Testing

Extend the initial Noise connection test to exhaust the first lookup's retry
budget, receive a `401`, then verify that an offline replacement lookup is
retried and connects successfully.

GitOrigin-RevId: bcfad50ea32d69855f1c2c4c461022b3ecbbd941
2026-08-21 03:47:37 +00:00
Brandon Zhang
27c05a52e0 Include context window IDs in response metadata (#39847)
## What changed

- Add `context_window_id` to turn metadata for sampling and compaction requests, using the UUID for the model-visible context window.
- Keep the ID stable for requests in the same context window and advance it after compaction, independently of the existing thread-generation `window_id`.
- Reserve `context_window_id` so client metadata cannot override it.

## Testing

- Cover HTTP and WebSocket metadata, remote compaction, token-budget context alignment, resume behavior, and post-compaction window changes.

GitOrigin-RevId: 55cceea377ad509c8dd96ad668f2b5703ea46a63
2026-08-21 03:31:56 +00:00
Dylan Hurd
bd19459358 Ignore project instructions for untrusted projects (#39837)
## What changed

- Skip project-scoped `AGENTS.md` discovery when the active project is untrusted, while preserving user-level instructions.
- Include the active project trust level in the instruction cache key so runtime trust changes reload the applicable instructions.
- Preserve updated project trust metadata during runtime configuration refreshes.

## Testing

Add coverage for initially untrusted projects and for switching between trusted and untrusted states at runtime.

GitOrigin-RevId: 284bf7693943f585013fb5fe4b6aa3309bc50cf3
2026-08-21 02:33:50 +00:00
pmccrary-oai
d8ec270183 Rename the history notes extension config option (#39830)
## What changed

Rename the token-budget configuration key and its Rust field from
`use_history_notes_history` to `use_history_notes_extension`. Update the config
schema, extension gating, explicit-setting detection, and tests to use the new
name consistently.

GitOrigin-RevId: b6a514e23f02095fcd1d35dc42eeb7394b800c77
2026-08-21 01:51:48 +00:00
pmccrary-oai
daa48072f4 Add history and notes tools for token-budget sessions (#39827)
## Why

Token-budget sessions need a way to recover prior conversation context and preserve working state across context-window transitions.

## What changed

- Add direct-model `history` tools for listing windows and items, reading items, and searching conversation contents.
- Add direct-model `notes` tools for listing, reading, searching, appending, and writing persistent notes.
- Route tool calls through the configured Codex backend with trusted session and agent context, bounded request arguments, and truncation-aware output handling.
- Expose the extension when `features.token_budget.use_history_notes_history` is enabled with an OpenAI provider and Codex backend authentication.

## Testing

- Cover tool registration, configuration changes, provider and authentication requirements, backend request context, encrypted output preservation, and request and response limits.

GitOrigin-RevId: 43b259f01014ba3f30803dd7cd5634942407a9bb
2026-08-21 01:24:52 +00:00
rka-oai
f20b63e85c Use Responses compaction for Amazon Bedrock (#39825)
## What changed

- Switch Amazon Bedrock remote compaction to `compaction_trigger` items sent through `/v1/responses`.
- Remove the legacy dedicated compaction protocol from provider capabilities.
- Default remote compaction to unsupported and explicitly enable it for OpenAI, Azure Responses, and Amazon Bedrock providers.

## Testing

- Cover manual and automatic Amazon Bedrock compaction requests and their compacted history.
- Verify remote-compaction capabilities for configured and Amazon Bedrock providers.

GitOrigin-RevId: cf9ba314595367518b37a85f334f0c105ce47e45
2026-08-21 00:53:52 +00:00
felixxia-oai
54201093d4 Preserve uncapped Guardian classifier instructions (#39822)
## Why

Guardian v2 applied an implicit token limit to classifier instructions even when
no limit was configured, which could truncate the rendered policy.

## What changed

- Leave classifier instructions unbounded by default.
- Continue honoring `max_classifier_instruction_tokens` from local or model
  configuration, with local configuration taking precedence.

## Testing

- Cover full policy rendering without a configured cap and truncation when an
  explicit cap is present.

GitOrigin-RevId: 70eb42d43858e0656129dd438b10b60940fd97c6
2026-08-21 00:16:39 +00:00
chess
67b2c8c6fb Defer legacy filesystem policy projection (#39813)
## Why

Applying session settings rebuilt and compared a legacy filesystem policy even
when the update could not trigger cwd-based policy rebinding.

## What changed

Compute the legacy projection only for cwd changes whose filesystem policy has
a rebindable project-root write entry. Preserve the existing equivalence check
before rederiving the policy.

GitOrigin-RevId: c428a5c54f1b5b1300be406cac374a6fd29bb9a8
2026-08-20 23:36:13 +00:00
chess
969efa5470 Avoid materializing writable-root carveouts for presence checks (#39812)
## What changed

- Add `FileSystemSandboxPolicy::has_writable_roots_with_cwd` to detect an
  effective writable root without constructing its read-only carveouts.
- Use the helper when classifying permission profiles and selecting patch
  rejection reasons.

## Testing

- Verify the presence check matches the existing materialized-root result
  across read-only, unrestricted, external, writable, denied, and unresolved
  special-path policies.

GitOrigin-RevId: 17ee490aa3180e05732133203f68544d9de5268b
2026-08-20 23:26:59 +00:00
Jeremy Rose
21facf2273 Restrict macOS preference reads to full-disk policies (#39811)
## Why

The macOS preferences service can expose data outside a sandbox's allowed
filesystem read roots.

## What changed

- Move the Seatbelt preference and `cfprefsd` grants into a separate policy
  section that is included only when filesystem reads are unrestricted.
- Remove the equivalent grants from the restricted platform defaults.

## Testing

- Verify both Seatbelt profiles include preference grants only for full-disk
  read policies, including policies with denied paths or globs.
- Verify a restricted sandbox cannot retrieve a preference whose plist is
  denied, while an unrestricted read policy can.

GitOrigin-RevId: 90388366a7302bca1830ad0439544be8babc7321
2026-08-20 23:18:55 +00:00
zm-oai
3cde5d4ccd Preserve WINDIR in core Windows shell environments (#39809)
## What changed

- Add `WINDIR` to the Windows core environment variable allowlist.
- Extend the Windows core-inheritance test to verify that a case-variant
  `WinDir` entry is retained.

GitOrigin-RevId: 0305d8fa882ba2705a7ce7661098cedac1339c43
2026-08-20 23:14:32 +00:00
wencongli-oai
2790c13899 Finalize reserved PDF uploads with creation context (#39807)
## What changed

- Read the optional `pdf_c2pa_reservation` flag from file creation responses.
- When a reservation is present, include the original creation payload as
  `pdf_c2pa_create_request` in the upload finalization request.
- Keep sending an empty finalization payload when the flag is absent for
  compatibility with older server responses.

## Testing

- Cover reserved hosted PDF uploads and the legacy empty-payload path with mock
  server tests.

GitOrigin-RevId: 454a4b9d872d70766c2bbb6c01d6015f7127af2f
2026-08-20 22:59:37 +00:00
Celia Chen
f3cd299428 Use multi-agent V1 for Amazon Bedrock models (#39804)
## Why

Amazon Bedrock does not support the response items required by multi-agent V2.

## What changed

- Normalize Bedrock model catalogs to advertise `MultiAgentVersion::V1`.
- Cover both remote catalog normalization and the static Bedrock Runtime catalog in tests.

GitOrigin-RevId: 93832cd4b885daf4b87fb33a7be8502ae15c1b24
2026-08-20 21:59:31 +00:00
andrewgu-oai
53cec04646 Optimize case-insensitive thread history matching (#39802)
## What changed

Map lowercase match offsets back to the original thread text with monotonic
span cursors. This avoids rescanning all character spans for every occurrence
while preserving the original byte ranges returned for matches.

GitOrigin-RevId: 363fba5d56813c3aeb2a7ede1d7275147a9ef51a
2026-08-20 21:50:51 +00:00
stevenlee-oai
a3bce23f3b Update rmcp to 3.1.3 (#39798)
## What changed

- Upgrade `rmcp` and `rmcp-macros` from 3.1.2 to 3.1.3.
- Preserve authentication-required and retryable transport classifications when modern MCP discovery falls back to legacy initialization.
- Prevent unrelated discovery errors from triggering legacy fallback while retaining their diagnostics.

## Testing

- Cover authentication challenges and transient initialization failures during legacy fallback.
- Verify that a failed OAuth issuer check does not consume the pending authorization state.

GitOrigin-RevId: 957c0873fec1148883dd163fbaeb77d7593d8c53
2026-08-20 20:53:17 +00:00
Eddie Chen
cc801d7048 Enrich thread archive analytics with thread context (#39797)
## What changed

- Add app-server client, runtime, thread source, and parent thread ID metadata to archive and unarchive analytics events when the reducer has that context.
- Omit non-automation feature thread sources and skip unavailable metadata.

## Testing

- Cover archive and unarchive event enrichment, filtered feature sources, and threads without cached context.
- Verify the app-server archive flow emits the enriched analytics payload.

GitOrigin-RevId: 163f9c30721cee0172bb4581b6dcd269e44cd941
2026-08-20 20:44:31 +00:00
Ian MacLeod
d9fd91edab Add hostname to the configurable TUI status line (#39795)
## What changed

- Add `hostname` as a selectable status-line item and show it in setup previews.
- Read the normalized operating-system hostname without triggering DNS resolution, and omit the item when no hostname is available.

## Testing

- Cover hostname normalization, status-line rendering, and setup and surface previews.

GitOrigin-RevId: c5e4e0ee1dba6e4bfdf942562a6b037835ff9e69
2026-08-20 20:08:11 +00:00
rhan-oai
010738a25c Reject settings updates for parent-owned subagents (#39792)
## What changed

- Apply the existing direct-input restriction to `thread/settings/update` for
  parent-owned Multi-Agent V2 subagents.
- Document the restriction and extend the direct-input test to verify that the
  request returns an invalid-request error.

GitOrigin-RevId: 2eead01c6f54ec637c68573378f3b56a7ee85652
2026-08-20 19:52:44 +00:00
rka-oai
aead844f64 Handle standalone tool outputs as external context (#39791)
## What changed

- Treat standalone `function_call_output` items without a `call_id` as external context, including items injected into new and forked threads, and mark the thread memory mode polluted when `memories.disable_on_external_context` is enabled.
- Include these outputs in guardian transcripts with their namespaced tool name and a placeholder for non-text content.
- Allow image generation to reuse images from standalone and otherwise unpaired function or custom-tool outputs.

## Testing

- Cover injected thread items, external-context detection, guardian transcript rendering, and recent-image selection.

GitOrigin-RevId: ca4e8c16a4b731e1256a5956908d00f785b4feb1
2026-08-20 19:46:29 +00:00
jif
43526b8561 Deduplicate zsh fork test setup (#39790)
## What changed

Reuse the shared `build_zsh_fork_test` helper in the unified exec approval
suite and remove its identical suite-specific wrapper.

GitOrigin-RevId: 0593f0e1a56737eba1d491872a44d14e9171dbfb
2026-08-20 19:43:54 +00:00
ostepanian
9e680a52e7 Support host-accepted exec-server WebSockets (#39786)
## What changed

- Add `EnvironmentManager::from_accepted_websocket` so embedding hosts can
  construct a remote environment from an already accepted and authenticated
  Axum WebSocket.
- Add `replace_accepted_websocket` to retire the current transport and resume
  the same exec-server session on a host-supplied replacement connection.
- Serialize replacement handoffs, reject overlapping replacements, and release
  the handoff claim when a replacement attempt is cancelled or fails.

## Testing

- Cover initial connection validation and immediate environment readiness.
- Verify replacement retry behavior and recovery of a running process and its
  output after reconnecting.

GitOrigin-RevId: 1f2ab7bcf7b5abbbece5c101801432dc84a8058d
2026-08-20 19:33:48 +00:00
xli-oai
0cc80b8db5 Support turn cost telemetry for custom model providers (#39785)
## What changed

- Route turn-cost queries for non-OpenAI providers through the configured
  provider endpoint and authentication, while retaining the existing OpenAI
  API-key path and excluding Amazon Bedrock.
- Observe turns only when their model provider matches the worker's provider.
- Retry custom-provider authentication failures during periodic availability
  probes and ensure client authentication takes precedence over provider
  headers.

## Testing

- Add coverage for provider matching, custom-provider authentication retries,
  ChatGPT-auth rejection, and header precedence.

GitOrigin-RevId: 04a7b28e8e3e18a510ae6fface5193af40d114c0
2026-08-20 19:28:32 +00:00
Owen Lin
90c67e6f33 Classify rollout migration failures (#39784)
## Why

Rollout migration outcomes expose free-form error messages, making failures hard to group without parsing text.

## What changed

- Add a serialized `RolloutMigrationFailureReason` to failed outcomes and classify failures across reading, conversion, SQLite materialization, publishing, and recovery.
- Add the failure reason as a low-cardinality tag on per-thread migration telemetry.

## Testing

- Cover missing SQLite metadata and invalid session metadata classifications.

GitOrigin-RevId: 2bff98483b484f4d02b72d52f39950ff99ebe429
2026-08-20 19:24:09 +00:00
rka-oai
763787d061 Support standalone named function call outputs (#39782)
## Why

External tool events may need to enter thread history without a preceding function call and therefore do not have a `call_id`.

## What changed

- Allow `function_call_output` items to omit `call_id` and carry optional `name` and `namespace` fields.
- Preserve named standalone outputs during history normalization and agent forks while retaining existing pairing behavior for outputs with a `call_id`.
- Accept, persist, and forward these outputs through `thread/inject_items`, and update the app-server schemas and documentation.

## Testing

- Cover paired and standalone JSON round trips, history normalization, agent forks, and injected thread history.

GitOrigin-RevId: a3258163a7dc93777c7c3023116fe204819bdbb0
2026-08-20 19:19:41 +00:00