BeginnerLesson 9 of 4710 min · hands-on
The agentic loop
Part of the Claude from Zero to Mastery course
Before this: Lesson 5 and Lesson 6. There you saw the idea of the loop. Here we open it up step by step. No programming needed.
The agentic loop is the cycle that calls the model, runs the tools it asked for, and calls it again until the job is done. These few small steps are the engine of every agent, whether you build it yourself or Claude Code runs it for you. Domain 1 questions keep coming back to it. ...
Want to learn Claude from Zero to Mastery The agentic loop in a real environment?
Click below, get a fresh Linux box with Claude from Zero to Mastery ready to go, and work through The agentic loop hands-on with an AI tutor that knows your code.
Start this lessonThe agentic loopWhat you'll learn
- The story: an agent that sometimes stops halfway
- The right way: a field built for exactly this
- The loop, step by step
- Why the other ways are wrong
Read this lesson in your language
All lessons in this course
47 lessons- 1What is Claude, really?10 min
- 2How programs talk to Claude10 min
- 3Tokens and the context window: the model's short-term memory10 min
- 4Prompts: how to ask the model for work10 min
- 5Tools: how a model with no hands gets things done10 min
- 6What an agent is, and why a loop comes into it10 min
- 7A map of the Claude family: models, API, Claude Code, SDK and MCP10 min
- 8Introduction: why agents break in practice10 min
- 9The agentic loop10 min
- 10The coordinator and subagent pattern10 min
- 11Building a subagent and giving it context15 min
- 12Enforcing in code, and handoff15 min
- 13Hooks in the Agent SDK15 min
- 14Breaking work down: fixed chains versus dynamic splitting10 min
- 15Sessions: continue, resume and fork10 min
- 16Introduction: a tool is the model's user interface10 min
- 17Tool descriptions and boundaries10 min
- 18Structured errors in MCP10 min
- 19Distributing tools, and tool_choice15 min
- 20Connecting MCP15 min
- 21Choosing the built-in tools10 min
- 22Introduction: how Claude Code learns what your project is like10 min
- 23The CLAUDE.md hierarchy10 min
- 24Commands and skills10 min
- 25Path-specific rules10 min
- 26Plan mode or direct execution10 min
- 27Iterative refinement10 min
- 28Claude Code in CI10 min
- 29Introduction: from "a good answer" to "output you can rely on"10 min
- 30Explicit criteria to cut false positives10 min
- 31Few-shot10 min
- 32Tool use and JSON schema15 min
- 33Validation and retries10 min
- 34Message Batches10 min
- 35Multi-instance and multi-pass review10 min
- 36Introduction: a system that behaves well on a bad day too10 min
- 37Keeping facts in a long conversation15 min
- 38When to escalate to a human10 min
- 39Error propagation in a multi-agent system10 min
- 40Exploring a large codebase10 min
- 41Human review and calibration10 min
- 42Provenance and uncertainty10 min
- 43Wrap-up: the exam's six scenarios10 min
- 44The logic of the answers: eight rules10 min
- 45The exam versus today10 min
- 46Glossary10 min
- 47The exam itself and its conditions10 min
Explore other courses
Vibe Coding: Fundamentals
12 lessons · 4.5h
Prompt Engineering
11 lessons · 6.2h
Python
19 lessons · 9.3h
Git
13 lessons · 5.9h
Docker
13 lessons · 6.6h
Kubernetes
14 lessons · 8h
TypeScript
18 lessons · 7.7h
Go
20 lessons · 12.3h
React
17 lessons · 10.2h
Linux
17 lessons · 8.5h
Ansible
12 lessons · 6.1h
Bash
12 lessons · 5.7h
Helm
10 lessons · 5.4h
GitLab CI
11 lessons · 5.8h
Jenkins
11 lessons · 5.3h
PostgreSQL
14 lessons · 7.6h
MySQL
13 lessons · 6.8h
Web
14 lessons · 5.9h
Vibe Coding
12 lessons · 5.8h
Vibe Coding: Prototype to Production
12 lessons · 5.5h
Vibe Coding: Multi-Agent Engineering
12 lessons · 5.3h
Vibe Coding: Advanced Engineering
12 lessons · 7.3h
