ChatGPT was still answering.
Your Mac didn't care.

You asked the ChatGPT desktop app for something long — a deep answer, a doc rewrite, a Work with Apps session over your editor — stepped away, and came back to a frozen window. Here's why macOS does that, and how to stop it.

To keep your Mac awake while ChatGPT 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 ChatGPT working and lets your Mac sleep when it finishes.

The direct answer

Why your Mac sleeps while ChatGPT is still working

The ChatGPT desktop app spends almost all of a long answer waiting on the network — the model does the heavy lifting on OpenAI's servers while your Mac sits near 0% CPU. And CPU isn't what decides it anyway — macOS goes by your idle time, how long since real keyboard or mouse input, plus the power assertions running processes hold. Nothing about a Mac watching ChatGPT think registers at all. When your sleep timer runs out, macOS suspends everything: the app freezes mid-stream, and a Work with Apps session over Xcode, VS Code, or your terminal stalls right along with it.

Agent mode is a partial exception, and it's worth being straight about: agent-mode tasks run on OpenAI's computers, so the task itself doesn't die when your Mac sleeps. But agent runs are supervised — ChatGPT pauses and asks you before consequential steps, and a sleeping Mac can't answer. A task that usually takes 5–30 minutes becomes "however long until you wake the Mac and find the prompt waiting."

The fix is to stop macOS from sleeping while ChatGPT is actually doing something — then let it sleep normally again 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 "answer in progress" and "idle chat window" so you don't have to babysit it.

The free option

Free tools can keep your Mac awake too

If you only run long ChatGPT 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 ChatGPT task. 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 specific apps are running.

Both are a fine choice if ChatGPT runs for a few minutes here and there. The catch: neither one knows when ChatGPT actually finished. A process trigger sees the ChatGPT app "running" whether it's mid-answer or sitting idle in your menu bar all day — so you either turn it off yourself, or it keeps your Mac awake, and your battery draining, long after the answer landed.

The purpose-built option

What AgentBarista does differently for ChatGPT

The ChatGPT desktop app is already in AgentBarista's supported-agent list out of the box — turn it on, grant one permission, done.

Knows when ChatGPT is generating

With a one-time macOS Accessibility permission, it watches the window's visible status — the same cues you'd check, like the stop-generating state — to tell an answer in progress from an idle chat. Raw CPU can't do that: streaming an answer barely uses any.

Lets go when it's done

When ChatGPT goes back to idle, AgentBarista releases sleep prevention within your grace window — 90 seconds by default. No forgetting a Terminal window open, no battery held hostage overnight.

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.

ChatGPT Claude Code Cursor Codex Gemini CLI Copilot CLI OpenCode VS Code Zed Antigravity Claude Windsurf + 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.

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 if you subscribe before September 15 — locked in for as long as you stay subscribed. 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.

FAQ

Questions people actually ask

Doesn't ChatGPT's agent mode run in the cloud anyway?

Yes — agent-mode tasks run on OpenAI's servers, so the run itself survives your Mac sleeping. What doesn't survive: the supervised parts. Agent mode pauses to ask you before consequential steps, and a sleeping Mac leaves that prompt hanging. And everything local — a streaming answer, a Work with Apps session over your editor or terminal — freezes with the Mac.

Can't I just use caffeinate or Amphetamine?

You can, and for occasional use you should — they're free and they work. What they can't do is tell "ChatGPT mid-answer" from "ChatGPT idle in the menu bar," so they hold your Mac awake until you remember to turn them off. AgentBarista starts and stops on real activity, cuts off before it drains your battery, and shows you how much run time it actually kept awake.

How does AgentBarista know ChatGPT is working?

For a desktop app like ChatGPT, CPU is useless — a streaming answer uses almost none. So AgentBarista asks for macOS Accessibility permission once, then checks the ChatGPT window's visible status text for the working state, right on your Mac. Without that permission it can see ChatGPT is open, but not whether it's mid-answer — the permission is what makes auto start/stop work.

Does it read my conversations?

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.

More agents

Also running Devin Desktop, Claude Code, or another agent?

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