CLAUDECODE101 · chapter 2 of 21 · free to read
This is the whole chapter, not a sample of it. Nothing is shortened for the showcase and nothing here is recorded — no account, no cookie, no reading history. Every chapter of this ladder was signed by a named person before it was served; this one by Capt Anil Sharma.
There is a temptation, when a new tool arrives, to treat it as a new idea. Resist it here. Claude Code is not a new idea, and if you finished CodeAI101 you have already been taught the machine.
Day 4 drew the shape: you set a goal, the model plans, it calls a tool, reads the result, plans again, calls another tool, and eventually reports back. That is the whole of it. Claude Code is that loop, with the tools from Day 3, pointed at the files on your computer.
So this chapter does not re-explain agents, tool calls or loops. It shows you where the controls are, and it starts with one distinction that everything else in the ladder rests on.
THE SPLIT
The model proposes; a harness runs what it proposes.
Those are two different things and they are not in the same place. The model is a service that reads text and produces text — it cannot touch your disk, and never does. The harness is the program on your machine. It reads the model's description of an action, decides whether to carry it out, carries it out if so, and hands the result back as more text.
Sit with that, because three things follow and none is obvious.
NOTHING HAPPENS THAT THE HARNESS DID NOT DO. Every file written and every command run was executed by a program on your own computer, not by a model somewhere else.
THE MODEL DOES NOT KNOW WHAT HAPPENED UNTIL IT IS TOLD. It proposed; the result came back as text. If a command failed, it knows only because the failure was reported to it.
THE GAP BETWEEN THEM IS WHERE A RECORD LIVES. Because every action passes through the harness, every action can be written down — and it is.
If you take one structural idea from this course, take that one. Almost every safety property of an agentic tool comes from the proposal and the execution being separable. Where nothing sits between the model and the machine, there is nowhere to put a control.
From outside, a session looks like a conversation: you type a sentence, some time passes, a reply appears with a summary of what was done. From inside, that gap was busy.
Here is a real window of thirty consecutive steps from the middle of a working day. Each entry is one step, in order:
Bash → Bash → assistant → Bash → assistant → Bash → Bash → Bash → Bash → assistant → Bash → Bash → Bash → assistant → Bash → assistant → Bash → assistant → Bash → Bash → assistant → you → assistant → Bash → Bash → assistant → Bash → Bash → assistant → Bash
Three things are worth noticing. How much of it is tool calls — most steps are the harness doing something on the machine rather than the model talking. The rhythm — runs of tool calls, then a pause to reason, then more tool calls, which is the loop deciding what it learned and what to do next. And the word you sitting in the middle of it: a person walked into a loop that was already running.
Abstractions are cheap. Here are counted figures from one real session — the day that built the interactive labs for CodeAI101.
Counted on 15 August: 576 tool calls, 16 prompts from the human, 36.0 tool calls per prompt.
Now put that beside something CodeAI101 said, written months before this session existed — that defaults exist, and that this tool's attempt limit sits somewhere around twenty-five to fifty tool calls per task.
Thirty-six is inside twenty-five to fifty. It would be easy to stop there and call it a confirmation.
Counted again on 16 August, from the same file by the same rule: 1,011 tool calls, 154 prompts, 6.6 tool calls per prompt.
Six point six is nowhere near twenty-five to fifty.
Neither count is wrong. Both came from the same transcript by the same method. What was wrong was calling the first one a confirmation, and three lessons come out of that — each of them worth more than the figure.
A COUNT CAN ONLY GROW; A RATE CAN MOVE IN BOTH DIRECTIONS. The transcript is append-only, so every figure counted from it is a floor at the moment it was taken, not a fact about the tool.
THE RATE WAS NEVER A PROPERTY OF THE TOOL. It is a property of how the work was being done — long autonomous stretches on the first day, close conversational back-and-forth on the second.
THE DENOMINATOR WAS A CHOICE NOBODY NAMED. "Prompts" is not a labelled thing in a transcript. Someone decided what counted as one, and the ratio moves with that decision.
So take the twenty-five to fifty figure as describing a shape of work rather than a constant — and take the habit of asking what the denominator was before you believe any rate at all.
The same session on 16 August, broken down by which tool was called:
| Tool | Calls | What it does |
|---|---|---|
| Bash | 913 | Run a command |
| Write | 75 | Create a file |
| Edit | 12 | Change part of an existing file |
| Read | 5 | Read a file directly |
| WebSearch | 2 | Search the web |
| WebFetch | 2 | Read a specific page |
| AskUserQuestion | 1 | Stop and ask the human to decide |
| ToolSearch | 1 | Load a tool it did not start holding |
| Total | 1,011 |
Read that as a portrait of what building software actually is. Nine in ten calls were shell commands — checking, testing, listing, running. Two details repay attention.
Read appears five times, and did not appear at all in the first count. A tool whose job is reading files, in a session spent building software, barely used.
And one question in the entire session. One moment where the loop stopped and said: this is yours to decide, I will not choose it for you.
That ratio is not a recommendation and yours will differ. But it corrects a common first impression — that using an assistant like this means a steady conversation. Mostly it means watching something work.
You have used AI in a chat window. Three things change here, and all three follow from the split rather than being new ideas.
IT ACTS, NOT JUST ANSWERS. In a chat window the worst outcome of a bad reply is a wrong sentence you can read and reject. Here it is a wrong action already taken.
IT KEEPS GOING. A chat reply arrives and stops. This loop continues until it believes it is done, or something bounds it.
IT SEES YOUR FILES. A chat window knows what you paste into it. This has a working directory, and what is in scope is a decision you made when you started the session.
Each of those is a benefit and a risk wearing the same coat, which is why the next chapters are about control rather than about features.
The loop is not a window, and the terminal is not the only place it runs. The same agent is reachable four ways: the command-line tool, a desktop application, a web application at claude.ai/code, and extensions inside an editor such as VS Code or JetBrains. Chapter 1 installs the command-line one because it is the version where nothing is hidden and every command is visible as it runs — which is what a course about watching the tool needs. If you met Claude Code somewhere else first, you are not in the wrong course.
What is identical is nearly everything this ladder is about: the loop, what the session can see, the permission tiers, the fact that a session has a resumable history, and the habit of reading commands rather than summaries. What differs is where you type and how an approval is drawn — plus one thing that is not presentation at all. What "which directory am I in" means changes with the door, and since what the tool can see is the whole of what it can act on, that is a real difference rather than a cosmetic one.
Surfaces move faster than behaviour. When this chapter and the product disagree, believe the product about the door and this chapter about the agent.
When you open a session with any agentic tool — this one or another — the questions worth asking are the ones CodeAI101 already taught you, now with somewhere concrete to point.
Who is driving the iteration? If it keeps going after one instruction, the AI is the loop and you are supervising. Is the proposal separable from the execution — because if nothing sits between the model and the machine, there is nowhere to put a control. What can it actually touch, since which tools are available decides what a mistake can cost. What stops it. And how would you know what it did, given that a summary is not a record — the record is the transcript, and it is on your disk.
None of those is specific to this tool. That is the point of them.
Chapters 1, 3 and 4 also cost nothing. Enrolling is what carries your record; there is no payment for those.