Practise safely.Use the sample text here. Never paste real names, phone numbers or beneficiary data into any AI tool.

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.

EnthusiastsNot started

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

Which task?
The prompt these options make
Try a weak prompt first, then the book's prompt, and compare.

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 works4 min

The book's HOW IT WORKS, one card at a time.

  1. 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.

2A plan, or a loop3 min

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)

  1. 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.
  2. 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.
  3. 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.
  4. 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 checks3 min

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 loop4 min

The book's step card for running an agent loop in Cowork or Claude Code, one step at a time.

  1. 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?

    You hand an agent the twenty budgets. Which brief gives it a check that proves it is done?
5The 4Ds for agent loops3 min

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
  1. Let the agent open each budget, copy the totals and check them

  2. Decide yourself what the summary is for and who gets it on Friday

  3. Write "done means every total matches the partner's own total, or is flagged"

  4. Ask for the loop before it starts: what it will read, do, and check

  5. Open two rows marked "matches" and check them against the partner files

  6. Notice that one total is far bigger than all the rest

  7. Give the agent a copy of the folder, not the originals

  8. Keep it asking before it changes the tracker

6The same loop, other jobs3 min

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.

Open claude.ai

Use your own work, after you have taken out names, phone numbers and anything that identifies a person.

Back from trying it? How did it go?