Skip to content

[Bug] ExecuteCopilotAsyncV2 does not work with the New Github Copilot harness agents in Copilot Studio #431

Description

Describe the bug

After adding the Copilot Studio connector using 'pac code add-data-source -a "shared_microsoftcopilotstudio" -c ', the "Execute Agent and wait" action returns "Enhanced task completion preview has ended" for new Github Copilot harness Copilot Studio agents. Standard harness agents work fine.

Steps to Reproduce

  1. Publish an agent from the new Github Copilot harness agent experience
  2. pac code add-data-source -a "shared_microsoftcopilotstudio" -c <connectionId>
  3. Call the generated service ExecuteCopilotAsyncV2 api from the deployed player
  4. The call

Swap only the agent schema name between the two runs.

import { MicrosoftCopilotStudioService } from './generated';

const res = await MicrosoftCopilotStudioService.ExecuteCopilotAsyncV2(
  'pub_myAgent',                                  // agent SCHEMA NAME (path parameter)
  {
    message: 'Hello',
    notificationUrl: 'https://notificationurlplaceholder',  // required, unused in sync mode
  },
);

// The generated return type is IOperationResult<void>, but a payload does come back,
// so read it through a cast:
const data = (res as unknown as { success: boolean; data?: unknown }).data;
console.log(JSON.stringify(data, null, 2));

Expected behavior

Agent returns a response message in the "responses" array for the json payload.

{
  "responses": [
    "This is a typical normal response from the AI agent"
  ],
  "conversationId": "<guid>",
  "completed": false,
  "isExpectingInput": false
}

Actual behavior

{
  "responses": [
    "**Enhanced task completion preview has ended. Go to copilotstudio.microsoft.com and republish the agent.**"
  ],
  "conversationId": "<guid>",
  "completed": false,
  "isExpectingInput": false
}

Screenshots or Error Messages

Environment information

  • Framework, build tool or relevant package used: [React,Vite, Webpack, etc]
  • Any connection/components: [Office365, SQL, etc]
    -| Connector | shared_microsoftcopilotstudio (Microsoft Copilot Studio) |
    | Action | ExecuteCopilotAsyncV2 — "Execute Agent and wait" |
    | Caller | Power Apps code app, @microsoft/power-apps generated SDK, running in the deployed player |

Additional context

| Agent A | created in the new Github Copilot harness agent experiencebot.template = cliagent-1.0.0 |
| Agent B | created in the classic Standard experiencebot.template = default-2.1.0 |

Both agents live in the same environment, are published, and are called through the same
connection with the same code. Only the agent name changes between the two runs.

Probable mechanism

The connector action posts to the classic Power Virtual Agents dataverse-backed runtime:

POST /{connectionId}/powervirtualagents/dataverse-backed/authenticated/bots/{Copilot}/proactivecopilot/executeAsyncV2

New-experience agents appear to run on a different service — the agentic runtime. The connector
exposes that path only through operations marked x-ms-visibility: internal, and only a continue
operation:

POST /{connectionId}/copilotstudio/agenticruntime/dataverse-backed/authenticated/bots/{Copilot}/conversations/{ConversationId}/continue

described in the swagger as "Continues a conversation on the Agentic Runtime service (mcs-dracarys)
to resume a parked turn (e.g. autonomous token refresh)."

There is no public connector operation that starts a turn on the agentic runtime. That would
explain why the classic runtime answers on the new agent's behalf with a stub.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions