Quiz
Harnesses and the agent loop: what Claude Code and Cursor do every turn
Check what you learned
10 questions from this lesson. Answers are checked as you go; nothing is recorded.
1 / 10
What are the three phases of the agent loop in Claude Code's documentation?
Hint
Look, do, check.
Anthropic describes the loop as gather context, take action and verify results, and notes that the phases blend together.
2 / 10
What is the harness?
Hint
The workshop around the engine.
Anthropic: the harness is "the layer around the model that provides the tools and manages the context the model sees."
3 / 10
In the fix-failing-tests example, what does the agent do first?
Hint
It starts the way it ends.
It starts by running the tests, so it works from the real error instead of a guess.
4 / 10
Which of these is a tool, in the agent sense?
Hint
Something it can do, not something it knows.
A tool is an action the harness lets the model take, such as running a command, reading a file or searching.
5 / 10
What does Cursor say about the number of tool calls its agent can make in one task?
Hint
Nothing inside it says "enough".
Cursor's documentation: "There is no limit on the number of tool calls Agent can make during a task." That is why stopping rules and checks matter.
6 / 10
Why put a rule in CLAUDE.md rather than just typing it early in a session?
Hint
The desk gets cleared.
Compaction summarizes older conversation, which can drop details. CLAUDE.md is loaded at the start of every session.
7 / 10
You type a message while the agent is in the middle of running a command. When does it read it?
Hint
Between steps.
Both harnesses read your message after the current tool call finishes, so you can steer mid-task.
8 / 10
Which of these can a checkpoint NOT undo?
Hint
Outside your computer.
Anthropic: actions that affect remote systems "can't be checkpointed." A rewind restores files, not sent messages.
9 / 10
Which permission mode lets an agent read and propose but change nothing?
Hint
Think before doing.
Plan mode reads and proposes only. It is the safest place to start with any agent.
10 / 10
In my footer example, which part of the turn was mine rather than the agent's?
Hint
The goal and the last look.
The agent did the rounds. I set the goal, kept it on a local copy and looked at the result before anything went live.
Worth another look
After the quiz
Using AI · Agents · Lesson 15 of 21
Harnesses and the agent loop: what Claude Code and Cursor do every turn
What actually happens after you press enter in an agent: gather context, take action, verify, and go round again. The tools a harness hands the model, what it can see, and the three places you can step in: stop, rewind and permission modes.