The agent loop — CCA-F Exam Prep

×
L2.170
REAL STORYA developer watching a terminal scrolling endlessly. The screen shows repeated API calls, each one returning another tool_use request. A cost counter in the corner climbing past $2,000. The developer's face shows pure panic. Dark office, blue monitor glow.

He started a research agent before bed. He woke up to a $4,200 API bill.

The task was simple: 'Summarize everything about quantum computing.' The agent called a search tool, got results, decided it needed more context, searched again. 1,847 API calls. Six hours. It never returned a summary because it never decided it had 'enough' information.