Agent Builder: can an agent read a file it created, or a file the user attached, in a later turn of the same conversation?

Williams, Paula 0 Reputation points
2026-12-01T18:26:46.0866667+00:00

Title: Agent Builder: can an agent read a file it created, or a file the user attached, in a later turn of the same conversation?

Product and setup

  • Agent created in Agent Builder (Microsoft 365 Copilot app), with code interpreter on.
  • Knowledge is SharePoint content plus files attached by the user in chat.
  • I can't use Copilot Studio for this agent.

What I'm trying to do I'm running a multi-pass document review. In pass 1 the agent creates an .xlsx workbook. In pass 2 and later, in the same conversation, the user asks it to add a tab to that same workbook. I want to avoid asking the user to re-attach the workbook or the original document on every pass.

What the documentation says

  • The code interpreter security page says each code run starts on a fresh VM and no data is persisted.
  • The Copilot Studio page "Files the agent creates (Microsoft Copilot) (preview)" says an agent can read a created file back and update it in a later turn. It lists 28 days of retention and 10 MB per file.
  • The Copilot Studio page "Attach files to a conversation (Microsoft Copilot)" says attachments influence only the turn they're sent with, unless the agent references them again later in the same conversation.
  • Those two pages describe the Microsoft Copilot harness. The Agent Builder pages I found don't describe file retention or carryover. Microsoft's labs describe Agent Builder as running on the Copilot Chat harness, separate from the Microsoft Copilot harness.

Questions

  1. Which harness runs agents created in Agent Builder?
  2. Do the 28-day and 10 MB created-file rules apply to Agent Builder agents? If not, what are the rules?
  3. In turn 2 of the same conversation, can an Agent Builder agent read and modify the .xlsx it created in turn 1 without the user re-attaching it?
  4. Can it read a document the user attached in turn 1 when answering in turn 2 and later, without re-attaching it? Does it need to be told to use it again?
  5. Is there a documented per-turn time limit or tool-call limit for Agent Builder agents?

What I need Please link the documentation if it exists. If it doesn't, a statement from Microsoft staff would be enough for me to design around it. If none of this is supported, I'd like to know that too.Title: Agent Builder: can an agent read a file it created, or a file the user attached, in a later turn of the same conversation?

Product and setup

  • Agent created in Agent Builder (Microsoft 365 Copilot app), with code interpreter on.
  • Knowledge is SharePoint content plus files attached by the user in chat.
  • I can't use Copilot Studio for this agent.

What I'm trying to do I'm running a multi-pass document review. In pass 1 the agent creates an .xlsx workbook. In pass 2 and later, in the same conversation, the user asks it to add a tab to that same workbook. I want to avoid asking the user to re-attach the workbook or the original document on every pass.

What the documentation says

  • The code interpreter security page says each code run starts on a fresh VM and no data is persisted.
  • The Copilot Studio page "Files the agent creates (Microsoft Copilot) (preview)" says an agent can read a created file back and update it in a later turn. It lists 28 days of retention and 10 MB per file.
  • The Copilot Studio page "Attach files to a conversation (Microsoft Copilot)" says attachments influence only the turn they're sent with, unless the agent references them again later in the same conversation.
  • Those two pages describe the Microsoft Copilot harness. The Agent Builder pages I found don't describe file retention or carryover. Microsoft's labs describe Agent Builder as running on the Copilot Chat harness, separate from the Microsoft Copilot harness.

Questions

  1. Which harness runs agents created in Agent Builder?
  2. Do the 28-day and 10 MB created-file rules apply to Agent Builder agents? If not, what are the rules?
  3. In turn 2 of the same conversation, can an Agent Builder agent read and modify the .xlsx it created in turn 1 without the user re-attaching it?
  4. Can it read a document the user attached in turn 1 when answering in turn 2 and later, without re-attaching it? Does it need to be told to use it again?
  5. Is there a documented per-turn time limit or tool-call limit for Agent Builder agents?

What I need Please link the documentation if it exists. If it doesn't, a statement from Microsoft staff would be enough for me to design around it. If none of this is supported, I'd like to know that too.

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

1 answer

Sort by: Most helpful
  1. AI answer

    2026-12-01T18:27:55.3033333+00:00

    Do not design the Agent Builder workflow around guaranteed cross-turn file persistence: the public Agent Builder documentation does not explicitly state that its agents inherit the Microsoft Copilot harness’s 28-day retention, file-size, or runtime limits.

    For a reliable multi-pass review, download or save each generated workbook to persistent storage after every pass and attach it again when requesting the next update. Cross-turn reuse might work in the current experience, but the supplied documentation does not establish it as an Agent Builder contract.

    What is documented

    1. Runtime used by Agent Builder

    Agent Builder creates declarative agents for Microsoft 365.^1^ Declarative agents run on Microsoft 365 Copilot’s managed orchestration and language-model infrastructure; they do not supply or host their own runtime.^2^

    That documentation does not explicitly identify an Agent Builder agent as a Copilot Studio agent powered by the separately documented Microsoft Copilot harness. Consequently, the safest terminology is:

    • Authoring product: Agent Builder in the Microsoft 365 Copilot app.
    • Agent type: Declarative agent.
    • Runtime: Microsoft 365 Copilot managed orchestration.
    • Not established by these documents: that every limit documented for Copilot Studio’s Microsoft Copilot harness automatically applies to Agent Builder.

    2. Workbook created in turn 1

    Code interpreter is supported in Agent Builder and can accept files for analysis or modification and produce downloadable files.^3^

    For agents covered by the Microsoft Copilot created-files documentation, the behavior you want is explicitly supported:

    • The user can refer to a created file in a later turn.
    • The agent can read it back and produce an updated version.
    • Maximum created-file size is 10 MB.
    • Retention is 28 days after the conversation’s last activity.^4^

    However, that article is preview documentation for the Microsoft Copilot harness and does not explicitly name Agent Builder as an applicable authoring surface. Therefore, it is insufficient to treat those values as a guaranteed Agent Builder service contract.

    The fresh-VM statement does not itself prevent conversation-level file carryover. It means the code-interpreter VM is destroyed and its local disk is not retained; a host could still store a surfaced file with the conversation and inject it into a later fresh VM. Microsoft explicitly documents the fresh-VM model for code interpreter in Agent Builder.^5^

    3. User attachment from turn 1

    For Microsoft Copilot harness agents, attachments are retained with the conversation and can be referenced later. The documented limits are:

    • 16 MiB per attached file
    • 28 days after the conversation’s last activity
    • The later prompt should identify the earlier attachment—for example, “compare this with the file I sent earlier.”^6^

    “Per-turn input” means the attachment initially influences the turn in which it is sent; it does not mean the stored attachment is necessarily deleted after that turn. The same article expressly says it can be referenced again later.

    Again, the unresolved point is applicability to an Agent Builder-created declarative agent. No supplied Agent Builder page publishes an equivalent retention contract.

    Also distinguish chat attachments from files embedded while authoring the agent as knowledge. Agent Builder’s later 512 MB increase concerns files uploaded as grounding data when creating an agent, not generated files or files attached to a user’s chat turn.^7^

    Runtime and tool-call limits

    Microsoft publishes the following defaults for agents powered by the Microsoft Copilot harness:

    Limit Published default
    Turn duration 90 minutes
    Steering to finish About 60 minutes
    Tool calls per turn 200
    Ordinary tool-call timeout 120 seconds
    Messages retained in the working window 100

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

    The available Agent Builder documentation does not separately publish a per-turn duration or tool-call count, nor does it explicitly say that the table above governs Agent Builder declarative agents. Code interpreter is documented only as having resource quotas for time, CPU, memory, and disk; that security article does not provide their numeric values.^5^

    Practical design for the multi-pass review

    1. In pass 1, have the agent create the workbook and return its file card.
    2. Download the workbook immediately or save it to SharePoint/OneDrive.
    3. For pass 2, first try an explicit same-conversation reference:
      • “Open the workbook Review.xlsx that you created earlier in this conversation, add a tab named Pass 2, and return the updated workbook.”
    4. If the agent cannot recover the file, reattach the saved copy. There is no documented Agent Builder setting that can force cross-turn restoration.
    5. Keep the original source document in SharePoint knowledge when appropriate, rather than relying on a chat attachment for a durable process.
    6. Treat each returned workbook as a new version and save it externally. Declarative agents are not recommended when the requirement is a durable business process with enforced state, retries, recovery, or transaction boundaries.^2^

    A definitive statement that the 28-day, 10 MB, 16 MiB, 90-minute, and 200-call limits apply to Agent Builder would require Microsoft to add Agent Builder to those articles’ applicability statements or publish an Agent Builder-specific limits page. None of the supplied Microsoft staff Q&A responses establishes that mapping.


    References

    1. Agent Builder overview
    2. Declarative agent architecture
    3. Add the code interpreter capability to your agent
    4. Files the agent creates (Microsoft Copilot) (preview)
    5. Code interpreter security architecture
    6. Attach files to a conversation (Microsoft Copilot)
    7. What's new history for Microsoft 365 Copilot extensibility
    8. Agent runtime limits (Microsoft Copilot)
    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.