Skip to main content

The power went out with a dozen agents running. Here is what came back.

A power cut took down every AI agent session on our main workstation at once. Nothing was lost, but nothing said where anything was. How we got all of it back in twenty minutes, and the five-minute snapshot that means next time takes one command.

By Shafen Khan//5 min read

AI-generated image: a quiet desk at sunset just after the power came back, two monitors waking up with rows of terminal windows, storm clouds clearing outside the window.

AI-generated image.

  • On September 30 the power cut out at our desk. A dozen AI agent sessions were open on the main workstation, each on a different job. All of them stopped at once.
  • Nothing was lost: every agent writes its conversation to disk as it goes. What was missing was the map. Reading those files showed only two jobs were actually running. The rest were waiting on a person.
  • Ten sessions were back by 3:10, nineteen minutes after the machine rebooted, each with a short handoff and an instruction to verify before building on it.
  • Now a snapshot every five minutes records what is open. After any restart, one command reopens every tab where it was. A battery under the desk covers the moment itself.

What was running

Our main workstation is a Mac Studio. On a normal afternoon it runs a dozen AI agent sessions at once, each in its own terminal tab, each on a different job.

On September 30, a little before 2:50 in the afternoon, the power cut out. The Mac Studio has no battery. By 2:51 it had booted again, and every one of those sessions was gone.

Nothing was lost. Nobody knew where anything was.

The good news came first. Every agent we use writes its conversation to disk as it goes. The work itself was safe. What was missing was the map: twelve tabs, twelve jobs, and no record of which was which.

So the first job was reading. Every session file that changed in the hour before the reboot, the last thing each person asked, and the last thing each agent said back.

That showed something the panic would not have. Only two jobs were actually running when the power went:

  • A coding run that had started two minutes earlier and had not written any code yet.
  • A helper agent writing a training guide in the background.

Every other session was finished, or waiting on a person to answer a question. The outage did not interrupt their work. It only closed the window they were waiting in.

Back in twenty minutes

Reopening an old session with its full history works, but some of these conversations had grown very long. So each one got a short handoff file instead: where it stood when the power went, the next step, and its last few messages.

Then ten new sessions opened, one per tab, each in the right project folder, each told the same three things. Read your handoff. Check anything it claims is done before you build on it. Send, push and deploy nothing without a go.

The machine came back at 2:51. The ten sessions started between 3:03 and 3:10.

Two things that went wrong on the way back

One command landed in the wrong tab. The launcher typed each start command into the newest tab. Once, the newest tab was not the one it had just opened, and the command ended up queued in another agent's input box. It was caught before that agent ever received it, and cleared. The launcher now addresses each window by its ID instead of trusting whichever one is in front.

The tab names would not stay put. A small script of our own was renaming every tab every 0.8 seconds, after whichever project folder the session happened to be working in at that moment. Rename a tab by hand and it flipped back the next time the agent changed folders. A pinned name now beats the script.

Next time, it happens on its own

Twenty minutes is fine once. The point is to not need it again.

  • A snapshot every five minutes. Which tab holds which session, in which folder, under which name. It uses about 23 MB of memory and wakes for under a second.
  • A notice after any restart. A notification at login, and the first agent session opened is told as well, so nobody has to remember to look.
  • One command to put it back. Every tab reopens in its old window, in its old order, under its old name, with its conversation resumed.
  • Cut-off runs get flagged, not rerun. Anything that started but never reported finishing is listed. Whether to run it again stays a human decision.
September 30Next time
What was openPieced together from file timestampsAlready written down
Getting it backHandoff files and a launcher, built on the spotOne command
Work cut off mid-runFound by diggingListed at login

The test that said everything was fine

The check for cut-off runs passed its first test by finding nothing. That should have been reassuring. It was not, because a check that finds nothing looks exactly like a check that is broken.

So we planted a fake cut-off run and tested again. It still found nothing. The check was fine. The test was wrong: it had read the wrong number out of the machine's boot time and dated the fake run to 1970. Fixed, the check found the planted run, then went quiet once the run was marked finished.

A "nothing found" only counts after the same check has found something real.

The battery under the desk

The snapshot fixes the morning after. A battery fixes the moment itself.

The load is smaller than it sounds. Apple's own figure for this Mac Studio is 6 W idle and 145 W at most. The 480 W on the spec sheet is what the power supply can deliver, not what the machine draws. Add the main monitor and the network gear and the desk runs at roughly 120 to 150 W.

The pick is a CyberPower CP1500PFCLCD, about $240 when we checked on October 1. Pure sine wave, 1000 W, six battery outlets, and a standard USB connection the Mac recognizes. CyberPower's own half-load figure works out to roughly 25 minutes or more at our load.

The part that matters most is already built into macOS. Plug a UPS in over USB and the system settings show UPS options: shut down after a set number of minutes on battery, or when the battery falls below a level you choose. No extra software.

Why not one of the sleek power stations. They ride through a short cut just as well. But we could not show that either one we looked at tells a Mac to shut down, and one maker's own article says its unit is not always a full UPS replacement for that. In a long outage it would run until empty and then cut the power, which is September 30 again, just later.

What a battery does not do. It does not keep the sessions alive through a long outage. They survive any cut shorter than the shutdown timer. In a longer one they still end, but cleanly, and the snapshot covers the rest.

What this means for your office

Your front desk has the same problem with fewer tabs. A half typed patient note, a payment screen, a file that was saving. A power blip does not just stop the machine. It erases the answer to "where were we."

Two layers fix most of it. A battery that gives the machine time to shut down properly. And a record of what was open, so the morning after starts from a list instead of from memory.

Read and checked on October 1, 2026. Vendor claims are marked as such. Where published figures disagreed, that is said in the text rather than resolved silently.

Send it to a coworker, your boss or a friend who has this problem.

Find out what your office loses when the power blinks.

We will walk through what is running, what would stop, and what it takes to get it back on its own, for a fixed price agreed before the work starts.

Prefer email? [email protected]