## Why
A background command can request approval after its originating turn has completed. Interrupting a later turn cancels the pending approval but can leave the command item marked as in progress.
## What changed
Complete these late command items with `Declined` status when their approval is canceled by a turn transition. Route completion through the thread listener so `item/completed` reaches the thread's current subscribers, preserving the original turn ID and command start timestamp.
## Testing
Add regression coverage for interrupting a turn with a pending approval from a completed turn, and for delivering late command completion to a replacement subscriber.
GitOrigin-RevId: 8c62fa3302fd3754b84e6fb87b3117f678f55164
## Why
Reading the newest turns or items in a fork previously resolved the entire rollout lineage, even when the page only needed recent segments. This caused unnecessary ancestor reads and could fail when an unused ancestor was missing.
## What changed
Introduce an incremental `LineageWalk` and use it to resolve descending history pages only as far as needed for the cursor, requested rows, and next-page lookahead. Defer sibling rollout discovery until a parent is needed, while preserving newer turns' overrides when resuming in an ancestor.
Keep full lineage resolution for ascending reads, update replay, item anchors, and inherited summary lookup.
## Testing
Add regression coverage for pages with missing unused ancestors, continuation within a parent, turn overrides, inherited summaries, and exact page-boundary lookahead. Extend coverage for descending item pages using the selected rollout.
GitOrigin-RevId: dad941f4f3c54a46121d4fa22b69e13f1830a385
## Why
Metadata-only `thread/read` requests for loaded threads reread the store to attach a title after already loading persisted metadata.
## What changed
Reuse persisted metadata and overlay live settings, returning metadata-only responses without another store read. Keep history loading conditional on `includeTurns` and centralize stored-title trimming and legacy preview fallback handling.
## Testing
Extend the in-memory store test to verify that a loaded thread without a rollout path returns its trimmed stored title with exactly one metadata read, while requests with turns still return stored history.
GitOrigin-RevId: 74f20914afb44901d7586eb8e944afdae2640c31
## Why
Creating a child thread with inherited model context collected owned rollout items just to count them, then collected them again during persistence even when telemetry did not need them.
## What changed
Count persisted inherited items without collecting an owned vector. Only collect filtered items during persistence when telemetry is enabled, and reuse those items for metadata updates on normal appends.
## Testing
Extend the inherited-context test to verify that paginated history excludes legacy-only events, preserves the child history boundary and record ordinals, and replays the expected records after reopening from disk.
GitOrigin-RevId: 04dfb7b5b086c66f4dc760027c4faa704cab0df1
## Why
A steer can restart sampling within the same turn. Recreating the diff tracker loses earlier edits, and changing the working directory can change the meaning of relative diff paths.
## What changed
Keep the diff tracker for the lifetime of the turn and retain each environment's first display root. Refresh cached diff headers when new environments are added. Emit the final aggregate `TurnDiff` before `TurnComplete` instead of at sampling completion.
## Testing
Extend regression coverage for steering during the final flush, with and without additional patches and with a changed working directory. Check final diff ordering across continued sampling and header updates when adding an environment.
GitOrigin-RevId: fbd1ebef072d8486a324190c9125fc1446510802
## Why
A turn can complete after the next turn has started. Sharing one turn summary lets late completion events consume the next turn's metadata and clear its command tracking.
## What changed
Track turn summaries and command start times by turn ID so errors, timestamps, final agent messages, and command lifecycle notifications stay associated with the correct turn. Read and remove only the completing turn's state, and clear tracked state when listeners are replaced or removed.
Initialize summaries for inline reviews that can finish before their delegate emits `TurnStarted`.
## Testing
Extend regression coverage to check that overlapping turns retain their own errors, completed turns include start timestamps, and the next turn's approved command emits one start and one completion notification despite a late completion from the previous turn.
GitOrigin-RevId: 91f022d885c67c7d8982091c72325f1d701569a6
## Why
A turn's terminal event can arrive after the next turn has started, cancelling the newer turn's pending approval requests and incorrectly changing the thread's active status.
## What changed
Track the latest started turn in the app server. Only let completion or abort events for that turn cancel pending server requests and update thread watch status, preserving the existing behavior when no started turn is recorded.
## Testing
Add a regression test that delays one turn's completion until the next turn requests command approval, then verifies that the thread remains waiting on approval and the approval can still be accepted to execute the command.
GitOrigin-RevId: 521f4fb74728b3e70572839b2e73d2d2b2735f35
Document managed `prompt-user` command checkpoints as stable in the interactive
Codex CLI, while keeping app-server integration marked experimental. Clarify
that each matching command requires a fresh human decision, even with automatic
review enabled, and that session or persistent approvals cannot satisfy it.
GitOrigin-RevId: 98c36d00294bd97ab937f32940dfb24310ecbc32
## What changed
Use `HousekeeperSampler` for evidence routing instead of starting a separate review-session thread. The housekeeper now owns a tool-free model conversation, retains completed routing batches, and evicts whole batches under context-window pressure.
Commit sampled history only after all board writes succeed and the evidence cursor advances. Stop the worker after a routing error or an interrupted routing future. Cancel routing when the account changes while allowing accepted appends to finish before shutdown.
## Testing
Extend housekeeping integration coverage for retained history, whole-batch eviction, transient retries, retry exhaustion with `Retry-After`, HTTP fallback, credential renewal, command-token rotation, and shutdown waiting for accepted evidence appends.
GitOrigin-RevId: 316ab1b90529e2a5874e617855d38c41f232872a
## What changed
Add a tool-free Responses sampler with persistent conversation history and whole-batch eviction to stay within the model's input budget. Parse completed routing replies and retain their output through an explicit commit step.
Add WebSocket connection reuse, HTTP fallback, bounded retries, authentication recovery, account-change checks, and cancellation of unfinished responses.
Register the new modules without connecting them to the existing housekeeper routing flow yet.
GitOrigin-RevId: 2a0ff557a521763ab984249ec6594ae7ce09d59e
## What changed
- Install Guardian V3 with a local message-board host when the server enables `features.guardianv3.enabled`, independently of thread overrides.
- Clear inherited user, thread, and project instructions from Guardian V3 private threads and skip repository instruction discovery.
## Testing
Add integration coverage for routing the first live message while the actor is still sampling, for both new and resumed threads. Verify that resumed history is skipped, `AGENTS.md` reaches only the actor, and thread overrides cannot enable or disable server-level housekeeping.
GitOrigin-RevId: 3f3ae1be404c9e17b73eea12c95f5a95c96052cf
## What changed
- Add an `install` entry point that registers thread and turn lifecycle hooks for Guardian housekeeping. Coalesce user-message and turn-end wakes into one worker per eligible root thread, flushing history before routing durable evidence in order.
- Run the housekeeper in an isolated, ephemeral model thread with no tools. Cancel and join its tracked tasks on root shutdown, waiting for accepted evidence appends to finish.
- Give each routing batch a 90-second deadline, make channel listing and updates cancellable, and redact model response content from JSON parsing errors.
## Testing
Extend housekeeping tests to cover stalled channel creation, redacted model errors, and shutdown waiting for an accepted evidence append without leaving a persisted housekeeper rollout.
GitOrigin-RevId: 519b539c0613c964bac7b18eb84e684f5e105640
## What changed
- Exercise an explicit `PermissionProfile` in the additional writable roots test on non-Windows platforms, while preserving Windows coverage of the default read-only fallback.
- Assert that enabling memories preserves write access to the working directory on non-Windows platforms.
GitOrigin-RevId: ae25690a56825b47ca38e42fece1fdd7a42b48a4
## What changed
Move legacy sandbox policy conversion into `codex-protocol` and add a shared helper for resolving compatibility writable roots. Re-export the policy helper from `codex-sandboxing` and use the writable-roots helper in both Windows sandbox backends, preserving the existing workspace-write fallback.
## Testing
Add a regression test confirming that an output-only permission profile retains the fallback's output and working-directory writable roots, including protected `.git` and `.codex` subpaths.
GitOrigin-RevId: a40474eb74544f34f7eea8135a7eb1b57706dbc2
## What changed
Remove `position` from app-server `Project` responses, the thread-store project model, and generated schemas and SDK types.
Document that clients should use the returned project order and that `beforeProjectId` places a moved project before another project, or appends it when omitted or null.
GitOrigin-RevId: 5de481e13f524c03260b7fed5c74874f051d6f30
Generate `history_notes_tools` directly from `register_tools!`, removing the
separate per-namespace registration helpers and building a single executor
vector. Preserve tool order, catalog overrides, and empty results when no
backend is available.
GitOrigin-RevId: f13a056af4e26b7510b2cc138c69c935be5a5c2d
Initialize the file result with `ThreadLabelStyle::Plain` in
`fuzzy_matches_preserve_graphemes_when_truncated` so the test supplies the
required `SearchResult` field.
GitOrigin-RevId: c1dbfc3b4d094511b2f480020d8365813f2d89d5
## What changed
Split tool construction into `history_tools` and `notes_tools`, with
`history_notes_tools` combining both. Each builder accepts an optional backend
and reads its catalog messages directly from the step's `ExtensionData`.
Extract a shared contributor registration helper and simplify the HTTP-backed
extension to use these helpers. Update the bundled tool contract snapshot test
to use the revised builder signature.
GitOrigin-RevId: c9804b457ffc5d3634d7e58973a9f0f5028ca6e9
## Why
The `login` description claimed a fixed default and described Unix shell flags for every shell. In PowerShell, disabling login startup skips profiles, which can make profile-defined commands unavailable.
## What changed
Describe omitted `login` values as inheriting the setting. When a turn environment reports PowerShell, explain that `login: false` skips profiles and advise keeping profiles enabled for commands that depend on them, including unattended commands.
## Testing
Add coverage for shell-specific descriptions, remote environment readiness, and exact normalization of PowerShell wording in portable tool snapshots. Update prompt-prefix compatibility checks and affected snapshots.
GitOrigin-RevId: f6cb29c6c32921241cbd1be0c31f985c5ae274f9
## What changed
Prefix cloud thread labels with `☁︎` in resume and fork pickers, the agents overview and task details, task mention suggestions, side chat tabs and chooser, status lines, and terminal titles. Keep the marker separate from thread names, search text, and identity, and account for its width when truncating labels.
Track cloud backend identity independently of live connections so thread labels retain their marker after a disconnect.
## Testing
Extend rendering tests and snapshots to cover cloud and local labels, narrow layouts, side chat tabs and chooser, and terminal title fallbacks and truncation.
GitOrigin-RevId: ea8189ebcc5e35d2d2ef95d6a4a87ca23b5e3b8f
## What changed
Reuse connected thread tool inventories for paginated `ToolsAndAuthOnly` status requests when registrations, client settings, permissions, environments, and authentication match. Restrict reuse to connections with fixed credentials; discover remaining servers separately and preserve enterprise-managed servers' admitted thread connections.
Bind status configuration to the same environment and permission inputs used by the thread runtime, and limit authentication-failure inspection to the requested servers.
## Testing
Extend status tests to cover fixed-credential reuse, fresh discovery for stored OAuth authority, full resource discovery, and inventories for dormant threads without starting their runtime connections. Verify that paginated lightweight results keep same-named servers in different environments separate.
GitOrigin-RevId: eaca6365fb2a739eaad76eefdc62ec9f796b1024
## Why
Cloud agent messages lost their phase when converted to app-server thread items, leaving consumers unable to distinguish commentary, final answers, and partial answers.
## What changed
Decode the optional phase from cloud agent messages, expose it through `ItemSummary::AgentMessage`, and map it to the corresponding app-server `MessagePhase`. Leave the phase unset for missing or unrecognized values.
## Testing
Extend item lifecycle and completed-reply tests to verify that a final-answer phase survives decoding and conversion. Retain history coverage for messages without a phase.
GitOrigin-RevId: b7661386758685e0f3c07b53935ff7fd7ba35f7d
## Why
Per-grapheme color updates can break native terminal bidirectional rendering in thinking and reasoning headers.
## What changed
Render text containing strong right-to-left characters or Arabic numbers as a single, static dimmed span in both shimmer implementations. Preserve logical text order and use one-second clock updates for these status headers when progress animation is disabled.
## Testing
Add snapshot coverage for Hebrew, Arabic, mixed-direction text, and Arabic numbers, checking that headers remain unchanged during the shimmer sweep. Add scheduling tests for static headers and active progress animation.
GitOrigin-RevId: 911abc50f00db597ae4dcfca9941e9f63547c2f9
## Why
The thread listing index migration shares version `0063` with the session model IDs migration, and the sidebar query-plan test omits the required `included_thread_ids` field.
## What changed
- Renumber the thread listing index migration to `0064`.
- Set `included_thread_ids` to `None` in the sidebar query-plan test.
GitOrigin-RevId: 2c4c4ed52dd412fbf379ddbd2ed77324fba3b1ca
## Why
Default thread listings should stay in timestamp order without scanning subagent threads. Attached-thread listings should use both parent and archive filters even without planner statistics.
## What changed
- Add partial indexes for visible interactive threads sorted by creation, update, or recency timestamps.
- Use literal source predicates for default interactive listings so SQLite can select the partial indexes.
- Extend the attached-parent index to include archive status.
## Testing
Add a query-plan test verifying that the default sidebar listing uses the interactive update-time index. Extend app-server coverage to include `chatgpt` custom-source threads in default interactive listings.
GitOrigin-RevId: 5844622b7af629cad71e15ec95a8960739d6d447
## Why
Splitting fuzzy matches into individual Unicode scalars can break multi-codepoint emoji when mention results are truncated.
## What changed
Render highlighted names and parent paths as whole grapheme clusters, using scalar match indices for names and grapheme match indices for paths. Bold the entire grapheme when any part matches.
## Testing
Add a regression test covering truncated plugin names and file paths containing `👩💻`, checking both rendered text and bold match styling.
GitOrigin-RevId: 516d6668a9a22f79483adb0c576ed190b4f4a784
## Why
Ctrl+R history search highlights need to cover whole grapheme clusters so that matches on combining marks highlight the visible character.
## What changed
- Map case-insensitive matches to grapheme boundaries and deduplicate identical highlight ranges.
- Segment the separately rendered `!` bash prompt independently from the textarea so a prompt-only match does not highlight the command body.
## Testing
Extend match-range tests for repeated combining marks and rendering coverage for combining-mark matches and prompt-only matches.
GitOrigin-RevId: d8f5c5ebb06b1130153b3cfbc8631342a57cfa1c
## Why
Single-line ASCII copies can use the lightweight Windows clipboard writer without starting PowerShell.
## What changed
- Try `clip.exe` for printable ASCII text and tabs, falling back to PowerShell if it is unavailable or fails. Bound discovery and execution by short deadlines.
- Keep PowerShell for Unicode, multiline text, and other control characters. Pad even-length ASCII input with a trailing NUL to prevent `clip.exe` from interpreting it as UTF-16.
- Preserve precedence and command compatibility for installed Linux `powershell.exe` adapters, and defer Windows PowerShell discovery until needed.
## Testing
Extend WSL clipboard tests to cover input eligibility and padding, adapter precedence, and expired deadlines.
GitOrigin-RevId: 69b66ec1243452d0a4df119563321f38d177bea9
## Why
An editor's suspend/resume cycle can change terminal settings while crossterm still considers raw mode enabled, preventing Codex from restoring raw mode on return.
## What changed
On Unix, clear crossterm's raw-mode cache before reapplying TUI terminal modes after an external program exits.
## Testing
Extend the external-editor PTY test to simulate an editor restoring canonical mode with `stty sane` and verify that canonical input and echo are disabled after returning to Codex.
GitOrigin-RevId: 4ae151deaf073bddf5a1c7fdfb5a1b5f4a480375
## What changed
Launch desktop session URLs with PowerShell's `Start-Process` instead of resolving and starting the packaged executable directly. Restrict the installed `OpenAI.Codex` package check to the two supported publisher IDs and select the first match.
GitOrigin-RevId: 350029a2101ff048de52fa9f9444e4b5dbdcc12e
## Why
Restricted input dismissed the slash-command popup when a thread was unavailable, preventing users from selecting recovery commands from partial input.
## What changed
Keep the command popup available while editing an unavailable thread's draft. Allow navigation, Tab completion, and submission of eligible recovery and local commands, including with custom submit keys. For example, typing `/sub` and pressing Enter selects `/subagents`.
Continue to reject commands unavailable in this state and invalid command arguments. Preserve Vim escape and search behavior without reopening the popup during search.
## Testing
Add regression tests and a popup snapshot covering highlighted recovery completion, blocked commands, custom submit keys, and Vim escape and search behavior.
GitOrigin-RevId: 38021db8cdcd9f7ec7c62cfa0efd8819bf8057da
## Why
Listing even one turn of a legacy thread replays its entire rollout. Overview refreshes should avoid that work just to populate previews.
## What changed
- Fetch saved prompt and reply previews only for threads with paginated history.
- Update legacy prompt previews from user-message notifications and preserve them across refreshes and reverts.
- Retain the latest observed reply preview when a thread closes.
## Testing
Extend overview tests to reject legacy turn-list requests, verify paginated previews, preserve live prompts across stale refreshes and reverts, and retain reply previews after thread closure.
GitOrigin-RevId: 85130adda155c5ea93c5a5c2b3f89a945170ba51
## What changed
Allow `codex exec --remote <ADDR>` to run a noninteractive turn using an existing app server's configuration and credentials. Support starting a new thread or resuming one by UUID, with human-readable or JSON output and optional bearer-token authentication through `--remote-auth-token-env`.
Accept remote options before or after `exec`, and reject conflicting endpoints. Reject unsupported agent configuration overrides and active threads, and report an error if the server disconnects before the turn completes.
## Testing
Extend CLI integration coverage for remote execution and resume using server authentication, JSON completion events, human-readable thread IDs, and conflicting endpoints. Add a snapshot for `--remote` help text.
GitOrigin-RevId: d4c3b16fb80eb6e8c523aff92110eaa878cbd3ee
## What changed
- Use `AppServerClient` throughout exec and extract turn completion into `finish_turn`, including handling for server and thread-stream disconnections.
- Move remote address parsing and auth-token resolution into `codex-app-server-client`, with re-exports from the TUI.
- Allow human-readable exec output to be initialized without a local `Config`.
## Testing
Move remote address and auth-token tests into `codex-app-server-client`, retaining coverage for WebSocket and Unix socket addresses, invalid addresses, and missing, empty, or whitespace-padded tokens.
GitOrigin-RevId: 465b17a1c03392a7d4e7700d83ce67c2cf5ef021
## Why
Releasing TUI input modes previously disabled alternate scrolling unconditionally, overriding terminals where it was initially enabled.
## What changed
- Query alternate-scroll mode (`1007`) during the Unix startup probe and filter its replies from replayed input.
- Restore the recorded mode during editor handoff and exit, defaulting to disabled when the initial state is unknown.
- Retry scroll-mode restoration after a failed cleanup write.
## Testing
Extend startup probe tests to parse enabled and disabled reports. Add coverage for preserving both initial states across handoff and exit, and retrying failed restoration.
GitOrigin-RevId: 786a44c04da6e2c9cb9af73c096d8df92ded88e9
## What changed
Close the experimental features popup without saving pending edits when the user presses `Esc`, `Ctrl+C`, or a remapped cancel key. Keep saving on the accept action (`Enter` by default), and update the footer from `esc save/close` to `esc cancel`.
## Testing
Update tests to assert that cancellation discards toggles without emitting save events, including after a failed write and with a remapped cancel key. Refresh popup snapshots for the new hint.
GitOrigin-RevId: d7640edaeca1db371a7087312179a001d7528b9a
## Why
When status details exceed the line limit, character-based truncation can make the final line overflow its available terminal width.
## What changed
Use display-width-aware truncation on the entire final line, including its indentation and trailing ellipsis.
## Testing
Extend the status details test with wide Unicode characters, checking that every line fits within 10 columns and snapshotting the truncated output.
GitOrigin-RevId: 89c6cfb7cf36cdf0d63b6f732c59acd96128f9fd
## Why
Pasted goal text was stored in separate files, leaving file references in the goal editor instead of the pasted content.
## What changed
Expand pending pastes into the goal objective before processing image attachments and checking the objective length. Short goals now retain their text inline; oversized expanded objectives still use the managed `goal-objective.md` file.
## Testing
Update goal tests to cover oversized Unicode pastes, inline text without new attachment files, and pastes combined with image attachments. Add a snapshot showing `Use hello` when reopening a pasted goal in the editor.
GitOrigin-RevId: afd8e8de1ca12fe81bdfd526a0ad9e92a43addc2
## What changed
- Add an `OWNERS` file for `codex-rs/tui` with `tempest::evaluate-only`.
- Add `TEMPEST_REVIEW` guidance requiring inspection of `codex-rs/tui/styles.md`, identifying local rendering and copy fixes with focused snapshots as eligible for automatic approval, and requesting human approval for changes to input actions or app-server-dependent thread and turn state.
GitOrigin-RevId: 6440f1a5a96fa4979292171d0c88c0b5d4d464bd
## Why
Marketplace listings read plugin manifests for entries later discarded by policy, product visibility, or duplicate selection across project scopes. This causes unnecessary reads and can emit parse warnings for plugins that never appear in the listing.
## What changed
Separate marketplace entry validation from plugin manifest loading. Apply marketplace policy, visibility, and path and plugin ID deduplication before loading metadata, preserving first-source and first-scope precedence.
## Testing
Add a regression test covering repeated marketplace paths and shadowed plugin IDs across scopes. Verify that the selected malformed manifest is read once, the discarded manifest is never read, and the visible plugin IDs and local versions are preserved.
GitOrigin-RevId: 00b1d50593fb6546aafdc2089e6fccec1b4e5f42
Build `config/read` responses from the latest loaded configuration's layer
stack so requests with a relative `cwd`, such as `.`, succeed and reflect
external configuration edits. Reuse that configuration for feature overrides
and preserve precedence for layer read and decoding errors over full-config
validation errors.
Add a regression test that reads with `cwd: "."` before and after an external
model configuration edit and checks that both values are returned.
GitOrigin-RevId: 82eb835f2eac4e53414b01fc9286c2aac71babf2
## What changed
Direct agents to use `history.list_windows` to find valid window IDs for the agent they want to inspect. Replace the namespace description's ordering and unknown-window guidance, and update the bundled tool contract snapshots to match.
GitOrigin-RevId: 37050cc3b2311f1d8f3b5676dca8d1261423c4c5
## Why
Archiving the current task waits for the server response before returning to the command center, blocking navigation while the request is pending.
## What changed
- Run the archive request in the background after side chat and voice cleanup, hiding the task while it is pending.
- Preserve drafts and approvals until archiving succeeds. On failure, show an error and make the task visible again.
- Keep archive completions across reconnects and route dynamic tool replies through their original reply handles.
- Show `Archiving…` during side chat cleanup. On exit, wait up to five seconds for pending archives and report failures or unconfirmed outcomes.
## Testing
Add coverage for navigation before the archive response, success and failure handling across event channel replacement, preserved drafts, side chat cleanup failures, and exit warnings.
GitOrigin-RevId: 7b6e35cb11159f5be1d0b9fb2082dbd8c7826a94
## Why
Cloud conversations previously skipped TUI title generation, leaving them without automatically saved names.
## What changed
- Generate structured titles using the selected Cloud account and its backend routing, without agent tools or a temporary conversation.
- Read and save names outside the conversation command queue without replacing the active attachment. Preserve an existing name if it no longer matches the expected value.
- Fall back to the first-message title when generation is unavailable, and allow up to three seconds for pending saves during shutdown.
- Report a retryable error when a manual rename encounters an automatic save in progress, keeping the UI responsive.
## Testing
Add coverage for selected-account title generation, saved-name reads without attachment, first-message fallback persistence, and manual rename retries after automatic saves.
GitOrigin-RevId: 48030cc0b75e790a2004af018f54e5751665b760
## Why
Cloud stream failures previously used a generic reopen message even when the conversation was missing, access was denied, or sign-in had changed. Abandoned turn and item list requests could also keep the native worker occupied.
## What changed
- Report specific disconnect reasons for missing conversations, lost access, and changed or expired sign-in, including failures during idle reconnection.
- Report exhausted reconnect attempts and other nontransient recovery failures with dedicated messages.
- Cancel in-flight `ThreadTurnsList` and `ThreadItemsList` requests when their callers drop, matching `ThreadList` behavior.
## Testing
Add regression coverage for abandoned history reads, changed sign-in during accepted idle recovery, and access-denied stream errors.
GitOrigin-RevId: 29923b46c2d377f2247d699757553777a31d08ca
## Why
Switching backends while an overview refresh is pending can lose queued pagination or let a late page consume another backend's refill budget.
## What changed
- Track queued refreshes, “Show more” requests, refill counts, and refresh failures per backend.
- Preserve pending work across backend switches and use registered live request handles to refresh the owning backend.
- Cancel stale reads for the affected backend after mutations, event lag, or disconnects, and hide “Show more” when its backend is disconnected.
## Testing
Add regression coverage for pagination across focus changes, backend-specific refills, pin completion, stale reads after event lag, and connection registration during reconnect.
GitOrigin-RevId: 3429b2b3ac93156b4dc4234ad042431d26c84525
## Why
Item IDs are unique only within a turn. Reusing an ID across turns can misplace completion boundaries or hide unrelated items when loading older history.
## What changed
Carry turn IDs with paginated history items and key completion grouping and hidden review prompt lookups by both turn ID and item ID. Skip completion boundaries that would move backward through the page.
## Testing
Extend regression coverage to reuse item IDs across turns, checking completion ordering, visibility of unrelated tool items, and pagination without overlapping completion footers.
GitOrigin-RevId: 6cc8e16a1731d5aad4cbfb1c27e51c4665b0a655
## Why
Model request hooks need to correlate attempts belonging to the same generation across retries and model fallback.
## What changed
Add `request_id` and one-based `attempt_number` fields to `PreModelRequest` and `PostModelRequest` inputs and their generated schema. Keep the request ID stable across retries and increment the attempt number for each call to open a response stream.
## Testing
Extend hook tests to verify matching request IDs and increasing attempt numbers across retries. Extend the background compaction scenario to verify that its pre/post hooks share an ID distinct from the ordinary sampling request.
GitOrigin-RevId: 2d85ad6fd630505a89a712cebab6ca0f731610c9
## What changed
- Centralize generation admission checks before request contributors run for HTTP and non-warmup WebSocket requests.
- Route pending input and inline compaction through dedicated budget checks, and centralize post-compaction budget handling.
- Preserve whether any checkpoint was installed when remote compaction combines a background candidate with foreground compaction.
- Track accepted final answers separately from trailing commentary and encapsulate the response state shared by stop and after-agent hooks.
## Testing
Update the plan-mode contributor test to verify that contributed commentary is tracked separately from final answers, and adapt stream-event assertions to the phase-aware assistant text representation.
GitOrigin-RevId: 43b663e92bfd24ec7e5a0778b711938f16a7fea4