Agentic Loop
Agentic Loop
When you invoke Claude Code (ask it to do something) it uses an agentic loop to perform the requested task.
- Flow: Your Prompt → Model → [Gather Context → Take Action → Verify Results] (loop) → Done
- While executing the three phases it will perform calls to tools (tool calls) to aid it accomplishing its tasks.
- Tools are just functions of code that call to external programs.
- It will keep looping, self-reflecting to determine if it has met the goal.
- You can interrupt the loop at any time: interrupt, steer, or add context, to help correct the agent if you think it's misguided.
Related: Tool Calls, Models, Claude Code