* agentHost: complete resumed subagent turns from stop hooks
Match subagent stop hooks by invocation ID when the SDK provides the agent identity only in the start event input. Reuse the existing completion path so finished follow-up turns do not keep the session in progress.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: narrow subagent stop hook input before reading agent ID
Fix the Compile & Hygiene failure by checking that SDK hook input is a non-null, non-array object before reading agentId. Cover missing, primitive, array, and non-string inputs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Only web and server-web consume the injected built-in extension manifest. Leave the native replacement empty to avoid carrying 368 KB of unreachable metadata in each desktop renderer bundle.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Defer title bar overflow measurement
Schedule responsive title bar overflow reads on the animation frame so they no longer force style and layout during startup. Apply the same coalesced behavior to the workbench and Agents window title bars.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add RuleTester coverage for valid accesses, diagnostics, and autofix edge cases. Preserve escaped string-literal property names by checking their raw source before reporting.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rank attributable completed turns by their completion time instead of chat modification time, so Agent Merge notices cannot select stale checkpoints. Add two-chat coverage for notices and real repair turns.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix managed sandbox force-on resolution for Agent Host routing
Preserve sandbox.enabled=true from any managed source so conflicting device policy cannot prevent new chats from defaulting to Agent Host Copilot. Keep diagnostics aligned and cover source conflicts and policy refreshes.
Fixes#334273
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Agent Host changes for agents/log-analysis-error-fix-prioritization-2bfece15
* sessions: fix changes summary type narrowing
Move the summary observable onto the existing-session adapter and use an explicit type guard for readonly change arrays.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: test atomic changes summary refresh
Observe file changes and aggregate counts together across provider refreshes to ensure updates stay atomic and never create a synthetic resource.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The V3 new-session onboarding personalizes its 3 prompt options with GitHub
items, falling back to standard options. Telemetry from experiment f716301b
showed 61% of impressions timed out with zero GitHub options, and the existing
events could not measure partial success: `fallbackReason` was only 'none' when
all 3 slots were GitHub, so 2 real issues logged identically to zero.
Telemetry (additive; existing field names and values unchanged):
- promptStrategy gains gitHubOptionCount, candidatesFound, lookupDurationMs,
per-stage durations and outcomes, and timedOutStage.
- promptOptionInteraction gains optionIndex and optionKindsShown, so per-option
CTR is computable rather than confounded with availability.
- Both gain a shared impressionId, replacing lossy DevDeviceId joins.
- New 'noComposer' fallback reason splits the infra-bug meaning out of the
overloaded 'noCandidate'.
- Bounded categories and counts only: no titles, URLs, numbers, repository
names or prompt text.
Latency, without raising the 10s total budget:
- Publish issue candidates before the linkage lookup, which only filters out
issues that already have linked pull requests and so must never hide them.
- Keep review-thread enrichment off the critical path; it produced the least
picked option while being the most expensive stage.
- Rebalance sub-budgets to 4000/1500/3000 so the concurrent chains fit.
- Stream options into the composer: paint the standard options immediately and
replace slots as lookups land, instead of blocking first paint on the lookup.
INewSessionPromptOptionsController.resolve gains an optional progress callback
that reports whether an update was rendered, so the composer can refuse late
updates while the user is acting on the options and telemetry still describes
what was actually shown.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the chat.turnStatusPills configuration and legacy compatibility path so turn status pills render consistently in agent sessions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove duplicate UNIFIED_WORKSPACE_PICKER_SETTING imports introduced by overlapping main changes so core compilation succeeds again.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: drop the composer card, give each control its own surface
Over a chat background the new-session composer sat on a single frosted
card, while a started session gives every control its own surface. This
makes the composer match the started session.
- Delete `.new-chat-widget-content`'s card styling: the padding, blur,
border, radius and shadow.
- Give the bottom-row action labels and the workspace pills an opaque
`--session-view-background` fill, and put a 2px gap between the agent
host config controls now that they no longer share one surface.
- Keep the hover tint opaque. `--vscode-toolbar-hoverBackground` is
translucent, so it goes on `background-image` as a flat gradient and
composites over the opaque fill instead of replacing it.
- Frame the bottom-row chips when a chat background is set, the same
move the in-session secondary toolbar makes in `chatView.css`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Address review: high-contrast chip frame, fixture layering
The chip frame over a chat background used commandCenter.inactiveBorder,
which — unlike its sibling border tokens — registers no hcDark/hcLight
value, so it stayed a 25%-alpha wash in high contrast. Put contrastBorder
first, the way the rest of the codebase does: high-contrast themes define
it, others fall through.
The chat-background fixture painted its opaque base on .session-view,
which production makes transparent so the wallpaper can show. Move that
base onto the part instead. Both screenshots are byte-identical, since
the wallpaper is positioned and always painted above a static background
either way — but the fixture now stacks its layers the way the real
window does.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Refresh the blocks-ci screenshot manifest
Regenerated by CI. Most entries are this PR repainting the composer, and
the NewSessionChatBackground pair is the fixture it adds.
One entry is not from here: chatInput/ResponsiveModelResizeCycleMinimal/Dark.
#334021 landed after the manifest was last regenerated and changed
chatView.css without refreshing it, so this PR is the first regeneration
to pick that up.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Restore the resize-cycle hash the manifest refresh clobbered
ResponsiveModelResizeCycleMinimal/Dark is not a fixture this branch
touches, but the regenerated manifest I pasted carried a one-off hash for
it. Put back the value main has held across ~20 regenerations, which is
also what the latest run produced.
That fixture is the only blocksCi one that sets virtualTime.enabled to
false, and it drives 19 sequential resize widths on wall-clock time, so
its final frame can land mid-settle on a loaded runner.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* agentHost: bump Copilot SDK and CLI canaries
Update the bundled root and remote dependencies to the requested canary builds. Accept the SDK's policyHelper managed-settings source in diagnostics and E2E validation.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* build: keep Copilot canaries in product builds
Restore the public Copilot dependency pins used by OSS builds. Product builds can apply the requested private-feed SDK and CLI canaries through the existing Azure pipeline override parameters.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* build: check in product Copilot versions
Use a checked-in manifest as the default source for Copilot SDK and CLI versions in Azure product builds while keeping OSS package manifests on public versions. Retain queue-time selectors as recovery and validation escape hatches.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* build: override only product Copilot runtime
Keep the OSS SDK version and check in the product runtime canary as the existing Azure pipeline parameter default. Extend the shared override path to support runtime-only updates.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* build: preserve latest canary SDK tag
Keep the existing sdk-canary build tag emission scoped to latest-canary resolution while adding runtime-only overrides.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* build: update product Copilot runtime canary
Set the checked-in product runtime override to 1.0.84-canary.67.g6496fad.unsigned.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: publish client tools before starting turns
Flush and await the latest active-client snapshot before dispatching new or resumed turns so tools registered during MCP startup are available on the first provider request. Keep the barrier cancellation-aware and cover ordering and cancellation regressions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: harden active client turn barrier
Avoid retaining cancelled unresolved claims and reconcile before reading resumed-turn state so concurrent resumes are joined instead of duplicated. Strengthen both race regressions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Paul Wang <paulwang@Pauls-MacBook-Pro.local>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: fix GitHub context repository selection
Avoid waiting for unresolved local Git metadata in the Agents window, and initialize every workspace root before choosing a repository in multi-root editor windows.\n\nFixes #334563\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: preserve workspace folder choices for GitHub context
Keep multi-root workspace folders as distinct Issue and Pull Request picker entries, even when they resolve to the same GitHub repository.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: choose workspace folder before GitHub context
Show multi-root workspace folders before resolving GitHub metadata so Issue and Pull Request attachment never skips folder selection while repository state is still loading.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: avoid blocking GitHub context repository discovery
Build multi-root choices from workspace folders and already-known repositories so unresolved Git state cannot prevent the Issue or Pull Request picker from opening.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: scope GitHub context to selected folder
Pass unresolved workspace folder selections to Copilot Chat and resolve their remotes without waiting for repository HEAD state. This keeps issue and pull request searches limited to the chosen repository even while Git discovery is incomplete.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: resolve Git worktree remotes for context
Follow Git worktree directory pointers and common directories when resolving the selected folder's remote. Preserve normal remote preference ordering so origin is chosen consistently when repository discovery is unavailable.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: use selected Agents folder for GitHub context
Pass a single selected local folder directly to Issue and Pull Request attachment commands. Only offer repository selection when that folder cannot be resolved.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: fix GitHub repository picker typing
Make the repository quick pick explicitly single-select and pass a mutable pick array so Compile & Hygiene resolves the correct overload.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Copilot session provider formatting
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Skip workspace trust prompts in Allow All mode
Reuse the effective auto-approval configuration when converting workspace-less sessions so Allow All and global auto-approve bypass trust prompts consistently, including isolated worktree creation. Preserve trust checks for default, assisted, and autopilot modes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Inline workspace trust bypass checks
Keep the workspace-conversion helper minimal while preserving the SessionPermissionManager public methods and their existing effective configuration behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Localize workspace trust bypass checks
Keep the one-off effective approval decision in workspace conversion and restore session permissions to its prior shape.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Preserve workspace transition boundaries
Keep workspace transitions visible across collapsed progress and Agent Host restarts while hiding the internal continuation request. Persist transition state atomically and serialize database mutations so rollback cannot absorb unrelated writes.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Address workspace transition review feedback
Serialize transition restoration behind earlier turn mapping writes, and preserve access to truncated transition labels with the standard hover service. Avoid the global class-substring selector while retaining compact icon styling.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: move no-workspace experiment setting
Move the No workspace experiment gate into the Sessions chat contribution and rename it to describe the tested UX. Migrate explicit values from the legacy application-scoped setting while preserving explicit values already configured under the new key.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: clarify unified workspace picker setting
Name the experiment gate for the complete unified picker experience, including consolidated remote sources, search, and the No workspace option.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: address workspace picker review
Keep the deprecated application-scoped key included so configuration migration can inspect it, and qualify No workspace support in the replacement setting description.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: preserve workspace picker treatment name
Keep new and old clients on the same ExP flight by explicitly retaining the existing treatment identifier while the user-facing setting is renamed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: use unified picker treatment name
Allow the renamed setting to derive a matching ExP treatment identifier for a clean restart of the recently launched experiment.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: test workspace picker setting migration
Extract the unified workspace picker migration and cover application scope, legacy value removal, value copying, and preservation of an explicit replacement value.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: restore GitHub issue and PR context attachments
Revert compact inline references for pasted GitHub issue and pull request URLs until attachment rendering is unified. Restore automatic context attachment synchronization in the Agents composer.\n\nRefs #334542\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: attach pasted GitHub links as context
Keep pasted issue and pull request URLs in the prompt while adding context attachments in regular Chat. Share URL parsing with the Agents composer and preserve undo behavior.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: use semantic icons for GitHub context
Represent pasted GitHub links as generic context so issue and pull request pills render their respective Codicons without generic pasted-content chrome.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: preserve request link interactions
Reject invalid GitHub issue and pull request URL continuations, and keep nested request links keyboard- and pointer-operable when inline request editing is enabled.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: avoid forwarding flatMap index as metadata
Wrap the GitHub attachment parser callback so Array.prototype.flatMap does not pass its numeric index into the optional metadata parameter.\n\nRefs #334548\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(copilot): don't auto-retry expired vision attachments, show actionable error
Expired pasted images return vision_attachment_not_accessible 400 on every
request. ToolCallingLoop retried the same poisoned payload 3x with
'Recovering from request error'. Skip auto-retry for this error (mirrors
isContextOverflowBadRequest precedent) and surface remove-attachment /
new conversation guidance.
Fixes#334126
* fix(copilot): centralize vision-attachment check, add retry and formatter tests
Address Copilot review on #334129: extract shared
isVisionAttachmentInaccessibleError helper in commonTypes and reuse it
from ToolCallingLoop.shouldAutoRetry; cover the retry exemption and both
error-message variants with tests.
Fix dictation hangs by adding timeouts to Foundry Local native calls
The on-device (nemo/Foundry Local) dictation backend awaited several
native SDK calls with no timeout and no AbortSignal: the model catalog
lookup, model.load(), session.start(), each session.append() call
(chained serially so one stuck append blocks every later chunk and
stop()), the result stream's next(), and session.stop()/dispose().
If any of these stalls (proxy/firewall silently dropping packets, a
wedged native addon, a driver hiccup during model load), the awaiting
promise never settles. Since start()/pushAudio()/stop()/cancel() all
await these calls directly or transitively, dictation would hang
indefinitely with no error surfaced to the user and no way to recover
short of restarting VS Code.
Guard each of these awaits with a hard timeout that rejects with a
descriptive error, mirroring the existing inactivity-timeout pattern
already used for the native runtime tarball download. A timeout now
surfaces as a normal model/session Error (with a new 'timeout' error
code from classifyModelError) so the existing error-handling UI path
picks it up, and Stop/Cancel can no longer hang forever.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: add telemetry for toggling terminal thinking blocks
Track user expand/collapse of the terminal command header in thinking
and simple-collapsible wrappers, without counting auto-expand.
* chat: log collapsible toggles from the shared parent
Move user-toggle telemetry onto ChatCollapsibleContentPart so thinking,
terminal, references, and other wrappers share one event. Keep the
terminal-specific event when kind is terminal.
* Agent Host changes for aeschli/agents/improve-customization-message-ui
* Address customization hint review feedback
Route review links to the relevant customization surface and avoid reporting an unverifiable instruction count when collection is extension-owned. Add coverage for disabled customizations and each hint destination.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Avoid blocking agent dispatch on customization summaries
Start summary discovery alongside request setup, but publish it only after agent invocation has begun. Forward request cancellation through customization discovery so abandoned sends stop outstanding work.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix customization summary ordering test leak
Await the agent invocation gate directly while summary discovery remains blocked, avoiding a leftover cancelable timeout in browser unit tests.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove customization availability summary
Keep migration hints focused on workspace and user candidate counts and retain migration-page deep linking, while removing the summary setting and inventory enumeration path.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>