passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 003/012 easy

An autonomous coding agent is designed to repeatedly read a file's current contents, decide on an edit, apply it, and check whether the test suite passes, looping back if it does not. During a test run the agent keeps re-applying the same failing edit over and over, because nothing in its loop design ever tells it to stop. What is missing from the agent's design?

  1. A larger tool set, since an agent can only loop indefinitely when it doesn't have enough distinct tools to choose between
  2. A bigger context window, since the loop only continues because the model has run out of room to remember its earlier attempts
  3. A retrieval-augmented generation component, since only a RAG system is able to recognize that a task has been completed
  4. An explicit termination condition -- such as a cap on the number of iterations, or a check for the model emitting a recognizable 'done' / final-answer signal -- so the loop halts instead of continuing indefinitely
Next card → Shuffle