Share via

Copilot Studio Agent Triggers OnError Before Any Topic Execution

Dinesh Bendre 0 Reputation points
2025-12-16T10:41:24.48+00:00

When the Copilot Studio agent is invoked, it immediately triggers the OnErrorLog event before any topic is executed.

The agent does not:

Perform intent recognition

Route to any configured topic (including root or fallback topics)

Enter any dialog or orchestration logic

Instead, execution short-circuits directly into the global error handler.

Observed Error Details

ErrorCode: SystemError

ErrorMessage:

Something unexpected happened. We're looking into it.

Trigger Point: Before topic resolution and dialog execution

Behavior: Consistent and reproducible across sessions

Logging Evidence

Application Insights logs show the following sequence:

  1. Agent invocation
  2. Immediate OnErrorLog event
  3. No topic start or topic execution events recorded

This indicates the failure occurs prior to topic routing, likely during:

Agent initialization

Orchestration pipeline setup

Pre-topic runtime validation

Key Characteristics

No custom topic logic is executed

No validation or runtime errors are surfaced to the developer

Error is generic with no actionable diagnostic message

Agent execution fails deterministically at startup

Expected Behavior

The agent should successfully initialize, perform intent recognition, and route execution to a topic.

OnErrorLog should only trigger when a runtime exception occurs within topic execution or downstream actions.

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2025-12-16T10:42:36.1233333+00:00

    The issue you are experiencing with the Copilot Studio agent triggering the OnErrorLog event before any topic execution indicates that there may be a problem during the agent's initialization or orchestration pipeline setup. The error code SystemError suggests that something unexpected is occurring, which prevents the agent from performing intent recognition or routing to any configured topics.

    Since this behavior is consistent and reproducible, it is likely that the failure is happening at a stage before the agent can validate topics or execute any custom logic. This could be due to a misconfiguration or an issue in the underlying setup that is not surfacing specific errors to the developer.

    To address this, you may want to:

    1. Review the agent's initialization process to ensure all configurations are correct.
    2. Check for any recent changes in the orchestration pipeline that might affect the startup sequence.
    3. Utilize logging tools like Application Insights to gather more detailed information about the initialization phase, even if the current logs do not show specific errors.

    Expected behavior is that the agent should initialize successfully, perform intent recognition, and route to the appropriate topic. The OnErrorLog should only be triggered for runtime exceptions that occur during topic execution or downstream actions, not during the initial setup phase.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.