Junie was still working.
Your Mac didn’t care.

Your Mac will go to sleep with the fans howling and a local model mid-token. That surprises people, and with Junie Local it is the most expensive thing to learn the hard way. Here’s why it happens, the free fix, and why running the model on your own machine makes agent detection harder rather than easier.

To keep your Mac awake while Junie runs: if you use Junie CLI, the free way is macOS’s built-in caffeinate — start it as caffeinate -i junie and the Mac can’t idle-sleep until it exits. If you use Junie inside a JetBrains IDE, caffeinate can’t wrap it, and you need either a timer, an app-presence rule, or a tool that reads the IDE’s on-screen text. Junie is not in AgentBarista’s built-in agent list yet — no JetBrains IDE is — and the honest detail of what that costs you is below.

The direct answer

Why your Mac sleeps while Junie is still going

macOS doesn’t decide when to sleep from CPU load. It goes by your idle time — how long since real keyboard or mouse input — plus the power assertions running processes hold. A Mac running a model flat out sleeps on exactly the same schedule as one sitting at an empty desktop, because from the sleep timer’s point of view they are identical: nobody has touched the keyboard.

That catches people out with cloud agents, where it at least looks plausible — the machine really is close to idle while it waits on a server, and a CPU meter says so. With Junie Local it is far less intuitive and much more expensive. The GPU is flat out, the fans are audible, the model is resident in memory, and the Mac still goes to sleep on schedule and freezes the run mid-token. Working hard has never protected a Mac from sleeping, and a local model makes that gap visible to you in a way a cloud one does not. To your tools it does the opposite — which is the next section.

The free option

Free tools can keep your Mac awake too

Which one applies depends on how you run Junie, and JetBrains ships it in two forms:

  • Junie CLI — use caffeinate. Launch it as caffeinate -i junie instead of junie. The Mac can’t idle-sleep while it runs, and the moment it exits, normal sleep is allowed again — nothing to remember to undo. Already on your Mac, free.
  • Already started it? Find the process and hold sleep against that exact PID. Read the output before acting on it — Junie CLI can be installed several ways and the program name is worth confirming rather than assuming: ps -Awwo pid,comm,args | grep -i junie | grep -v grep, then caffeinate -i -w <pid>.
  • Junie inside the IDE — caffeinate does not apply. There is no command to launch and wait on; the agent is a plugin inside a long-running application that stays open whether or not anything is running. A menu-bar tool like Amphetamine (free, Mac App Store) can keep the Mac awake while your IDE is open, which is a blunt instrument but a working one.

All of these are a fine choice if Junie runs for a few minutes here and there. The catch is the same as ever: none of them knows when the agent actually finished versus when it is sitting idle. You either stop it yourself, or it keeps your Mac awake — and your battery draining — long after the work is done. With a local model that second failure is the one to worry about, for the reason at the end of the next section.

What Junie Local changes

A local model makes this harder, not easier

JetBrains announced Junie Local on 2026-08-24: the agent runs a model on your own Mac instead of calling a server, switched on with /local inside Junie. Their requirements page asks for an M5 Mac, macOS 26 or newer (their table says >26), 64 GB of memory and roughly 40 GB of free disk; the weights themselves are about a 20 GB download. Check that page before assuming your machine qualifies — JetBrains say they are working the numbers down. The intuition most people have about this is backwards, in two ways that both cost money.

Backwards #1: it does not make the machine “obviously busy” to a keep-awake tool. The tempting assumption is that a local model pins the CPU, so anything watching CPU can finally tell working from idle. But JetBrains runs inference on the GPU, with specialised NPU optimisation on M5 — and a process’s CPU percentage, which is what ps reports and what any CPU-threshold rule reads, does not count GPU or NPU work at all. A Mac can be flat out on a local model without that showing up where such a rule is looking.

Backwards #2: there is still a server, it is just on your desk. JetBrains says the local server launches on its own and Junie switches over to it. So junie is a client talking to a separate local server process. What disappears is the network round-trip, not the client-waiting-on-a-server shape — and for detection that shape is the whole problem. Whether a CPU rule sees the work at all depends on how that server process is parented: a tool that sums the CPU of the agent and its children catches it if the server is a child, and misses it entirely if the server is launched independently.

The practical upshot: do not assume a local model is easier to detect, and do not trust a CPU-threshold rule with an unattended Junie Local run until you have watched it work on your own machine. Start it under caffeinate -i junie, which does not care about any of this.

And the safety half genuinely does get harder. Holding a laptop awake while it runs a local model is a different proposition from holding it awake while it waits on an API. You are keeping a machine from sleeping exactly when it is hottest and drawing the most power. The failure to plan for is not the Mac sleeping — it is the lid shut all night and the machine cooked: coming back to a laptop at 1%, or one that throttled itself to a crawl hours ago. Two settings matter and many tools in this category have both: a battery floor that releases the hold instead of draining to zero, and a thermal rule that backs off when macOS reports trouble. Free tools including Keepresso and LidRun ship both, and so do we — this is table stakes, not a differentiator. Refuse to run any of them unattended until you have found those two settings and seen what they are set to.

Junie Local details read from JetBrains’ announcement and requirements page, not measured on a Mac of ours — including the GPU/NPU and local-server points above, which is exactly why this page will not tell you a CPU rule works. Junie, including the CLI, reached general availability on 2026-06-17, and Junie has been a JetBrains IDE plugin for longer than that.

The purpose-built option — honest status

What AgentBarista does today for Junie

Straight answer: Junie is not in AgentBarista’s built-in agent list, and neither is any JetBrains IDE. We would rather say that here than let you find out after paying. This one is a genuine gap rather than a deliberate hold: Junie CLI has been generally available since June 2026 and we did not have it on the board. It is on the board now.

What that costs you, concretely. For the products in our built-in list, the on-screen-text signal resolves an app by its exact bundle identifier, and we hold none for the JetBrains IDEs — so out of the box, Junie running inside IntelliJ IDEA, PyCharm or WebStorm is invisible to us. You can add the IDE as a custom app, and a custom app does get its on-screen text read, but matched against your own phrase lists rather than any we ship for Junie. Go that route and you are writing the detection yourself.

And the honest warning about that route is the opposite of the one you would expect. Custom apps are CPU-trusted: we hold sleep when the app and its children cross a CPU threshold, 8% by default. Merely having the IDE open does not hold sleep — that registers as presence, which is not enough on its own. The risk runs the other way. An IDE indexing a repository, compiling, or running a test suite crosses 8% easily, so a custom-added IntelliJ will report “working” for work that has nothing to do with Junie, and hold your Mac awake for it. Be clear-eyed about that before choosing it.

Junie CLI is the cleaner shape — a custom entry is matched loosely, in both directions, against the process name and its executable path, and is likewise CPU-trusted. For a cloud agent we would warn you that CPU-trust misses the waiting phase. For Junie Local the warning is the one in the section above: inference is on the GPU and behind a local server, so we cannot promise a CPU rule sees it either. We have not measured this on an M5.

On the safety half: AgentBarista releases its hold when the battery drops to your cutoff, which is on by default, and again when macOS reports the thermal state as critical — and both of those apply to any app it watches, custom or built-in. For a genuinely unattended overnight local run, we would still point you at caffeinate -i junie first: it depends on none of our detection, and this page is not going to pretend we have measured something we have not. And one scope worth being exact about, because it is the sentence people bet an overnight run on: those cutoffs release the hold we placed. If you run caffeinate -i junie yourself, that assertion is yours, not ours — we never see it and we will not drop it at your battery floor or at thermal critical. On battery overnight, stay on power — or give the hold a hard ceiling: caffeinate -i -t 28800 junie drops the assertion after eight hours even if the run is still going, and releases it early when junie exits. (caffeinate’s man page claims -t is ignored when a utility is invoked. On current macOS it is not — we measured it.) Plugged in, the battery half stops mattering; the thermal risk does not — a MacBook running docked with the lid shut is where heat bites hardest — and the same ceiling helps there too.

Not in the built-in list

No JetBrains IDE is, either. Junie CLI went generally available in June 2026 and we missed it — that is a gap, not a decision, and it is on the board now.

In-IDE is invisible out of the box

We hold no bundle id for the JetBrains IDEs. A custom entry works, but it is CPU-trusted at 8% — so an IDE indexing or running tests reports “working” for work that isn’t Junie.

Local doesn’t mean easier

Inference runs on the GPU, behind a local server. CPU percentage doesn’t count GPU work, so don’t assume a CPU rule sees a Junie Local run. Battery and thermal cutoffs matter more, not less.

Junie (not built in — see above) Claude Code Cursor Codex Gemini CLI Copilot CLI OpenCode Zed Claude ChatGPT + more

Worth saying plainly: this category is crowded and a lot of it is free. Keepresso and adrafinil are open source and read agent hooks, which is a more accurate signal than guessing from CPU, and several free tools ship the battery and thermal guards described above. If you’re a solo dev running one agent, one of them may well be the right answer. Where we put our effort is the honesty of the count, and being straight about which agents we have actually measured — which is why this page tells you Junie isn’t one of them yet, and why it just talked you out of trusting a CPU rule on a local run.

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 per Mac. 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
  • Claude Code, Cursor, Codex and more in the built-in list — Junie as a custom app
Subscribe — $19/yr

$19/year per Mac. It auto-renews annually until you cancel, and you can cancel any time. 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.

Running agents across a team instead? See the teams page.

More agents

Also running Claude Code, Codex CLI, or another agent?

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