web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / New-harness agent retu...
Copilot Studio
Answered

New-harness agent returns "Enhanced task completion preview has ended" on direct engine channel

(0) ShareShare
ReportReport
Posted on by 4

A published new-harness agent returns the message "Enhanced task completion preview has ended. Go to copilotstudio.microsoft.com and republish the agent." as its first activity and on every subsequent turn, instead of the agent's actual response. Republishing does not resolve it. This occurs on the direct published-engine channel, not only in Power Automate.

Repro

  1. Publish the agent above (last published successfully; republished multiple times since - no change).

  2. Invoke it programmatically using the official @microsoft/agents-copilotstudio-client SDK (v1.8.1), constructing ConnectionSettings with the environment ID, schema name, cloud Prod, agent type Published.

  3. Acquire a token for scope https://api.powerplatform.com/.default via MSAL (interactive consent granted; token acquired successfully).

  4. Call startConversationAsync(), then send any turn (e.g. "hello")

Actual result
Every response is the "Enhanced task completion preview has ended" message. Relevant observations from the raw activities

  • The message arrives on channel _channelId: "pva-published-engine-direct" - the modern published-engine direct channel.

  • turn.complete fires normally after each message, so the engine is running turns and is deliberately substituting this message for the agent's response.

  • Same behaviour in Preview? No - Preview greets and runs normally. The failure is specific to the published direct-engine surface

Expected result
The agent runs its instructions and returns its actual response (a greeting on first turn; a generated description when asked).

What i have ruled out

  • Not a transport/scope issue: reproduced with Microsoft's own current SDK over pva-published-engine-direct using a valid .default token.

  • Not authentication: token acquired, consent granted, turn.complete fires.

  • Republishing has no effect. We can find no setting in the Build canvas that names or migrates the ended "Enhanced task completion" preview.

  • A classic-harness agent in the same environment invoked the same way works correctly

Question
What is the supported path to invoke a new-harness (GitHub Copilot) agent programmatically with per-user authentication? If the direct published-engine channel is not supported for this harness, what is the intended replacement, and is there a migration step to clear the retired-preview dependency that republishing does not address?

  • Verified answer
    sannavajjala87 Profile Picture
    1,113 Super User 2026 Season 2 on at
    Hi,
     
    Based on your testing, this doesn't look like an authentication or SDK issue. The fact that turn.complete fires successfully and the agent works in Preview suggests the runtime is reachable, but the published channel is intercepting responses and returning the "Enhanced task completion preview has ended" message instead.
     
    A few observations:
    • Since a classic-harness agent works in the same environment, the issue appears specific to the new-harness (GitHub Copilot) agent runtime.
    • The behavior occurring only on pva-published-engine-direct suggests the published direct channel may not currently support this agent configuration, or there may be a provisioning issue tied to a retired preview feature.
    • Republishing alone doesn't appear to refresh whatever dependency or configuration is triggering the message.
     
    At this point, I'd verify whether the agent can be invoked successfully through other supported published surfaces (such as Teams or Microsoft 365 Copilot). If those work while the direct published-engine channel fails, that would further indicate a channel-specific limitation or service issue rather than a problem with the agent itself.
     
    If the behavior persists after republishing, I would recommend opening a support ticket and providing the conversation ID, environment ID, agent schema name, and evidence that Preview works while pva-published-engine-direct consistently returns the retired preview message. That should help determine whether this is a known limitation, a migration issue, or a backend provisioning problem affecting new-harness agents.
     
    Thanks & Regards,
    Manoj Annavajjala
  • Verified answer
    Sayali-MSFT Profile Picture
    Microsoft Employee on at
    Hello ,
    This looks more like a new-harness/runtime compatibility issue than an authentication or SDK problem. The current Copilot Studio Client/Agents SDK documentation for custom app integration applies to standard-harness agents, while agents created in the new experience run on the GitHub Copilot harness, which uses a different runtime.
    Since Preview works, turn.complete is returned, and a classic/standard-harness agent works with the same authentication flow, I don’t think repeatedly republishing will resolve this. I’m also not aware of any maker-side migration setting that clears the retired “Enhanced task completion” preview dependency.
    For now, if programmatic invocation with per-user authentication is required, the supported path would be to use a standard-harness agent with the Copilot Studio Client. The documentation currently doesn’t identify an equivalent direct-engine API for invoking GitHub Copilot-harness agents from a custom application.
    Additional References:
    1. Key concepts - Publish and deploy your agent - Microsoft Copilot Studio | Microsoft Learn
    2. Integrate with web or native apps using Microsoft 365 Agents SDK - Microsoft Copilot Studio | Microsoft Learn
    3.Integrate with web or native apps using Microsoft 365 Agents SDK - Microsoft Copilot Studio | Microsoft Learn
    4. Harnesses in Copilot Studio - Microsoft Copilot Studio | Microsoft Learn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Copilot Studio

#1
Mohsin Ali Profile Picture

Mohsin Ali 360

#2
Valantis Profile Picture

Valantis 253 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 184 Super User 2026 Season 2

Last 30 days Overall leaderboard