I’m working with Azure AI Agents and following the official Microsoft tutorial. Everything runs smoothly when I don’t involve file operations, but the service gets stuck whenever I try to create or upload files using the Assistant.
The process stays in IN_PROGRESS state for exactly 10 minutes before timing out with an ‘expired’ status. This matches the documented timeout behavior where operations expire after 10 minutes if tool outputs aren’t submitted in time.
For example, asking “Tell me a funny story” works perfectly fine. But changing it to “Tell me a funny story and save it to story.txt” causes the hanging issue. The same problem happens with file uploads too.
I’ve tested this with different models like gpt-4o-mini and gpt-4o in various regions but get the same result. My setup uses Python 3.12.8 with azure-ai-projects 1.0.0b4 and all current dependencies.
Has anyone encountered similar freezing issues when performing file operations with Azure AI Agents?
totally makes sense! sometimes it feels like the agent’s just unsure about handling files. maybe double-check your permissions and ensure everything’s set up right for file operations.
Hit this exact issue last week building a CMS. You’re seeing timeouts because Azure AI Agents creates file operation tools automatically when you mention saving files, but they’re just empty placeholders. You need to actually define what happens.
The agent assumes you’ve got file storage set up somewhere. I thought it’d save locally but had to connect it to Azure Blob Storage instead. Fixed it by adding real file handling logic and proper tool response formatting.
Check if file operations are enabled in your agent config too. Sometimes the tools register fine but storage permissions aren’t set up right, which causes that silent hang you’re getting.
Yeah, this hanging is totally normal when you don’t have file tools implemented properly. Azure AI Agent spots file operations in your prompt and creates tool calls, but it can’t actually do anything without your code handling the file system stuff. When you ask it to “save it to story.txt”, it makes a tool call and just sits there waiting for your app to process it. No handler means it stays stuck in IN_PROGRESS until the 10-minute timeout hits. I hit the exact same issue migrating from OpenAI’s assistant API. You need to set up polling that catches the requires_action status and handles the tool calls yourself. Write some actual file I/O code that grabs the agent’s parameters and does the file operations on whatever storage you’re using. Regular conversations work fine since they don’t trigger tools - they just go through the normal response flow.
Had this exact issue 3 months ago building a document processing workflow. The agent creates a function call for file operations but never gets the tool response back.
Check if you’re handling tool calls properly. When the agent tries to save that story.txt file, it’s waiting for you to execute the file creation and return the result.
You need something like this after your create_and_process_run:
while execution.status in ['queued', 'in_progress', 'requires_action']:
if execution.status == 'requires_action':
# Handle the tool calls here
tool_outputs = []
for tool_call in execution.required_action.submit_tool_outputs.tool_calls:
# Actually execute the file operation
# Then append the result to tool_outputs
execution = client.agents.submit_tool_outputs_and_poll(thread_id, execution.id, tool_outputs)
Without this loop, the agent just sits there waiting until it times out. “Tell me a funny story” works because no tools are involved.