Skip to content

Fix armed macro capture in Copilot bypass mode - #3214

Merged
George Ng (GeorgeNgMsft) merged 2 commits into
mainfrom
fix/copilot-bypass-recording-capture
Oct 24, 2026
Merged

George Ng (GeorgeNgMsft) merged 2 commits into
mainfrom
fix/copilot-bypass-recording-capture

Conversation

@GeorgeNgMsft

Copy link
Copy Markdown
Contributor

What changed

An explicitly armed macro recording can now be claimed while TypeAgent routing is in bypass mode. The task stays with Copilot; bypass still prevents recipe matching/execution, and TypeAgent MCP calls remain disabled.

Previously, the hook returned for bypass before it tried to claim a recording. The token stayed armed, so the session observer never finalized the selected interaction.

The change keeps recipe-owner off, recording feature flags, and the existing success-receipt checks intact. Regression tests cover claimed recordings, child-learning receipts, recipe-off behavior in all four modes, and unclaimed bypass requests. The README explains how to capture native or third-party MCP calls without routing the task to TypeAgent.

Validation

  • Standard plugin build and dependency graph: pnpm exec fluid-build @typeagent/copilot-plugin -t build --dep.
  • Four targeted Jest suites passed: routing, recording feature flags, session capture, and task success receipts (79 tests).
  • Prettier passed for all three changed files.
  • Repository lint ratchet passed for the two changed source/test files; no added violations.
  • Adversarial diff review completed; no remaining code findings.

A live recording/learning/replay with an updated installed plugin was not performed. These checks do not establish full end-to-end macro creation or replay.

Earlier macro findings considered

The previously observed MSI runtime-cache lookup and dispatcher SDK-runtime selection issues remain separate installer/reasoning concerns. Current macro authoring is plugin-owned and uses Copilot child agents, so those changes are not needed for this hook fix and are not bundled here.

The earlier confirmation-continuation cancellations still have no confirmed root cause. This PR does not make speculative changes to confirmation or permission handling.

Claim explicitly selected recordings before bypassing recipe matching. Keep recipe-off, recording feature flags, Copilot task ownership, and success-receipt checks intact.

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

Copilot-Session: 0040b8ff-2701-4fb7-821f-760e05fe6b4b
Update the bypass mode assertion to expect recording checks, preserve silent no-host behavior, and verify malformed endpoint diagnostics remain visible.

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

Copilot-Session: 0040b8ff-2701-4fb7-821f-760e05fe6b4b
@GeorgeNgMsft
George Ng (GeorgeNgMsft) added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit d005ea3 Oct 24, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants