An agent keeps calling the same search tool with nearly identical queries and never answers. What do you do first?
- Exam domain
- Evaluating and deploying agentic workflows~22% of the exam
- Difficulty
- Hard
- In this mock
- 11 questions on this domainPractise this domain
Why the exam asks this
Deploying and scaling production workloads.
Objective in the exam guide: Troubleshooting agent issues (e.g., drift, tool invocation latency, agent reasoning loops, and system failures).
Reasoning loops are a common agent failure.
Why D is the answer
Trace it, cap iterations, then fix the tool output
A reasoning loop usually means the agent never gets what it needs from a tool. Traces show the pattern, an iteration cap stops runaway cost, and fixing the tool result or instructions removes the cause.
Remember: Loops point to an unmet need: trace, cap, fix.
How it works
A trace shows each call and why the agent repeated it.
Cap iterations to stop runaway loops, then fix the cause, often a tool result the model cannot use.
Clues in the question
The words that point to the answer, and what each one tells you.
- nearly identical queries and never answers
- A loop.
In detail
- Reasoning loops are named in the exam guide as a troubleshooting topic.
- Alert on unusual tool-call counts per request.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Give the agent a larger model and hope it stopsWrong
A bigger model may loop just the same and costs more.
B. Remove the search tool entirely from the agent's toolsetWrong
Removing the tool breaks the agent.
C. Raise the request timeout so it can keep goingWrongMost tempting
A longer timeout lets it waste more.
Why it tempts: That makes the loop run longer and cost more.
D. Trace it, cap iterations, then fix the tool outputRight
Loops point to an unmet need: trace, cap, fix.
Use case
An illustrative scenario, not a real incident.
Illustrative: a search tool returned IDs without titles, so the agent kept searching. Returning titles fixed it, and a cap of five calls stops any repeat.
See it in different ways
flowchart LR S0["Trace shows repeated call"] --> S1["Inspect tool results"] --> S2["Fix output or instructions"] --> S3["Cap iterations"]
How to read this chart
- Read it in order: Trace shows repeated call, then Inspect tool results, then Fix output or instructions, then Cap iterations.
stateDiagram-v2 state "Search" as s0 state "Search again" as s1 state "Stopped" as s2 state "Answer" as s3 [*] --> s0 s0 --> s1: result not usable s1 --> s2: iteration cap s0 --> s3: result usable s2 --> [*] s3 --> [*]
How to read this chart
- It starts at "Search".
- From "Search", "result not usable" moves it to "Search again".
- From "Search again", "iteration cap" moves it to "Stopped".
- From "Search", "result usable" moves it to "Answer".
- It ends at "Stopped" or "Answer".