Skip to content

[pull] main from microsoft:main - #1618

Merged
pull[bot] merged 24 commits into
code:mainfrom
microsoft:main
Aug 21, 2026
Merged

[pull] main from microsoft:main#1618
pull[bot] merged 24 commits into
code:mainfrom
microsoft:main

Conversation

@pull

@pull pull Bot commented Aug 21, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

lramos15 and others added 24 commits August 21, 2026 16:36
…ts (#331975)

* chat: extract a shared large-card primitive for inline cards

Chat has two card tiers. `.chat-confirmation-widget2` is the medium tier and
already had a name; the large tier -- rounded border, panel background, clipped
content, plus a 22px chrome free icon button -- was open coded in four places.
`chatPlanReview.css` made this plainest by taking the medium tier primitive and
overriding it back up to the large one with the same six declarations the
survey and the question carousel open coded.

Name that tier. `chatCard.ts` owns the stylesheet so its position in the bundle
is deterministic rather than decided by module graph order, and exports the
class names plus a `createChatCardIconButton` helper.

The nine icon button copies all carried `!important`, because `Button` writes
its colors as inline styles that no selector can outrank. Rather than move the
`!important` into the shared file, build these buttons with no color options at
all: `Button` then writes empty strings and the stylesheet owns the appearance.

Removes 228 lines of duplicated CSS for 103 shared ones. The one rendering
change is in the question carousel title, which asked for
`--vscode-agents-fontWeight-semiBold`; that token is registered by
`workbench.common.main.ts` but not by the component fixture harness, so the
title fell back to 400 there instead of the intended 600. The generic token is
also the correct one for `workbench/contrib` per the design token guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14187097-e970-4d2b-8d7c-cfa8c5aa6306

* chat: fix silent arrow key navigation in the question carousel

The single select list mixed two ARIA focus models. It declared
`aria-activedescendant` on the listbox, but auto focus moved real DOM focus to
an option, and arrow keys only updated `aria-activedescendant` without moving
focus. `aria-activedescendant` is only honoured on the element that actually
has DOM focus, so arrowing through options announced nothing to a screen
reader. Focus the listbox instead, which is the element that declares it.

Multi select is left alone: it uses real focus on the item and never sets
`aria-activedescendant`, so its model is already coherent.

Focusing the list also revealed that the rule meant to indicate a focused list
never applied. It was nested inside `.chat-question-list` while also naming
that class, so it compiled to a list inside a list. With `outline: none` set on
both the list and its items, that left keyboard users with no focus indicator
at all on this list. Anchor it with `&` so the selected row picks up active
selection colors while the list has focus, matching the survey and the rest of
the workbench.

Adds characterization tests for the list's keyboard contract -- arrow clamping,
digit selection, digit past the last option moving to freeform, and where focus
and `aria-activedescendant` actually land.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14187097-e970-4d2b-8d7c-cfa8c5aa6306

* chat: share the listbox ARIA scaffolding between the card lists

The question carousel and the model feedback survey each hand roll a listbox,
and each has to keep three things in agreement: the class that paints the
active row, `aria-selected` on every option, and `aria-activedescendant` on the
container. Keeping that in step by hand is what produced the carousel bug fixed
in the previous commit, and it is silent when it breaks.

`ChatCardListbox` owns exactly that: option registration, the three way state
sync, and focus. Focus is only handed out through `focus()`, which puts it on
the container, so the invariant that makes `aria-activedescendant` work is
enforceable rather than conventional.

Keyboard handling and row rendering stay at the call sites. The survey wraps at
the ends and supports Home/End; the carousel clamps and binds digits; arrowing
commits in the carousel but not in the survey. Those are product differences,
not duplication, and folding them into option flags would have produced two
widgets wearing one name -- so the shared piece is deliberately narrow and
`clampedIndex` / `wrappedIndex` are offered rather than imposed.

This trades a small net line increase for a single place where the announcement
contract can be got right. The option element id format changes as a result; it
is internal and only referenced by `aria-activedescendant`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14187097-e970-4d2b-8d7c-cfa8c5aa6306

* chat: adopt the shared card on the tool confirmation carousel

This was the one large card left open coding its own chrome. It kept a
`transparent` border fallback while the other three fall back to
`chat-requestBorder`, which is why it was held back from the earlier
extraction.

That difference is drift rather than intent. The fallback dates from the
original design, where the carousel was fused to the chat input: no bottom
border and a top only radius. It later gained a full border and a full radius
but kept the fallback. More decisively, `input.border` is null only in dark and
light and resolves to `contrastBorder` in both high contrast themes, so all four
cards already agree in high contrast and diverge only in dark and light. A
deliberate borderless treatment would hold across themes.

So converge instead of adding a modifier: the carousel now shows the same
hairline as its siblings in dark and light, and is unchanged in high contrast.

Also drops the duplicated agents/editor background override and the header
actions block, which matched the shared one on all four declarations.

The overlay header keeps its own padding and centre alignment. It is a compact
bar for a collapsed carousel rather than a titled card header, so folding it
into the shared header would be a real visual change for no structural gain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14187097-e970-4d2b-8d7c-cfa8c5aa6306

* chat: make the large card tier win where it composes with the medium tier

Plan review carries both tier classes on one element. Its old rule set the
large shell at four classes of specificity, which beat
`.chat-confirmation-widget2`; the shared `.chat-card-large` only ties it, so the
medium tier was winning on stylesheet order and the card had regressed to a 6px
radius and the request border. Name both classes together so the outcome does
not depend on load order.

Also puts the header separator on `var(--vscode-strokeThickness)` to match the
shell border, and condenses the listbox and focus comments to the constraint
that is not obvious from the code.

The carousel test helper now defines `keyCode` on the event rather than passing
it through the init dict. Chromium does accept it there -- the navigation
assertions were exercising the intended branches -- but it is non-standard and
needed a cast, so this matches the survey test helper instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14187097-e970-4d2b-8d7c-cfa8c5aa6306

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 14187097-e970-4d2b-8d7c-cfa8c5aa6306
…331978)

* Agent Host changes for lramos15/agents/vscode-issue-331852-proposal

* Refactor chat input and attachment components for improved performance

- Remove unused code from agentHostInputCompletions and newChatContextAttachments.
- Optimize chatInputPart and chatAttachmentWidgets for better efficiency.
- Update tests for newChatInputPaste to reflect changes in functionality.

* Fix undefined artifactLocation in session artifact images

The image section called `artifactLocation`, but the helper is named
`sessionArtifactLocation`, as the five other call sites use. This broke
compilation and threw `ReferenceError` from the two Session Artifacts
tests that build an image section.

Introduced by #331946 and present on main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8277a07-8be3-4c23-a886-ba92a9c4cac0

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8277a07-8be3-4c23-a886-ba92a9c4cac0
* Remove flaky session artifact image tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix session artifact image location helper

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: identify Agent Host telemetry sessions

Adds a session-mode property to chat request, user-action, edit, and follow-up telemetry. This lets telemetry split Agent Host sessions from legacy sessions, including local fallback sessions.

- Adds isAgentHostSession to workbench chat telemetry events.\n- Adds whole-file edit outcomes and tags hunk outcomes.\n- Tags shared accepted and rejected edit telemetry.\n- Adds focused tests for Agent Host and legacy telemetry values.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: tag code block telemetry sessions

Tags sidebar code-block telemetry with the actual session mode. Corrects the remaining-edits value for user-modified file outcomes.

- Shares Agent Host session resource detection.\n- Tags code-block suggestions and acceptance actions.\n- Reports pending edits when users modify a reviewed file.\n- Extends focused telemetry coverage.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Dispose AgentHostPty on terminal exit

* Dispose AgentHostPty with its terminal instance

* Align AgentHostPty disposal with terminal precedent

* Let reconnect supersede a pending AgentHostPty startup
)

* Default to an installed build, and report missing video tooling

Three problems surfaced running the skill from a fresh checkout.

Nothing ran without a target. With no flags the runner used the build from the
checkout, which only exists after compiling the product, so the documented
starting point failed to launch. Reproducing a reported issue means running the
shipped product anyway, so with no target flag it now finds an installed VS Code
Insiders (falling back to Stable) and logs which one it chose. `--dev` selects the
checkout build, and `--build` still pins an exact install.

A missing ffmpeg was only discovered after the run, as a raw ENOENT, and it threw
out of `runScenario` after the report had been written. The runner now checks for
ffmpeg and ffprobe before launching anything and prints the install command for
the platform, and caption rendering can no longer fail a run that has already
produced its evidence.

The window did not fill the recording. The canvas is 1920x1080 while VS Code
sizes its own window (1440x900 with a workspace, 1200x800 empty), so the capture
showed the window in the top-left corner surrounded by dead space. The window is
now sized to the canvas once recording is on; a window larger than the display
still renders at that size, so this holds on smaller screens.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

* Find an installed ffmpeg, pace the steps, and classify blocked steps

Follow-up to the same skill run.

Captions were missing even though ffmpeg was installed. A PATH edit only reaches
processes started afterwards, so an editor that was already running never sees
it, and the runner concluded ffmpeg was absent. It now looks in the usual install
locations as well as PATH, which is the difference between an annotated recording
and a raw one on a machine that already has ffmpeg.

Steps flowed past too quickly to read. A caption is only legible for as long as
its step is on screen, and steps that assert rather than type can complete in a
few hundred milliseconds. Each finished step is now held briefly, controlled by
`stepPauseMs` and disabled with `0` for timing-sensitive scenarios.

Steps that cannot be automated were indistinguishable from ones that were merely
unavailable. `skip` now takes `needs: human` or `needs: infrastructure`: the first
means a person has to check it, the second means the harness could do it but
cannot yet, which is an enhancement request rather than a permanent limit. The
distinction is recorded in the manifest, highlighted in the report, shown on the
video caption, and printed at the end of the run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

* Report the quality of the build that ran, and finish the target options

Review follow-ups.

The evidence labelled every installed run `Dev`. Quality was read from the
environment, which only describes a build made from this checkout, so a run
against installed Insiders was reported as Dev in both the manifest and the
report - the evidence named the wrong product. An installed build stamps its own
quality in `product.json`, so that is now the source when a build path is given.
This also corrects `--build`, which had the same problem before this change.

Linux missed Snap installs. Snap keeps the app under a read-only revision root,
so a machine with VS Code installed only through Snap found nothing and fell back
to the unbuilt checkout - the exact failure the new default exists to avoid.

The web launcher recorded 1920x1080 while sizing the page to 1440x900, so the
no-empty-margins claim did not hold there. It now matches the canvas while
recording and keeps its established size otherwise, so smoke runs are unchanged.

`--dev` was accepted but undocumented in the runner's own help, which now lists
all three targets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

* Detect a staged update instead of timing out

VS Code on Windows applies a downloaded update by swapping the executable during
startup, so a launch attempt exits before showing a window. Playwright then waits
the full launch timeout and reports that the process "likely crashed or hung",
which sends the reader looking for crash dumps that do not exist.

Insiders downloads an update most days, so anyone reproducing an issue will meet
this. A `new_<exe>` beside the target is the marker, and checking for it turns a
60s misleading timeout into an immediate statement of the cause and the fix.

Confirmed the launch failure is environmental rather than harness behaviour: a
bare Playwright launch of the same installed build, with none of this code in the
path, also never receives a window while the update is staged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: adb443eb-11e5-40a1-8608-7f593fa79485
…ix-prioritization-58b68a87

Fix stale Agent Host turn completion to prevent response errors
* Refactor agentic browser opening lifecycle

* feedback
Rename RemoteAgentHostProtocolClient to AgentHostProtocolClient because the implementation is shared by local and remote agent host services.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s, archived state) (#331896)

* Handle archive session and add telemetry

* agentHost: keep migrated legacy CLI sessions matching by project root

* worktree fix and log update

* feedback updates

* Feedback updates

* test fix
* chat: update editor titles after rename tool

Fixes #331487

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: preserve single-chat rename titles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: ignore rejected title actions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: narrow editor title synchronization

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: synchronize default chat and session titles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: preserve restored chat state during title snapshot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: align default chat rename flows

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: preserve default chat title provenance

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: order default chat title snapshots

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: fix Copilot chat fork leaking an in-flight turn

Fixes a race in Copilot chat forking. `_forkSdkChat` computed the SDK
fork boundary from a locally-mirrored SQLite column that is only filled
in after the next turn's `user.message` event streams back from the
SDK. If a user forked a turn while the following turn was still
in-flight, that column read as empty. The code treated an empty read
as "there is no next turn" and omitted the fork boundary entirely,
which silently copied the whole session, including the in-flight
turn's skill invocation and partial work, into the fork.

- Adds `CopilotAgentSession.waitForTurnEventId`, backed by a
  `DeferredPromise` on each `CopilotTurn`, so a fork can wait for the
  in-flight turn's event ID instead of skipping the boundary.
- Makes `CopilotTurn` a `Disposable` and `_currentTurn` a
  `MutableDisposable<CopilotTurn>`, so the turn's SDK event ID promise
  is rejected automatically whenever the turn ends, is superseded, or
  the session is disposed. This guarantees `waitForTurnEventId` always
  settles, so it needs no timeout.
- Updates `_forkSdkChat` to detect an active next turn via
  `currentTurnId` and wait for its event ID before forking, failing
  the fork outright if that turn never produces one.

(Commit message generated by Copilot)

* agentHost: snapshot active fork boundary before database read

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: remove telemetry configuration service

Use the launch-resolved telemetry level when constructing Agent Host telemetry and preserve runtime consent updates through root config. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* telemetry: preserve strict DI constructor typing

Keep the configuration-service constructor overload visible to strict instantiation while retaining the fixed-level Agent Host factory. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: preserve internal telemetry launch state

Forward the parent-resolved internal telemetry status so removing the settings-backed configuration service preserves telemetry.internalTesting. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: drop internal testing forwarding

Keep Agent Host internal classification based on the product domain check instead of adding a launch contract for the undocumented telemetry.internalTesting override. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: use test service factory

Update the newly merged AgentService test to use the shared factory after the constructor refactor. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: make MCP SDK registration explicit

Separate Copilot MCP discovery routing from working-directory resolution so client-synced servers declare whether the SDK should discover them from a plugin or receive them in session config. Validate the client metadata that drives the decision and cover malformed and workspace-default cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: make MCP SDK registration explicit

Make the Copilot MCP registration path observable at the SDK handoff.

- Record whether each MCP server uses plugin discovery or session config.
- Log the final configured and disabled server names at trace level.
- Avoid logging server URLs, headers, commands, environment values, or paths.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: use the test service factory

Update the restored-chat test to construct AgentService through the shared test factory.

- Supplies the new service dependency through the existing test harness.
- Restores the client typecheck and Compile & Hygiene CI job.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: test MCP projection trace privacy

Cover the trace-level MCP launch projection contract.

- Assert normal and ephemeral registration and disabled-server summaries.
- Verify that URLs, headers, commands, environment values, and paths stay out of the trace.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add trace logging to the multi diff editor

Adds a `MultiDiffEditorLogger` that traces the state transitions which are
hard to reconstruct after the fact when investigating multi diff editor bugs
such as the view jumping while scrolling or files being expanded even though
they were collapsed:

- view model/loading changes, collapsed state changes (no matter who caused
  them) and content height changes (annotated when they happen above the
  current scroll offset, which is what makes the view jump)
- programmatic scrolling (reveal, restored scroll state, scroll adjustments
  coming from an embedded diff editor)
- view state save/restore, including the active diff item, and editor
  set/clear input in both the multi diff editor and the sessions Changes
  editor
- navigation (go to next/previous change) and editor template acquire/release

The observers are only created while the log level is set to trace and are
disposed again when it is lowered, so nothing is observed in the default case.

Enable with `Developer: Set Log Level...` > `Window` > `Trace`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address multi diff editor logging review feedback

- Log the decoded session resource instead of the synthetic
  changes-multi-diff-source: URI when the Changes editor input is set.
- Fall back to the authority or scheme in ormatUri, so pathless URIs
  no longer produce a blank label.
- Format diff item keys before logging them, so full URIs never leak into
  the trace when a persisted active item is missing.
- Guard the doc state aggregation in getViewState/setViewState with
  isEnabled, so large inputs pay no logging-only cost when tracing is off.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: stop picking the harness by which one has models

The New Session composer replaced the user's harness with the first one
usable without GitHub, which in practice meant the first one that had
published models. Models arrive asynchronously, so a user who picked
Copilot or Codex while Claude was the only harness with a catalog watched
the pick snap back to Claude a moment later.

Drop that substitution. The stored preference wins, and the first harness
in the list is the default when there is no preference.

The draft is also recreated on every session-type change while an explicit
pick is set, even when the pick and the draft already agree. That was
invisible before because the recreate landed on a different harness, and
it is the churn that carried the snap-back. Give the pick branch the same
match check the no-pick branch already has.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* sessions: clear the upgrade watcher once the pick matches the draft

Address PR feedback:
- Once a servable pick already matches the draft, the watcher can no
  longer do anything, so clear it instead of leaving the listener
  registered holding the created session. This restores the lifetime
  the old fall-through to _createNewSession gave it.
- Condense the inline explanation to one line.
- Cover _createSessionNow's openNewSession arguments so a signed-out
  user's explicit pick cannot be substituted again unnoticed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* chat: respect policy for reusable confirmations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: preserve contributed confirmation actions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: restrict approval preference management

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix: dispose previous settings preview hover

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
* agentHost: adopt AHP 1.0.0 breaking changes

Syncs the generated protocol types to AHP 1.0.0 and adopts the breaking changes in the agent
host, the workbench chat session handler, and the Agents window provider.

- Removes session-level forking. `CreateSessionParams.fork` and `SessionForkSource` no longer
  exist, so the fork configuration, its service plumbing, and the protocol forwarding are
  deleted. The editor-window Fork Conversation gesture now forks into a peer chat of the same
  session, which is how the Agents window already behaved. Chat-level forking does not change.
- Moves `ChatInputRequestPurpose` into the request `_meta` bag. The protocol no longer models
  the purpose, so a new helper writes and reads it. This keeps the ask-user telemetry and the
  elicitation classification.
- Replaces the terminal `exitCode` field with an explicit running/exited lifecycle. An exit
  without an exit code is now correctly an exit.
- Supplies the owning chat URI on each `TerminalSessionClaim`. The Copilot session runtime
  gives the chat URI to the shell tools, the non-pty output streams, and the local bang
  command, and the workbench records the owning chat for each observed terminal.
- Renames `SessionLifecycle.CreationFailed` to `SessionLifecycle.Failed`.
- Replaces the annotation `turnId` with an `origin` that holds the session, the chat, and the
  turn. Also corrects the persistence check, which discarded restored annotations.
- Adds `MethodNotFound` handlers for the new automation commands. This host does not advertise
  the automation capability.
- Corrects the test data that omitted the turn duration. The chat reducer now calculates
  `modifiedAt` from that duration instead of the local clock.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: correct the artifact location helper name

The image carousel entries called �rtifactLocation, but the helper is named
sessionArtifactLocation. This broke the build on main.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: address review feedback on the AHP 1.0.0 adoption

- Carries an explicit `hasExited` signal through `IChatTerminalOutputSource`. A command can now
  exit without an exit code, so chat must not read completion from the optional code.
- Rejects `session/workingDirectoryReplaced`. The action is client-dispatchable, but no provider
  advertises `primaryReplacement` and the host applies no backend side effect.
- Migrates annotations that were persisted before the origin change. Their records hold a
  top-level `turnId`, which the new check discarded as invalid.
- Derives the owning session for a shell terminal claim from the chat URI. The shell manager is
  constructed with a chat URI for a peer chat, so its own scope URI is not the session.
- Sends real timestamps from the end-to-end turn helpers. The chat reducer now calculates
  `modifiedAt` from the turn, so a fixed past `startedAt` made a peer chat look stale and removed
  its edits from the session changeset.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: correct turn data in the protocol integration tests

The chat reducer now calculates `modifiedAt` from the turn action instead of the local clock, so
turn data that was previously ignored must be correct.

- Sends a real `startedAt` from the shared turn helper. A fixed past timestamp made a completed
  turn look older than the session that contains it.
- Supplies the required `duration` when the cancellation test cancels a turn. Without it the
  reducer calculates an invalid date, throws, and the cancellation never applies.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: repair the merge of the AHP 1.0.0 adoption

The merge of main dropped a test helper call and did not apply the terminal lifecycle change to
the tests that main added, which broke the compile and one unit test.

- Restores `createTestAgentService` in the peer chat title test. The merge replaced it with a
  direct constructor call, whose arguments no longer match.
- Sets the terminal lifecycle on the two reconnect tests that main added.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Narrow internal service dependencies, move runtime collaborators out of AgentService, and replace two-phase initialization with a constructor-complete composition. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 21, 2026
@pull pull Bot added the ⤵️ pull label Aug 21, 2026
@pull
pull Bot merged commit 52131bf into code:main Aug 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.