An agent flow that a Copilot Studio agent calls as a tool can fail at three points: when you add it, when it runs, and when the agent words the answer. In the chat, the last two look alike: an error code, or a wrong figure. Below are eight symptoms, each with its cause and fix.
The setup assumed here: an agent flow does all the math and returns one finished text, named Result. The agent only picks the tool, fills its inputs and words the answer. It runs on the standard harness, with generative orchestration turned on.
The example is invented: a price-quote agent whose tool is named Quote. Standard costs 12.50 EUR and Premium 24.85 EUR per unit, orders of 100 units or more get 10% off, and VAT is 20%.
For "How much for 240 units of Standard?" the flow returns this Result:
240 x Standard at 12.50 EUR = 3,000.00 EUR. Volume discount 10%: 300.00 EUR. Net total: 2,700.00 EUR. VAT 20%: 540.00 EUR. Gross total: 3,240.00 EUR.
Send the failing message again in the Test your agent panel. Then make three checks, in this order:
Result right? Open the flow's run history. If the run failed, find the action that failed.
When a call fails outright, the panel gives you an error code and some context. Three of those codes appear below: FlowActionTimedOut, FlowActionBadRequest and BindingKeyNotFoundError.
On the agent's Tools page, select Add a tool, then Flow or Workflows (the one not under Create new) to list the flows you can add. A flow appears there only when all of this is true:
If the flow was built as a Power Automate cloud flow, convert it. Before you do: the environment needs available Copilot Studio capacity, and the conversion is one-way, because the flow's billing moves to that capacity. Then open the flow's detail page in Power Automate, make sure it is in a solution, select Edit, change its plan to Copilot Studio, select Save and confirm.
FlowActionTimedOut
Cause: the flow took more than 100 seconds to respond to the agent.
Fix:
Keep the slowest run you see in testing well under 100 seconds.
Cause: only Text, Number and Boolean values cross between agent and flow. One of the FlowActionBadRequest messages names exactly these three types. A file is a separate case: it needs a File input that is filled with a formula.
Fix: return one formatted Text, like the Result above, and pass a date as ISO 8601 text, such as 2026-11-14.
FlowActionBadRequest after a flow change
Cause: you changed the flow's inputs or outputs, and the tool still holds the old ones. Changed inputs can also show as BindingKeyNotFoundError.
Then save and republish the agent. If the error persists, check for empty inputs and start a new conversation.
Cause: the rounding broke. In this setup the flow keeps every amount in whole cents, in Integer variables. div() of two integers drops the remainder, so adding 50 before dividing by 100 rounds half up. The VAT step sets VatCents like this (VatPct holds the rate, 20):
VatCents div(add(mul(variables('NetCents'), variables('VatPct')), 50), 100)
Two mistakes break this: the +50 is missing, or one operand is a decimal. With a decimal operand, div() returns a decimal and nothing is dropped.
To see which one it is, ask for two quotes and check the VAT:
| Quote for | Correct VAT | Wrong VAT | What the wrong figure means |
|---|---|---|---|
| 103 units of Premium | 460.72 EUR | 460.71 EUR | The +50 is missing from the VAT step |
| 101 units of Premium | 451.77 EUR | 451.78 EUR | The VAT step ran in decimals |
Fix: restore the +50 if it is missing, and keep every amount in an Integer variable.
Cause: two separate settings, one per symptom.
Your own tests may not show the first problem, because when you test, the user is you. Before launch, have a colleague without access to the price list ask for a quote.
The activity map shows no call to the Quote tool for that message.
Cause: the agent answered from a knowledge source, such as an old price list, or from conversation memory. The setting Allow ungrounded responses permits the second of these.
Fix: remove price lists and old quotes from the agent's knowledge, and add these two rules to the agent's instructions:
- Never state a figure the Quote tool did not return for this message. If the tool fails, say the quote cannot be calculated right now; do not estimate.
- After the answer, offer only what the Quote tool can calculate.
Then:
Cause: models treat tool output differently. Some repeat it, some rephrase it.
Fix: keep a test set and rerun all of it after every model change, and after each change to the flow, the instructions or a description. A set is 10 to 20 questions with known-correct figures: a typical case, both sides of the discount tier (99 and 100 units), a rounding case, a missing input.
Which of these eight has cost you the most time?
The price list and all figures in this article are invented. The article was generated with AI under my direction. The interface labels and limits were checked against Microsoft Learn on 15 November 2026, and the figures were verified by calculation; the example as a whole has not been run end to end in a tenant, so test it before you rely on it.
References (Microsoft Learn)