* agentHost: attribute telemetry to initiating clients
Plumb VS Code client telemetry identity through AHP and attach the complete known initiator context to attributable Agent Host events without replacing host identity. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: address client attribution feedback
Fix test registration, propagate initiator context through provider operations and Claude edit telemetry, and retain identity in AHP diagnostic logs. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
macOS's default TMPDIR makes the Electron IPC socket path exceed the
~103-char unix socket limit, so every launch failed with EINVAL. Fall
back to /tmp, and document the same limit for the Playwright daemon.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
agentHost: show worktree sessions in a window opened on their repository folder
2026-08-15 00:59:08 +00:00
vs-code-engineering[bot]GitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>CopilotPaul Wang
* chore: bump @github/copilot-sdk to 1.0.11-preview.2 and @github/copilot to 1.0.80-1
* Adapt agentHost to SDK JsonValue tool-args/settings widening
SDK 1.0.11-preview.2 widened PermissionRequest custom-tool args,
tool.execution_start arguments, callTool arguments, and managed-settings
resolved data from Record<string, unknown> to the recursive JsonValue type.
Migrate the VS Code call sites (and their tests) to the new contract,
narrowing JsonValue back to an object where property access is needed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Copilot agent host E2E regressions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc
* Update Copilot CLI to 1.0.80
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc
* Isolate Copilot state in smoke tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc
* Isolate Codex state in smoke tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Paul Wang <8560030+pwang347@users.noreply.github.com>
Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc
* Fix moved Omni picker positioning
Use authoritative native bounds for the focused Omni window when positioning model, folder, and context picker overlays after the window has been dragged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38881cae-54c4-44ea-9f5b-e0a2874c2979
* Target Omni window for picker bounds
Resolve picker geometry by the Omni auxiliary window ID instead of the last active main window.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38881cae-54c4-44ea-9f5b-e0a2874c2979
---------
Copilot-Session: 38881cae-54c4-44ea-9f5b-e0a2874c2979
The title span resolved the SDK conversation id only from a live session or a
provisional reservation, both of which are empty after a cold restart until the
session is resumed. A rename in that window fell back to the AH session id, so
the title span drifted off the turn spans again for fork/import/peer sessions.
Consult the persisted default-chat backing before falling back (fresh sessions
store the AH id there, so no change for them).
* implements rich link presentation in chats
* Allows settings to be set by experiments
* Fix rich link CI configuration
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8949987-7bbf-43c2-a7bb-ee6450ac74c7
---------
Copilot-Session: b8949987-7bbf-43c2-a7bb-ee6450ac74c7
Run background status probes with optional Git locks disabled so changeset commits do not contend for index.lock. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: add Copilot SKU telemetry context
Propagate the raw Copilot entitlement SKU from account discovery to provider-scoped Agent Host events while omitting unavailable and non-Copilot values.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: use Copilot provider ID for SKU telemetry
Align SKU enrichment and its coverage with the production copilotcli provider identifier.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: support Copilot telemetry provider aliases
Include SKU context for both the copilotcli agent provider and direct Copilot SDK telemetry paths that still emit copilot.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: centralize Copilot SKU telemetry context
Add the authenticated account SKU in the Agent Host telemetry service so every standard and restricted event receives it, independent of provider. Clear the context on sign-out without relying on immutable common-property storage.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: register SKU as common telemetry context
Use the telemetry delegate's common-property path for standard classified events so their exact GDPR types remain intact. Continue enriching restricted telemetry in the Agent Host sender.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: reuse common telemetry properties for SKU
Add a generic setCommonProperty to the restricted telemetry surface and fan common properties out from the Agent Host telemetry service, so account context reaches GH and internal events without per-property special casing.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Agent Host changes for agents/automation-timeout-issue-logging-update
* Automations: Improve timeout diagnostic accuracy
Log the created session resource when link persistence fails, and use the persisted post-update run state in timeout diagnostics.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The host-emitted title_changed span carried gen_ai.conversation.id set to
the AH session id, while the agent's anchor and turn spans use the SDK
conversation id. After the id namespaces were separated, those diverge for
fork/import/peer chats, so the title span stopped correlating with the
turn spans. Resolve the SDK conversation id backing the session URI when
emitting the title span, falling back to the AH session id (no change for
fresh sessions).
* chat: carry managed settings client identity in the query string
Neither header channel survives the trip to the settings service: fetch
refuses to set User-Agent, and custom headers are dropped before reaching
the monolith unless they are allow-listed. Move the client identity into
the request URL, which is subject to neither restriction and behaves the
same on desktop and web.
Restores the product service injection that #330762 removed along with
the dead headers, since the identity is built from the product version.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 584bc910-e58b-44d4-9aaf-eefda60f23e4
* chat: drop a stale runtime version from the managed settings url
The helper preserves query parameters already present on the configured
endpoint, so a `copilot_runtime_version` carried by that URL would stand
in for a runtime this build did not bundle. Remove it when no runtime is
present, and stop exporting the client id, which has no consumer outside
this module.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 584bc910-e58b-44d4-9aaf-eefda60f23e4
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 584bc910-e58b-44d4-9aaf-eefda60f23e4
* agentHost: use the side chat seed marker as the inherited turn boundary
A side chat forks its source chat, so its transcript starts with inherited turns
and continues with its own turns. The boundary was kept only as a turn count in
the persisted backing. The count is a copy of a value that changes with time, and
a recompute in `createChat` wrote the full transcript length back into it. When
that recompute ran again for a chat that already had its own turns, the count
increased and the display hid the turns of the user. In one session the count
moved from 16 to 24 and hid 8 turns.
The first own turn of a side chat carries a `<side-chat-context>` seed marker.
The marker gives the same boundary, it stays in the transcript, and it does not
change with time. The marker is now the authority and the count is a hint.
- Removes the recompute in `createChat` that wrote the transcript length into
`inheritedTurnCount`. The value from the fork is correct and must stay.
- Adds `resolveSideChatBoundary`, which keeps the recorded count when a marker is
at that position, and otherwise moves to the first marker. A count that is too
large can no longer hide turns. A side chat that forks a side chat keeps the
recorded count, because its inherited turns hold the marker of the parent.
- Adds `sliceSideChatTurns`, which resolves the boundary, slices, strips the seed
and reports a misalignment to the log. The Copilot and Claude read paths use it.
- Compares against the resolved boundary in `prepareSideChatPrompt`, so a count
that is too large can no longer cause a second seed injection.
- Adds a warning when a fork does not find its anchor turn. The fallback treats
the full source as inherited, which hid all turns without a record.
- Extracts the seed parser from `stripSideChatContext` so that detection and
removal of the seed cannot diverge.
- Binds two side chat test fakes to the sends of the recorder instead of a count
of `getMessages` calls. The count made the tests depend on the defect.
Corrupt counts need no migration, because the correction occurs at read time.
(Commit message generated by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: let the last side chat seed marker set the boundary
Simplifies the boundary resolver to a reverse scan that stops at the last seed
marker. The earlier version searched only at or before the recorded count, which
made the corrupt value bound the repair, and which returned the seed of an
ancestor when a nested side chat had a count that drifted past its own seed.
- Returns the index of the last seed marker in the transcript. Markers of
ancestors always precede the marker of the chat, so the last one is the
boundary for a nested side chat as well.
- Uses the recorded count only when the transcript holds no marker, which means
the chat did not send a message yet.
- Adds a test for a nested side chat with a count that drifted past its own
marker. The earlier version resolved that case to the marker of the parent and
showed the turns of the parent.
(Commit message generated by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: anchor the side chat boundary to the inherited turn id
Replaces `inheritedTurnCount` with `inheritedTurnId`, the id of the last turn a
side chat inherits from its source. The id names a turn of the same transcript
that the reads slice, so it stays correct while the chat grows, and it tells the
seed marker of the chat apart from the markers of the side chats it descends
from. A count cannot do either.
Copilot reported the gap on the previous revision: a side chat that forks
another side chat holds the marker of the parent before it sends anything, so a
rule of "take the last marker" gave the index of the parent. Reads then showed
the turns of the parent, and the first prompt of the child went out with no
context.
- Records `inheritedTurnId` on the Copilot and Claude fork paths. Forks copy the
transcript, so the ids of the inherited turns carry over unchanged.
- Resolves the boundary from that id first, then from the last seed marker, then
from the count that older builds wrote.
- Keeps `inheritedTurnCount` as an optional legacy field. A chat written by an
older build still resolves, and a chat whose count drifted is repaired by the
marker.
- Adds tests for a nested side chat before and after its first message, and for
an id that no longer resolves.
(Commit message generated by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: drop inherited side chat turn counts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Revert to showing all context size options
Removes the `github.copilot.chat.preferLongContext.enabled` setting and
reverts to always showing both the default and long-context options in the
model picker. Also removes the now-dead `freeLongContext` plumbing that the
setting gated.
Reverts:
- https://github.com/microsoft/vscode/pull/322950
- https://github.com/microsoft/vscode/pull/323116
- https://github.com/microsoft/vscode/pull/324650
- https://github.com/microsoft/vscode/pull/328628
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add context-size picker coverage for both surfaces
Addresses PR review: cover the reverted "always show both context options"
behavior for each independently implemented picker surface.
- languageModelAccess.test.ts: a free/no-surcharge endpoint publishes both
the default and full windows, with the smaller window as the default.
- copilotCliModels.spec.ts: a CLI model with defaultContextMax < maxInputTokens
and no long-context surcharge exposes both sizes, smaller as default.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Default to the longer window for free long-context models
Keeps both context-size options in every picker, but when the long-context
tier has no surcharge (free long context) the default selection — and the
no-selection behavioral fallback — is the full window rather than the smaller
default tier. Models with a long-context surcharge still default to the
smaller tier so users opt into the extra cost.
Applied consistently across all four surfaces:
- Main chat picker: getContextSizeOptions default + applyContextSizeOverride fallback
- Copilot CLI picker: buildConfigurationSchema default + resolveContextTier fallback
- Agent host: _createContextSizeConfigSchemaProperty default + getCopilotContextTier
via the restored freeLongContext flag (and hasLongContextSurcharge helper)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Shorten context-size comments
Condense the free-long-context comments added across the picker surfaces to
concise one-liners; no behavior change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Further cleanup of model restoration logic
* Small cleanup
* Fix comments
* Preserve a conversation's model across pool rebinds
initialize() wrote the profile preference into the bound conversation's intent
unconditionally, erasing a model seeded from request history before the catalog
published it. Seed only when the conversation has not chosen a model.
Also capture the inline editor's instruction routing with the mode it belongs to,
so a resubmit cannot pair the edited mode with the composer's tool selection.
Keep the active question or approval flow open when the user sends a side question with /btw.
- Route concurrent silent slash commands while any request is active.
- Keep normal message handling unchanged when no request is active.
- Add a test for a request that waits for user input.
Fixes https://github.com/microsoft/vscode/issues/330872
(Commit message generated by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* theme: update agent panel border colors and styles across themes
* theme: update border colors for agents in various themes
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(theme): update agentsPanel.border to transparent
* fix(theme): set agentsPanel.border to transparent
* fix(screenshots): update image links for agent host and user data migration
---------
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* refactor: replace Codicon.close with Codicon.closeSmall for consistency in chat components
* refactor: replace Codicon.close with Codicon.closeSmall for consistency in chat components
---------
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
* agentHost: Scope rename tool to chats
Replace the separate session and chat rename tools with one chat-scoped tool. A sole default chat continues to name its session, while chats in multi-chat sessions keep independent titles.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Preserve independent chat rename state
Resolve cold legacy peer catalogs before choosing session-backed title storage, and track multi-chat default title provenance independently across controller recreation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Rely on restored chat catalogs
Keep rename cardinality free of legacy migration work because session restoration establishes the peer-chat catalog earlier in the lifecycle.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Clear independent default title state
Include the deterministic default-chat key when releasing title-controller state for multi-chat sessions, and align cleanup coverage with independent default-chat provenance.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extension host shutdown cancels outstanding RPC replies even when the
request uses CancellationToken.None. Avoid reporting that expected
lifecycle outcome as an error while preserving unexpected failures.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>