Commit Graph
2597 Commits
Author SHA1 Message Date
Eric Traut ac192cd793 Allow guarded legacy resume with background migration enabled (#43178)
## Why

Enabling background rollout migration disabled the TUI's cached legacy resume shortcut, even when the rollout maintenance lock could prevent migration during resume.

## What changed

Allow embedded sessions to use the shortcut regardless of migration feature settings when they acquire the maintenance lock and revalidate that the thread still uses legacy history. Hold the lock through `thread/resume` so the response can safely include turns. Remove the session's cached startup migration setting.

## Testing

Update the regression test to cover all four combinations of startup and workspace migration settings, checking lock acquisition before metadata revalidation, a two-request resume, and nonempty history.

GitOrigin-RevId: cf525a6edb813050469dff39b83e5e61214485a1
2026-09-06 07:42:32 +00:00
Eric Traut 9587c9ef36 Use server model defaults for fresh TUI startup (#43177)
## Why

Fresh startup could use saved client model and reasoning settings that differ from the app server's effective configuration. A cleared server model could also leave startup using a stale client model from bootstrap.

## What changed

- Reuse the new-session defaults reader at startup to load `model` and `model_reasoning_effort` through `config/read` before `thread/start`, using the appropriate embedded or remote working directory.
- Preserve explicit CLI and selected-profile settings, then apply managed new-thread defaults with the existing precedence rules.
- When the server has no configured model, select the startup model from its model catalog, falling back to the bootstrap default if the catalog is empty.
- Fall back to local defaults when older servers do not support `config/read`; stop startup before thread creation on other read failures.

## Testing

Add request-level tests for defaults and override precedence, working-directory selection, cleared-model fallback, request ordering, unsupported servers, and read failures.

GitOrigin-RevId: e094ba5d5501fdb34c393a0117b34dd93d8d4f2b
2026-09-06 07:31:40 +00:00
Benjamin Carlsson f6976ab036 Add managed worktree creation to TUI session commands (#43120)
## What changed

- Add `/worktree` to start a fresh conversation or fork the current conversation into a new managed checkout.
- Offer current-checkout and new-worktree choices for `/new` and `/fork`, preserving optional conversation names. Enable these choices for local Git repositories when the `worktrees` feature is enabled.
- Load destination configuration, bind the checkout to the replacement thread, and inherit conversation history only when forking.
- Reject creation from explicitly untrusted sources and require an idle primary session without queued input. Refuse forks when developer instructions differ, with guidance for removing the unused checkout.

## Testing

Add picker snapshots and tests for command availability, named selections, fresh versus forked history, destination configuration, worktree ownership, and feature and trust checks.

GitOrigin-RevId: d6c83e00217660aacf2a6d92acad50b506607e0b
2026-09-05 22:53:48 +00:00
Eric Traut fc748ab8d5 Save subagent and memory opt-ins through the app server (#43113)
## What changed

Route the TUI's subagent and memory enable prompts through server config writes for new threads, leaving the current thread unchanged. Report success, configuration overrides, or failures after the write completes, and clarify the scope in the prompts.

Write both `features.memories` and the legacy `features.memory_tool` key for compatibility with older app servers.

## Testing

Extend tests to cover writes to the selected server config, preservation of current settings, legacy memory key updates, and managed configuration overrides. Update prompt snapshots and verify that confirmation emits the new save event.

GitOrigin-RevId: ec331db675b38102851899a4aa878d6fe8e9606e
2026-09-05 22:16:26 +00:00
Benjamin Carlsson 64e9a68987 Add a helper-backed realtime WebRTC session API (#43097)
## What changed

- Add `RealtimeWebrtcSession` and cloneable handles for startup, answer negotiation, audio controls, level meters, and error reporting.
- Open devices after answer negotiation and apply the latest controls before enabling audio. Preserve subsequent control transitions in order and close the session if the command queue fills.
- Cancel pending work on explicit close, external cancellation, or final handle drop, with a shared runtime keeping helper reaping alive.
- Add audio-state polling to consume microphone and speaker peaks and detect helper, device, or connection failures.
- Check packaged helper/runtime availability and initialize build information in the standalone TUI for the helper handshake.

## Testing

Add unit and helper-process integration tests covering startup control ordering, queue overflow, cancellation, helper reaping and loss, package availability, SDP debug redaction, and peak accumulation, clamping, and consumption.

GitOrigin-RevId: 458cd80353697f7411cee785f380d1d53aef8416
2026-09-05 20:39:46 +00:00
Eric Traut 51c97f3a67 Show a retryable error when the apps popup fails to load (#43074)
## Why

An initial `/apps` request failure with no cached or partial app list left the popup showing “Loading apps...”.

## What changed

Replace the loading popup with a generic failure message and a `Retry` action. Retrying forces a refresh and restores the loading state while the request runs.

## Testing

Add a regression test and snapshot covering the error display, omission of raw request errors, and retry transition back to loading.

GitOrigin-RevId: 9b1974dbc5065a6d3695d881f216f8060d4381a9
2026-09-05 18:38:41 +00:00
Benjamin Carlsson 3525845978 Support managed worktrees for interactive sessions and forks (#43069)
## Why

`--worktree` previously supported only `codex exec` and `codex exec fork`. Interactive sessions need the same managed checkout support, with configuration and policy resolved for the destination before starting a turn.

## What changed

- Enable `codex --worktree` and `codex fork --worktree <session-id>` behind the `worktrees` feature, restricted to local sessions. Interactive forks require an explicit session selector.
- Resolve interactive and exec worktree forks from the session's latest saved working directory unless `--cd` is supplied. Keep relative `--add-dir` paths anchored to the invocation directory.
- Load interactive destination configuration before telemetry and login policy initialization, and bind checkout ownership before the first turn.
- Reject explicitly untrusted sources, including when destination cloud policy or refreshed configuration reveals distrust. Retain unbound interactive checkouts after startup failure and report manual recovery instructions.

## Testing

Add CLI integration and TUI tests for startup and named forks, destination instructions and configuration, ownership before the first request, trust enforcement, and retained-checkout recovery. Extend exec coverage for saved fork directories, explicit `--cd`, relative writable roots, and cloud policy rejection.

GitOrigin-RevId: 371583f7feca73b218a4ff188b2b85812c8439e6
2026-09-05 18:06:26 +00:00
Benjamin Carlsson 52e73e3a54 Allow /copy to copy status output and individual fields (#43055)
## Why

`/copy` only offered the last assistant response and its code blocks or quotes, leaving `/status` output unavailable in the copy picker.

## What changed

After `/status`, offer the whole status as plain text, the model, the full directory path, and the thread name and session ID when present. Preserve the displayed status fields across repeated copies and include refreshed rate limits in whole-status copies.

Return to assistant-response copying after a later user message, assistant response, or command other than `/copy`. Rename the picker to “Copy to clipboard”.

## Testing

Add snapshots and regression tests covering status text and field selection, missing fields, full directory paths, repeated copying, refreshed limits, and returning to response copying after subsequent turns and commands, including queued commands.

GitOrigin-RevId: 9424cdca9753c834971992ca29494161957b50c4
2026-09-05 16:43:40 +00:00
Eric Traut 89208f09f8 Avoid filesystem scans when seeding the agents overview (#43043)
## Why

Seeding recent history for the agents overview should not trigger a startup filesystem scan for unindexed rollouts.

## What changed

Set `use_state_db_only` to `true` on the overview's initial recent-thread list requests so they use only the state database.

## Testing

Extend the shared overview regression test with a newer, unindexed rollout and verify that the overview still contains the expected indexed history and loaded threads.

GitOrigin-RevId: b20861bef5b49fa2aa2a3b0953f069528b6f0c4f
2026-09-05 15:54:44 +00:00
Ian MacLeod be2684ede0 Preserve TUI question state and integrate history and queue navigation (#42903)
## What changed

- Retain question drafts, selections, expanded state, and handled message IDs across thread input restoration and reconnects. Preserve buffered live questions during session refresh without replaying their message text.
- Enable history recall and search in question answers, honoring updated key bindings and stripping image attachments and placeholders from recalled entries. Preserve Vim mode when an answer is not accepted.
- Let forward navigation past the last question restore the latest queued message as an editable main composer draft. Keep working status and queued messages visible alongside questions.
- Show a countdown for newly arrived collapsed questions and clear it when the question editor is opened or used.
- Disable question submission and skipping while the thread is unavailable.

## Testing

Add regression tests and snapshots for draft restoration and replay deduplication, history search and key bindings, queued-message editing, countdown rendering, and question layout with working status.

GitOrigin-RevId: de016120a979db860fd0d4b8098b322b312b7d84
2026-09-05 01:13:54 +00:00
Ian MacLeod c126b0d8ef Add inline Other answers to async question choices (#42897)
## Why

Async questions with suggested choices only accepted those choices. Allow users to write an alternative answer directly in the question pane.

## What changed

- Append an editable Other choice. Typing or pasting opens it, while number shortcuts still submit named choices.
- Preserve custom drafts when switching choices, reject blank Other submissions, and distinguish the input from a suggested choice named Other.
- Support Vim editing and search in question inputs while keeping arrow keys available for choice navigation.
- Wrap custom answers inline, cap the editor height, and keep the input visible in narrow layouts.

## Testing

Add interaction tests and snapshots covering custom answer delivery, draft preservation, selector key repeats, blank answers, remapped shortcuts, Vim editing and search, and narrow or wrapped layouts.

GitOrigin-RevId: 0e9aa9fcd2410e8da25f5ca43bdef94cbb9253b8
2026-09-05 00:49:07 +00:00
Ian MacLeod 07f18d5ff7 Support selectable answers for asynchronous TUI questions (#42894)
## Why

Asynchronous questions can include suggested answers, but the TUI previously displayed only a freeform input. Show those choices and require them to be fully visible before submission.

## What changed

- Render numbered, wrapped choices with a default selection, list navigation, and digit shortcuts. Submit the selected label as the answer.
- Block submission of clipped choices and prompt the user to expand the terminal. Limit option processing to the first 32 entries and discard labels over 512 bytes.
- Preserve freeform input when no usable choices remain, and add contextual submit, skip, and question navigation hints.
- Ignore repeated submit keys so holding a key cannot answer another question.

## Testing

Add state, snapshot, and chat widget tests covering wrapped and clipped choices, constrained layouts, option limits, long answer preservation, oversized answer rejection, key repeats, and conflicting keybindings.

GitOrigin-RevId: 5d3ebadf61da62a9680ba819e6dfcf8302c4e9da
2026-09-05 00:36:20 +00:00
Ian MacLeod 218e8df926 Integrate asynchronous questions into the TUI (#42891)
## What changed

- Display questions from live agent messages with a collapsed question count and an expandable answer editor.
- Support navigating, answering, queueing, and skipping questions while preserving the main composer draft. Expose question navigation and skip actions in the keymap picker.
- Route answers through existing input delivery and consume them only after an accepted send or queue operation. Keep questions editable while disconnected, with delivery and skipping disabled.

## Testing

Add tests for answer delivery, queued answers, retained drafts, disconnected editing, Vim undo, buffered input, constrained layouts, and question shortcut descriptions.

GitOrigin-RevId: 084b54dceb8c0100aefbf9f0b7897bf8d26eac47
2026-09-05 00:15:42 +00:00
Ian MacLeod 6ae8dcf6e1 Add TUI building blocks for inline async question editing (#42889)
## What changed

- Introduce an async-question editor component with per-question drafts, navigation, replay deduplication, and submit or queue handling using the shared composer.
- Add bounded `AnsweredQuestion` framing that truncates question text at a UTF-8 boundary and flattens line breaks before prepending it to an answer.
- Add `prompt_stack_back` and `skip_question` keybinding actions and the `tui.question_esc_back` setting. Normalize `Ctrl+]` and `Ctrl+5` for key matching and conflict detection, and let default question shortcuts yield to explicit bindings.
- Flush buffered typing in both the main composer and the covering view so background input cannot keep the draw loop waiting.

The async-question component is not yet connected to the TUI event flow.

## Testing

Add regression coverage for bounded Unicode question framing, question-shortcut conflicts, and paste-buffer flushing in background and covering editors.

GitOrigin-RevId: 4098043cf588ddafc05c27505645495edd690cb9
2026-09-04 23:56:25 +00:00
rhan-oai a97cf1b72e List GPT-6-Astra in the model picker (#42879)
## What changed

Set GPT-6-Astra's bundled model visibility to `list` so it appears first in the interactive model picker, and update the picker snapshot for the new entry and numbering.

GitOrigin-RevId: 1bbbb7cb932b53d121a2d3246343c06e120da2f7
2026-09-04 22:47:01 +00:00
faizan-oai 3921a30d6b Persist Daybreak preferences in thread metadata (#42854)
## Why

Clients need a per-thread Daybreak toggle that survives restarts and can be
restored on resume without changing the access program of an active or future
turn.

## What changed

- Add experimental `daybreakEnabled` support to `thread/metadata/update` and
  expose the saved value on thread responses.
- Store the preference in SQLite, including for threads without a first turn,
  and preserve it through reads, resumes, reconciliation, and restarts.
- Copy the preference when forking a thread while keeping subsequent updates
  independent.
- Keep `daybreakEnabled` separate from the per-turn `cyberAccessProgram` field;
  app-server does not derive one from the other.

## Testing

- Cover persistence across restarts, cold reads, reconciliation, and forks.
- Verify metadata updates do not alter the access program of active or later
  turns.

GitOrigin-RevId: bcf987a9fcd7b0ac8a88b1c8f0df06b33ed8ad6e
2026-09-04 21:17:25 +00:00
Felipe Coury 7a8092a447 Preserve Markdown formatting when copying TUI responses (#42847)
## What changed

- Add rendered HTML alongside the original Markdown when copying a whole response through the native clipboard, so rich-text destinations preserve headings, lists, tables, code, and other formatting.
- Keep code-block, blockquote, transcript, terminal, and WSL clipboard copies as plain text.
- Escape raw HTML, omit remote image sources, and render unsupported link destinations as visible text when producing clipboard HTML.

## Testing

- Add coverage for rich formatting, local and unsafe links, inert images, fenced tables, copy selection formats, and clipboard fallbacks.

GitOrigin-RevId: c6f5edd88b65f9e9b1ddc5618442868cf47ee560
2026-09-04 20:38:08 +00:00
Ian MacLeod 147137c1f4 Add Astra sparkle effects to the TUI composer (#42842)
## What changed

- Render sparse, fading stars across the composer when using an Astra model in a true-color terminal.
- Preserve composer content, cursor state, effort effects, and terminal colors, and pause the animation while popups are open.
- Add the default-on `tui.whimsy` setting so decorative effects can be disabled independently. Sparkles also respect `tui.animations`.

## Testing

- Cover model and setting eligibility, terminal color handling, protected composer cells, popup behavior, effort effects, and layout stability.

GitOrigin-RevId: fe0471ebef0bca21c44e1d8f731d46959eba0165
2026-09-04 20:18:13 +00:00
iceweasel-oai 773f0b081d Preserve executor paths in Guardian approval reviews (#42838)
## Why

Guardian approval actions can contain paths from a remote executor whose path convention differs from the host, such as Windows paths reviewed on a POSIX host. Converting those paths to host-native absolute paths prevents the action from being reviewed.

## What changed

- Render command working directories using the executor's reported path convention, and preserve URI-backed paths for attribution.
- Carry foreign command and patch paths through Guardian events and app-server schemas as legacy path strings.
- Bound remote plugin attribution within the overall review deadline and reject Guardian action payloads that exceed the review byte limit.

## Testing

- Cover Windows and POSIX executor path rendering, foreign patch paths, protocol round trips, oversized payload rejection, and remote Guardian review context.

GitOrigin-RevId: 38be0fcdac897139519e74e077eb5cb4f8f8017e
2026-09-04 19:56:31 +00:00
Eric Traut 80ab0ffafe Add data-use disclosures to the user report dialog (#42798)
## What changed

- Show audience-specific data-use disclosure copy and links before report submission.
- Keep the note editor and submit/cancel controls visible in short panes while allowing the disclosure to scroll with `PageUp` and `PageDown`.
- Clarify the employee completion message with its report ID and link.

## Testing

- Add snapshot coverage for both audiences, narrow widths, short panes, and four-row panes.
- Cover submit and cancel behavior in the report note view.

GitOrigin-RevId: c025bcfbbd39e462685b211ef9392664e7de4f71
2026-09-04 16:39:46 +00:00
Eric Traut 47b0f7d540 Extract the note input view into its own module (#42792)
## What changed

Move the optional note input and its focused tests out of the broader submission
module. Update the bottom-pane export and snapshot metadata to match the new
module layout without changing submission behavior.

GitOrigin-RevId: 383ad052b47571f8a46e1aa6182261c370008be0
2026-09-04 16:08:14 +00:00
Eric Traut a07158c784 Keep TUI prompt history tied to local settings (#42791)
## Why

Prompt history is client-owned state, but app-server thread lifecycle responses derived its metadata from the active server configuration. When server and local settings differ, the TUI can advertise metadata for the wrong history log.

## What changed

- Pass `LocalSettings` through thread start, resume, and fork response handling.
- Build message-history metadata from the local Codex home and history preferences while continuing to use the thread configuration for server-owned session fields.

## Testing

- Cover local history metadata across embedded and remote start, resume, and fork flows with deliberately different server settings.
- Verify single-entry and batched history lookups return entries from the local prompt history.

GitOrigin-RevId: 8b47230a4e9f2d342b8d79fd575d474c9062b05e
2026-09-04 15:58:02 +00:00
Felipe Coury a1294e57f1 Improve automatic thread naming in the TUI (#42749)
## Why

Automatic title generation used a provisional thread name and only applied the
generated result while its thread remained active. Switching threads could
therefore leave the originating thread without its generated name.

## What changed

- Track title-generation requests by thread so results are persisted for the
  originating thread, while preserving any name set before generation finishes.
- Show a `renaming...` spinner instead of a provisional name, including across
  thread switches and failure paths.
- Add `thread-name` items to the status line and terminal title, and include the
  generated thread name in both default layouts.

## Testing

- Cover automatic naming, manual-name precedence, thread switching, failed
  requests, deduplication, and status-surface rendering and animation.

GitOrigin-RevId: a03ae4849bedec9f62f256fadad72c1685ce46e0
2026-09-04 12:20:57 +00:00
jif 9d253c885c Make the TUI symlink startup test Bazel-compatible (#42741)
## Why

The macOS startup symlink test applies its own Seatbelt policy, which cannot
run inside Bazel's sandbox.

## What changed

- Tag the TUI Bazel tests with `no-sandbox` so the startup test can install
  its policy.
- Verify that the mocked write tool reports a successful exit before checking
  the file written through the symlink.

GitOrigin-RevId: c12eb00f995985fccc053765399fbb0eb7ce70d9
2026-09-04 11:43:37 +00:00
jif d13aeb77ea Allow trusted symlinks beneath CODEX_HOME on macOS (#42716)
## What changed

- Add the macOS-only `allow_symlinked_codex_home` user setting. When enabled in the execution host's `$CODEX_HOME/config.toml`, writable roots at or beneath that home may traverse symlinks.
- Keep the exception disabled by default and prevent project config, command-line overrides, and ignored user config from enabling it. Other writable roots remain subject to symlink checks.
- Propagate the resolved setting through local, interactive, and exec-server sandbox paths, including `CODEX_HOME` aliases.
- Explain the opt-out in symlink rejection errors, including that it trusts targets outside `CODEX_HOME` and targets that change between commands.

## Testing

- Add macOS coverage for shell commands, patches, filesystem helpers, process execution, and interactive startup with enabled, disabled, aliased, and out-of-scope homes.

GitOrigin-RevId: 99fcdf611200c9e1b7713cf06f7fdea5bfa7f089
2026-09-04 10:12:03 +00:00
Benjamin Carlsson 8e6a44b428 Fix the worktrees experimental feature test fixture (#42682)
## What changed

Construct the worktrees entry in `experimental_features_popup_snapshot` with
its string feature key and mark it writable, matching the current
`ExperimentalFeatureItem` fields.

GitOrigin-RevId: c12cd3d472504777e77d21a13a276e1d2381e85f
2026-09-04 06:14:15 +00:00
Eric Traut 048a936a23 Persist server-advertised experimental features from the TUI (#42674)
## What changed

- Save writable `/experimental` selections through `config/batchWrite`, including features that are not known to the local client.
- Refresh configured values after writes and surface timeouts, failures, and higher-priority overrides without changing the active task's settings.
- Serialize saves and discovery, let accepted writes finish after the popup closes, and retain uncertain selections for explicit retry.

## Testing

- Cover new server feature keys, server defaults, overrides, write and readback failures, timeouts, selected config profiles, and popup retry behavior.

GitOrigin-RevId: acee4e10cbb8c2fce9211e8fadd3cd67fa0eb1a5
2026-09-04 04:55:40 +00:00
Eric Traut b995d06050 Preserve TUI sessions while starting replacement threads (#42671)
## Why

Starting a replacement thread can fail while reading configuration or calling
`thread/start`. The active thread and any composed input should remain available
when that happens. Remote app servers also need new threads to use their own
effective defaults instead of stale client-side model settings.

## What changed

- Read effective server configuration before starting a replacement thread,
  while preserving explicit model and reasoning-effort launch settings.
- Keep the current thread, configuration, subscriptions, and composer input
  intact until `thread/start` succeeds.
- Fall back to local defaults when an older server does not support
  `config/read`.

## Testing

Added coverage for server and managed defaults, explicit launch overrides,
remote working directories, older servers, and failures during configuration
reads or thread startup.

GitOrigin-RevId: 507a918ea2bf79c9f0adbb189bc611ecf57b757a
2026-09-04 04:45:44 +00:00
Eric Traut ff2f01b0c2 Tailor TUI cyber refusal notices to Daybreak eligibility (#42667)
## What changed

- Prefetch ChatGPT account eligibility in the background and cache it across TUI widget replacements.
- Show an application link when Daybreak is available but not enabled, an Astra-specific explanation for unsupported models, and neutral copy when access is already present or eligibility cannot be determined.
- Refresh eligibility after account changes and reconnects without changing the selected model or delaying refusal handling.

## Testing

- Cover eligibility responses, account changes, model-specific notices, fallback behavior, and rendered notice snapshots.

GitOrigin-RevId: 7ae8613a946cb46b8f0b46bf47e5e15ae258ed86
2026-09-04 03:30:21 +00:00
Adam Perry @ OpenAI a7ab2d66d7 Use a generic fallback model name in status tests (#42657)
GitOrigin-RevId: d6566e2b5f427aeb198bfd326886c0977b545590
2026-09-04 02:24:54 +00:00
Benjamin Carlsson eb5a00b068 Add managed worktrees to codex exec (#42652)
## What changed

- Add the experimental `worktrees` feature and a shared `--worktree` flag for new and forked `codex exec` sessions.
- Create each enabled session in a managed Git worktree, use that checkout as the session working directory, and bind the checkout to the new thread.
- Share the configured worktree pool with Desktop while leaving automatic cleanup disabled for CLI allocations.
- Reject unsupported commands, remote execution, ignored user configuration, ephemeral sessions, and use without the feature enabled before allocating a worktree.

## Testing

- Cover flag placement and inheritance, supported and rejected command combinations, worktree allocation and thread ownership, configuration gating, and compatibility with existing worktree-backed sessions.

GitOrigin-RevId: 011ff4639b09e8992c50d7b823df23e71798670e
2026-09-04 01:56:38 +00:00
Ian MacLeod f46671b14a Render assistant file citations as local links (#42650)
## What changed

- Convert `codex-file-citation` directives in assistant Markdown into local-file links while preserving paths with Markdown-significant characters, Unicode, Windows separators, and location suffixes.
- Apply citation rendering consistently to streaming output, finalized messages and plans, and resume-picker transcript previews.
- Keep directives literal in code, HTML, existing links, reference definitions, escaped text, and generic Markdown rendering.
- Bound repeated parsing work for malformed directive candidates without limiting valid citations.

## Testing

- Add coverage for citation parsing and rendering across finalized, streaming, and resume-preview output, including malformed input and path edge cases.

GitOrigin-RevId: 5a0bfb3fc7ac21b7e8846fd170a349fb2d2d5e85
2026-09-04 01:46:55 +00:00
Felipe Coury 956aa3f637 Restore the inline TUI after full-screen overlays (#42641)
## Why

Leaving an alternate-screen overlay in inline mode could retain stale overlay
cells and leave conversation history scrolled out of view.

## What changed

- Invalidate the restored inline viewport after leaving the alternate screen so
  the next draw repaints it against the main screen.
- Reflow transcript history once when a full-height inline viewport returns to
  the shorter chat layout, including transitions not tracked by the agents
  overview.

## Testing

Added regression coverage for repainting the restored composer and rebuilding
history exactly once after a full-screen overlay closes.

GitOrigin-RevId: c6d63299fd95731603d8b1d7f04afcd4b92c1681
2026-09-04 00:39:56 +00:00
Ian MacLeod 0305dde920 Harden TUI parsing of assistant markup (#42640)
## What changed

- Add a shared parser for assistant directives that handles quoted and unquoted attributes, embedded braces, escaped quotes, and malformed input consistently.
- Use the parser for Git action receipts and code comments, including Git actions that follow a rendered code comment on the same line.
- Parse `file://` links with `PathUri` so Windows drive and UNC paths render correctly regardless of the TUI host while preserving line and column anchors.

## Testing

- Add unit coverage for directive grammar and snapshot coverage for code comments, Git actions, and foreign Windows file links.

GitOrigin-RevId: 8252b3254b92ec6943096026e74c19160c4e24cc
2026-09-04 00:31:51 +00:00
Eric Traut 68e9c4a31a Warn when saved model defaults are overridden (#42639)
## Why

A model-default config write can succeed even when a higher-priority configuration layer overrides the saved value, leaving the TUI's success message misleading.

## What changed

- Show a warning when saved model, reasoning-effort, or service-tier defaults are overridden.
- Preserve the active conversation's explicit selection while reporting the saved default's effective status.

## Testing

- Cover successful, overridden, and rejected writes against the app server's target config profile.

GitOrigin-RevId: 6720d66a58629447b71cd9363c9e08c1c5b9edc1
2026-09-04 00:23:45 +00:00
Celia Chen 1f7b99922a Add GPT-6-Astra to Amazon Bedrock catalogs (#42619)
## What changed

- Add `openai.gpt-6-astra` to the Amazon Bedrock model catalog.
- Include its global and US cross-region variants in the Bedrock Runtime catalog.
- Preserve the bundled model metadata while applying Bedrock-specific capabilities and identifiers.

## Testing

- Cover catalog ordering, metadata, context-window overrides, and runtime routing variants.
- Add TUI snapshots for the Bedrock model and reasoning pickers.

GitOrigin-RevId: 25895174f00b85a738da5bb94ade82feaacb474c
2026-09-03 21:21:09 +00:00
Ian MacLeod 32c303c197 Condense TUI startup warnings (#42609)
## What changed

- Coalesce configuration, skill, sandbox, and MCP startup diagnostics into a single summary below the session header, including MCP and sign-in counts.
- Keep the complete warning text in the transcript and update the summary's transcript shortcut when key bindings change.
- Continue rendering warnings that arrive after work begins as inline history entries.
- Hide the MCP startup status row before a turn while preserving the configured interrupt shortcut.

## Testing

- Add coverage for warning ordering and deduplication, transcript details, MCP sign-in counts, resumed sessions, runtime warnings, reflow, backtracking, and interruption without a visible status row.

GitOrigin-RevId: 009657cf04f1d3a52270cf096eebf9db7513c040
2026-09-03 20:25:59 +00:00
rhan-oai ed391d4dd2 Add GPT-6-Astra to the bundled model catalog (#42607)
## What changed

- Add the hidden `gpt-6-astra` model definition, including its reasoning levels,
  tool capabilities, context limits, agent instructions, and review policies.
- Reorder existing model priorities around the new catalog entry and provide the
  browser-use policy to the bundled auto-review model.
- Keep TUI snapshots pinned to `gpt-5.6-sol` and make Guardian coverage read the
  policy from the model selected by each test case.
- Allow the expanded `models.json` through the repository blob-size check.

GitOrigin-RevId: 039b224b91ca35c8d894cf6d23568bc6dc18ceeb
2026-09-03 20:05:58 +00:00
victor-openai 8f31b64c7f Report MCP tool discovery errors in server status (#42598)
## Why

An empty tool map does not distinguish a successfully returned empty catalog from a server whose startup or tool discovery failed.

## What changed

- Add nullable `toolsError` to each `mcpServerStatus/list` entry when no catalog is available because startup or tool discovery failed.
- Keep `toolsError` null for returned catalogs, including cached and empty catalogs, and continue returning healthy servers when another server fails.
- Update the protocol schemas and generated TypeScript type.

## Testing

- Extend the app-server status integration test with a broken MCP server and verify its error without losing the healthy server's inventory.

GitOrigin-RevId: 30b4ca4d9a45cec6998f5f626d3fddbee90a525d
2026-09-03 18:36:58 +00:00
Benjamin Carlsson 1d6727c0b5 Recover Vim escape input in legacy terminals (#42584)
## Why

Legacy terminals encode `Alt` plus a character the same way as `Esc` followed
by that character. In Vim insert or replace mode, typing a command immediately
after `Esc` could therefore leave the composer in the wrong mode.

## What changed

Recover ambiguous input as separate `Esc` and character events when Vim mode
can consume the escape. Preserve active `Alt` bindings, key chords, image
paste, agent navigation, enhanced-key terminals, and AltGr input.

## Testing

Add coverage for recovered Vim commands and for each shortcut and terminal
case that must retain its existing behavior.

GitOrigin-RevId: 3d8464d805f95f677cce5c46ae00338e611d776a
2026-09-03 17:28:48 +00:00
iceweasel-oai 7a7c188682 Preserve target-native paths in command approvals (#42577)
## What changed

- Pass the selected executor's `PathUri` through user command approval requests instead of converting the working directory to a host-native path.
- Make native-path permission helpers explicitly local and require executor-aware permission transforms to receive a `FileSystemSandboxPolicyContext`.
- Cover approved remote commands to verify that the approval request reports the selected remote working directory and execution resumes after approval.

GitOrigin-RevId: 0aa3042f2d7594af6c7d0abf31d7f99cf67d5556
2026-09-03 16:21:10 +00:00
Can Sar 728cb12fe5 Expose thread originators through the app-server API (#42458)
## What changed

- Add the creation-time `originator` to app-server thread responses and `thread/started` notifications.
- Persist originators in thread metadata and preserve the first recorded value across list, read, resume, rollout, and SQLite paths.
- Add an `originators` allowlist to `thread/list` for hosted backends. The local app-server accepts omitted or empty values but rejects nonempty filters.

## Testing

- Cover originator persistence across server restarts and list, read, and resume requests.
- Verify local `thread/list` handling for nonempty, omitted, null, and empty originator filters.
- Heap-allocate large TUI dispatcher futures in affected tests to keep them within the Windows test-thread stack.

GitOrigin-RevId: 73ad6e61b8fdd2d93a22d1f971723a19ec7be3fc
2026-09-03 06:02:25 +00:00
Eric Traut 8ff74cc9b1 Show live task details in the agent command center (#42455)
## What changed

- Add bounded detail previews for the selected task, including pending approval or user-input requests, live reasoning headings, and the latest agent message.
- Prefer the most urgent child task with useful detail while keeping the task list compact.
- Populate historical last messages from existing thread reads and update live details from already-delivered events without attaching to additional threads.
- Clear stale previews after reverts, event-stream gaps, reconnects, and thread lifecycle changes.

## Testing

- Add coverage and snapshots for attention requests, live activity, historical messages, stale refreshes, and attachment changes.

GitOrigin-RevId: 5de4b8aa3bc5bf9653a40c44b827f7aa85c8cf89
2026-09-03 05:33:57 +00:00
Eric Traut c9fecd3fa0 Discover permission profiles from the app server (#42453)
## Why

The permissions menu needs to reflect the profiles and configuration requirements available in the active app-server scope, including remote workspaces.

## What changed

- Load permission profiles and configuration requirements asynchronously when opening the permissions menu, using the active thread working directory.
- Render loading, retry, empty-catalog, and unsupported-server states, and fall back to the legacy permissions menu when explicit profiles are not configured.
- Disable profiles rejected by server requirements or unavailable in the catalog. Remote custom profiles remain visible but cannot yet be selected.
- Bound pagination and request time, reject malformed catalogs, and ignore responses made stale by account, thread, or modal changes.

## Testing

- Cover local, session-only, remote, legacy, empty, unsupported, pagination, malformed-response, and timeout discovery paths.
- Add TUI tests for loading, failures, retries, empty results, remote catalogs, stale responses, and working-directory changes.

GitOrigin-RevId: 3e2ab53a4eae1179587d064f9a4c605765ea7880
2026-09-03 05:24:31 +00:00
Eric Traut 8b8ee28a9b Acknowledge pending TUI steers by submission ID (#42451)
## Why

Completion receipts for identical user messages could acknowledge the wrong
pending steer. When the receipt arrived while another thread was displayed,
the stale pending state could later be restored and resubmitted.

## What changed

- Assign each TUI submission a client message ID and pass it through turn start
  and steer requests.
- Preserve pending steer IDs across thread input snapshots and match completion
  receipts by ID, while retaining content-based matching for older app servers
  that do not echo IDs.
- Acknowledge matching receipts for inactive threads before their notifications
  can be discarded, including threads stored in the agents overview.

## Testing

Added coverage for identical steer receipts and for switching within and
between tasks before interrupting an active turn.

GitOrigin-RevId: 28bd80a735ff86cd7bf836f24b448e7499f0a902
2026-09-03 05:15:20 +00:00
Eric Traut 498d40b29f Box the TUI resume picker future (#42432)
GitOrigin-RevId: 1b53bc2d7a4015330fb39e29e9092b37153d9fa3
2026-09-03 03:25:26 +00:00
Eric Traut 62f553bfd0 Use the shared composer in the agent command center (#42428)
## What changed

- Replace the command center's single-line new-task input with the shared chat composer, including multiline editing, paste handling, Vim mode, configured keybindings, cursor behavior, and input validation.
- Keep task drafts and editor state across dashboard refreshes and reconnects while separating composer focus from list, search, and rename actions.
- Preserve whitespace in dispatched task prompts, block submission while offline, and restore unsent prompts after dispatch failures when the composer is still available.

## Testing

- Add coverage for focus routing, draft retention, multiline pastes, custom keybindings, Vim mode, offline editing, failed-dispatch recovery, and responsive rendering.

GitOrigin-RevId: a609ae95d497cbae0ebcac4cdcc50fe49d74832a
2026-09-03 03:16:24 +00:00
Eric Traut cac96cd7b1 Discover TUI experimental features from the server (#42425)
## What changed

- Load the `/experimental` catalog from the running server for the active thread, with loading, empty, and failure states in the popup.
- Show beta features in server order and preserve server-reported names, descriptions, and configured values. Mark features as read-only when the local config writer cannot safely update them.
- Persist only changed, writable feature flags. Bound discovery with page-size and page-count limits, repeated-cursor detection, deduplication, cancellation, and a timeout.

## Testing

- Cover paginated discovery, malformed or unresponsive servers, popup cancellation, read-only controls, selective writes, and the new popup states.

GitOrigin-RevId: 1f49eb961c8ab220a466e15f032c1dc61ed86d38
2026-09-03 02:49:36 +00:00
Eric Traut 1d741742c5 Add session resume to the agent command center (#42419)
## What changed

- Add a configurable `agents.resume` action, bound to `Ctrl+O` by default, that opens the session resume picker from the agent command center.
- Preserve command-center state when the picker is cancelled, and preserve per-thread composer and queued-input state when switching sessions.
- Keep resume failures within the command-center flow and wrap footer shortcuts on narrow terminals.

## Testing

- Add coverage for picker cancellation, active-session selection, resume failures, per-thread input restoration, custom keybindings, and narrow footer layout.

GitOrigin-RevId: 59159f838a0c642200cd164e3af45b0971d29bf8
2026-09-03 02:18:43 +00:00
acrognale-oai b27a6321fa Expose managed application network requirements (#42417)
## What changed

- Add `application.network` managed requirements with exact-domain allow/deny
  rules, default-enabled behavior, domain normalization, and normal managed TOML
  precedence.
- Return the policy separately from agent network requirements through the
  experimental `configRequirements/read` API. The endpoint reports the policy
  but does not enforce it.
- Export the new protocol types and schemas, and document the TOML format.

## Testing

- Cover parsing, validation, normalization, layered precedence, and cloud
  requirement composition.
- Verify app-server responses, defaults, separation from agent policy, and
  rejection of invalid domains.

GitOrigin-RevId: 563eeed296d9748430b819797204a44a8db92f3b
2026-09-03 02:09:10 +00:00