The Feedback Loop
How to iterate with Claude Code when the first result isn't quite right — the core skill that makes everything else work
The first result is a starting point
On the previous page, everything went smoothly. You asked Claude Code to rename files, it renamed them. You asked it to organize files, it organized them.
Real work isn't always that clean.
The result might be close but not quite right. Claude Code might interpret your request differently than you intended. Or you see the result and realize you wanted something else entirely.
This happens. It's part of the process. The skill that makes Claude Code genuinely useful isn't giving perfect instructions on the first try — it's knowing how to refine the result until it matches what you want.
That's the feedback loop: ask, review, refine.
How it works
You already know the rhythm from the previous page: ask, review, approve, verify.
The feedback loop adds one more step: refine.
- Ask — describe what you want
- Review — look at what Claude Code proposes
- Refine — tell it what to change
- Repeat — keep going until the result is right
You're having a conversation, not filling out a form. If a colleague did something almost-right, you wouldn't start from scratch. You'd say "that's close, but change this part."
Seeing it in action: organizing photos by date
Let's walk through a real scenario so you can see the feedback loop play out.
The situation: You have a folder called event-photos on your Desktop.
It contains 200 photos from a company event, all with unhelpful names like IMG_0001.jpg through IMG_0200.jpg.
You want them organized by the date they were taken.
Step 1: Ask
Open your terminal, navigate to the folder, and start Claude Code:
cd ~/Desktop/event-photos
claudeThen type your request:
organize these photos into subfolders by the date they were takenStep 2: Review the plan
Claude Code reads the photo files and checks their dates. Before moving anything, it shows you a plan:
I'll organize 200 photos into subfolders based on their creation dates. Here's the structure I'll create:
2026-01-15/— 73 photos2026-01-16/— 89 photos2026-01-17/— 38 photosI'll move each photo into the matching folder. Want me to proceed?
It asks permission before touching a single file.
Take a moment. Look at the plan. Do the dates make sense? Is the structure what you had in mind?
Here, the structure is right — photos split by date — but the folder names are in a format like 2026-01-15.
You'd rather have something friendlier.
Step 3: Refine
Instead of approving, tell Claude Code what to change:
use month and day names instead of numbers — like "January 15" instead of "2026-01-15"Claude Code adjusts:
Updated plan. I'll create these folders instead:
January 15/— 73 photosJanuary 16/— 89 photosJanuary 17/— 38 photosSame photos, friendlier folder names. Want me to proceed?
Closer. But three folders with dozens of photos each still feels cluttered.
Step 4: Refine again
actually, put all the photos in one folder called "Company Event Jan 2026" and rename each file to include the date and a number, like "jan-15-001.jpg"Claude Code shows a new plan:
I'll create a single folder called
Company Event Jan 2026/and rename each photo to include its date:
IMG_0001.jpg→Company Event Jan 2026/jan-15-001.jpgIMG_0002.jpg→Company Event Jan 2026/jan-15-002.jpg- ...
200 files total. Want me to proceed?
Now the plan matches what you had in mind. Approve it, and Claude Code moves and renames every file.
How the iterations built on each other
Three rounds of instructions, each refining the last.
The first request got the idea across: organize by date. The second tweaked the format: friendlier folder names. The third changed the approach entirely: one folder, better file names.
Claude Code didn't get frustrated or lose track. It adapted its plan each time and waited for your go-ahead.
Why reviewing matters
It's tempting to approve the first plan without reading it closely. Don't. Catching issues early saves you from fixing them later.
Before approving, scan for these:
- Does the plan match what you asked for? Claude Code might interpret your request differently than you intended.
- Do the numbers add up? If you have 200 files and the plan mentions 150, something's off. Ask about it.
- Are the names and folders right? A quick look at the first few examples tells you if the pattern works.
You don't need to verify every line. Check the pattern, check the totals, and trust that Claude Code applies the pattern consistently.
Tip: If you're unsure whether the plan is right, ask Claude Code to explain it first. Type something like "explain what this will do to my files before I approve" and it will walk you through the changes in plain language.
When to refine vs. start fresh
Most of the time, refining is better than starting over. Claude Code remembers everything in the current conversation — what files are in the folder, what you've already asked for, what you changed your mind about.
Refine when:
- The result is partly right and you want to adjust it
- You realized you want something slightly different
- Claude Code did the right thing but in the wrong format
Start fresh when:
- The conversation has gotten long and confused
- You want to work on a completely different task
- Your corrections aren't landing and Claude Code keeps heading the wrong direction
To start fresh, type /clear and try again with a better description.
Here's a useful guideline: if you're still far from the result after a few rounds of refining, a clearer first request will get you there faster than more iteration. When you start over, use what you learned. The refinements you made tell you what you actually wanted all along — write that as your opening request.
Your undo button: Escape twice
Refining works before Claude Code acts. But what if you already approved something and the result isn't right?
Press Escape twice.
Claude Code keeps a snapshot of your files before each change. Pressing Escape twice opens the rewind menu, where you can roll back to any earlier point in the conversation.
You get three options:
- Conversation only — rewind what you and Claude Code said, but keep the file changes
- Files only — undo the file changes, but keep the conversation
- Both — rewind everything to a previous point
For most situations, rewinding both is what you want. It puts you right back where you were, as if the last change never happened.
Heads up: Escape twice can undo file changes that Claude Code made. It can't undo things that left your computer, like emails sent or data uploaded to external services. For the local file work in this course, the rewind covers you completely.
What you've learned
The feedback loop — ask, review, refine — is the core skill for everything that follows in this course.
Data analysis, automation, building tools: they all work this way. You describe what you want, check the result, and adjust until it's right.
You don't need to write flawless prompts on the first try. You need to be comfortable saying "that's close, but change this part."
Next up: a clear-eyed look at what Claude Code can and can't do, so you know where it shines and where to set realistic expectations.