[pull] main from microsoft:main#1452
Merged
Merged
Conversation
… against stale turns Background todo passes were triggered by accumulated activity from previous turns when a conversation continued, causing todos to be recreated even for trivial messages like 'hi'. Three interacting problems are fixed: 1. Policy threshold used total substantiveToolCallCount across all unprocessed rounds (including previous turns). Add currentTurnSubstantiveToolCallCount to IBackgroundTodoDeltaMetadata and use it in shouldRun() so only current- turn activity drives threshold checks. 2. requestFinalReview fired on every turn end as long as _hasCreatedTodos was true, using _lastExecutionContext from a previous turn. Track _lastExecutionContextTurnId and skip when the context is stale. 3. _consecutiveInitialNoops persisted across turns, penalizing a new user message with backoff from a previous turn's exploration. Track _lastSeenTurnId and reset per-turn state when the turn changes. Also annotate tool-call rounds with 1-based turn indices (IToolCallRoundWithTurn) so the prompt can render <turn> boundary markers, and add renderRoundsGroupedByTurn for token-efficient turn grouping. Fixes stream: false on the copilot-fast request that caused SSE parse failures.
Update both system messages (regular and final-review) with turn-aware trajectory format documentation and cross-turn rules: - Rounds are now grouped inside <turn index="N"> wrappers instead of repeating a turn attribute per round, saving tokens. - Cross-turn rules instruct the model to treat previous turns as already- reflected context and only update todos based on current-turn activity. - Final-review prompt focuses completion evidence on the latest turn and skips tool calls when the turn had no substantive activity. PreviousContextRoundChunk emits <turn> open/close tags at boundaries via annotateWithTurnBoundaries(). Inline rendering uses renderRoundsGroupedByTurn.
- backgroundTodoDelta: test currentTurnSubstantiveToolCallCount only counts current-turn rounds, is zero for history-only deltas, excludes processed rounds, and matches total when no history is present. - backgroundTodoHistory: update collectAllRounds test for turn-annotated output, wrap buildBackgroundTodoHistory rounds with turnIndex, add turnIndex to all IBackgroundTodoHistoryRound inline objects, add renderRoundsGroupedByTurn tests for turn boundary wrapping.
- Make PreviousContextRoundChunk self-contained by always wrapping each round in <turn> tags, preventing unbalanced tags when PrioritizedList prunes boundary rounds. Remove annotateWithTurnBoundaries helper. - Add currentTurnSubstantiveToolCallCount to all dummyMeta object literals in policy and processor tests for type safety. - Add unit tests for requestFinalReview turn-ID guard: verify it skips when execution context is from a different turn and runs when IDs match.
* feat: enhance session customization handling and state management across agents * refactor: simplify customization sync logic in CopilotAgent * fix: guard initial customization publish for disposed sessions Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com> * feat: improve initial customization handling during session creation --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Our current implementation has some bugs that can hide changes. However even after fixing these, I'm not 100% confident a unexpected change wont sneak through. Best to make users aware of this while also trying to prevent this
…ngth telmetry event
feat(debug): add 'Copy All' action to Watch view context menu
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* draft version * draft version * adding mxc for windows sandboxing * Potential fix for pull request finding Merging readwritePaths Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * cleaning up PR * cleaning up * Run Windows MXC commands directly * Pin MXC SDK lockfiles * fixing tests and cleaning up env variables * adding a flag for windows sandboxing as its experimental * adding a flag for windows sandboxing as its experimental * adding a flag for windows sandboxing as its experimental --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
Show a warning when showing the rendered markdown diff
* Chronicle: Add cost-tips command * feedback updates
* Browser: support element selection in subframes * feedback * graceful handling after frame disposal
* Long context pricing * Fix
…t sessions (#316907) Fix duplicate terminal tool render from pastTenseMessage For agent host sessions, terminal tool calls were having pastTenseMessage set on the serialized history invocation, which the renderer then displays alongside the terminal command — causing the past-tense message to appear to duplicate the main message. The live finalize path already suppressed pastTenseMessage for terminal tools using a broader check (terminal content URI OR tool kind). The history replay path (completedToolCallToSerialized) was only checking the terminal content URI. Align them so pastTenseMessage is suppressed for terminal tools detected either way. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor and add tests for agentCustomizationContentExpander * fix tests
Long lines in read_file output were getting pruned by the token-budget prompt renderer, so the agent saw an empty result and looped — adding unbounded session log size each retry. Truncate any line over 2000 characters at the source with a `[truncated]` marker, and append a notice when any line was truncated so the model knows the data is abbreviated rather than missing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…versationid-to-tool-usage Add GHCP telemetry correlation fields for tool responses and response turns
…317856) * agent-host: stop config pickers flashing during resolveSessionConfig When a user changed a session-config picker (isolation, branch, autoApprove, mode, claude permission mode), all schema-driven pickers visually disappeared and reappeared while the async resolveSessionConfig round-trip ran. Root cause: NewSession.setConfigValue wiped the cached schema to { properties: {} } during the optimistic update, so every well-known mode/autoApprove guard returned false and hid its picker until the new schema arrived ~200-500 ms later. Fix: - Preserve the existing schema in NewSession.setConfigValue. - Introduce an observable isResolvingConfig on NewSession, owned by resolveConfig's finally, with begin/endResolveConfigSync helpers for the synchronous-set-before-event path and the no-connection early- return path. - Expose IObservable<boolean> isSessionConfigResolving(sessionId) on IAgentHostSessionsProvider; constObservable(false) for any session that isn't the in-flight new session. - Distinct from session.loading: the latter also stays true while config is complete-but-required-values-missing, where pickers must remain interactive. Every picker that mutates session config now disables on this observable: generic per-property chips, the mode/claude permission mode enum pickers, the autoApprove permission action item, the mobile bottom-sheet mode picker, and the mobile combined Mode+Model new-session chip. The autoApprove permission picker also gates the delegate's setPermissionLevel on the same observable, because ActionWidgetDropdown opens via Enter/Space directly on its label and CSS pointer-events: none does not block keyboard activation. A defense-in-depth bail in setSessionConfigValue drops second-arrival changes on a new session while a resolve is already in flight. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agent-host: update FakeProvider mocks for isSessionConfigResolving Two unit-test FakeProvider mocks were missing the new isSessionConfigResolving method that the production AgentHostPermissionPickerDelegate and AgentHostSessionEnumPicker (claude permission mode) now call. Add a no-op constObservable(false) implementation to both so the rendered delegate / picker code paths don't TypeError. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agent-host: address Copilot review feedback on PR #317856 Move _isResolvingActiveSessionConfig derived initialization into the constructor so its body safely closes over parameter-property service references (avoids depending on class-field/parameter-property initialization ordering). Split the picker trigger's read-only (permanent: <span> + aria-readonly) state from the resolving state (transient: <a> stays focusable, slot gets .disabled class, aria-disabled is set). Click is blocked at the picker level by an in-flight resolve check in _showPicker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…type (#317859) * fix(chat): enhance language model reset logic for CopilotCLI session type * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix(chat): improve language model reset logic and enhance logging in ChatInputPart --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
) The @microsoft/mxc-sdk package ships per-arch native binaries under bin/arm64 and bin/x64 regardless of the host architecture, so the macOS x64 build was failing 'Verify arch of Mach-O objects' on node_modules/@microsoft/mxc-sdk/bin/arm64/mxc-exec-mac. Skip the whole bin/ tree, matching the pattern already used for similar multi-arch vendor payloads.
…sions/merge-conflict (#317864) build(deps): bump @nevware21/ts-utils in /extensions/merge-conflict Bumps [@nevware21/ts-utils](https://github.com/nevware21/ts-utils) from 0.11.6 to 0.14.0. - [Release notes](https://github.com/nevware21/ts-utils/releases) - [Changelog](https://github.com/nevware21/ts-utils/blob/main/CHANGELOG.md) - [Commits](nevware21/ts-utils@0.11.6...0.14.0) --- updated-dependencies: - dependency-name: "@nevware21/ts-utils" dependency-version: 0.14.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Hide anonymous access setting from settings ui
…sions/copilot (#317872) build(deps): bump @nevware21/ts-utils in /extensions/copilot Bumps [@nevware21/ts-utils](https://github.com/nevware21/ts-utils) from 0.12.5 to 0.14.0. - [Release notes](https://github.com/nevware21/ts-utils/releases) - [Changelog](https://github.com/nevware21/ts-utils/blob/main/CHANGELOG.md) - [Commits](nevware21/ts-utils@0.12.5...0.14.0) --- updated-dependencies: - dependency-name: "@nevware21/ts-utils" dependency-version: 0.14.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Copilot CLI sanity testing * Make things better * see if 1.0.48 correctly fails * Try to be smarter with git auth * Test if copilot cli sanity test auth correctly. * Test if copilot cli sanity test FAILS correctly * Try to get sanity tests pass? * Copilot CLI from chat extension sanity test * Try more smoke test for copilot cli * More smoke test related things? * title is messing with chat disabled..? * Why is there timeout for .editor-instance .interactive-session * add copilot cli ui smoke auth diagnostics * Be more descriptive when copilot cli smoke test fail * remove integration test, upgrade smoke test * Clean up Copilot CLI smoke test diagnostics * Get even more inspiration from agent smoke test
…ts (#317876) Wires up the new `channels-otlp/` protocol so the agent host's `ILogService` is mirrored over an `ahp-otlp://logs/{level}` channel and surfaced as a per-host Output channel in the workbench. - Add `OtlpLogEmitter` / `OtlpEmitterLogger` (`platform/agentHost/common/otlp/`). `LogService` is constructed with the OTLP logger as a secondary sink in both `agentHostMain.ts` and `agentHostServerMain.ts` so every log call fans out to subscribers. - `ProtocolServerHandler` advertises `telemetry.logs` in `InitializeResult`, routes `subscribe`/`unsubscribe` on `ahp-otlp:` channels through a typed `ChannelSubscription` union, canonicalises the channel URI per-level, and broadcasts `otlp/exportLogs` notifications filtered per subscriber severity. - `RemoteAgentHostProtocolClient` stores the full `InitializeResult`, adds `subscribeStateless` and `onDidReceiveOtlpLogs`. - New `RemoteAgentHostLogForwarder` in the workbench layer registers an `Agent Host (${host})` Output channel via `IOutputChannelRegistry`, subscribes at the workbench's `ILogService` level (re-subscribes on change), and appends decoded records. Constructed from `remoteAgentHost.contribution.ts::_setupConnection` so it covers WebSocket, SSH and tunnel paths. Local agent host IPC logging is unchanged. - Existing remote IPC traffic channel renamed to `Agent Host IPC (${host})` to disambiguate from the new OTLP-derived channel. - Move `UriTemplate` from `workbench/contrib/mcp/common/` to `base/common/` so the forwarder can use it for `{level}` expansion. Tests: 8 unit tests for the emitter, 7 for the server-side OTLP routing (including URI canonicalisation), 3 integration tests for the end-to-end wire flow, and the existing protocol/handshake/reconnect suites. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…17874) - ensure_supervisor_running now runs as a background task driven by tokio::spawn, so the tunnel control server and command-shell can start accepting connections immediately instead of waiting for the supervisor to come up. - handle_serve (and the agent-host port forwarder) await the shared future on demand and mix the bridge endpoint into the per-request code_server_args. Supervisor failure is logged as a warning so editing and the extension host keep working; the renderer just misses agentHostProxy. - This eliminates the startup stall that was sporadically tripping remote SSH's 450ms command-shell ready timeout. Fixes #317714 (Commit message generated by Copilot)
Fix background todo policy for current-turn activity
* sessions: clean up ISessionsProvider chat API Simplify the provider contract and remove provider access to the chat widget service so widget opening is owned exclusively by the management service. Provider API - Remove `sendAndCreateChat` and `addChat` from `ISessionsProvider`. - Add `createNewChat(sessionId)` returning the committed `IChat` so the management service can open the widget on the real backend resource before sending. - `sendRequest(sessionId, chatResource, options)` now handles both the first-send (new session) and subsequent-send paths; providers dispatch internally based on `_currentNewSession`. - For multi-chat sessions, `createNewChat` on an existing session gates on `_isMultiChatEnabled()` and creates a fresh chat in the group. Session model - `ISession.mainChat` changes from `IChat` to `IObservable<IChat>` so providers can swap the chat when an untitled new session commits to a real backend resource (e.g. Claude). - `ICopilotChatSession` owns its own `ISettableObservable<IChat>` `mainChat` field; the provider no longer maintains a parallel map. Management service - `sendNewChatRequest` (renamed from `sendAndCreateChat`) calls `createNewChat`, opens the widget on the returned chat resource, then calls `sendRequest`. - `openNewChatInSession` is now async and opens the widget after `createNewChat` returns. Copilot provider - Drops the `IChatWidgetService` injection; the provider never opens widgets directly. - Drops `userSelectedTools` from the local send path (no widget available there). Spec - `SESSIONS.md`: document that `ISessionsProvider` must not have optional methods and that every addition to `ISession` or `ISessionsProvider` must be consumed by the agents-window core workbench (outside `contrib/providers/`). - `COPILOT_CHAT_SESSIONS_PROVIDER.md`: update the send-flow section to describe the new `createNewChat` + `sendRequest` two-step contract. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * address review comments - sessionsManagementService.sendNewChatRequest: open the chat widget with ChatViewPaneTarget so it lands in the chat view (matches the other openSession call sites in this service). - copilotChatSessionsProvider.createNewChat & _createNewSubsequentChat: dispose the IDisposable returned by _createChatSession so the model reference acquired via acquireOrLoadSession is not leaked. - copilotChatSessionsProvider._sendExistingChat: capture the disposable from _updateChatSessionState and release it in a finally so the model reference does not leak on every send. - copilotChatSessionsProvider._sendFirstChat: when chatService.sendRequest returns kind 'rejected', clean up the temp session (cache, group cache, current-new-session, fire removed event, dispose) before throwing so the UI does not keep showing a stuck InProgress session. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Open agent browser pages in the background in some conditions * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * feedback --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…odels-intellisense fix(chat): add JSON schema type and validation for chatLanguageModels configuration
* Bump Agent host Copilot CLI to 1.0.48 * Copilot Cli to 1.0.48 sdk to 1.0.0-beta.4 * Exclude pvrecorder, foundry-local-sdk, mxc-bin * Parity for copilot/sharp * Add back missing binary * Update dependencies for public copilot cli sdk * remove icu-native.node for now * Remove win32-native.node, icu-native.node * Bump both internal and public to 1.0.49 * Only copy required Copilot SDK prebuilds * Fix Copilot SDK native binary handling
…izer (#317884) * Phase 10.5: unify ClaudeAgentSession lifecycle, retire ClaudeMaterializer Collapse the dual-map session lifecycle (`_provisionalSessions` + `_sessions`) onto a single `ClaudeAgentSession` identity per `sessionId`. The session now owns its full materialize flow (SDK startup, abort gates, DB ref open, pipeline construction, rematerializer attach, metadata overlay write, bijective state seed). `ClaudeMaterializer` is gone; its pure helpers (`buildOptions`, `buildClientMcpServers`, `buildSubprocessEnv`) live in a new `claudeSdkOptions.ts` module. Why - Phase 10's race regressions (C1, C1-resume, S1) were all compensation for the dual-map split. With one object identity per session, the fixes become structurally trivial and the compensation paths delete. - `_materializeProvisional` and `_resumeSession` were ~80-line orchestrators trying to be methods on the session entity \u2014 now they are: build canUseTool + delegate to `session.materialize(ctx)`, then fire the public materialize event. Behavior preserved - `IAgent` provider surface unchanged. - Phase 10 race regression tests still cover the same races (materialize gap, resume bootstrap gap, rebind failure leaves diff dirty). - Resume path explicitly skips the overlay write (overlay is the SOURCE on resume); new test guards this. `changeModel` simplified - `session.setModel(model)` is now the single mutation entry. It stashes provisional state when no pipeline exists, queues runtime model+effort with the 'max'->'xhigh' clamp when materialized, and writes the metadata overlay in both cases. Agent's `changeModel` collapses to a sequencer + delegation. Tests - 1810/1810 agentHost unit suite passing. - 7/7 real Claude SDK integration tests passing (2 pre-existing pending). - Live workbench E2E: full tool-call round-trip end-to-end (createSession -> setClientTools(13 tools) -> materialize -> openBrowserPage request -> workbench permission UI -> approve -> workbench opens https://example.com -> tool_result returned -> session.result). 0 occurrences of legacy failure patterns. Plan + roadmap - Roadmap Phase 10.5 marked DONE. - Full plan at src/vs/platform/agentHost/node/claude/phase10.5-plan.md. * Address PR review: fix stale setModel link + document buildOptions ambient env reads
…sions/html-language-features (#317868) build(deps): bump @nevware21/ts-utils Bumps [@nevware21/ts-utils](https://github.com/nevware21/ts-utils) from 0.11.6 to 0.14.0. - [Release notes](https://github.com/nevware21/ts-utils/releases) - [Changelog](https://github.com/nevware21/ts-utils/blob/main/CHANGELOG.md) - [Commits](nevware21/ts-utils@0.11.6...0.14.0) --- updated-dependencies: - dependency-name: "@nevware21/ts-utils" dependency-version: 0.14.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…sions/simple-browser (#317867) build(deps): bump @nevware21/ts-utils in /extensions/simple-browser Bumps [@nevware21/ts-utils](https://github.com/nevware21/ts-utils) from 0.11.6 to 0.14.0. - [Release notes](https://github.com/nevware21/ts-utils/releases) - [Changelog](https://github.com/nevware21/ts-utils/blob/main/CHANGELOG.md) - [Commits](nevware21/ts-utils@0.11.6...0.14.0) --- updated-dependencies: - dependency-name: "@nevware21/ts-utils" dependency-version: 0.14.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- The launch configuration name in the Run and Debug view title could grow wider than the title bar, pushing the dropdown past the sidebar edge instead of getting clipped or truncated. - The flex chain inside .title-actions could not shrink because the block-level .monaco-toolbar / .monaco-action-bar wrappers propagated the action item's intrinsic min-content (a long launch configuration name) up to .title-actions, so its min-width: auto kept it at full content width. - Constrain .title-actions with min-width: 0 and overflow: hidden (scoped via :has(.start-debug-action-item)) so the inner flex layout has a finite width, and propagate min-width: 0 down the chain so the label can ellipsize. Sibling action items keep their natural size via flex-shrink: 0. - Drop the configuration's min-width: 90px so the dropdown contents are the first to shrink, and reduce the label to 12px to better match the surrounding title row. Fixes no issue (Commit message generated by Copilot)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )