Claude was still working.
Your Mac didn't care.

You started a long research run or an MCP tool chain in the Claude desktop app, stepped away, and macOS went to sleep right through it — pausing Claude mid-response. Here's why that happens, and how to stop it.

To keep your Mac awake while Claude Desktop runs: the free way is macOS's built-in caffeinate -i — run it in Terminal before you start, and stop it yourself when the run ends. The automatic way is AgentBarista, which detects Claude working and lets your Mac sleep when it finishes.

The direct answer

Why your Mac sleeps while Claude Desktop is still going

Claude Desktop does almost none of its work on your Mac. While it streams a long response, runs MCP tools, or grinds through a research task, the heavy lifting happens on Anthropic's servers — your Mac's CPU sits near zero. That isn't even what decides it: macOS goes by your idle time, how long since real keyboard or mouse input, plus the power assertions running processes hold. Nothing about a Claude window being deep into a run registers at all. When your sleep timer runs out, macOS suspends the Mac, and Claude is frozen mid-response until you wake it back up.

It stings more with Claude Desktop than with a terminal agent, because Claude lives in a window: there's no terminal session to park a keep-awake command in, and the runs got long — multi-step tool use and research tasks can go far past any screen-sleep timer. The fix is to hold sleep off only while Claude is actually working, then let your Mac sleep normally shortly after it goes quiet — within your grace window, 90 seconds by default. You can do that for free in two minutes, or with a tool that knows the difference between "Claude responding" and "Claude window just open."

The free option

Free tools can keep your Mac awake too

If you only run long Claude tasks occasionally, you don't need to buy anything. Two solid free options:

  • The built-in caffeinate command. Open Terminal and run caffeinate -i before you kick off a long Claude run. It'll hold sleep off until you close the Terminal window or press Ctrl+C. Simple, free, already on your Mac.
  • Amphetamine (free, Mac App Store). Gives you a menu-bar toggle and basic process triggers, so you can set it to stay awake while the Claude app is running.

Both are a fine choice for occasional use. The catch is specific to a chat app: Claude's window is often open all day, so an "awake while Claude is running" trigger means awake all day — and caffeinate doesn't know when the response actually finished. Either you remember to turn it off, or your Mac stays up (and your battery drains) long after Claude went quiet.

The purpose-built option

What AgentBarista does differently for Claude Desktop

Claude (the desktop app) is already in AgentBarista's supported-agent list out of the box — turn it on, grant the one-time Accessibility permission it asks for, and you're set.

Tells "responding" from "just open"

Raw CPU can't tell — Claude barely uses any while the model works. So AgentBarista reads Claude's on-screen status (via macOS Accessibility) — the "Stop response" state you see while it's generating — and holds sleep only while there's an actual run happening, not whenever the window exists.

Lets go when it's done

When Claude finishes the response, AgentBarista releases sleep prevention within your grace window — 90 seconds by default. No forgetting a Terminal window open, no battery held hostage by a chat window that's just sitting there.

Has a safety net

A battery cutoff and an emergency restore mean it never gets permanently stuck keeping your Mac awake — the risk every manual keep-awake trick carries.

Claude Claude Code Cursor Codex Gemini CLI Copilot CLI OpenCode VS Code Windsurf Zed Antigravity ChatGPT + more

It runs on your Mac. AgentBarista never opens your files. To tell a working agent from a finished one it looks at process command lines and CPU, at the names and modification times of your agents' session files, and — only if you grant macOS Accessibility permission — at the on-screen text of the agent apps you enable and of the terminals we support. Two of those can contain your own words: a command line includes any prompt you pass on it, and on-screen text includes whatever is visible in that window, your code included. Both are matched against status phrases on your Mac and discarded on the spot: never stored, never sent. Nothing about your work leaves your Mac — no file contents, no code, no prompts, no file names, no activity data. Your stats and settings stay on this Mac. The app contains no analytics or telemetry of any kind. Its network calls are two: license validation, sent to our payment provider, Lemon Squeezy — activating a license sends your license key and your Mac’s name, and the routine check after that sends your license key and an anonymous instance id, nothing else — and an update check that fetches the new-version list from agentbarista.com, sends no personal data, and can be turned off in Settings.

FAQ

Questions people actually ask

How does it know Claude is working and not just open?

For a windowed app like Claude Desktop, AgentBarista checks the on-screen status — Claude shows a "Stop response" state while it's generating — through macOS's Accessibility API, which needs a one-time permission from you. Without that permission it still sees Claude is running, but deliberately treats it as idle: a merely-open chat window shouldn't keep your Mac awake.

Isn't caffeinate or Amphetamine enough?

For occasional use, honestly, yes — they're good tools and they're free. Where AgentBarista earns its price: it knows when Claude actually finished (instead of staying awake as long as the window is open), it won't drain your battery overnight, and it shows you what it actually kept awake.

Does it read my Claude conversations?

It looks for a handful of status phrases in Claude's window — a working-or-idle check. AgentBarista never opens your files. To tell a working agent from a finished one it looks at process command lines and CPU, at the names and modification times of your agents' session files, and — only if you grant macOS Accessibility permission — at the on-screen text of the agent apps you enable and of the terminals we support. Two of those can contain your own words: a command line includes any prompt you pass on it, and on-screen text includes whatever is visible in that window, your code included. Both are matched against status phrases on your Mac and discarded on the spot: never stored, never sent. Nothing about your work leaves your Mac — no file contents, no code, no prompts, no file names, no activity data. Your stats and settings stay on this Mac. The app contains no analytics or telemetry of any kind. Its network calls are two: license validation, sent to our payment provider, Lemon Squeezy — activating a license sends your license key and your Mac’s name, and the routine check after that sends your license key and an anonymous instance id, nothing else — and an update check that fetches the new-version list from agentbarista.com, sends no personal data, and can be turned off in Settings.

What does it cost?

AgentBarista Personal License is $19/year if you subscribe before September 15 — locked in for as long as you stay subscribed. New subscribers after that pay $29/year. It auto-renews annually until you cancel — cancel any time. A 5-Mac Pack is $129/year, flat. The download is a free 14-day trial of the full app — no card needed — and there is a 30-day money-back guarantee — one email, full refund.

Getting it

$19/year, locked in for as long as you stay subscribed. Cancel any time.

AgentBarista Personal License — one Mac, $19/year
  • Runs as a menu-bar app — pick a mode, get back to work
  • Battery cutoff on by default (20%), plus a one-click emergency restore
  • Signed and notarized by Apple
Subscribe — $19/yr

$19/year — less than one saved overnight run pays for a year of it. Lock that rate in before September 15; new subscribers after that pay $29/year. 30-day money-back guarantee — one email, full refund.

Download free 14-day trial

The download is the trial — the full app, free for 14 days, no card needed. Need more Macs? 5-Mac Pack — $129/year, flat.

More agents

Also running ChatGPT Desktop, Devin Desktop, or another agent?

Same Mac-goes-to-sleep problem, different tool. Each of these guides covers the fix for that agent specifically: