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 (14-day free trial, then $19 one-time), 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. macOS only looks at CPU and user input to decide whether to sleep, so a Claude window that's deep into a run looks exactly like an idle chat app. 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 one network call is 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.

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 saved.

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 one network call is 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.

Is this a subscription?

No. Pro is $19 once and includes 1 year of updates ($15 founding price for the first 200 customers). Lifetime is $39 once with all future updates. Both start with a 14-day free trial, no card required.

Pricing

Try it free, then keep it. No subscription.

Pro, one-time
$19 once
  • 14-day free trial, no card needed
  • $15 founding price for the first 200 customers
  • Includes 1 year of updates
  • Lifetime option: $39 once, updates forever
Get notified at launch

Not live yet — leave your email and we'll ping you the moment it is.

Running agents across a team instead? See team pricing.

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: