Commit Graph
3139 Commits
Author SHA1 Message Date
jif 9a59289fbe Fix races in remote environment and session replacement tests (#52591)
## Why

The remote environment test can steer before the wait tool call is recorded, discarding the call. The session replacement test can close the client while agents overview RPCs are still pending, leaving the proxy writing to a closed socket.

## What changed

- Wait for the `wait-for-active-environment` function call event before steering the active turn.
- Wait for `AgentsOverviewThreadsLoaded` before shutting down session replacement test cases that open the agents overview.

GitOrigin-RevId: 886112a56ff6e1016efe30dbbd0256807bc1cc85
2026-10-09 14:21:14 +00:00
Felipe Coury 5fe4fc8f7c Forward clipboard copies to the terminal in Herdr sessions (#52557)
## Why

Herdr sessions can gain attached clients after Codex starts. Successful native clipboard copying should still forward the text to the attached terminal, even without inherited SSH variables.

## What changed

Detect Herdr sessions with `HERDR_ENV=1` and enable terminal forwarding for `/copy` and `Ctrl+O` even when native copying succeeds. Use OSC 52 directly when outside tmux, while preserving the native copy result.

## Testing

Add a routing test verifying that a Herdr session copies natively before sending OSC 52 and retains the successful native clipboard lease.

GitOrigin-RevId: c43c08ca037ff51e902267dc8636889493f5c30c
2026-10-09 12:24:07 +00:00
Benjamin Carlsson 2351d9e1b6 Avoid an extra blank quote line when pasting text with a trailing newline (#52418)
## Why

Pasting text ending in a newline into a composer line beginning with `> ` adds an unnecessary empty quoted line before the next Markdown block.

## What changed

Remove one trailing newline from nonempty blockquote paste content before adding quote prefixes. Preserve interior blank lines and the two unquoted newlines that move the cursor to the next block.

## Testing

Add a trailing-newline regression case, update the CRLF/CR expectations, and exercise trailing-newline input in the existing rendering snapshot test.

GitOrigin-RevId: 2367efa8253dd0512de8ba6333b39eba6381fba8
2026-10-09 05:12:54 +00:00
Brent Traut 82883da25e Notify subscribers when thread read state changes (#52384)
## What changed

Add the experimental `thread/readState/changed` notification with `threadId` and the committed `readState` receipt. Send it to existing thread subscribers when terminal activity updates read state or a revert clears a removed unread position. Emit terminal read-state updates before `turn/completed` so completion remains the last notification for that result.

Expose the notification in generated JSON schemas, TypeScript types, and Python SDK models. Document experimental capability gating, subscription lifetime, notification opt-out, and refreshing receipts when concurrent responses disagree.

## Testing

Extend the read-state integration test to assert that the notification receipt matches the receipt returned by `thread/read` after terminal activity.

GitOrigin-RevId: 28935352a881b7a5e2e7f629173c3b2061bd7941
2026-10-09 02:59:21 +00:00
Brent Traut 0ada5d8806 Expose experimental durable thread read state in the app server (#52350)
## What changed

- Add experimental `readState` to `thread/read` and a thread-ID-keyed `readStates` map to `thread/list` for eligible durable local user threads. Each receipt contains `firstUnread` and an opaque `revision`.
- Publish new visible terminal results before `turn/completed`, after flushing the rollout. Reading snapshots leaves activity unread; replayed history does not publish new activity.
- Clear unread positions removed by a paginated thread revert while preserving explicit thread-start marks and concurrent receipt updates.

## Testing

Add an integration test covering completed-turn receipts, repeated reads without acknowledgement, matching list receipts, and revert cleanup with a changed revision.

GitOrigin-RevId: e7f6ddfbb1fc2fa95d1ef2876d7f0f7b9f99ff65
2026-10-09 01:22:30 +00:00
Benjamin Carlsson 22ebb0fb17 Clamp wrapped source ranges before remapping terminal hyperlinks (#52330)
## Why

Wrapping can retain a cursor sentinel one byte past the end of the input. Using that range to slice source text during hyperlink remapping can panic.

## What changed

Clamp wrapped range boundaries to the input length before calculating hyperlink columns and recording logical source ranges, keeping both aligned with the visible text.

## Testing

Add a regression test that extends a wrapped range past the input boundary and verifies that the line, hyperlinks, and logical source are preserved.

GitOrigin-RevId: c83c817df8d3ea790f7d126768092ae317ff9217
2026-10-09 00:04:15 +00:00
Felipe Coury a3f3b44cd8 Add configurable persistent leader shortcuts to the TUI (#52273)
## What changed

- Add `tui.keymap.global.leader`, defaulting to `ctrl-x`, and symbolic bindings such as `leader c` that follow the configured prefix. The default prefix yields to existing custom shortcuts and chord prefixes.
- Keep leader shortcut hints open until completion or cancellation, while ordinary chords retain their one-second timeout. Pressing `esc` or repeating the leader cancels the pending shortcut.
- Add leader configuration and a `Use leader...` capture option to `/keymap`, with resolved shortcut labels and conflict validation.
- Cancel pending chords when input targets change, on paste or focus loss, and on mouse actions other than movement.
- Move the default voice mute shortcut from `ctrl-x` to `f9` and update its tests and displayed hints.

GitOrigin-RevId: 35b964cccd2812c73200f0c26b0f19506821df92
2026-10-08 21:01:06 +00:00
Felipe Coury 39f4277087 Enable text selection in the fullscreen TUI footer (#52270)
## What changed

Allow mouse selection and plain-text copying of rendered status and footer text, honoring `tui.copy_on_select` and existing selection keyboard controls. Keep the selected region stable while other content updates, preserve Unicode and terminal hyperlinks, and clear selections when their region becomes invalid.

Defer warning clicks until a stationary mouse release so dragging selects text without opening the warning viewer. Preserve the composer draft and cursor while selecting footer text.

## Testing

Add unit and snapshot coverage for visible-text copying, Unicode and hyperlinks, selection invalidation, keyboard ownership, and stationary clicks versus drags. Add a fullscreen integration test for warning selection and draft preservation.

GitOrigin-RevId: dd14d7ede52e97e507be24c4d6ac0299f7388a9b
2026-10-08 20:49:14 +00:00
Adam Perry @ OpenAI 3b6ab3471a Normalize formatting in docs, web assets, and sample scripts (#52256)
## What changed

- Reformat Markdown tables and lists, login pages, inline visualization HTML, and sample JavaScript scripts.
- Escape union-type pipes in Python SDK API tables so they render within their cells.
- Keep the formatting-recipe test focused on the working directory and formatter commands by removing assertions on comment text.

GitOrigin-RevId: ae46d5b40fd013553de8b5ccf2c41d76be65aba8
2026-10-08 20:11:43 +00:00
Brian Lee 5505a80f38 Honor API-key feature gates in TUI Daybreak selection (#52228)
## Why

API-key accounts could retain a saved Daybreak preference without `ApiKeyCyberAccessPrograms` enabled. Eligible API-key turns also omitted the `standard` access program when Daybreak was off.

## What changed

- Require both `CliDaybreak` and `ApiKeyCyberAccessPrograms` for known API-key accounts, and refresh Daybreak state when either flag changes.
- Use account eligibility consistently for normal turns, continuations, and background tasks so eligible API-key accounts can select the catalog's `standard` program when Daybreak is off.
- Preserve resumed preferences while account state is unknown and update `/daybreak` help to reflect API-key eligibility.

## Testing

Extend regression coverage for feature-flag combinations, API-key continuations, resumed preferences, and `/daybreak` help.

GitOrigin-RevId: 966f4789c9d685ff122da196a13da50c60a4b393
2026-10-08 19:02:53 +00:00
Felipe Coury 96d238d0b9 Include foreground activity in iTerm2 session status (#52226)
## Why

The iTerm2 session status reports `Working` without describing the current activity.

## What changed

Populate the OSC 21337 `detail` field from the TUI status header during foreground work, for example `Reading source`. Leave it empty for idle, waiting, background-only work, and the generic `Working` header.

Reuse terminal-title text filtering and the 240-character limit, then escape semicolons and backslashes for the status payload. Include detail in the emission cache so activity changes update the terminal even when the lifecycle state stays the same.

## Testing

Add coverage for foreground-only details, payload encoding, text filtering and truncation, and cache updates when the detail changes.

GitOrigin-RevId: b27a287b80e0db52be6cd9d5d246f03897e2996b
2026-10-08 18:56:04 +00:00
Felipe Coury ade12342e2 Expose Codex lifecycle status in iTerm2 sessions (#52203)
## What changed

Emit `Idle`, `Working`, or `Waiting` with colored indicators through iTerm2's `OSC 21337` session status protocol. Pending user action takes precedence over running tasks and background processes.

Limit emission to direct iTerm2 TTY sessions without a terminal multiplexer. Deduplicate successful writes, refresh status after terminal handoffs and resume, and clear status on suspension and exit.

## Testing

Add coverage for lifecycle transitions, protocol encoding, terminal detection, write retries, deduplication, and re-emission after terminal handoffs.

GitOrigin-RevId: 750e9ec92aeefc57651886a08ef6aea07675d175
2026-10-08 18:07:35 +00:00
Felipe Coury c079352d83 Allow plugin toggles while searching and preserve filters on refresh (#52200)
## Why

In `/plugins`, Space edits a nonempty search query, leaving filtered plugins without the advertised toggle shortcut. Refreshing the popup also clears the query.

## What changed

- Add `Tab` to enable or disable the selected plugin while searching, and update toggle hints.
- Preserve the search query and selected plugin when the popup refreshes after a toggle.
- Give configured list bindings precedence over the `Tab` toggle and hide its hints when `Tab` is already bound.

## Testing

Add regression tests and snapshots for filtered toggles, search and selection preservation, and custom `Tab` binding precedence and hints.

GitOrigin-RevId: de98ba2bb3f9d8928ced7216dcc5e4b4fa4c4968
2026-10-08 18:06:19 +00:00
iceweasel-oai f90a578f76 Enforce managed MXC requirements on Windows (#52193)
## What changed

Add `windows.require_mxc` to managed requirements. When set to `true` on Windows, reject configurations whose effective local sandbox backend is not MXC without changing the selected backend.

Validate after cloud configuration loads and outside startup recovery fallbacks. Apply the check to app-server startup and configuration loads, in-process bootstrap, session creation, sandbox debugging, and runtime configuration refreshes.

## Testing

Extend configuration tests to cover required and optional MXC selection, separately loaded policy requirements, and runtime refresh validation. Expand app-server startup tests to cover local and cloud MXC requirements, cloud preference selection, and failures without default-config recovery.

GitOrigin-RevId: 16456611bfd9df77e7f959b52515f1885b59ac75
2026-10-08 17:48:32 +00:00
Eric Traut 5fe2152b60 Preserve side conversations across thread navigation (#52184)
## Why

Navigating to another thread discarded side conversations, preventing users from returning to them later.

## What changed

- Keep side conversations and their event listeners, channels, and pending requests across thread switches and session resets.
- Reopen a parent's existing side conversation with `/side` and submit any supplied question there. Resolve side toggles by the current thread's parent relationship.
- Limit explicit return-and-discard behavior to the active side conversation, and shut down retained side conversations when exiting.

## Testing

Extend regression tests to cover reopening a side conversation after navigating away, preserving its listener and pending approval during a reset, and restricting discard selection to the active side.

GitOrigin-RevId: ff80566970414ba190ff650d5e413ef63dc65449
2026-10-08 17:31:08 +00:00
jackz 6f6e80bcdd Show AWS GovCloud guidance at startup and remember acknowledgment (#52176)
## Why

GovCloud guidance was tied to Bedrock credential setup, so users with an already configured provider could miss it.

## What changed

Check for GovCloud during TUI startup using the app server's resolved provider, including when connecting to a server. Require acknowledgment before proceeding and save `notice.hide_gov_cloud_guidance = true` to suppress the screen on subsequent launches. Quitting the guidance exits startup without saving acknowledgment.

## Testing

Add a terminal integration test covering acknowledgment persistence, quitting without saving, and suppression after restart. Retain coverage for explicit acknowledgment and scrolling in short panes.

GitOrigin-RevId: f09fd73a66fb02f94ebdd3c3b0dbe5712dfa9be7
2026-10-08 17:10:20 +00:00
jif cd85a26cae Remove the patched zsh shell execution backend (#52160)
## What changed

- Use the standard shell executor and remove the zsh fork escalation runtime, `codex-execve-wrapper`, and `shell-escalation` crate.
- Ignore `shell_zsh_fork` and `unified_exec_zsh_fork`, emit migration notices for legacy configuration, and warn when ignoring managed requirements for these flags.
- Keep the active session's `apply_patch` alias directory readable under restricted filesystem permissions.

## Testing

Add coverage for legacy configuration startup and shell execution, migration notice rendering, active alias directory selection, and nested `apply_patch` execution while other files in `CODEX_HOME` remain unreadable.

GitOrigin-RevId: 43af461fea32b4980550ee7237effd2bc0646ed8
2026-10-08 16:19:09 +00:00
liame-oai ec8251c545 Add experimental prediction forks that inherit parent context (#51884)
## Why

Prediction forks need to preserve the parent's effective context and request settings to maximize prompt-cache reuse.

## What changed

- Add `experimentalPredictionMode` to `thread/fork` for ephemeral forks of loaded, persisted parents. Reject configuration overrides, `path`, `lastTurnId`, and `beforeTurnId` in this mode.
- Inherit the parent's effective configuration, tools, environments, collaboration settings, disabled plugins, and persisted history.
- Enable `features.reasoning_effort_override` on the fork while preserving the parent's request-effort baseline, including when overrides were disabled on the parent.
- Report the fork's effective model, service tier, and reasoning effort in the response.

## Testing

Add coverage for matching parent and fork requests and prompt-cache keys across legacy and paginated history, invalid fork parameters, and reasoning-effort inheritance. Add a context snapshot for identical parent and fork continuations.

GitOrigin-RevId: 46b41f2ac331562b441dadff1a0a9f926c94880d
2026-10-08 00:09:03 +00:00
pash-openai eef4719927 Preserve line breaks and links in multiline async questions (#51866)
## Why

Rendering an entire question title as one terminal line removes line endings and misaligns hyperlink source ranges with the visible text.

## What changed

Wrap and annotate each logical line of asynchronous question titles separately, preserving blank lines and handling both LF and CRLF endings while retaining complete hyperlink destinations.

## Testing

Add a rendering regression test and snapshot covering multiline titles with code fences, Unicode text, and a URL. Check LF and CRLF rendering equivalence and hyperlink destinations at narrow and wide widths.

GitOrigin-RevId: ccd7256dbaed91ce98374e52b17d3a1b87645574
2026-10-07 22:55:00 +00:00
canvrno-oai 746103b592 Use readable plugin mentions without suppressing same-name skills (#51865)
## Why

Generated app IDs produce opaque plugin mention labels. A selected `@foo` plugin mention also prevented a separate `$foo` skill mention from being submitted.

## What changed

- Use eligible display names, such as `@Postman`, for plugins named `app-` followed by 32 lowercase hexadecimal characters, while preserving the plugin binding. Accept 1–64 ASCII letters, digits, underscores, or hyphens, excluding common environment variable names; otherwise retain the existing naming fallback.
- Only `$` mention bindings suppress automatic skill selection, allowing `@foo $foo` to submit both the plugin and the skill.

## Testing

Add naming tests for accepted display names and fallback cases, a composer snapshot verifying `@Postman` and its plugin binding, and a submission regression test for a plugin and skill sharing the name `foo`.

GitOrigin-RevId: aa8c98f293d12e62d32d43206e076cbe1fcb2a3b
2026-10-07 22:46:41 +00:00
Dmitriy Kovalenko 745d865521 Align Bazel release builds with Cargo and fix platform compatibility (#51848)
## Why

Bazel release builds need Cargo-compatible Rust and native build-script settings. Platform-specific issues also include Windows command-line limits, MSVC runtime conflicts with V8's allocator, and a missing V8 `__clear_cache` symbol on ARM64 musl.

## What changed

- Add `--config=release` settings for thin LTO, four target codegen units, and disabled debug assertions and overflow checks, with separate settings for build tools.
- Add opt-in Cargo release profile support for build-script optimization and debug information, preserving explicit C/C++ flags. Give optimized Bubblewrap builds `-O3`, debug symbols, and enabled native assertions.
- Statically link the MSVC CRT for Rust and C/C++ target and host dependencies, and disable SQLite intrinsics on x64 MSVC to avoid startup crashes on older CPUs.
- Let the Rust process wrapper read its arguments from a multiline parameter file to avoid Windows command-line limits.
- Select the ARM64 musl V8 archive containing compiler-rt builtins and raise the Rust recursion limit to `256` in the app-server client, exec, and TUI entry points for release compilation.

GitOrigin-RevId: 8f61e62b8735c36209ee92e04a0e0339a70badc5
2026-10-07 22:10:23 +00:00
pakrym-oai 406b0c4446 Enable instant interrupts by default (#51812)
## What changed

Enable `instant_interrupt` by default so new user input can preempt responses and yield foreground code-mode observations. Keep the feature marked as under development and update feature-policy tests to allow this exception.

Explicitly disable instant interrupts in core, TUI, and Python SDK tests that depend on responses completing before steering or processing subsequent input.

GitOrigin-RevId: a8cab2d6c445bfdbd10b0b2abcf7893d32ee8595
2026-10-07 19:42:35 +00:00
berkdeniz-oai b38942ce7c Preserve diagnostic reasons for MCP user verification failures (#51808)
## Why

User-verification cancellations previously discarded failure reasons, leaving MCP servers unable to distinguish user cancellation from unavailable approval, interruption, or invalid proof.

## What changed

- Carry a bounded `openai/userVerificationReason` value in response `_meta` for verification failures, declines, and cancellations across the TUI, app server, and MCP client.
- Preserve recognized reasons and classify invalid responses, missing or invalid proofs, response errors, closed response channels, interruptions, and unavailable approval.
- Discard unknown reasons and unrelated metadata. Keep proof material out of decline and cancellation responses, and keep display messages and raw error diagnostics out of response metadata.

## Testing

Add and update tests for typed failure propagation, metadata filtering, invalid proofs, response-channel failures, interrupted requests, and unavailable approval, including TUI RPC and native MCP response coverage.

GitOrigin-RevId: 6b7f855ce8eb13e759b5b86d0dc2b1afdfcff7b3
2026-10-07 19:28:14 +00:00
Celia Chen 87be737b66 Advertise Ultrafast for GPT-6.1 Sol on Amazon Bedrock (#51794)
## What changed

Add the `ultrafast` service tier to bundled catalogs for `openai.gpt-6.1-sol` on Bedrock Mantle and `global.openai.gpt-6.1-sol` and `us.openai.gpt-6.1-sol` on Bedrock Runtime. This exposes `/ultrafast` for these models while keeping tier selection opt-in.

## Testing

Extend catalog, app-server, core request, and TUI tests to cover GPT-6.1 Sol tier discovery and selection across all three model IDs, including toggling back to the default tier and honoring custom catalog commands.

GitOrigin-RevId: b5bbde8615b73a1d73eb16db7952b10d044b9fa6
2026-10-07 18:32:50 +00:00
Brent Traut 1fbe15c962 Add thread ID exclusions to thread/list (#51595)
## Why

Clients displaying a saved manual thread order need to list the remaining threads without repeating those already loaded separately.

## What changed

Add optional `excludedThreadIds` to `thread/list` and the generated protocol bindings. Apply exclusions before the result limit, refilling pages until the requested limit is reached or history is exhausted while preserving existing filters and ordering. Clients must send the same exclusions on each page.

Accept up to 100 entries, counting duplicates toward the bound. Reject invalid IDs or oversized lists with JSON-RPC error `-32602` rather than truncating them. Omitted, null, and empty lists preserve existing behavior.

## Testing

Add integration coverage for page refill across database-only and scan/repair paths, archived threads, sort directions, and project/section scopes. Cover duplicate and unknown IDs, the 100-entry boundary, invalid input, and preservation of section order.

GitOrigin-RevId: e9a884e642ae25d166aff7e275469d1d43179c6c
2026-10-07 06:07:47 +00:00
Ian MacLeod eb2d3c6416 Preserve live TUI settings when configuration reloads fail (#51510)
## Why

Live preferences can be newer than the last successful configuration load. Starting a new thread after a reload failure could overwrite those preferences with stale settings.

## What changed

Carry local settings alongside the new-session configuration, retaining the live settings when reloading fails and applying the staged settings when the new thread starts. During resume and agent selection, replace staged local settings only when the directory-trust check actually reloads configuration.

## Testing

Add a regression test that changes a live rendering preference, writes invalid `config.toml`, and verifies that loading a new thread's configuration preserves the live local settings.

GitOrigin-RevId: 4ac3c70de6d627e1609cc0a5d4ba5df5a61a8b20
2026-10-06 23:19:16 +00:00
Eric Traut 7298a6e020 Add shared task pinning to the agent command center (#51500)
## What changed

- Use `p` to pin or unpin the selected task, with a configurable `agents.toggle_pin` binding.
- Display pinned tasks first in a `Pinned` group, preserving shared section order and applying search and status filters.
- Load pins from the shared thread section, including tasks outside the recent-task window, and refresh after pin changes. Disable pinning when the server does not support shared sections.

## Testing

Add coverage for shared pin/unpin state, paginated pin discovery and refreshing pins on reopen, shortcut dispatch and duplicate-action suppression, and pinned-group and custom-help snapshots.

GitOrigin-RevId: d1a2cab6642d059c3c8df8480b5c59a10c493936
2026-10-06 23:04:26 +00:00
Adam Perry @ OpenAI c9870d0157 Use PathUri for skill identity and path matching (#51482)
## Why

Skill selection and disabled-path matching need to recognize equivalent Windows paths across case and separator differences while preserving literal spaces, `%`, and `#` in native filenames.

## What changed

- Carry `PathUri` through skill metadata, discovery mappings, filesystem lookups, disabled-path sets, and invocation analytics.
- Match linked skill mentions and TUI selections by parsed path identity.
- Use `LegacyAppPathString` for app-server skill paths and regenerate schemas and SDK types, preserving native path strings on the wire.
- Preserve native catalog display paths and ordering. Keep host filesystem probes and configuration writes restricted to host-compatible paths.

## Testing

Add regression tests for Windows path identity and disabled-skill matching, literal filename characters, catalog resource reads, native path ordering, and foreign-path analytics normalization.

GitOrigin-RevId: c212916dc9fef0e7616542726e107f0d6a313267
2026-10-06 21:29:35 +00:00
Charlie Marsh 0b863c69f5 Preserve URL destinations in wrapped hook details (#51473)
## Why

The hooks browser rendered detail URLs as plain text. Long URLs in hook commands can wrap or be truncated, so their visible text may omit part of the destination.

## What changed

Render web URLs in hook details as terminal hyperlinks, preserving the complete destination across wrapped lines and truncated text. Keep truncation ellipses outside the links.

## Testing

Add a regression test and snapshot for a wrapped, truncated hook command URL, checking that linked cells retain the complete destination and the ellipsis remains unlinked.

GitOrigin-RevId: 488562266bd5ef880c03bf313bc4cfa7d3104c7b
2026-10-06 19:52:29 +00:00
Charlie Marsh b0a5191bd6 Preserve clickable URLs in TUI selection rows (#51472)
## What changed

Render web URLs in selection labels and descriptions as terminal hyperlinks, preserving their complete destinations when text wraps or is truncated. Carry hyperlink ranges through two-column layouts and keep truncation ellipses outside links.

## Testing

Add regression assertions and a snapshot covering wrapped and single-line rows, prefixed labels, descriptions, and wide Unicode characters. Verify that visible URL fragments retain complete destinations and ellipses are not linked.

GitOrigin-RevId: 9d50b3ced79cbd29200e48a676445ec169d60758
2026-10-06 19:52:03 +00:00
Charlie Marsh 4854cfa643 Preserve clickable URLs in pending input previews (#51471)
## What changed

Render web URLs in pending steers, rejected steers, and queued follow-up messages as terminal hyperlinks. Preserve the complete destination when the visible URL is clipped to the preview width.

Add `HyperlinkRows` to render already-wrapped rows without changing their spacing or row count, clipping text and hyperlink ranges to the viewport.

## Testing

Add regression coverage for complete URL destinations across all three preview sections, plus snapshots for oversized URLs and clipping overflow text and the edit hint in a narrow preview.

GitOrigin-RevId: 959df27bba381b1b3895f5a86cc2ecb1419806b1
2026-10-06 19:51:39 +00:00
Steve Coffey b0a6b8d86f Record resolved model and reasoning effort in sub-agent activity (#51463)
## What changed

Add `model` and `reasoningEffort` to `subAgentActivity` items for multi-agent v2 spawns. Capture startup settings before the child begins its turn and resolve the reported effort against model metadata, including model defaults, while preserving the child's configured effort.

Carry these fields through live notifications, persisted activity, thread history, and legacy rollout migration. Update the JSON schemas and generated TypeScript and Python types. Older records and other activity kinds retain null values.

## Testing

Add coverage for resolved spawn settings matching the child's request across legacy and paginated history, preserving configured effort, forwarding metadata through events and history, and reading and migrating older records without the new fields.

GitOrigin-RevId: a9e4241ae21bb8db1ead293f78ffba8257cca0ae
2026-10-06 19:29:40 +00:00
Charlie Marsh 414d165b47 Preserve wrapped help links in Windows sandbox prompts (#51459)
## What changed

Render help text in Windows sandbox setup and fallback prompts with `HyperlinkText` so each wrapped URL fragment links to the complete destination. Strip OSC 8 sequences when rendering popup snapshots to keep assertions focused on visible text.

## Testing

Add a regression test covering both prompts at 40 columns, asserting that every linked cell retains the complete destination and the visible link text remains intact. Include a snapshot of the wrapped setup prompt.

GitOrigin-RevId: 98bd60f04ab3ec8d6552a0b74b9637cce26169d5
2026-10-06 19:12:40 +00:00
Charlie Marsh 858aea3449 Make URLs clickable in user verification prompts (#51458)
## What changed

Render user verification titles and request details with `HyperlinkText` so URLs carry terminal hyperlinks, including in the waiting-for-verification view.

## Testing

Extend the narrow-prompt regression test to verify that wrapped URLs retain their full hyperlink targets before and during verification. Strip OSC 8 annotations when comparing visible text in snapshots.

GitOrigin-RevId: 9b2fba963c028eaa2b177220b0487364b44d04bb
2026-10-06 19:12:16 +00:00
Charlie Marsh e44b9bb3da Preserve status usage hyperlinks when the URL wraps (#51457)
## Why

The ChatGPT usage URL in the status card loses its terminal hyperlink when it wraps across lines in a narrow terminal.

## What changed

Attach the usage URL destination to each underlined span so every wrapped fragment remains clickable.

## Testing

Extend status hyperlink coverage at widths of 24, 42, and 120 columns to verify that linked fragments reconstruct the full URL and all point to the same destination.

GitOrigin-RevId: 516421380763f48da8af63b4d374e2b352722ddb
2026-10-06 19:10:59 +00:00
Charlie Marsh 4b5c111349 Make banner URLs clickable across wrapped lines (#51452)
## What changed

Render URLs in TUI banner titles and descriptions as terminal hyperlinks, preserving the full destination when a URL wraps across lines.

## Testing

Add a regression test that checks hyperlink destinations for a wrapped URL and snapshots the visible banner layout.

GitOrigin-RevId: 1b1957570c1c0940a60f5a202648b0eeed5b95e1
2026-10-06 18:52:05 +00:00
Charlie Marsh 5da229e54d Make URLs in the TUI warnings viewer clickable (#51451)
## What changed

Render web URLs in warning details as terminal hyperlinks, preserving the full destination when a URL wraps across lines or the viewer scrolls.

## Testing

Add a regression test for hyperlink destinations after wrapping and scrolling, plus a snapshot of a warning containing a wrapped URL.

GitOrigin-RevId: 6500e6129a95b2dea8e8f53296ca056e63196a57
2026-10-06 18:51:41 +00:00
Charlie Marsh eb2a33aa18 Make URLs clickable in MCP elicitation prompts (#51450)
## What changed

Render web URLs in TUI MCP elicitation prompts as terminal hyperlinks. Preserve the full destination when a URL wraps across lines, while retaining the existing styling for answered and unanswered prompts.

## Testing

Add a regression test that verifies each linked cell of a wrapped URL targets the complete URL, including its query string, and a snapshot of the rendered form.

GitOrigin-RevId: 74baabbee6b72b695e1534d694296a3352f7e47d
2026-10-06 18:51:15 +00:00
Charlie Marsh 44fe0289c6 Make URLs clickable in TUI user input questions (#51449)
## What changed

Render web URLs in `request_user_input` question text as terminal hyperlinks. Preserve the complete destination when a URL wraps across rows, along with explicit newlines and blank lines in the question.

## Testing

Add a regression test that checks each linked fragment retains the complete URL, including its query string, and snapshots the wrapped question layout.

GitOrigin-RevId: 473c8a8a00797c0b353a9cdb762dea2c718d9190
2026-10-06 18:47:46 +00:00
Charlie Marsh bc3ebcb77d Preserve clickable URLs in TUI approval headers (#51439)
## What changed

Render command, permission, patch, and MCP elicitation approval headers with `HyperlinkText`, which annotates web URLs and preserves their full destinations across wrapping and clipping.

## Testing

Add a regression test covering wrapped URL destinations in all four header types, plus a snapshot of the wrapped command approval header.

GitOrigin-RevId: 7f6b79484c9297cd03514da2d6805b0d239fee63
2026-10-06 18:16:18 +00:00
Abhinav 8e23d1836f Show hook status messages as titles in the hooks browser (#51433)
## What changed

Replace generic `Hook 1` labels with trimmed `status_message` titles, falling back to `Unnamed hook` when the message is missing or blank. Show aligned, dimmed row numbers alongside the titles and retain trust-status suffixes.

Render rows with `Paragraph` to preserve full-row selection styling and per-span dimming, including titles containing wide characters and emoji.

## Testing

Add snapshot and buffer assertions for title trimming, blank and missing messages, wide characters, selection styling, and dimmed indices. Update snapshots for long-title truncation and scrolling across two-digit row numbers.

GitOrigin-RevId: a9b20ea91e7252b6399d1c8a9fa849186f16a651
2026-10-06 17:52:52 +00:00
Eddie Chen cfc946f4e1 Expose and persist turn lineage across the app server (#51415)
## Why

Clients starting delegated work need to attribute descendant turns to the original turn and retain that attribution through completion and history reads.

## What changed

- Accept optional `parentTurnId` and `rootTurnId` in `turn/start`, and expose `rootTurnId` on returned turns and lifecycle notifications.
- Default new turns to their own root when none is supplied. Preserve the active turn's root when steering, ignoring incoming lineage fields.
- Carry root IDs through completion, interruption, recovery, and fork boundaries, and persist them for paginated history reads. Leave unknown roots null in older history.
- Update protocol schemas and generated TypeScript and Python bindings.

## Testing

Extend coverage for default and explicit roots, steering without changing lineage, interrupted and recovered turns, history reads after restart in both history modes, nested fork pagination, and compatibility with older database writers.

GitOrigin-RevId: f1a570a12bd11742929fd2e8b017e5d35aa07dcb
2026-10-06 16:56:39 +00:00
Eric Traut ff9ab4aed9 Suppress repeated image paste presses in legacy terminals (#51411)
## Why

Legacy terminals report key auto-repeat as new presses, which can trigger repeated image pastes when presses accumulate during a slow paste.

## What changed

Suppress repeated `Ctrl+V` and `Alt+V` image paste presses within a sliding 250 ms window, refreshed after each suppressed press and after a paste completes. Clear suppression on other ordinary key presses or key release events so a fresh paste can proceed immediately.

## Testing

Add regression coverage for repeated presses, window expiry, and resetting suppression on another key press or a key release. Update the shortcut remapping test to release the key between image pastes.

GitOrigin-RevId: 45abc056e5bda47d1c9704702e369e63dcce29db
2026-10-06 16:41:53 +00:00
Eddie Chen 551bd409eb Preserve turn attribution across recovery and compaction (#51402)
## Why

Recovering an interrupted turn replaced its original trigger with `retry` and restored only its root lineage from model context. Turns suspended before that context was written could lose their attribution entirely.

## What changed

- Persist regular-turn attribution in `TurnStartedEvent` and compaction resume metadata, including the trigger, parent and root turn IDs, and initiating agent path.
- Restore matching attribution during recovery, keep unknown triggers absent, and retain the model-context root fallback for older records.
- Reconstruct attribution from surviving turns across rollback and late completion or abort events, and clear inherited attribution when spawning a forked agent.

## Testing

Add coverage for repeated cold recovery, suspension before context persistence, legacy rollouts, fresh attribution on subsequent turns, compaction checkpoints, rollback, and late terminal events.

GitOrigin-RevId: 85b5763e8fbd48a1ea2c07cfda8196e63c2cd33a
2026-10-06 15:50:27 +00:00
Charlie Marsh 594283af5c Make URLs in asynchronous question titles clickable (#51391)
## What changed

Render web URLs in TUI asynchronous question titles as terminal hyperlinks, preserving the full destination when a URL wraps across lines or is partially clipped. Exclude trailing question punctuation such as `)?` from detected URLs while preserving balanced parentheses and query strings.

## Testing

Add a rendering regression test and snapshot for a wrapped URL, checking complete hyperlink destinations at full and reduced heights. Extend URL detection tests for trailing question punctuation and balanced parentheses in query strings.

GitOrigin-RevId: 6c9a807466d7b7e3a23bc6e86aae8410ae378161
2026-10-06 15:13:05 +00:00
dpatel-oai 7ac954ea24 Enforce Fast and Ultra Fast policies independently (#51253)
## Why

Fast mode previously gated both Fast and Ultra Fast, preventing policies from allowing one while disabling the other.

## What changed

- Add the default-enabled `features.ultrafast_mode` flag and enforce it independently of `features.fast_mode` in service-tier selection, requests, and agent prewarming.
- Filter TUI service-tier commands and selections by the corresponding policy and model catalog support.
- Report `supportsIndependentSpeedModes: true` from `configRequirements/read` and update the protocol schemas and generated bindings. Retain the shared Fast gate when connecting to older servers that omit this capability.
- Preserve legacy cloud speed denials by translating `rbac-fast-mode` fragments with `fast_mode = false` into a denial of both modes, while retaining higher-priority enterprise overrides.

## Testing

Add coverage for all four Fast/Ultra Fast policy combinations in requirements responses and request routing, agent prewarm inheritance, TUI command visibility and saved selections, and legacy cloud denial normalization and override precedence.

GitOrigin-RevId: 147e08524c4b228ea9d46b25a9f8aa64c359e169
2026-10-06 03:35:55 +00:00
rb-oai 8b6bb1c77d Add a partial answer message phase (#51241)
## Why

Assistant answer text may be followed by more output or tools. A distinct `partial_answer` phase lets callers represent this separately from commentary and a terminal `final_answer`.

## What changed

- Add `MessagePhase::PartialAnswer` and expose `partial_answer` in the app-server schemas and generated TypeScript and Python types.
- Keep the TUI working indicator visible after partial answers and exclude them from the thread history's final-answer summary field.
- Route partial answers to the speakable channel in realtime V3 BEM-tag mode.

## Testing

Add coverage for phase preservation through serialization, input-message conversion, and SSE item start/completion events. Extend TUI snapshot coverage to verify that partial answers keep the working indicator visible while final answers hide it.

GitOrigin-RevId: 1ae3ad9264b6e36ae1cbe6b93df3d345ab4460e6
2026-10-06 02:57:15 +00:00
Eric Traut 2f412e60d7 Remove default model labels from TUI model pickers (#51235)
## What changed

Remove `SelectionItem::is_default` and stop appending `(default)` to model picker entries. Keep the `(current)` marker and explicitly label the workspace owner notification prompt's negative option as `No (default)`.

## Testing

Update the model selection popup snapshot to reflect the removed label and adjusted column spacing.

GitOrigin-RevId: 1f8b85f896541ef7354d5979b4244d7df4b867d6
2026-10-06 02:49:06 +00:00
Eric Traut 80e0b51c9e Make session lookup pagination stable and report listing failures (#51230)
## Why

Session activity can move unread threads ahead of a pagination cursor, and timestamp-only cursors can skip threads with equal creation times. Either can prevent a session label lookup from detecting duplicate labels. Database failures must also remain distinguishable from an exhausted listing.

## What changed

- Resolve session labels using database-only listings ordered by `CreatedAt`, with thread IDs breaking timestamp ties. Accept unique matches across pages with valid timestamp-and-ID cursors, while retaining ambiguity errors for older cursors that cannot establish uniqueness.
- Preserve timestamp index ranges for database continuation queries and timestamp-only cursors for listings that may fall back to the filesystem.
- Propagate database-only listing and name-resolution failures. Keep best-effort name enrichment for ordinary listings and retry latest-session lookup with scan-and-repair after a database-only error.
- Keep loaded sessions selectable in the resume and fork pickers when a later page fails, stop further pagination, and display `Could not load more sessions`.

## Testing

Add regression coverage for creation-time continuation after session activity, cursor query plans, filesystem fallback, database and name-query errors, cross-page label uniqueness, older server cursors, and selection after picker pagination failures.

GitOrigin-RevId: 264ab2e69b8ad12d9edaa31fd253cb9805a46a90
2026-10-06 02:14:22 +00:00
rhan-oai d63a9b8344 Remove legacy personality template metadata (#51223)
## What changed

- Remove `instructions_variables`, its protocol type, and unused personality templates. Continue accepting older catalogs by ignoring their legacy variables.
- Report `supports_personality` as `false` in app-server model listings and TUI model presets.
- Preserve pinned model metadata and base instructions when only personality settings change. Reuse Guardian review sessions across friendly and pragmatic settings, while keeping the `none` opt-out distinct.

## Testing

Update coverage for legacy catalog deserialization, personality override notifications, opt-out behavior during model switches, and preservation of instructions and history on resume.

GitOrigin-RevId: bee8a263ef84046301888d02347f43929ececce9
2026-10-06 01:46:33 +00:00