Skip to content

[pull] main from microsoft:main - #1601

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

[pull] main from microsoft:main#1601
pull[bot] merged 6 commits into
code:mainfrom
microsoft:main

Conversation

@pull

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

alexdima and others added 6 commits August 17, 2026 10:37
Every cached AgentHostSessionAdapter eagerly subscribed to the shared
agent-capabilities observable, so a window restoring hundreds of sessions
installed hundreds of observers and tripped the listener leak detector.

Most of those observers had nothing to do: the autorun only re-applies a
chat catalog, and an adapter that never received one has no catalog to
reconcile. Install the observer on the first applyChatCatalog call instead,
so only adapters with catalog state to reapply subscribe. Late-hydrating
capabilities still re-expand a collapsed peer catalog.

Found while self-hosting Insiders.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: address agent merge review feedback

Follow-ups to PR #331010 review comments:

- Rename settings from `chat.agentHost.agentMerge.*` to `chat.agentMerge.*`.
- Reject client writes to host-owned `agentMerge.controller` session config so a
  forged controller state cannot drive a native merge.
- Reconcile injected autonomy configuration every cycle and roll back keys that
  policy later revokes; never widen configuration while a turn is active.
- Revalidate the merge target before starting a turn and before merging, and
  refresh live state, config and top-level comments inside the merge step.
- Split `AgentMergeRepairAction` out of `AgentMergeAction` so repair paths
  cannot express a merge.
- Carry all feedback comments per review thread and bound the prompt with
  explicit caps and an aggregate character budget.
- Fail closed when fork head provenance is missing, and ignore refs from a
  different GitHub host.
- Cancel the controller turn when the runtime stops.
- Split the enable/disable command preconditions with a dedicated context key and
  make the configure quick pick's reset a title button.

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

* agentHost: address agent merge PR review feedback

- Preserve host-written session config across a client `SessionConfigChanged`
  with `replace: true`. Omitting `agentMerge.controller` previously cleared the
  bound target, comment watermark and attempt budgets, which bypassed the
  authorization boundary that explicit-write rejection was meant to enforce.
- Canonicalize pull request web hosts to their API host when checking that the
  credential matches. GitHub Enterprise Cloud serves `tenant.ghe.com` from
  `api.tenant.ghe.com`, so comparing the web host rejected every GHE Cloud pull
  request. The derivation now reuses `deriveGitHubEndpoints`.
- Refresh top-level comments inside `prepareMerge`, last, before the snapshot and
  token are captured. Refreshing them in the controller beforehand left a window
  across `prepareMerge`'s own authoritative refreshes in which a new maintainer
  comment could be missed; refreshing afterwards would invalidate the preparation
  generation. A comment landing after capture now invalidates the preparation.
- Migrate the legacy `chat.agentHost.agentMerge.*` setting ids to their new
  `chat.agentMerge.*` names so an explicit opt-out is not silently discarded.

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

---------

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

Update surface border color to use opaque defaults and add corresponding tests

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
* agentHost: Filter external Copilot sessions

Only discover standalone Copilot CLI and GitHub Copilot app sessions that have repository metadata and were modified within the last seven days. Preserve legacy extension-host adoption and cover accepted and rejected metadata boundaries.

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

* agentHost: Fix Copilot discovery gating test

Gate the raw session-list RPC used by external discovery so the migration-toggle test no longer waits on the obsolete convenience listSessions seam.

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

* agentHost: Format Copilot discovery test

Apply the repository TypeScript formatter to the raw session-list test fixture.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add recent external sessions filter

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

* Address recent session review feedback

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

* Update session lifecycle test for external default

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

---------

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

* Add CSS styles to persist tab actions when action space is reserved

* Potential fix for pull request finding

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

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 17, 2026
@pull pull Bot added the ⤵️ pull label Aug 17, 2026
@pull
pull Bot merged commit da71f95 into code:main Aug 17, 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.

3 participants