An agent sometimes loops on the same tool call. What helps you find where it goes wrong?
- Exam domain
- Agentic AI17% of the exam
- Difficulty
- Medium
- In this mock
- 9 questions on this domainPractise this domain
Why the exam asks this
Objective in the exam guide: Safety concepts and failure modes, including tracing and NeMo Guardrails.
Failure modes and tracing are part of agent safety.
Why D is the answer
Tracing each step: prompts, tool calls and results
Traces show each prompt, tool call and observation in order, so you can see why the agent repeats a step, such as a malformed result or missing stop condition.
Remember: Trace agent steps to find failure modes.
How it works
Common agent failures include loops, wrong tools and hallucinated results. Tracing and step limits help find and contain them.
In detail
- Tracing shows every step.
- Add step limits and stop conditions.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Lowering the maximum output tokensWrong
Token limits do not explain the loop.
B. Asking users to rephrase their questionWrong
Users should not have to work around bugs.
C. Removing the tool and hoping the agent manages without it in the next releaseWrongMost tempting
Removing tools hides the cause.
Why it tempts: Removing the trigger seems quick.
D. Tracing each step: prompts, tool calls and resultsRight
Trace agent steps to find failure modes.
Use case
An illustrative scenario, not a real incident.
Illustrative: the trace shows the tool returns an error string the agent misreads as "try again".
See it in different ways
flowchart LR S0["Capture trace"] --> S1["Find repeated step"] --> S2["Inspect tool result"] --> S3["Fix prompt or tool"] --> S4["Add step limit"]
How to read this chart
- Read it in order: Capture trace, then Find repeated step, then Inspect tool result, then Fix prompt or tool, then Add step limit.
stateDiagram-v2 state "Running" as s0 state "Looping" as s1 state "Stopped" as s2 state "Fixed" as s3 [*] --> s0 s0 --> s1: same call repeats s1 --> s2: step limit hit s2 --> s3: trace reviewed s3 --> [*]
How to read this chart
- It starts at "Running".
- From "Running", "same call repeats" moves it to "Looping".
- From "Looping", "step limit hit" moves it to "Stopped".
- From "Stopped", "trace reviewed" moves it to "Fixed".
- It ends at "Fixed".