MODULE 1 · GETTING STARTED / 25 MIN Free NOVEMBER 2026 EDITION · CLAUDE CODE 2.1.318
Your first task: the agent loop
Give Claude a real change to make, watch the gather → act → verify loop, learn the permission modes, and undo anything with checkpoints.
Updated 5 November 2026 · Reviewed 5 November 2026
What you’ll be able to do
Give Claude Code a small change, follow what it’s doing at each step, pick the right permission mode, and undo anything with a checkpoint.
The loop
Every task, big or small, runs the same loop:
- Gather context. Read files, search for symbols, look at git history.
- Act. Edit files, run commands.
- Verify. Run tests or the build, read the output.
- Repeat until done, then summarise what changed.
You don’t have to micromanage the loop, but you should be able to see it. That’s how you build trust in the tool.
Permission modes: who approves each action
Press Shift+Tab to cycle through modes. The status line shows the current one.
| Mode | Status line | What runs without asking |
|---|---|---|
| Manual | ⏸ manual mode on | Reads only. Everything else asks you |
| Accept edits | ⏵⏵ accept edits on | Reads, file edits and basic file commands in your project |
| Plan | ⏸ plan mode on | Read-only exploration, then a plan for you to approve (lesson 2.3) |
| Auto | ⏵⏵ auto mode on | Most actions. A classifier reviews each one in the background and blocks risky ones, such as force-pushes, curl | bash or production deploys |
In current versions, auto mode is the default for new interactive sessions. It’s fast and safe for everyday work, but it hides the loop’s decisions from you. For this lesson, switch to Manual so you see every approval.
Set up a practice repo
mkdir loop-practice && cd loop-practice
git init
npm init -y
claude
Press Shift+Tab until you see manual mode on.
Exercise: build a small feature with tests
Paste this prompt:
Create a small plain-JavaScript Node module `slugify.js` exporting slugify(text):
lowercase, trim, replace any run of non-alphanumerics with a single "-", strip
leading/trailing "-". Add tests using node:test in slugify.test.js covering at
least 5 cases including unicode accents ("Crème Brûlée" -> "creme-brulee").
Add an npm "test" script and run the tests until they pass.
Watch for these moments:
- The plan. Claude often lists what it’s about to do. Read it.
- Edit approvals. When Claude wants to create or change a file, you’ll see the content or a diff. Approve it.
- Command approvals. When it wants to run
npm test, choose Yes, and don’t ask again to save a permission rule for that command. - Self-correction. If the accent case fails, Claude will usually see the failure, fix the code (for example with
normalize('NFD')) and run the tests again.
Now switch to auto mode and ask for one more change: “Add a maxLength option that truncates on a word boundary, with tests.” Notice how few prompts you get.
Steering: the controls you’ll use daily
| Action | How |
|---|---|
| Interrupt the current step | Esc |
| Open the rewind menu (restore code and/or conversation) | Esc Esc on an empty prompt, or /rewind |
| New line without sending | Shift+Enter, or Ctrl+J in any terminal |
| Run a shell command yourself | Start with !, e.g. !npm test. Claude sees the output and responds to it |
| Point Claude at a file | Type @ and pick the file |
| See the full detail of each tool call | Ctrl+O |
Try it: while Claude is working, press Esc, then type “Also handle empty strings by returning an empty string.” It picks the task up again with your correction.
Checkpoints: undo without fear
Claude Code saves a checkpoint of your files before every prompt. Open the rewind menu (Esc Esc), pick a prompt, then choose:
- Restore code and conversation: go back completely
- Restore code: keep the conversation, undo the file changes
- Restore conversation: keep the files, rewind the chat
- Summarize from here / up to here: compress part of the history to free context
Try it: ask Claude to “rename slugify to toSlug everywhere”, then rewind to before that prompt and choose Restore code.
Checkpoints don’t track files changed only by shell commands (for example
rmor a code generator). They’re for quick, in-session undo. Git is still your real history.
Reviewing the result
Before you accept that a task is finished, check it yourself:
!git status
!git diff
!npm test
Or run /diff to review all changes in the working tree. You’re the reviewer: Claude is fast, but you decide what gets committed.
Verify it worked
-
slugify.jsandslugify.test.jsexist andnpm testpasses - You worked in Manual mode, then in auto mode, and noticed the difference
- You interrupted Claude at least once and redirected it
- You restored code from a checkpoint with the rewind menu
Next: working across a longer session: slash commands, resuming work, and managing context.
Knowledge check
4 QUESTIONS · PASS MARK 80%Tip: select the text that's wrong before clicking, and it's quoted in your report.