When you build a Copilot agent that uses multiple plugins, the order in which actions are invoked can produce unexpected results or errors. Copilot does not always run plugin actions in the sequence you define in the manifest or the conversation flow. Instead, the orchestrator evaluates dependencies, user intent, and confidence scores to decide which action to call first. This article explains why action invocation order matters, how Copilot determines it, and what you can control to get predictable behavior from your agent.
Key Takeaways: Controlling Plugin Action Invocation Order
- Copilot Studio > Agent > Plugins > Action sequence: The order you list actions in the plugin manifest does not guarantee execution order.
- Copilot orchestrator > Dependency graph: Actions that produce output required by another action run first.
- Plugin manifest > Triggers > Invocation constraints: Use
afterandrequiresfields to enforce a specific sequence.
How Copilot Decides Which Plugin Action to Invoke First
Copilot uses a central orchestrator to process user requests. When a user prompt matches multiple plugin actions, the orchestrator does not simply run them in the order they appear in the manifest. Instead, it builds a dependency graph based on three factors:
Dependency Resolution
If Action B requires an output value that Action A produces, the orchestrator runs Action A first. For example, a plugin that searches a database for a customer ID must complete before a plugin that retrieves that customer’s order history can run. The orchestrator reads the outputs and inputs sections of each action’s OpenAPI description to find these dependencies automatically.
User Intent Matching
The orchestrator scores each action against the user’s natural language request. The action with the highest confidence score runs first, even if it appears later in the manifest. This can cause side effects if one action modifies data that another action depends on.
Conversation Context
If the user has already provided information in the same conversation, the orchestrator may skip an action that would normally run first. For instance, if the user said “Show my orders” and then “Cancel the last one,” the orchestrator may call the cancel action directly without re-running the search action, using the order ID from the previous turn.
Steps to Define and Test Action Invocation Order
You cannot force a strict sequential order for all scenarios, but you can increase predictability by configuring dependencies and triggers correctly. Follow these steps to set up and verify the invocation order for your Copilot agent plugins.
- Open the plugin manifest in Copilot Studio
Go to Copilot Studio > Agents > select your agent > Plugins > select the plugin you want to configure. The manifest file is listed under the Actions tab. Click the action name to view its OpenAPI description. - Define input and output schemas for each action
In the OpenAPI description, add anoutputssection with a named property that another action can reference. For example, an action calledsearchCustomermight outputcustomerId. Then increateOrder, add aninputssection that requirescustomerId. The orchestrator will detect this dependency and runsearchCustomerfirst. - Add invocation constraints to the manifest
In the plugin manifest JSON, locate thetriggersarray. For each action, you can add aconstraintsobject with anafterfield that lists the action name it must follow. Example:"constraints": { "after": ["searchCustomer"] }. This tells the orchestrator to run the current action only aftersearchCustomercompletes. - Test the sequence with a conversation simulation
In Copilot Studio, open the Test pane and type a prompt that triggers both actions. Watch the logs in the Diagnostics panel. The logs show each action invocation in real time with a timestamp. If the order is wrong, the logs will also show an error message likeAction 'createOrder' failed because required input 'customerId' was not provided. - Adjust confidence thresholds for early actions
If the orchestrator keeps skipping a prerequisite action, lower the confidence threshold for that action. Go to the action’s settings in Copilot Studio and reduce the Minimum confidence score from 0.8 to 0.6. This makes the orchestrator more likely to match the action even when the user’s phrasing is imprecise. - Use a parent action to enforce a sequence
If dependencies and constraints still produce the wrong order, create a single parent action that calls the child actions in the order you need. The parent action runs as a single plugin action and executes the child steps sequentially inside its own code. This bypasses the orchestrator entirely for that sequence.
Common Issues With Action Invocation Order
Action Runs Before Its Prerequisite Action Completes
This happens when the prerequisite action’s output schema is missing or incorrectly named. Verify that the output property name in the prerequisite action matches exactly the input property name in the dependent action. The names are case-sensitive. Also check that both actions belong to the same plugin group in Copilot Studio. Actions from different groups cannot reference each other’s outputs.
Orchestrator Runs an Action That Should Be Skipped
If the user’s intent matches multiple actions with similar confidence scores, the orchestrator may invoke an action that is not needed. Add more specific trigger phrases to the action’s manifest. For example, instead of a generic trigger “search,” use “search customer by email.” The orchestrator will give higher confidence to the more specific action, reducing false invocations.
Action Invocation Order Differs Between Test and Production
The orchestrator uses different caching behavior in test mode versus production. In production, the orchestrator caches action results for the duration of the conversation. If a prerequisite action already ran in an earlier turn, the orchestrator may skip it in a later turn, even if your manifest says it should run again. To force a fresh invocation, add a cacheTTL property to the action’s manifest with a value of 0.
Copilot Agent Action Invocation: Default vs Constrained Order
| Item | Default Orchestrator Order | Constrained Order With Manifest |
|---|---|---|
| Execution logic | Dependency graph + confidence score | Explicit after and requires fields |
| Sequence control | None — orchestrator decides | Full control over action sequence |
| Error on missing input | Orchestrator tries to find the input from any previous action | Fails immediately if prerequisite action did not run |
| Performance | Faster because orchestrator may skip unnecessary actions | Slower because all actions run even if not needed |
| Use case | Simple queries with one or two actions | Complex workflows with strict data dependencies |
You now know how the Copilot orchestrator determines which plugin action to invoke first and how to influence that order using dependency schemas, invocation constraints, and parent actions. Start by reviewing your plugin manifests for missing output properties, then add after constraints to enforce the sequence for critical workflows. For the most reliable control, consider building a parent action that runs child steps in a fixed order inside its own code.