Free sample lesson · Stanford CS146S: How always-on agents work

From Copy-Paste to Always-On

Why does closing your laptop stop a coding agent but not a bot?

Lesson 1 of the Wondering course Stanford CS146S: How always-on agents work

Why Closing the Laptop Stops It

You already know the basic coding agent: a model calling tools, like file edits and shell commands, in a loop.

Its weak spot is simple. In the Stanford class's words, "you close your laptop and the process stops."[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

A terminal harness is tied to one process on one machine. It also replies to every message you send.

A closed laptop with a stopped agent beside a server-hosted bot that keeps working

Notice where each loop runs: the harness lives inside the laptop, so closing the lid ends it, while the bot runs on a server and keeps going.

A bot woken by a Slack message keeps working, because its loop lives somewhere else.

Five Properties of Always-On

An always-on agent runs its loop on a server, so it survives restarts and crashes.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

It has its own Linux computer with files and a browser. It builds memory of how you work.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

It can be triggered by Slack or email, not only your typing. It also decides when an update is worth interrupting you, acting "more like a colleague."[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

What makes an agent always-on
  • Server: Survives restarts and crashes.
  • Own Linux computer: Has files and a browser.
  • Memory: Learns how you work.
  • Slack or email: Wakes it without your typing.
  • When to interrupt: Acts more like a colleague.

The goal is work that runs for weeks or months.

What Always-On Is Not

"Always-on" does not mean a laptop that never sleeps. That setup still ties the loop to one machine you own.

A cron job has a trigger, but no model judgment, no memory, and no own computer.

A chatbot that answers questions does no work in the background.

Near misses

To diagnose any setup, check each property. Whatever is missing tells you what breaks when the laptop closes.

Four Eras of AI Coding

Developer use of AI moved through four eras.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

First, copy-pasting code from ChatGPT. Second, terminal agents that edit files and run commands.

Third, dedicated apps running parallel agents, with the developer reviewing every command. Fourth, always-on agents that work ambiently.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

Each era removes a bottleneck
  • Copy-paste from ChatGPT: Bottleneck: manual copying.
  • Terminal agents: Agents edit files, removing manual editing.
  • Parallel agent apps: Bottleneck: reviewing every command.
  • Always-on agents: Work ambiently without per-command approval.

Each step removed a human bottleneck: manual copying, then manual editing, then per-command approval.

From Approver to Steerer

In era three, a developer might approve 200 shell commands in an afternoon.

Era four hands that check to autoreview: a separate model that checks commands. Robinson calls this more secure than approval fatigue.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

So users now steer instead of queuing. Send "go check this thread," then "actually, do that on Thursday," and the model parses both as one request.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

How the human role changes
  • Era three
  • Era four
Wondering lens
  • Auto-approval is now a default

Designing Your Own Always-On Agent

New eras do not fully replace old ones. Robinson still prompts agents directly sometimes.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

Interfaces also got simpler. Talking to the bot feels like texting a friend.[[1]](https://www.youtube.com/watch?v=L1OBRtfPS34)

To turn a terminal harness into an always-on agent, add a server for the loop, its own cloud computer, memory, triggers like Slack or email, and judgment about when to speak.

Upgrade path from harness
  • Server loop: Move the loop off your laptop so it survives closing the lid.
  • Cloud computer: Give it its own machine with files and a browser.
  • Memory: Let it remember how you work.
  • Triggers: Wake it from Slack or email, not only typing.
  • Judgment: Let it decide when an update is worth interrupting you.

If your agent still dies with your laptop, start with the server.

Check yourself

An agent whose loop runs only on your laptop will stop working when you close the laptop.

  • True
  • False

Answer: True

This is true because a terminal harness is tied to one process on one machine. Moving the loop to a server lets it continue when the laptop is closed.

AI-assisted development progressed from _____ code, to _____, to _____, and finally to _____.

Answer: AI-assisted development progressed from copy-pasting code, to terminal agents, to parallel agent apps, and finally to always-on agents.

The four eras move from manual copying, to agents editing files and running commands, to parallel agents with command review, and finally to ambient agents that work without per-command approval.

A coding agent runs on a server, has its own Linux computer with files and a browser, remembers a developer’s preferences, and can wake from Slack. It still sends every small update immediately. Which always-on property is missing?

  • A server-hosted loop
  • An own cloud computer
  • Judgment about when to interrupt
  • A Slack trigger

Answer: Judgment about when to interrupt

An always-on agent should decide when an update is worth interrupting the user. Sending every update immediately lacks this judgment, even though the other properties are present.

Keep going

This is lesson 1 of 12 in Stanford CS146S: How always-on agents work. Next up:

  1. Six Shifts That Made Bots Possible
  2. Sleeping Servers, Waking Triggers
  3. Thin Client, Thick Server
  4. Durable Workflows Over Job Queues
  5. Try the Cheapest Option First

Start this course free

Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.