Share via

Code interpreter - Unable to access files in agents

Stew Welsh 20 Reputation points
2026-03-10T09:31:40.2933333+00:00

We are experiencing an issue when using the code_interpreter tool with GPT-4.1 model with both AzureOpenaiAgents and Azure AI Foundry Agents.

CSV files are uploaded and attached to the agent as expected. However, when the agent triggers the code_interpreter tool and attempts to read the uploaded file from the mounted environment, the execution fails because the file cannot be accessed.

In other words, the files appear to be uploaded successfully but are not available inside the code interpreter runtime when the tool executes.

 

Additional notest

  • We tested the file_search tool to read PDF files and it works as expected. The issue appears to be specific to the code interpreter tool.
  • We also attempted to reproduce the issue directly from the Azure portal, where the behavior was the same.
Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


1 answer

Sort by: Most helpful
  1. Manas Mohanty 16,105 Reputation points Microsoft External Staff Moderator
    2026-03-31T01:20:43.66+00:00

    Hi Stew Welsh and all

    Not sure it was working earlier but this feature is not fully supported yet as per SME's who reviewed. Fixes are in progress.

    User's image

    Reference: https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/publish-copilot#limitations

    Thank you for your inputs here on forum.


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.