Skip to content

[pull] main from microsoft:main - #1611

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

[pull] main from microsoft:main#1611
pull[bot] merged 19 commits into
code:mainfrom
microsoft:main

Conversation

@pull

@pull pull Bot commented Aug 20, 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 : )

roblourens and others added 19 commits August 19, 2026 22:34
…rts (#331709)

* agentHost: avoid collecting Copilot process logs

Disable SDK process-log collection during debug exports while preserving session event and shell logs. Add focused coverage for both session-scoped and host-wide requests.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: address debug log review feedback

Document why SDK process logs are excluded and make the debug-log mock return destination-specific paths.

(Written by Copilot)

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

* agentHost: remove redundant process log comment

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* base: share WebSocket framing across tunnel transports

Extracts the RFC 6455 frame parser and encoder into the shared IPC layer so
node IPC sockets and browser tunnel connections use the same implementation.

- Supports masked client frames, fragmented messages, extended payload lengths,
  control frames, close handshakes, and protocol validation.
- Removes the websocket framing package and its browser compatibility shims from
  the Dev Tunnels web bundle.
- Adds focused coverage for the shared codec and browser tunnel transport.

(Commit message generated by Copilot)

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

* base: harden shared WebSocket framing

Addresses review feedback for lifecycle, resource limits, and high-throughput IPC
performance in the shared RFC 6455 implementation.

- Restores browser client frame, message, and close-handshake limits.
- Adds zero-copy in-place unmasking for the Node IPC path.
- Handles Pong frames explicitly and adds focused regression 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>
* agentHost: improve debug log export

Show collection progress, include rotated VS Code logs, and use one 256 MiB artifact limit.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: harden debug log export

Snapshot rotated logs, use stable paths, reject symlinks, and enforce limits across the complete ZIP.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Tweak builtin pr skills to not ban gh cli
If the gh CLI is available and authed, some tools are not enabled in the gh mcp

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…1722)

* agentHost: Preserve authority identity through URI serialization

Encode non-readable remote addresses with lowercase hexadecimal so connection authorities remain stable across URI serialization and cannot collide across encoding tiers.\n\nFixes #331708.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: Clarify authority encoding schema

Document each encoding tier and make the reserved hex prefix check explicitly case-insensitive.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: avoid transferring provisional sessions

Only materialized sessions are shared when opening an editor window, keeping provisional Agents sessions scoped to their owning composer.

Fixes #331592.

(Written by Copilot)

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

* sessions: document provisional handoff gate

Correct the active-session type import and explain why only materialized sessions are shared across windows.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Chat input pills: reusable widget, artifacts, customizations and visibility

Rework the pill row above the Agents-window chat input:

- Left-align the row and make it horizontally scrollable, with a reusable
  observable-driven ChatPillsWidget in the workbench layer. Sessions owns the
  adapters from session state so the workbench layer never imports sessions.
- Add chat.agentSessions.showSessionMetadataInInput, which moves the session
  header metadata pills down into the input row, hides the header second row,
  moves Chats into the title toolbar and shows workspace metadata inline.
- Add agent-host artifact tools (add/remove/list_artifacts) with persistence,
  a gating setting and an artifacts pill. GitHub pull request and issue
  artifacts are promoted into the session GitHub links rather than shown twice.
- Derive the customizations a chat used or read from its output stream and
  surface them in a customizations pill that reveals the picked entry in the
  customizations editor.
- Add a right-click visibility menu for the row, with Hide <pill> for the
  clicked pill and kinds grouped by whether they have data. Customizations and
  Subagents start hidden; Changes can never be hidden.
- Consolidate pill rendering onto one base plus four implementations: icon and
  label, dropdown, resource label, and the animated changes pill.

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

* also add this to the pr

* Fix chat pill rendering crash from space-separated class names

`classList.add` rejects tokens containing spaces, so the changes and resource
pills threw while rendering. Subclasses now contribute a single modifier class
instead of the full class list, which makes the mistake impossible, and the
base always applies the shared classes.

Port the changes pill's styling onto the shared pill classes and retire the
now-dead chatTurnPills.css, whose rules all targeted the pre-refactor DOM.

Cover the render path of every pill implementation, which is what CI caught
and the existing unit tests missed.

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

* Address PR review feedback on chat input pills

- Restrict artifact `link` to http(s). A link is opened with `openExternal`,
  so a `file:` or custom-scheme link would reach the OS protocol handler from
  an agent-labelled pill.
- Never let promotion lose an artifact. A GitHub reference is only removed
  from the artifacts pill when the GitHub pills actually surface it, so a
  session with no repository, or a reference belonging to another repository,
  keeps showing it. References from another repository are also no longer
  polled against the checkout's coordinates.
- Let the dropdown pill's trigger close its own dropdown, and expose
  `aria-haspopup`/`aria-expanded` while it is summarized.
- Keep the Windows drive prefix attached when matching customization paths,
  so `C:\repo\...` resolves.
- Derive a plugin's container folder from its type rather than basename
  punctuation, so a versioned root such as `plugins/foo/1.2.0` no longer
  claims its sibling roots.
- Gate customization data presence on the turn-status setting, without
  gating it on visibility, which would drop the pill from the menu that
  restores it.

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

* Show session metadata above the chat input by default on insiders

`chat.agentSessions.showSessionMetadataInInput` now defaults to on for
non-stable builds, matching `chat.artifactTools.enabled`, which already uses
the same gate. Stable keeps the session header's metadata row.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: preserve sessions during cold-start restore

Prevent cold-start catalog migration from reporting valid sessions as missing.

- Wait for the requested provider's initial catalog migration before session restore.
- Keep tombstone checks ahead of migration and preserve failed-catalog retry behavior.
- Keep the stored active chat until a delayed peer-chat catalog restores it.
- Add regression tests for provider migration and delayed side-chat restoration.

Fixes #331648

(Commit message generated by Copilot)

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

* sessions: preserve pending chat during state save

Keep the delayed active-chat identity when the window saves before the peer catalog arrives.

- Store pending restored chat resources at the service level so snapshots preserve them.
- Handle sessions whose active chat is temporarily unavailable during restoration.
- Extend the regression test through another save and restart before catalog hydration.
- Keep the concurrent-restore test focused on duplicated restore work.

(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>
…an MCP server (#331674)

* Fix automation MCP launches against an installed build

getApplication re-applied the from-source environment on every launch, so
--build runs were also marked VSCODE_DEV=1. A packaged build then behaves as
if it were running from a checkout and never opens a window, and the launch fails
with Timeout 60000ms exceeded while waiting for event ''window''. That
environment is already resolved at module load, and only for the from-source
path, so drop the duplicate.

The launcher also never passed an extensions directory, so a --build run loaded
the user's installed extensions: those change the product under test and their
logs are copied into the evidence bundle. Point it at an isolated directory under
the existing test data path, matching the smoke test runner.

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

* Stop downloading a stable build the MCP server never uses

\setup\ downloaded the previous stable release on every \--build\ launch, and
the test data directory it downloads into is wiped at startup, so the cost was
paid on every run: 335 MB and ~36s before VS Code even starts.

The result was only ever assigned to \opts['stable-build']\, which nothing in
this server reads. Migration tests belong to the smoke test runner, which has its
own copy of this logic. Remove the download along with the now-unused
\--stable-build\ option.

A full \--build\ evidence run drops from about 90s to 19s.

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

* Run UI validation scenarios without configuring an MCP server

The ui-scenario-validation skill could only be used by first registering
test/mcp as an MCP server and then driving the evidence tools by hand. That is a
lot of setup for a one-off reproduction, and it puts the capability out of reach
of a plain request like ''reproduce this issue and record it''.

Add runScenario, which takes a scenario file and runs it end to end:

    node test/mcp/out/runScenario.js <scenario.js> --build <app-root>

A scenario is plain JavaScript that exports an id, a title and a list of steps.
Each step gets the Application, the Workbench helpers and the Playwright page,
returns a string describing how it was validated, throws to fail, or calls
skip(reason) when a precondition is unavailable. The runner launches VS Code with
video and tracing, captures a screenshot at every step boundary, stops at the
first failed or skipped step, writes the report and renders the chapter titles
onto the recording.

Clean capture is enabled by default, so the recording shows unmodified UI and the
step titles are added afterwards.

A skipped step reports the run as aborted rather than passed: the scenario did
not validate, so calling it a pass would overstate the result.

Rewrite the skill around this flow. The MCP server remains available for
interactive exploration, where inspecting the UI before choosing an assertion is
worth the setup.

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

* Caption the recording instead of cutting chapter cards into it

Step titles were shown on full-screen cards spliced between segments, which
stretched the timeline and told the viewer nothing about what the step actually
checked. The validation detail was meant to appear on those cards but never did:
it was read from the opening capture, which only records that a step started, so
the field was always empty.

Draw a caption band under the frame instead. ffmpeg pads the canvas and the text
is drawn into the added strip, so the recording keeps its original length and no
recorded pixel is covered - the status bar and the bottom of the workbench stay
readable. Each caption shows the step number and id, its status, the title, and
the validation detail from the closing capture, coloured green, red or amber to
match. The run outcome sits in the corner for the whole video.

This also collapses the render to a single ffmpeg pass: the previous version
trimmed one segment per step, generated a card per step and concatenated them.

Give a CommonJS scenario a .cjs extension. This package is an ES module
package, so a scenario saved as .js inside the repository is treated as ESM and
a CommonJS one fails to load - which is exactly what the skill told people to do.

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

* Rename the skill to validate-ui-scenario

Workspace skills are surfaced as slash commands named after the skill, so the
name is what a user types. "ui-scenario-validation" reads as a topic; the verb
form matches how it is invoked:

    /validate-ui-scenario reproduce <issue url> against my installed Insiders

Update the example to that phrasing, and state that a reproduction which fails at
the expected step is a successful reproduction rather than a broken scenario.

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

* Put the caption band above the recorded frame

The band reads before the frame it describes, and it keeps the eye near the
toolbar and editor where the action happens rather than at the far edge of the
window.

The canvas is still padded rather than overlaid, so no recorded pixel is hidden.

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

* Reject per-run arguments that escape the isolated profile

Per-run `extraArgs` are appended after the generated arguments, and VS Code keeps
the last value of a repeated string option, so a caller-supplied
`--extensions-dir` would replace the isolated directory and let real user
extensions and their logs back into the recording. The same applies to
`--user-data-dir` on the restart path, which had no guard at all.

Move the check into a shared helper and apply it to both the launch and restart
argument paths.

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

* Unwrap a default export without the `in` operator

`local/code-no-in-operator` rejects `'default' in loaded`. Reading the optional
property directly is equivalent here and simpler: a CommonJS scenario has no
`default`, and an ES module namespace carries the scenario on it.

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
agentHost: restore deleted legacy session worktrees

Restore the legacy metadata fallback that reconstructs the worktree path and repository root for pre-July 2026 Copilot sessions, allowing live sessions to recreate deleted worktrees on resume.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sion (#331721)

* agentHost: wait for provider catalog migration before restoring a session

On Agents Window startup after an update, a restored session could show a
persistent "Couldn't open session / Session not found on backend" error even
though the session existed and loaded fine after navigating away and back.

`AgentService.listSessions()` waits for each provider's registration-time
catalog migration via `_awaitInitialProviderMigration()`, but
`restoreSession()` did not. A restored editor subscribes during startup and
triggers `restoreSession()` while the provider's initial catalog migration is
still in flight; the provider's `getChatMetadata()` returns `undefined`, and
`_restoreSessionState()` threw a false `AHP_SESSION_NOT_FOUND` that the client
baked into synthetic chat history until re-subscription.

Give restore the same gate:

- Extract `_awaitInitialProviderMigrationForProvider(provider)` (reusing the
  existing compare-and-replace single-flight retry) and refactor the aggregate
  `_awaitInitialProviderMigration()` to delegate to it.
- In `_doRestoreSession`, after the early tombstone check, await the session
  provider's initial migration, then re-check the tombstone before the
  registry/metadata work so a session deleted during the (potentially long)
  wait is not resurrected.
- Classify the outcome truthfully: `_restoreSessionState` throws
  `AHP_SESSION_NOT_FOUND` only when the catalog was ready (a genuine miss),
  otherwise `JSON_RPC_INTERNAL_ERROR`, so a still-unavailable catalog is never
  reported as a missing session.

Adds regression tests covering: waits-for-migration, delete-during-wait,
genuinely-missing-after-migration, unavailable-catalog-is-internal-error, and
provider specificity.

Fixes #331648

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

* agentHost: classify restore metadata miss from an authoritative signal

Address PR review feedback on #331721:

- A metadata miss on restore is now treated as authoritative absence only
  when the provider catalog was readable this run AND the registry has no
  record of the session. A miss for a registered (known) session, or while
  the catalog was unavailable, is reported as a transient internal error
  rather than a sticky `AHP_SESSION_NOT_FOUND`. Previously `catalogReady`
  (derived solely from the one-time backfill promise) could be true on a
  backfilled restart while a provider was currently unavailable — e.g. Claude
  whose SDK is not downloaded yet returns `undefined` from getChatMetadata —
  and still emitted the sticky not-found. The registry is a download-free,
  authoritative record of existence, so no provider download is triggered.

- Condense the method-body comments that exceeded the inline one-liner limit
  and the two test-double JSDocs.

Adds a regression test for a registered session whose provider is currently
unavailable on a backfilled restart (migration short-circuits): restore now
rejects with an internal error, never a false not-found.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Removing managed settings check

* updating types for sandbox configuration

* fixing compile errors
* sticky scroll chat

* potential sticky scroll fixes

* add back rnderParsedRequestToPlainText

* clamp height, editing value instead of input box

* fix large gap + editing + address pr comments

* address comments + fix css

* fix tests

* only show sticky scroll when fully hidden

* address some more fixesgit add .

* fix compiliation/hygiene

* add fade in animation

* Fix sticky scroll regressions

Co-authored-by: justschen <54879025+justschen@users.noreply.github.com>

* Fix sticky scroll review findings

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

---------

Co-authored-by: Rob Lourens <roblourens@gmail.com>
Co-authored-by: BeniBenj <besimmonds@microsoft.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Defer idle Copilot configuration updates (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chat: avoid transferring local debug logs over IPC

Keep local log and user-data resources as URI/size descriptors so the main process can stream them directly into the export. Bound unavoidable inline content for non-local resources to a shared 30 MiB budget.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* make sure thinking headers have markdown rendering

* Address thinking header review feedback

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

* Fix writable progress test fixture

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…he list (#331606)

* agentHost: Make the first session listing authoritative for legacy Copilot CLI migration

* agentHost: address PR review on legacy Copilot CLI migration readiness

* agentHost: redirect legacy Copilot CLI opens through the agent host

* agentHost: drop the startup discovery wait now that opens redirect

* do not remember legacy adoption failures and cleanup

* Feedback update

* Few fixes and cleanup

* test fix

* Handle external session visibility and test fix

* feedback updates

* few updates
@pull pull Bot locked and limited conversation to collaborators Aug 20, 2026
@pull pull Bot added the ⤵️ pull label Aug 20, 2026
@pull
pull Bot merged commit eb5099f into code:main Aug 20, 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.

9 participants