No. 24 · Going further
Agent loops
An agent works in a loop. It gathers context, takes an action, checks the result and repeats until the job is done. Say what done looks like and how to check it.
Matches the playbook, Version 1, November 2026, page 36.
Quick version about 5 min
1 · The idea
An agent works in a loop: gather context, take an action, check the result, and repeat until the job is done. Four things make an agent: tools, access (what it is allowed to touch), checks (tests and rules for done) and a person who approves the steps that matter. You can interrupt the loop at any point, and good agents show their plan first. In Cowork or Claude Code, say what done looks like and how to check it.
Try the bare prompt, then the book's. This page uses a plain chat, so each answer is the loop Claude would follow, not the work itself. Look at where the checks sit and how each answer knows it is done.
2 · Build the prompt
The prompt these options make
3 · The result
4 · What made the difference
- To be fair, the weak prompts did well. All six answers said a plain chat cannot open the folder and asked for the files. All three budget answers converted lakh to rupees and compared each total with the partner's own. All three report answers kept missing months blank instead of zero and left the original reports unchanged. The bare prompt for Task B even noticed that 15 reports is more than 2 blocks times 3 months.
- It puts a check inside every round. The book's prompt turned the plan into a loop: read, do, check, repeat, once per partner or report. Each total is checked against the partner's own total as the row is written. The bare prompt spot-checked "three or four partners" at the end, and the half prompt asked a colleague to check three at random.
- It says what done looks like. Only the book's answers had a "How I will know it is done" list: all 20 rows or a reason, every total matching or flagged, one unit, no zeros for missing months. The weak prompts ended with a spot-check and a send, not with a test.
- It decides what happens when a check fails. Re-read once, then mark the row "needs check" and move on, without guessing. For Task B it asked you first whether to correct or only flag, with "flag, not silently correct" as its default. The half prompt would put in the figure it thought was right, where that seemed clear, and add a note.
- It keeps a person at the step that matters. Both book answers settle questions with you before the loop starts, and end with you looking at the flagged rows before anything goes out.
5 · Check it
An agent tells you the summary sheet is finished. Which part of the book's prompt gives you a way to judge that?
Go deeper 0 of 6 done
Each part stands on its own. Open any of them, in any order, and stop whenever you like.
1How the loop works
The book's HOW IT WORKS, one card at a time.
Step 1 of 6
Gather context
The agent reads files, searches, and asks for what it needs. In the book's example, it opens each partner budget.
Step 2 of 6
Take action
It uses a tool: it writes a file, runs a search or calls an app. Tools are what let an agent act, not only write an answer.
Step 3 of 6
Verify the work
It checks the result against the goal. In the example, it checks that each budget's totals add up.
Step 4 of 6
Loop again
Then it goes round again, until the job is done. You can interrupt the loop at any point. Good agents show their plan first.
Step 5 of 6
What makes an agent
Four things. Tools: ways to act (files, search, apps). Access: what it is allowed to touch. Checks: tests and rules for done. A person: approval at the steps that matter.
Step 6 of 6
The book's example
Twenty budgets, one sheet. An agent opens each partner budget, copies the totals, checks they add up, flags two that do not, and stops to ask before going further.
2A plan, or a loop
Task A is twenty made-up partner budgets in mixed units. Here is the bare prompt and the book's prompt for the same task.
The bare prompt
Here is how I would approach it. One thing first: in this chat I can't open your "Partner budgets 2026" folder, so you would need to upload the 20 spreadsheets here (or paste their contents) for me to do the work itself.
1. Gather and look at the files
- Open each of the 20 budgets and note how it is laid out: which sheet holds the budget, where the headings are, whether amounts run down rows or across columns.
- Check the unit on each one. Look for "in lakh", "₹ lakh", "Rs.", "INR" in headings, notes or the title. Write down the unit per partner.
2. Decide how to map each partner's lines to your four categories
Partners will use their own headings, so you need a simple mapping, for example:
| Your column | Lines that usually go here |
|---|---|
| Staff | Salaries, honorarium, personnel, HR costs, consultants (if you count them as staff) |
| Travel | Travel, local conveyance, field visits, vehicle hire, per diem |
| Materials | Inputs, supplies, training materials, equipment, printing |
| Overheads | Admin, office rent, utilities, audit, indirect costs, management fee |
Some lines won't fit neatly (for example "workshops" or "monitoring"). Decide once how to treat them and apply that rule to every partner, so the summary is consistent.
3. Convert everything to one unit
- Pick one unit for the summary. Rupees is safest for a finance lead; lakh is easier to read. You can show both.
- 1 lakh = 1,00,000 rupees. So 12.5 lakh = ₹12,50,000.
- Watch for crore too (1 crore = 100 lakh = ₹1,00,00,000), and for sheets that mix units.
4. Build the summary sheet
Columns: Partner | Staff | Travel | Materials | Overheads | Total | Source unit | Notes
- Use a formula for Total (Staff + Travel + Materials + Overheads) rather than typing it.
- Add a check column comparing your Total with the partner's own stated total. If they differ, that usually means a line was missed or mapped twice.
- Add a grand total row at the bottom.
5. Check before sending
- Spot-check three or four partners against their original files.
- Look for outliers: a partner whose total is 100 times bigger or smaller than the others probably has a unit mix-up.
- List anything you had to assume in the Notes column (missing overheads, unclear lines, different budget periods).
6. Send to the finance lead
Send the sheet with a short note: the unit used, how lines were mapped, and which partners have open questions. Sending it a day before Friday leaves time for questions.
If you upload the spreadsheets, I can read them, do the mapping and conversion, and give you the summary table plus a list of anything that needs checking.
The book's prompt
The loop I will follow
Before the loop starts
- I can't open the "Partner budgets 2026" folder from this chat. I need you to upload the 20 spreadsheets (or paste them). Until then I can only describe the loop.
- I will settle two things with you first: the unit for the summary (I suggest rupees) and where unclear lines go (for example, consultants under Staff, workshops under Materials).
The loop, once per partner (Partner 1 to Partner 20)
Read
- Open the partner's file and find the budget table.
- Find the unit (lakh or rupees) from the heading, a note or the size of the numbers.
- Find the partner's own stated total.
Do
- Map each budget line to Staff, Travel, Materials or Overheads, using the agreed rules.
- Add up each category.
- Convert to rupees if needed (1 lakh = ₹1,00,000).
- Write one row in the summary sheet. Note any line I had to guess.
Check
- Does my Total equal the partner's own total (after conversion)? If yes, the row is done.
- If not, re-read the file once to find the missing or double-counted line.
- If it still does not match, or the unit is unclear, I do not guess. I mark the row "needs check" with the reason and move on.
Repeat with the next partner.
After the loop
- Compare all 20 totals. A total far bigger or smaller than the rest usually means a lakh and rupee mix-up, so I re-check those rows.
- Add the grand total row.
- Write a short note for the finance lead: unit used, how lines were mapped, and the list of "needs check" rows.
How I will know it is done
- All 20 partners have a row, or a clear reason why not (for example, a file is missing).
- Every row's Total matches the partner's own total, or is flagged with a reason.
- All amounts are in one unit, and the sheet says which.
- The note lists every assumption and open question.
- You have looked at the flagged rows before it goes to the finance lead on Friday.
Upload the files and I will start with Partner 1.
Swipe sideways to see both answers.
Both answers know the traps. Both convert lakh to rupees, compare each total with the partner's own total, watch for a total far out of line with the rest, and note every assumption. The bare prompt did well.
The difference is where the checks sit and where it ends. The bare answer checks a column and then spot-checks "three or four partners" before sending. The book's answer checks every partner inside the loop, says what to do when a total does not match (re-read once, then flag, never guess), and ends with a list of what done looks like, including you looking at the flagged rows before Friday.
3Spot the weak checks
This is part of a real answer to the half prompt for Task B (fifteen field reports). Tap each highlighted part you would tighten before you let an agent loop on it. Some are fine.
Tap the parts you think are wrong. Found 0 of 2.
Step 5: Correct with care
12. Where the right figure is clear (for example, the table adds up to 84 but the summary says 48),
13. Where it is not clear,
Step 6: Fill in the tracker
16. For missing reports,
Step 7: Final check and follow-up
18.
19.
4Four steps for a real loop
The book's step card for running an agent loop in Cowork or Claude Code, one step at a time.
Stage 1 of 4
Goal and check
State the goal and the check that proves it is done.
You hand an agent the twenty budgets. Which brief gives it a check that proves it is done?
Stage 2 of 4
See the plan
Ask it to show its plan before it starts.
The agent shows its loop. It says it will correct mistakes in the field reports as it finds them. What do you do?
Stage 3 of 4
Let it loop
Let it act, check the result and try again, up to the limit you set.
Partner 7's total still does not match after the agent re-reads the file. What should a good loop do?
Stage 4 of 4
Review the result
Review the final result yourself.
The agent says all 20 totals were checked. What is your last step?
5The 4Ds for agent loops
The book's lines for this chapter: hand over the loop and keep the goal, define done in plain words, check what it says it checked, limit what it can touch. Sort each action.
- Delegation what to hand over
- Description describe it well
- Discernment judge what comes back
- Diligence own what goes out
Let the agent open each budget, copy the totals and check them
Hand over the loop. The reading, copying and checking round by round is the part an agent does well.
Decide yourself what the summary is for and who gets it on Friday
Keep the goal. The agent runs the loop; you decide what the work is for.
Write "done means every total matches the partner's own total, or is flagged"
Define done in plain words. Without it, the weak prompts ended with "send it", not with a test.
Ask for the loop before it starts: what it will read, do, and check
This is the book's prompt. It turns a plan into a loop with a finish line.
Open two rows marked "matches" and check them against the partner files
Check what it says it checked. An agent's "all checked" is a claim, not proof.
Notice that one total is far bigger than all the rest
A total far out of line usually means a unit mix-up, such as lakh and rupees. Judging what comes back includes spotting what does not fit.
Give the agent a copy of the folder, not the originals
Limit what it can touch. Originals stay safe whatever the loop does.
Keep it asking before it changes the tracker
Keep it asking before changes until you trust it. A person approves the steps that matter.
6The same loop, other jobs
The book's three rows. Copy the prompt that fits your work and fill in the brackets.
Programme and field
Folders of reports. Read each, extract, check, repeat.
From each report in [folder], take [the figures] and put them in [sheet]. Before you start, write the loop you will follow for this task: what you will read, what you will do, and how you will know it is done. Flag any figure you cannot confirm; do not guess.
Communications
A website update. Edit, preview, check, repeat.
Update [page] with [the changes]. Before you start, write the loop you will follow for this task: what you will read, what you will do, and how you will know it is done. Show me the preview before anything goes live.
Leadership
A data pipeline. Fetch, clean, test, repeat.
Fetch [data] from [source], clean it and put it into [summary]. Before you start, write the loop you will follow for this task: what you will read, what you will do, and how you will know it is done. Include the test that proves the figures are right.
Try it this week, in claude.ai
Open Cowork (or Claude Code for files and scripts) and give it a copy of your folder, not the original. State the goal and the check that proves it is done, paste the book's prompt, and read its loop before it starts; add the checks you care about. Unlike this page, the agent then opens the files, acts, checks its own results and loops again until the checks pass, and you can stop it at any point. Keep it asking before changes until you trust it, review the final result yourself, and take out names, phone numbers and IDs before you share real work.
Before you start, write the loop you will follow for this task: what you will read, what you will do, and how you will know it is done.
Read its loop and add the checks you care about.
Use your own work, after you have taken out names, phone numbers and anything that identifies a person.
Here is how I would approach it. One thing first: in this chat I can't open your "Partner budgets 2026" folder, so you would need to upload the 20 spreadsheets here (or paste their contents) for me to do the work itself.
1. Gather and look at the files
- Open each of the 20 budgets and note how it is laid out: which sheet holds the budget, where the headings are, whether amounts run down rows or across columns.
- Check the unit on each one. Look for "in lakh", "₹ lakh", "Rs.", "INR" in headings, notes or the title. Write down the unit per partner.
2. Decide how to map each partner's lines to your four categories
Partners will use their own headings, so you need a simple mapping, for example:
| Your column | Lines that usually go here |
|---|---|
| Staff | Salaries, honorarium, personnel, HR costs, consultants (if you count them as staff) |
| Travel | Travel, local conveyance, field visits, vehicle hire, per diem |
| Materials | Inputs, supplies, training materials, equipment, printing |
| Overheads | Admin, office rent, utilities, audit, indirect costs, management fee |
Some lines won't fit neatly (for example "workshops" or "monitoring"). Decide once how to treat them and apply that rule to every partner, so the summary is consistent.
3. Convert everything to one unit
- Pick one unit for the summary. Rupees is safest for a finance lead; lakh is easier to read. You can show both.
- 1 lakh = 1,00,000 rupees. So 12.5 lakh = ₹12,50,000.
- Watch for crore too (1 crore = 100 lakh = ₹1,00,00,000), and for sheets that mix units.
4. Build the summary sheet
Columns: Partner | Staff | Travel | Materials | Overheads | Total | Source unit | Notes
- Use a formula for Total (Staff + Travel + Materials + Overheads) rather than typing it.
- Add a check column comparing your Total with the partner's own stated total. If they differ, that usually means a line was missed or mapped twice.
- Add a grand total row at the bottom.
5. Check before sending
- Spot-check three or four partners against their original files.
- Look for outliers: a partner whose total is 100 times bigger or smaller than the others probably has a unit mix-up.
- List anything you had to assume in the Notes column (missing overheads, unclear lines, different budget periods).
6. Send to the finance lead
Send the sheet with a short note: the unit used, how lines were mapped, and which partners have open questions. Sending it a day before Friday leaves time for questions.
If you upload the spreadsheets, I can read them, do the mapping and conversion, and give you the summary table plus a list of anything that needs checking.
Here is a step-by-step plan, working back from the Friday deadline.
Step 1: Collect and list the files (Monday)
- Make a copy of the "Partner budgets 2026" folder so you never edit the originals.
- Check that all 20 files are there (Partner 1 to Partner 20). Note any that are missing or are older versions.
- Start a tracking list with one line per partner: file name, sheet used, unit (lakh or rupees), status.
Step 2: Agree the categories (Monday)
- Write a short definition for each column so the mapping is consistent:
- Staff: salaries, honorarium, consultants, benefits
- Travel: travel, conveyance, per diem, vehicle hire
- Materials: supplies, equipment, training and printing materials
- Overheads: admin, rent, utilities, audit, indirect costs
- Decide where unclear lines go (for example "events" or "monitoring"). If you are unsure, check with the finance lead now, not on Thursday.
Step 3: Extract the numbers (Tuesday to Wednesday)
- Open each partner's budget and find the four categories.
- Record the amount for each category in the partner's original unit, along with the partner's own stated total.
- Note any line you had to interpret, with the reason.
Step 4: Convert units (Wednesday)
- Pick one unit for the summary (rupees is usually safest).
- Convert lakh to rupees: multiply by 1,00,000. For example, 8.4 lakh = ₹8,40,000.
- Watch for crore (1 crore = 100 lakh) and for sheets that mix units within one file.
Step 5: Build the summary sheet (Wednesday)
- Create the sheet with columns: Partner | Staff | Travel | Materials | Overheads | Total | Unit in source | Notes.
- Calculate Total with a formula, not by hand.
- Add a check: compare your Total with the partner's stated total and flag any difference.
- Add a grand total row.
Step 6: Check (Thursday)
- Re-check every flagged row against the source file.
- Look for totals that are far bigger or smaller than the rest. These are often unit errors.
- Ask a colleague to spot-check three partners at random.
- Write a short note of assumptions and open questions.
Step 7: Send (Thursday evening or Friday morning)
- Send the sheet to the finance lead with the note: unit used, how lines were mapped, which partners need follow-up.
Tip: If you upload the 20 spreadsheets here, I can do Steps 3 to 5 for you and point out the rows that need a human check. I can't open the folder myself from this chat.
The loop I will follow
Before the loop starts
- I can't open the "Partner budgets 2026" folder from this chat. I need you to upload the 20 spreadsheets (or paste them). Until then I can only describe the loop.
- I will settle two things with you first: the unit for the summary (I suggest rupees) and where unclear lines go (for example, consultants under Staff, workshops under Materials).
The loop, once per partner (Partner 1 to Partner 20)
Read
- Open the partner's file and find the budget table.
- Find the unit (lakh or rupees) from the heading, a note or the size of the numbers.
- Find the partner's own stated total.
Do
- Map each budget line to Staff, Travel, Materials or Overheads, using the agreed rules.
- Add up each category.
- Convert to rupees if needed (1 lakh = ₹1,00,000).
- Write one row in the summary sheet. Note any line I had to guess.
Check
- Does my Total equal the partner's own total (after conversion)? If yes, the row is done.
- If not, re-read the file once to find the missing or double-counted line.
- If it still does not match, or the unit is unclear, I do not guess. I mark the row "needs check" with the reason and move on.
Repeat with the next partner.
After the loop
- Compare all 20 totals. A total far bigger or smaller than the rest usually means a lakh and rupee mix-up, so I re-check those rows.
- Add the grand total row.
- Write a short note for the finance lead: unit used, how lines were mapped, and the list of "needs check" rows.
How I will know it is done
- All 20 partners have a row, or a clear reason why not (for example, a file is missing).
- Every row's Total matches the partner's own total, or is flagged with a reason.
- All amounts are in one unit, and the sheet says which.
- The note lists every assumption and open question.
- You have looked at the flagged rows before it goes to the finance lead on Friday.
Upload the files and I will start with Partner 1.
Here is how I would approach it. Note that from this chat I can't open your "Field reports Q3" folder or the "M&E tracker" sheet, so you would need to upload the reports (and ideally the tracker layout) for me to do it.
1. Map what should exist
Q3 is July, August and September. Two blocks × 3 months = 6 reports if they are one per block per month. You have 15, so check what they actually are. There may be several reports per block per month (for example, by cluster or by staff member), or some may be from other months. Make a simple grid of block × month and tick off which reports you have. This shows you straight away which ones are missing.
2. Extract the two numbers from each report
For each report, find:
- Households reached
- Training sessions held
Record the report name, block, month, and the page or section the number came from. Reports often state the same figure in more than one place (summary and table), so check both.
3. Look for mistakes
Common problems in field reports:
- The summary figure does not match the table total.
- A cumulative number (total so far) is reported as if it were the monthly number.
- Households reached is lower than the previous month when it should be cumulative, or much higher than plausible.
- Typos, such as an extra zero.
- The month or block in the report does not match the file name.
On correcting them: I would be careful here. It is better not to change the reports themselves. Instead, enter the figure you believe is right in the tracker, and keep a note of what the report said, what you entered, and why. Where you can't tell which figure is right, flag it and ask the block team rather than guessing.
4. Fill in the tracker
Enter each figure in the right block and month row of the "M&E tracker". Add a comment or notes column for any corrected or uncertain figures.
5. Handle missing reports
Leave missing months blank (not zero), since zero means "nothing happened" and blank means "no data". Mark them as "report not received" and send the list to the block coordinators.
6. Final check
Compare the quarter totals for each block with any earlier figures you have, and spot-check a few entries against the source reports.
If you upload the Word files and tell me the tracker's columns, I can pull out the numbers, flag likely mistakes and give you a table ready to paste into the tracker.
Here is a step-by-step plan.
Step 1: Prepare
- Make a copy of the "Field reports Q3" folder and of the "M&E tracker", so the originals stay safe.
- Open the tracker and note exactly what it asks for: which columns, which rows (block and month), and whether figures are monthly or cumulative.
Step 2: List the reports
- Make a grid with blocks (North, East) down the side and months (July, August, September) across the top.
- Place each of the 15 reports in the grid by its block and month.
- Note any gaps (missing reports) and any duplicates (two reports for the same block and month).
Step 3: Extract the figures
- Open each report and find:
- number of households reached
- number of training sessions held
- Record each figure in a working table with: block, month, report file name, figure, and where in the report you found it.
Step 4: Check for mistakes
- Compare the figure in the summary with the figure in any tables in the same report.
- Check that the numbers make sense against other months (no sudden jumps, such as 120 households one month and 1,200 the next).
- Check whether a figure is monthly or cumulative, and that it matches what the tracker expects.
- For each problem, write down: what the report says, what you think it should be, and why.
Step 5: Correct with care
- Where the right figure is clear (for example, the table adds up to 84 but the summary says 48), use the correct figure and note the change.
- Where it is not clear, do not guess. Flag it and ask the block team.
- Do not edit the original Word reports. Keep corrections in the tracker notes and your working table.
Step 6: Fill in the tracker
- Enter the checked figures in the right block and month cells.
- For missing reports, leave the cell blank and add a note "report not received". Do not enter zero.
- Add a note to any cell where the figure was corrected or is uncertain.
Step 7: Final check and follow-up
- Spot-check three or four entries against the source reports.
- Check the quarter totals for each block look sensible.
- Send the block coordinators a short list: missing reports, and figures you need them to confirm.
If you upload the reports here, I can do Steps 3 to 5 and give you a table of figures plus a list of issues. I can't open the folder or the tracker myself from this chat.
The loop I will follow
Before the loop starts
- From this chat I can't open the "Field reports Q3" folder or the "M&E tracker". I need you to upload the 15 Word files and tell me (or paste) the tracker's columns.
- I will check one thing with you first: when I find a mistake, do you want me to correct the figure in the tracker with a note, or only flag it for you? My default is to flag, not silently correct, and to never change the original reports.
- I will set up a grid of Block North and Block East × July, August, September, so I can see gaps.
The loop, once per report
Read
- Open the report. Find the block and the month (from the text, not only the file name).
- Find households reached and training sessions held. Note where each figure appears (summary, table, narrative).
Do
- Write one row in a working table: block, month, file, households, sessions, source.
- Tick the block and month in the grid.
Check
- Do the summary and the table agree? Is the figure monthly or cumulative, and is that what the tracker wants?
- Does it fit next to the other months for that block (no sudden tenfold jump)?
- Is this block and month already filled by another report?
- If all checks pass, the row is ready. If something is off and the right figure is obvious (for example, the table adds to 84 and the summary says 48), I note the likely correction and the reason. If it is not obvious, I mark it "needs check" and do not guess.
Repeat with the next report.
After the loop
- Look at the grid. Every empty cell is a missing report. I list them and leave them blank in the tracker (not zero).
- Prepare the tracker entries, with a note on every corrected or flagged figure.
- Give you a short list: missing reports, proposed corrections, and figures to confirm with the block teams.
How I will know it is done
- All 15 reports have been read and each one sits in the grid, or is noted as a duplicate or out of range.
- Every block and month cell has a checked figure, a "report not received" note, or a "needs check" flag.
- Every correction shows the original figure, the new figure and the reason.
- No zeros have been entered for missing months.
- You have reviewed the flagged items before the figures go into the tracker.
Upload the reports and the tracker layout, and I will start with the first report.