Copilot Studio Friction
"Conversation state size exceeds the maximum allowed limit"
Last verified
Details & related
Assessment
- Confidence
- Confirmed officialConfirmed by Microsoft documentation or an official statement.
- Severity
- Blocking
- Typical time lost
- Hours
Identification
Verification & changes
Verified
Doc check by human: Error-code reference and variables documentation re-read during seed migration; error and recommended remedy still documented.
Change
Provisionally approved by the Product Owner; external LLM quality review pending.
Change
Initial record created from the seed dossier (migration wave 1).
Are you in the right place?
- The conversation stops with "Conversation state size exceeds the maximum allowed limit".
- It appears mid-conversation, typically after several topics or tool calls.
- Your topics store large results — whole objects, lists, or JSON text — in variables.
- Short test conversations work; long or data-heavy ones fail.
If the error is "Outgoing message size too big" → see "Outgoing message size too big". That error caps a single outgoing message; this record is about accumulated conversation state. If the chat shows raw JSON instead of an answer → see Chat shows raw JSON instead of an answer.
What's happening
Copilot Studio keeps every variable of the conversation in one state store. Every stored object, list, and JSON text adds to it — across all topics of the session. The platform enforces a maximum state size (documented as of 2026-07-08). When the accumulated variables exceed that limit, the conversation fails with this error. Think of a backpack on a long hike: every souvenir goes in, nothing comes out. At some point the zipper bursts — mid-trail, not at the start. Citizen developers hit this because variables are the only visible place to keep data. Large external data belongs in an agent flow that stores and fetches it on demand.
For technicians
The error-code reference recommends three measures (documented as of 2026-07-08). Reduce the data stored in variables. Use variables only for data needed across topics. Store and retrieve large external data through Power Automate flows instead. Together with per-channel payload caps, the practical rule is: no large JSON blobs in topic variables.
How to fix it
Solution 1
Official workaroundMove large data out of variables
- Open the topics of the failing conversation.
- List every variable that stores a whole object, a list, or long text.
- For each one, store only the property you need, for example the answer text.
- Delete or stop filling the variables that held whole objects.
- For large external data, create an agent flow that saves the data outside the conversation.
- Add a second flow, or a branch, that fetches only what the topic needs.
- Retest the long conversation.
✅ You should now see: the conversation completes without the state-size error.
Check that it worked
If it didn't work
- A topic still stores a whole object. Later topics inherit stored objects. Walk every topic in the session path, not only the failing one.
- The state grows through a loop. A looping topic that appends to a variable grows state on every pass. Cap the loop or clear the variable inside it.
- The error is the message cap instead. Re-read the exact message. "Outgoing message size too big" is a different limit — see "Outgoing message size too big".
- The channel runs the old version. Publish and propagation delay is suspect number one. See Teams answers with an old version of your agent.
Prevent it next time
- Follow variable hygiene: store single properties, never whole tool objects.
- Keep variables for cross-topic essentials only; park large data behind an agent flow.
- Watch variable values in the test pane during every long test run.
Evidence
Official documentationlearn.microsoft.com
The error-code reference documents the conversation-state size error and recommends reducing variable data and storing large external data via flows.
Official documentationlearn.microsoft.com
Variables persist as conversation-scoped state, so every stored object keeps adding to the session's state.