AI-103 Practice Question 84: Agent Run Requires Action
Microsoft Azure AI Apps and Agents Developer Associate (AI-103) · Test 9 · question 4 of 10
A developer's polling loop reads run.status in a tight loop and treats any value other than completed as "still running," so it just sleeps and checks again, including when the status is requires_action. The agent has a function tool that looks up account balances. In testing, every run that needs the balance lookup ends with status expired about ten minutes after it starts, even though the balance service itself replies in well under a second.
What is the polling loop missing?
Show answer and explanation
Answer:
A run's documented lifecycle is queued → in_progress → (optionally) requires_action → completed, and Microsoft is explicit that a language model never executes a function itself: "When the agent determines a function is needed, the run status indicates requires_action with function call details. Your application code must detect this, execute the appropriate function, and submit the results back to the agent via the API." A loop that only waits during requires_action leaves the run permanently parked in that state (nothing ever supplies the output the model is waiting for) until the documented 10-minute run expiration fires and the run becomes expired, matching exactly what the team observed.
- B is wrong because a longer polling interval only changes how often the loop *checks* the status; it never executes the function or submits an output, so the run still has nothing to advance past requires_action and still expires at the same ten-minute mark. - C is wrong because streaming changes how status updates are delivered to the client, not the run's expiration window or the requirement to submit tool outputs for a pending function call. - D is wrong because a new run would ask the same question again, generate the same function call, and land back in requires_action immediately; it never supplies the missing output either, it just repeats the failure.
Reference: Use Foundry Agent Service with function calling (classic)