Hello,
I am investigating an issue with a custom agent in Microsoft Copilot Studio using the Claude Sonnet model.
The agent is designed to generate a SharePoint modern page based on external input data.
The high-level workflow is as follows:
1. Receive external input data.
2. Retrieve template information for a SharePoint modern page.
3. Generate page content based on the template structure.
4. Generate or replace required IDs / GUIDs.
5. Build the final data for posting the page.
6. Call a Power Automate / SharePoint posting tool.
7. Register the result in a SharePoint list.
The issue occurs when the prompt, including the input data and page-generation instructions, becomes large.
Specifically, when the agent receives around 30,000 Japanese characters, Claude Sonnet appears to stop while generating the input values to be passed to the tool.
I have confirmed the following:
- The tool itself can be called successfully with shorter or simpler inputs.
- The Power Automate flow completes within 100 seconds.
- The Copilot Studio error code `FlowActionTimedOut` is not displayed.
- The following size-related Copilot Studio error codes are also not displayed:
- `AsyncResponsePayloadTooLarge`
- `ConversationStateTooLarge`
- `TooMuchDataToHandle`
- `OutgoingMessageSizeTooBig`
- No other visible Copilot Studio error code is shown.
- The interruption seems to happen before or during the stage where the agent generates and sets the tool input, rather than after the tool has been executed.
- Once this state occurs, the same test session no longer proceeds to the tool call, even if I later instruct the agent to “resume,” “stop the previous work,” or “call the tool.”
- If I start a new test session and use a shorter input, the tool call works again.
From the user’s perspective, the session itself does not appear to be disconnected.
However, the agent seems to be stuck in an internal reasoning or tool-input-generation state before the actual tool call. After that, the agent does not properly respond to later instructions to call the tool.
The process includes relatively complex operations such as:
- Understanding the template structure.
- Adjusting the page section structure.
- Replacing web part information.
- Adding or deleting sections.
- Handling fixed IDs and newly generated IDs.
- Generating data for posting the page.
I would like to ask the following:
1. Are there any practical limits on the character count, token count, or payload size for tool inputs generated by a Copilot Studio agent?
2. Are there any known limitations or issues when using Claude Sonnet in Copilot Studio to generate tool inputs from long prompts?
3. Is it generally unreliable to have an agent generate a large JSON-like payload and pass it directly as a tool input?
4. If the process stops before the tool call and no error code such as `FlowActionTimedOut`, `AsyncResponsePayloadTooLarge`, `ConversationStateTooLarge`, `TooMuchDataToHandle`, or `OutgoingMessageSizeTooBig` is displayed, is there any diagnostic log or investigation method available?
5. Is it a known behavior that, after one failed long-input attempt, the same session may no longer respond properly to later tool-call instructions?
Has anyone experienced a similar issue with long prompts, Claude Sonnet, Copilot Studio tool input generation, or SharePoint modern page generation?
Any information about known limitations, recommended investigation methods, or possible workarounds would be appreciated.
Thank you.