Quiz 16 Question 8 of 20

A long-running agent is tasked with 'migrate the authentication service to use OAuth 2.0.' After 2 hours and dozens of tool calls, an engineer reviews the agent's current actions and notices it is now modifying the payment processing module's session management code — a task that was never part of the original assignment. The agent's reasoning still references 'authentication improvements' but the actual changes have drifted significantly from the original scope. Which mechanism would BEST detect and correct this context drift?

Select an answer to reveal the explanation.

Motivation