Chapter 1 · Session 16
Split the work so agents cannot collide
Several agents make you faster only when the work is cut into pieces that do not touch the same files, in an order that respects what depends on what. Claude Code drafts that cut as a wave plan; you check it and write each piece a brief before any agent starts.
35 min2 stepsNo agents running yet
By the end of this chapter you can
- Say why more agents do not mean proportionally faster, and what the real limit is.
- Have Claude Code write docs/waves.md: tasks, waves, owners and the open pull requests to avoid.
- Turn wave 2 into briefs with acceptance checks written first, merged before any agent starts.
What a fleet is, and what it is not
A fleet is several Claude Code sessions working at the same time, each on one task, each in its own copy of the repository on its own branch, each ending in a pull request that the checks and a person judge. Nothing about the rules changes: every change is still a branch, a pull request, green checks, owner two's approval and a merge. What changes is that you have three pull requests to read instead of one [1].
That is also the limit. In 1967 Gene Amdahl showed that running work in parallel is capped by the part that stays serial [2]. In a fleet the serial part is you: reading each pull request, merging them one at a time and sorting out anything that conflicts. If a fifth of the effort is yours, eight agents give at best about 3.3 times the speed of one.
A good task for an agent
| Property | Test | Stamping plant example |
|---|---|---|
| Small | One pull request you can read in under 30 minutes | The hold screen's reason picker |
| Independent | Needs nothing from another task in the same wave | The queue filter does not wait for the picker |
| Owned | Writes only the folders its brief names, and nobody else in its wave writes them | app/operator/holds/ and its tests |
| Provable | Acceptance checks written before the work starts | Given a hold with no reason, when saved, then it is refused with a message |
| Bounded | Can be done in about 80 agent turns; stops after two identical failures | Stop and report instead of trying a third time |
Some tasks need others first: nothing can show hold reasons before the table that holds them exists. Tasks with nothing before them form the first wave; when they merge, the next wave can start. Changes to the database, to the package list and to the checks are never handed to a parallel agent: they belong to you, the lead, and usually make up wave 1.
Have Claude Code write the wave plan
15 minutesWhy
Agents that are handed overlapping work collide: one push is refused because another pull request touches the same file, or the same fix is built twice. Cutting the work by folder before any agent starts is the cheapest way to prevent it, and a written plan is something you and owner two can check in five minutes.
Do this
cd ~/code/acme-platform && git switch main && git pull && claudeRead docs/INTENT.md, docs/SCHEMA-PLAN.md, docs/measures.md and every file in docs/briefs/. Do not change any code.
I want to build the next piece of the platform with several Claude Code agents working at the same time. On a new branch fleet/wave-plan, write docs/waves.md with these sections:
1. "Still to build": every change the platform still needs for the decision in docs/INTENT.md, one line each, in plain English. If you are unsure whether something is wanted, ask me; do not invent features.
2. "Tasks": each change rewritten as a task that is small (one pull request I can read in under 30 minutes), independent (needs nothing from another task in its wave), owned (names the folders it may write, which no other task in its wave writes), provable (has acceptance checks I can read, written before the work starts) and bounded (about 80 agent turns).
3. "Waves": group the tasks so a task depends only on tasks in earlier waves. Any migration, any change to package.json, .github/ or the checks goes in wave 1 or to me as the lead, never to a parallel agent.
4. "Owners": a table per wave of folder and the one task that writes it. package.json, package-lock.json, supabase/, .github/, CLAUDE.md and .claude/ are owned by me, the lead.
5. "Open pull requests": the open pull requests and the files each touches (gh pr list, then gh pr diff with --name-only). If a task needs one of those files, put it in a later wave and say which pull request it waits for.
6. "Fleet size": the widest wave, and how many agents I should run: no more than the widest wave, and no more than 3 the first time.
Open a pull request titled "Wave plan", wait for the checks, and tell me the waves in plain words.You will see recreated screen
- It looks at open pull requests first, so no task is handed a file someone else is changing.
- Each folder in a wave has exactly one task. The overlap with #41 is named, not ignored.
Check it worked
Pull request Wave plan has one new file, docs/waves.md, with all six sections. No folder appears twice in one wave, and migrations, package.json and .github/ are marked as yours.
Fastest path
Asking for the open pull requests in the same prompt saves the most common collision before it happens. Merge the plan as soon as owner two approves: every agent will read it from main.
If it goes wrong
Two tasks in one wave both need package.json (a new library each)
Say: Move every package change to the lead. List the packages needed and I will add them in one pull request before wave 2 starts. Two agents changing one file is the most common cause of a collision.
The plan has eight agents and twelve tasks in one wave
Say: Cut wave 2 to the three most valuable tasks and move the rest to later waves. You read every pull request; more than you can read carefully in a morning only adds conflicts.
It lists features nobody asked for
Say: Remove anything that docs/INTENT.md does not need, or list it under Not now. Unasked-for work is unreviewed scope.
Do wave 1 yourself, then write wave 2's briefs
20 minutesWhy
Wave 1 is the change everything else depends on, usually a migration, so it is done the way Session 5 taught: one agent, you watching, applied by you after merge. Then each wave 2 task gets a brief with its acceptance checks written first. The checks, not the agent's opinion, decide when a task is done, and writing them before the work is the only way an agent cannot quietly fit them to what it built.
Do this
If your wave plan has a wave 1, build it now, as in Session 5: a new migration with its tests, reviewed, merged and applied (from Session 11 the deploy applies it). Then paste:
Read docs/waves.md (merged), docs/briefs/TEMPLATE.md and the newest brief in docs/briefs/ as an example.
On a new branch fleet/wave-2-briefs, write one brief per wave 2 task, numbered after the last brief in docs/briefs/. Each follows the template and also has:
- "Folders you own": the only folders this agent may create or change, from the Owners table.
- "Do not touch": every other folder, and always package.json, package-lock.json, supabase/, .github/, CLAUDE.md and .claude/. If the task seems to need one of them, stop and say so.
- "Acceptance checks": written now, in plain English, as Given / When / Then, including at least one refused or wrong input and one check at phone width. The agent turns each into a test and shows it failing before the change and passing after.
- "Limits": stop after two identical failures and report; stop if the work needs a folder you do not own.
- "Finish": open a pull request titled with the brief's number and name, wait for every check on the latest commit, and report the test command, its exit code and the last lines of its output.
Do not write any code for the tasks. Open a pull request titled "Wave 2 briefs", wait for the checks and show me the link.Read each brief's acceptance checks with the person who will use the screen, as you did with the schema plan. Owner two approves; merge.
You will see recreated screen
- Written before any agent starts, in words the operator can check.
- No code yet: the briefs merge first, because each agent starts from main and must be able to read its brief there.
Check it worked
docs/briefs/ on main has one new brief per wave 2 task. Each names its folders, has a Do not touch list, acceptance checks with a refused input and a phone check, and the two-failure limit.
If it goes wrong
An acceptance check says only "the page works" or "the tests pass"
Say: Rewrite check N as Given / When / Then with the exact input and the exact result the operator sees. A check nobody can fail is not a check.
A brief needs a new column or table
That is a wave 1 task. Move it to the lead: write the migration in the day, merge and apply it, then write the brief.
Knowledge check
Two wave 2 tasks both need a new package added to package.json. What is the fix?
Knowledge check
Your review and merging are 20% of the total effort. Roughly what speed-up can eight agents give?
References
- Anthropic: Building effective agents (the orchestrator-workers pattern). https://www.anthropic.com/engineering/building-effective-agents
- Amdahl, G. M. (1967). Validity of the single processor approach to achieving large scale computing capabilities. https://doi.org/10.1145/1465482.1465560
- Claude Code docs: Run agents in parallel. https://code.claude.com/docs/en/agents
Chapter 2 · Session 16
One agent first, then three, each in its own worktree
Each agent gets its own worktree: a separate folder on its own branch, sharing the repository's history. You add the fleet's rules to CLAUDE.md, cap the spending, prove one task with one agent, and only then start the other two.
40 min4 stepsThree terminals at the end
By the end of this chapter you can
- Add the rules for working in parallel to CLAUDE.md and start docs/fleet-ledger.md.
- Set the spending ceiling before more than one agent runs.
- Start Claude Code in a worktree with claude --worktree, prove one task, then add two more agents.
- Keep each agent's context small: one brief, its own folders, a fresh session per task.
A worktree per agent
A git worktree is a second working folder for the same repository, on its own branch [1]. Claude Code makes one for you: claude --worktree <name> creates the folder .claude/worktrees/<name>/ on a new branch worktree-<name>, starting from main as it is on GitHub, and starts the session inside it [2]. While a session is in its worktree, Claude Code refuses edits and commands aimed at your main folder. Three terminals, three worktrees: three agents that cannot edit each other's files.
| Shared by every agent on your computer | What goes wrong | The rule |
|---|---|---|
| The git stash | One agent's set-aside work is taken or lost by another | No git stash: commit to your own branch instead |
| The temporary folder (/tmp) | A test log is half empty or belongs to another job | Write scratch files inside your own worktree |
| "Stop every process called node" | Another agent's test run is killed | Stop only the processes you started, by their ID |
| Your Claude plan's usage window | Three agents use it up three times as fast | Cap spending; start agents a minute or two apart |
| GitHub checks and Vercel previews | Pull requests queue for the same builders | Fewer, smaller pull requests; never re-run old checks |
The first three rows are real: in our build, agents on one machine overwrote each other's stashes, logs and builds until these rules went into the project's standing instructions.
What each agent knows: keep it small
An agent knows only what is in its context: Claude Code's own instructions, your CLAUDE.md, the brief, and everything it has read and run so far. Every request sends all of it again. As it grows, the model recalls what is in it less reliably, and every request costs more [3]. So: one short CLAUDE.md every agent shares (Claude Code's guidance is under about 200 lines [4]), one brief per agent that points to files instead of pasting them, and a fresh session for each task.
Add the fleet's rules to CLAUDE.md and start the ledger
10 minutesWhy
Every agent reads CLAUDE.md before anything else, so a rule written there once applies to all of them, tonight and every night after. These rules are the ones we had to add after agents in our own build overwrote each other's work, reported "all tests pass" when they had not, went round in circles, and weakened a check to get to green. The ledger starts now so the first run is counted.
Do this
On a new branch fleet/rules, add a section "Working in parallel" to CLAUDE.md, keeping the whole file under 200 lines (move detail into docs/ and point to it if you need room):
- Each agent works only in its own worktree under .claude/worktrees/, on its own branch, and only in the folders its brief owns. Before starting, list the open pull requests and the files each touches; if your task needs one of those files, say which pull request it overlaps and stop. If a push is refused for an overlap, do not rebuild the commit: say which pull request we are waiting for.
- Never use git stash (commit to your branch instead), never write to /tmp (use a folder inside your worktree that git ignores), and never stop processes by name (pkill, killall, taskkill /IM): stop only processes you started, by their ID.
- Never edit, skip or loosen an existing test, check, limit or CI step to make something pass, and never use a different command to do something you were refused. If you think a check is wrong, stop and explain why.
- Before saying something works, show the exact command, its exit code and the last 20 lines of its output. Never pipe a test command into another command. If you could not run it, say "could not measure", not "passed".
- After two identical failures, stop and report what failed, what you tried, and whether the cause is in our code or outside it.
- A red check counts only if it ran on the branch's latest commit. If the branch is behind main, merge origin/main into it (no rebase, no force push), push, and wait for the new checks before diagnosing anything.
Also add .claude/worktrees/ to .gitignore, and create docs/fleet-ledger.md: a table with the columns Date, Task (brief), Run (worktree), Cost estimate, Check runs until green, Merged, Review minutes, Notes, and one paragraph explaining cost per merged change.
Open a pull request titled "Fleet rules", wait for the checks and report.You will see recreated screen
- Short rules, each from a real failure. The whole file stays under 200 lines.
- Without this, every agent's folder shows up as untracked files in your main folder.
Check it worked
On main: CLAUDE.md has the section Working in parallel and is under 200 lines; .gitignore has .claude/worktrees/; docs/fleet-ledger.md exists with its columns.
If it goes wrong
CLAUDE.md is now 300 lines
Say: Move anything that is not a rule for every task into docs/ and leave a one-line pointer. Keep CLAUDE.md under 200 lines. A long file costs context on every request and is followed less reliably.
It wants to put the rules in .claude/settings.json instead
Say: Leave .claude/settings.json as it is: it holds the deny rules from Session 1. These are instructions, so they go in CLAUDE.md.
Set the spending ceiling before you add agents
5 minutesWhy
Three agents spend about three times as fast as one, and from tonight they will run while nobody watches. A ceiling set on the account is the one limit no agent can talk its way past. It is a person's job, on the provider's own page, like every other account setting in this course.
Do this
On a company Team plan (Session 1), the organisation's usage page holds the spend limits for usage beyond each seat's allowance:
https://claude.ai/admin-settings/usage
Organization settings, Usage: check that usage credits have a monthly spend limit you are comfortable with, for the organisation and for your own seat.
If the fleet runs on a Claude Console account (paid per token) instead, set the spend limit on its workspace in the Console's Settings, under Workspaces and Limits [5]. Then write the limit, and where it is set, in docs/fleet-ledger.md above the table.
You will see recreated screen
- On, so a busy day does not stop the fleet halfway; off, if you would rather it stopped.
- The ceiling. Pick a number you would not mind losing on a bad night, and write it in the ledger.
Check it worked
A spend limit is set where your fleet's usage is billed, and docs/fleet-ledger.md states it and where it is set.
If it goes wrong
I cannot see the Usage page
Only owners or members with billing access can. Ask owner one, or the person who bought the seats in Session 1, to set the limit.
Agents stop with "You've hit your session limit"
Your seat's usage window is used up; it resets at the time shown. Run fewer agents at once, keep tasks small, and start them a few minutes apart.
Prove the task with one agent first
15 minutesWhy
Starting several agents before one has worked multiplies every mistake in the brief, the rules or the setup by the number of agents. In our own build, five agents left running overnight finished almost nothing because they all queued for one shared resource nobody had measured. One agent, watched, shows how long a task takes, where it gets stuck and what the agents will share.
Do this
cd ~/code/acme-platform && git switch main && git pull && claude --worktree wave2-task1You are agent 1 of wave 2, in your own worktree. Read CLAUDE.md, then docs/waves.md, and carry out the FIRST task of wave 2, following its brief in docs/briefs/.
1. Before you start: run npm ci, list the open pull requests and the files each touches, and stop if any overlap your brief's folders.
2. Turn each acceptance check into a test and show me it failing before you change anything.
3. Write only in the folders your brief owns.
4. Push, open the pull request, wait for every check on the latest commit, and fix anything red before reporting.
5. Then tell me how long it took, how many check runs it needed, what you got stuck on, anything in the brief that was unclear, and what agents working at the same time would share (Claude usage, GitHub checks, Vercel previews, the development database) and how many could use each at once.You will see recreated screen
- A new folder and branch just for this agent. Your main folder is untouched.
- Red first: proof that the tests test something.
- The numbers you need before adding agents, and an unclear brief to fix before the next one.
Check it worked
Pull request for task 1 is open and green on its latest commit, and you have written its time, check runs and what it got stuck on in the ledger's Notes.
Fastest path
Fix the brief's unclear point now, in the briefs for tasks 2 and 3 as well, before starting them. One sentence now saves two agents asking the same question.
If it goes wrong
Error: run claude once in this folder first to accept the trust dialog
Run claude in ~/code/acme-platform once, answer Yes, type /exit, and run the worktree command again.
npm test fails in the worktree with a missing key
Correct: a worktree has no .env.local, so no keys, and agents never need one. Say: Tests must not need a real key. Use the test setup's made-up values, or leave this test to CI, and tell me which. Do not copy .env.local into worktrees.
It reports "all tests pass" but the pull request is red
Say: The checks on the pull request are red. Show me gh pr checks for the latest commit, read the failed log, fix the cause and wait for green before reporting. The check on GitHub is the judge, never the summary.
Add the second and third agents, a few minutes apart
10 minutesWhy
Once one task has gone through cleanly, the others can run at the same time because the wave plan gave them separate folders. Starting them a few minutes apart spreads their large first requests, which all count against the same usage window, and gives you time to see each one start properly.
Do this
Open a second terminal window:
cd ~/code/acme-platform && claude --worktree wave2-task2You are agent 2 of wave 2, in your own worktree. Read CLAUDE.md, then docs/waves.md, and carry out the SECOND task of wave 2, following its brief in docs/briefs/. Run npm ci; list the open pull requests and their files and stop on any overlap; show each new test failing first; write only in your folders; push, open the pull request, wait for every check on the latest commit and fix anything red before you report. Report time taken, check runs and anything unclear in the brief.A few minutes later, a third terminal: the same command with wave2-task3, and the same prompt with agent 3 and the THIRD task. Then, in any terminal in ~/code/acme-platform:
git worktree listYou will see recreated screen
- Task 1 is finished and waiting for review; its folder stays until you merge.
- One folder and one branch per agent. If two lines show the same branch, stop both agents.
Check it worked
Three pull requests are open, one per wave 2 task, each changing only its brief's folders (the Files changed tab).
If it goes wrong
A push is refused, or two pull requests change the same file
Two agents were given overlapping work. Stop the later one (Esc, then /exit, and choose Keep). Say to it later: Your push overlaps pull request #N. Do not rebuild the commit; wait until #N merges. Then fix the Owners table in docs/waves.md.
An agent's test log is empty, or another agent's build was killed
An agent used a shared tool: the stash, /tmp or stopping processes by name. Check that the Fleet rules pull request is merged and that the agent started after it. Restart that agent's task in a fresh session.
An agent is silent for twenty minutes
Silence is not death: long thinking prints nothing. Check whether its files are changing (git -C .claude/worktrees/wave2-task2 status) before you stop it.
Knowledge check
Why does each agent run in its own worktree?
Knowledge check
Five agents were left running and almost nothing was finished. What should have come first?
References
- Git documentation: git-worktree. https://git-scm.com/docs/git-worktree
- Claude Code docs: Run parallel sessions with worktrees. https://code.claude.com/docs/en/worktrees
- Anthropic: Effective context engineering for AI agents. https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
- Claude Code docs: How Claude remembers your project (CLAUDE.md). https://code.claude.com/docs/en/memory
- Claude Code docs: Manage costs effectively (spend limits). https://code.claude.com/docs/en/costs
Chapter 3 · Session 16
Count every run, merge one at a time
Judge a fleet the way a plant judges a press: by cost per good part. Here the good part is a merged change that passed its checks. You read each agent's cost, merge the pull requests in wave order with the checks re-run each time, and work out what one merged change really cost.
30 min3 stepsEnds with a gate
By the end of this chapter you can
- Read an agent's cost and cache share with /usage, and clear the session between tasks.
- Merge pull requests one at a time, updating each from main and waiting for checks on its latest commit.
- Record each run in docs/fleet-ledger.md and work out your own cost per merged change.
Cost per merged change, not per token
A night's token bill means little on its own. What matters is how many changes passed their checks, survived your review and merged, and what each one cost in total. Element F01, chapter 11, works through what an eight-agent night costs (about $69 to $199 in tokens, depending on the model tier, at prices checked in October 2026) and has a calculator for your own numbers [1]. Take its middle case, eight workers on a mid-tier model with good caching, about $115.78 in tokens, and suppose six of the eight pull requests merge:
| Line | Working | Per merged change |
|---|---|---|
| Worker tokens | $115.78 ÷ 6 | $19.30 |
| Your planning session | $11.14 ÷ 6 | $1.86 |
| Retries and checks allowance | 25% of the token lines | $5.29 |
| Your review | 20 minutes at $60 an hour | $20.00 |
| Total | $46.45 |
Two lessons. The merge rate moves the cost more than the token price: if only three of eight merge, every change costs twice as much in tokens. Better briefs and acceptance checks written first raise it. And your review is the biggest single line, so make it fast: small pull requests and checks that decide for you.
The cheapest model that passes
Model tiers differ in price by about four times [2]. Most fleet tasks, built from a clear brief with checks written first, do not need the largest. Choose the model in Claude Code with /model; start a task on the default, and move up a tier only if it fails its checks twice. Models and prices change every few months, so this course names tiers, not models. Whatever you choose, the checks decide.
Read each agent's cost, then clear it
5 minutesWhy
Each session knows what it spent and how much of its input came from the prompt cache, which is about a tenth of the price of fresh input. Writing it down per task is how you learn your own cost per merged change instead of guessing. Clearing afterwards stops the next task paying, on every request, for the last task's files.
Do this
In each agent's terminal, once its pull request is green:
/usageWrite the Total cost and the cache share in docs/fleet-ledger.md's Notes for that task (you will commit them in Step 9). If that agent will do another task, clear it first:
/clearYou will see recreated screen
- This task's estimated cost. On a subscription it counts against the plan's usage, not a bill, but it is still the number to compare.
- Above 90% is healthy. A low share means something at the top of the context keeps changing: a new tool or connector mid-session, or a different CLAUDE.md.
Check it worked
Every wave 2 task has its cost estimate and cache share written down.
If it goes wrong
The cache share is low from the first requests
Each session started with something different at the top. Keep one CLAUDE.md for every agent and put task detail in the brief, not in CLAUDE.md. Set up tools and connectors before you start, not during.
One task cost five times the others
Read its conversation: usually it read far more files than it needed or went round in circles. Next time, point the brief at exact files, and keep the two-failure stop.
Merge in wave order, one at a time
15 minutesWhy
Every merge changes main, so a pull request that was green against this morning's main may not be green against main with the first one merged. Updating each from main and waiting for its checks on the new commit catches the clash before it reaches the plant's platform. A red check from before the update is about an old commit: re-running it proves nothing.
Do this
https://github.com/acme-ops/acme-platform/pulls
Open pull requests. Take them in the order of docs/waves.md.
For each, in turn: read Files changed (only its brief's folders; no existing test changed, only new ones added), open its preview on your phone, and have owner two approve. Merge the first. For each next one, GitHub shows This branch is out-of-date with the base branch: choose Update branch with a merge commit (not rebase), wait until every check is green on that new commit, then merge. Before merging, paste into that agent's terminal:
GitHub has merged main into your branch (Update branch). Pull it, then list every file and test this branch added and confirm each is still there after the merge. Show me only what this branch changed since it left main (git diff origin/main...HEAD, three dots), one line per file on why. If a check is red, tell me which commit it ran on before diagnosing anything. Do not rebase or force push.You will see recreated screen
- The first merge changed main. This pull request has not been tested against it.
- Update with a merge commit. Never rebase or force push: the deny rule from Session 1 stops Claude Code doing it anyway.
- Green on the new commit, named here. Only then merge.
Check it worked
All wave 2 pull requests are merged, each with every check green on its latest commit, and main's own checks are green after the last merge.
If it goes wrong
A pull request is red for a reason that has nothing to do with it, or its logs have expired
The verdict is about an old commit. Do not re-run old runs (in our build, re-running old checks sent 113 failure emails in one day). Update the branch from main and judge only the checks on the new commit. A Vercel deploy marked Canceled because a newer one replaced it is not a failure.
Update branch reports conflicts
Two tasks touched the same file after all. In that agent's terminal: Merge origin/main into this branch, resolve the conflicts keeping both changes, run the tests, push, and explain each conflict in plain words. No rebase, no force push. Then fix docs/waves.md's Owners table.
After the update, a test or file this branch added has gone
Someone undid a batch of changes on main and the undo took yours with it; no conflict is reported. Say: Find the commit that removed it and tell me before changing anything.
Files changed shows an existing test edited or a check loosened
Do not merge. A green check against a test the agent changed proves nothing. Say: Restore the original test; if you think it is wrong, explain why and I will decide.
Fill in the ledger and work out your cost per merged change
10 minutesWhy
After one wave you have real numbers: what each task cost, how many check runs it needed, whether it merged and how long you spent reading it. Those beat any estimate in this course and tell you, before tonight, whether a night of agents is worth it for your plant.
Do this
On a new branch fleet/ledger-wave-2, add one row to docs/fleet-ledger.md for each wave 2 task. Use these numbers from /usage: <paste each task's cost and cache share>. My review minutes: <paste per task>. Read the rest from GitHub (gh pr view and gh pr checks): merged or not, and how many check runs each needed until green on its latest commit.
Then work out the cost per merged change: total cost of every run, merged or not, plus 25% for retries and checks, divided by the number merged, plus my review minutes at $60 an hour (change it to: <my loaded hourly rate>). Show the working in a short paragraph under the table. Open a pull request titled "Fleet ledger: wave 2" and wait for the checks.Then close each agent: type /exit in its terminal and choose Remove for the worktree, since its work is merged.
You will see recreated screen
- One row per run, merged or not. Failed runs count too: they are part of the cost of the ones that merged.
- Review time is usually the biggest line, as in the worked example.
Check it worked
docs/fleet-ledger.md on main has a row per wave 2 run and your cost per merged change, and git worktree list shows only your main folder.
If it goes wrong
The worktree will not remove: it is locked or has changes
Check its pull request is merged. Then in a terminal in ~/code/acme-platform: git worktree remove .claude/worktrees/wave2-task1. If git says it is locked, run git worktree unlock on it first. Never force-remove a worktree whose work is not on GitHub.
My cost per merged change is far above the example
Look at the merge rate first: a run that did not merge still costs. Usually a brief was unclear or a task too big. Split it, sharpen its acceptance checks, and run it again tomorrow.
Knowledge check
Eight pull requests cost $120 in tokens and three merge. Which change lowers the cost per merged change most?
Knowledge check
The second pull request was green last night, but the first has just merged. What do you do before merging the second?
References
- Anthropic: Claude pricing. https://platform.claude.com/docs/en/about-claude/pricing
- Claude plans and pricing. https://claude.com/pricing
- Claude Code docs: Manage costs effectively (track your costs with /usage). https://code.claude.com/docs/en/costs
- Claude Code docs: How Claude Code uses prompt caching. https://code.claude.com/docs/en/prompt-caching
- GitHub Docs: Keeping your pull request in sync with the base branch. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch
Chapter 4 · 12 questions · 80% passes
Final assessment
Twelve questions across the element. Score 80% (10 of 12) to pass. Your LMS records your score and each answer; you can review the chapters and try again.
15 min12 questions≈ 15 minutesRetake allowed
Your result
CivOps AI Academy
AI Fleet: Several Agents at Once, Without Collisions
Element F15 complete · Learner
Your LMS records this completion. For the CivOps Foundation certificate, finish the Foundation Course at https://civops.io/learn.