timeout and character limits in Agent Builder

Williams, Paula 0 Reputation points
2026-12-01T17:30:06.21+00:00

Is there a documented per-turn time limit, tool-call limit, or tool-call timeout for Agent Builder agents (Copilot Chat harness)? The Copilot Studio runtime-limits pages cover the standard and Microsoft Copilot harnesses only. Long requests fail with "Oops! Something happened."

How long does a download link for a Code Interpreter–generated file stay valid in Microsoft 365 Copilot or an Agent Builder agent? The error message only says the file expires "after a short period."

The guidance says to keep SharePoint knowledge files at or under 36,000 characters. In Agent Builder, if a file is longer than that, is the rest truncated or skipped, or does it just rank lower in retrieval?

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

1 answer

Sort by: Most helpful
  1. AI answer

    2026-12-01T17:31:12.0966667+00:00

    Microsoft does not currently publish Agent Builder-specific numeric turn or tool-call limits, a fixed Code Interpreter download-link lifetime, or a rule that SharePoint files are truncated at 36,000 characters.

    Turn duration and tool limits

    The documented defaults—90-minute turns, 200 tool calls per turn, and a 120-second ordinary tool timeout—apply specifically to agents powered by the Microsoft Copilot harness:

    Limit Documented default
    Turn duration 90 minutes; wrapping begins around 60 minutes
    Tool calls per turn 200
    Ordinary tool call 120 seconds
    Workflow tool 300 seconds
    Connected-agent result 600 seconds

    Microsoft manages these defaults and can change them. ^1^

    The Agent Builder documentation describes its output as declarative agents for Microsoft 365 and says that Copilot Studio processes Agent Builder capabilities, but it does not identify those agents as using the Microsoft Copilot harness or publish a separate runtime-limit table for the Microsoft 365 Copilot Chat host. ^2^ Therefore, the 90-minute/200-call/120-second values should not be represented as confirmed Agent Builder limits.

    “Oops! Something happened” alone also does not distinguish a timeout from throttling, context size, or another service failure. For a reproducible Agent Builder failure:

    1. Open Agent Builder → Help → Get support and copy the agent, tenant, environment, and session details.
    2. In Try it or Describe, enter /debug.
    3. In Microsoft 365 Copilot, select Send feedback.
    4. State that the issue concerns Agent Builder, include the debug output and identifiers, and record the approximate elapsed time before failure. ^2^

    Breaking a reliably failing long operation into smaller turns remains the practical workaround, but there is no published Agent Builder-specific threshold to design against.

    A generated file is available only during the active session and is not persisted after that session ends. Microsoft does not publish a fixed number of minutes or hours for an Agent Builder or Microsoft 365 Copilot active session. ^3^

    Consequently:

    • Download the file immediately.
    • Do not treat the response link as durable storage.
    • Save the file to local storage, OneDrive, or SharePoint if it must remain available.
    • If the link expires, ask the agent to regenerate the file; reopening the old link cannot restore a file removed with the session.

    The separate “up to one hour” Foundry Code Interpreter session lifetime belongs to Microsoft Foundry agents, so it should not be applied to Agent Builder. Agent Builder’s Code Interpreter uses fresh isolated VMs, and data is not persisted after the session ends, but its documentation still gives no fixed session duration. ^4^

    What happens beyond 36,000 characters

    The behavior depends on how SharePoint knowledge is selected:

    • SharePoint site or folder referenced by URL: 36,000 characters per file is retrieval-optimization guidance, not a documented hard cutoff. For larger files, Copilot “might have trouble identifying the right content.” Microsoft does not say that everything after character 36,000 is deterministically truncated or skipped. Split large files into smaller, topic-focused documents when reliable coverage matters. ^5^
    • Specific SharePoint files: If no more than 20 files are specified, Copilot searches their full contents. With more than 20, it searches the full contents of the 20 most relevant files. This is the documented way to avoid relying on broad site/folder retrieval for important long files. ^5^
    • Embedded files uploaded into Agent Builder: Copilot indexes the first 750–1,000 pages, approximately 1.8 million characters, of each embedded file. This is a separate behavior from the 36,000-character SharePoint site/folder recommendation. ^5^
    • SharePoint lists: These have explicit truncation behavior above 20,000 rows or 50 MB of raw text, and the response notes the truncation. That rule is for lists, not ordinary SharePoint documents. ^6^

    For content where complete retrieval is required, select up to 20 specific files instead of a site or folder, remove tables or other special formatting that Copilot cannot parse reliably, and test questions whose answers occur near the beginning, middle, and end of each file. ^5^


    References

    1. Agent runtime limits (Microsoft Copilot)
    2. Agent Builder overview
    3. Add the code interpreter capability to your agent
    4. Code interpreter security architecture
    5. Optimize content retrieval
    6. Add knowledge sources to an agent in Agent Builder
    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.