Implement deterministic MCP replay for approved macros - #2881
Merged
Hillary Mutisya (hillary-mutisya) merged 7 commits intoAug 15, 2026
Merged
Conversation
Implements deterministic execution for approved, trace-derived macros without introducing an additional permission model. - Replays captured MCP calls in order with input and prior-step bindings. - Adds schema drift validation, dry-run, cancellation, timeouts, audit logging, and bounded sanitized run records. - Adds source-aware MCP configuration discovery and connection reuse. - Exposes execution and run inspection through agent-server RPC and the macro MCP server. - Routes non-replayable calls to agent-guided execution. Validated with focused macro, replay-host, RPC, and plugin tests, plus the full workspace build.
Hillary Mutisya (hillary-mutisya)
merged commit Aug 15, 2026
a0c1614
into
microsoft:main
27 checks passed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request adds comprehensive support for Copilot macro management to the agent server and protocol. It introduces new API methods for listing, searching, inspecting, creating, validating, approving, disabling, deleting, and running macros, as well as retrieving macro run information. The implementation is integrated across the protocol, client, server, and test layers, and updates the macro manager to use a replay host.
Macro Management API Additions:
Added new types and API methods for macro management to the protocol, including
listMacros,searchMacros,inspectMacro,getMacroRequirements,createMacroFromTrace,validateMacro,approveMacro,disableMacro,deleteMacro,runMacro,cancelMacroRun, andgetMacroRunin both the client and server implementations. [1] [2] [3]Updated the protocol exports to include all new macro-related types, ensuring they are available for use throughout the codebase. [1] [2]
Server and Macro Manager Integration:
MacroManagerwith aMcpReplayHost, enabling macro replay and inspection features. [1] [2]Testing Enhancements:
Stub and Adapter Updates:
Dependency Updates:
McpReplayHostand related types in server and test files to support replay functionality. [1] [2] [3]