Skip to content

Building with agents, lesson 8.1

Agents that work in the cloud while you do something else

A cloud agent works on a machine of its own, so you can shut the laptop and get on with your day. This lesson follows one task from the note you write to the branch that comes back, and sorts which tasks belong there.

What do you run?

Every example below changes to fit what you pick. The businesses are made up for teaching.

The picture, one step at a time

Each box is one stage. The picture lights up as you scroll.

Step 1 of 6

Write the task so it stands alone

An agent on your laptop stops when the lid shuts, and it ties up your machine while it runs. A cloud agent runs on someone else's machine. The catch is that it cannot tap you on the shoulder. So for the shop's site, write the task down: what to change, where, and what done looks like.

Claude Code's docs suggest planning a bigger task locally first, saving the plan to the repo, then starting a cloud session to carry it out (read November 2026).

Step 2 of 6

A fresh machine each time

Each cloud session gets its own virtual machine: a computer that exists only for this task. It copies your repo from GitHub and runs your setup script, which installs what the project needs. It copies what you pushed, not what is on your laptop, so push first.

In Claude Code's words, the cloud machine "clones your current directory's GitHub remote at your current branch, not your local checkout" (read November 2026).

Step 3 of 6

A fence around it

By default the machine can only reach a list of addresses, and your git login and keys stay outside it: a go-between adds them to requests on the way out. That fence matters because the agent may read outside text, like a bug report, that tries to send your code somewhere.

Claude Code's docs say network access is limited by default, and warn that even with it turned off the session still talks to the model's API, "which may allow data to exit the VM" (read November 2026).

Your cloud agent reads public bug reports. What does the network fence protect you from?

Step 4 of 6

Shut the laptop

Now it works alone: it edits, runs the tests, reads the failures and tries again. If it gets stuck it asks, and the question waits for you. You can check on it or steer it from your phone, and run several sessions at once, one per task.

Claude Code's docs: a cloud session "keeps running after you close your laptop, and you can check on it or steer it from any device" (read November 2026).

Step 5 of 6

It comes back as a branch

When it is done, its changes are pushed to a branch, not to main. You read the diff, leave comments if it needs another go, and open a pull request when you are happy. The scans and tests from Module 7 run on it like any other change.

Step 6 of 6

Decide what to send

Send a task when it is written down, done can be checked by a test or a page, and the machine can reach everything it needs. Keep it local when you need to watch, it needs something only your machine can reach, or it touches anything live.

Which task is the best one to send to the cloud tonight?

Cloud or laptop?

Here are four tasks in your business. Send it to the cloud: written down, checkable, and everything it needs is reachable. Keep it on your laptop: you need to watch, it needs your machine, or it touches something live.

  1. 1Update the delivery dates for the holidays on every page, and make the date tests pass.

  2. 2Work out with you why checkout feels slow, by clicking through it together.

  3. 3Upgrade the image library to the version that fixes last week's security finding, then run the tests.

  4. 4Chase a bug that only happens on your own phone, on your home wifi.

0 of 4 right so far, 4 to go.

When to send it to the cloud

This is what you keep: the questions to ask before you send a task away, and the one habit that saves a wasted run.

When to send it to the cloud

  1. Send it when the task is written down and stands without you.
  2. Send it when done can be checked by a test or a page that loads.
  3. Send it when the machine can reach everything it needs: the repo, the setup script and the addresses on its list.
  4. Keep it local when you need to watch, steer or click through it together.
  5. Keep it local when it needs something only your machine can reach, or touches anything live.
  6. Push before you send: the machine copies what is on GitHub, not what is on your laptop.

If you could hand it to a new colleague as a note and check the result in ten minutes, send it to the cloud.

Next: Lesson 8.2: Running many agents at once. How to split the work, give each agent its own workspace, and merge the results without a mess.