Tech

Your MacBook’s Half-Open Lid Is a Hack. Adrafinil Makes It Obsolete.

New tool keeps AI agents awake without the dumb lid trick.

Alex Novak|
Your MacBook’s Half-Open Lid Is a Hack. Adrafinil Makes It Obsolete.
Photo by Daniel Putzer on Pexels

Last month, Twitter and Hacker News had a collective meltdown over a strange new habit: engineers walking through cafes with their MacBooks propped open at an unnatural angle, like a half-closed clam. The reason? Closing the lid forces sleep, and if your AI agent is crunching data mid-commute, sleep means death.

Now, a one-person dev shop called Adrafinil has released a tool that makes that awkward pose as obsolete as a floppy disk. It keeps your Mac awake while the lid is closed — but only while your AI agents are working.

Why the Half-Lid Hack Happened

Let’s be clear: the half-lid thing was never a trend. It was a desperation move. AI agents — like those powering auto-gpt, babyagi, or custom llama-based assistants — often need to run continuously, even when you’re on the move. Standard macOS power management is ruthless: close the lid, kill the CPU. So engineers started leaving their lids cracked open, balanced on a pencil or a piece of tape, just to keep the neural nets humming.

The snark came fast. “Just use tmux,” said the command-line purists. “Amphetamine has kept my Mac awake for years,” chimed in the power users. But those solutions miss the point: Amphetamine keeps your Mac awake forever, which drains battery and overheats your bag. Tmux helps if you’re running code, but a lot of agents rely on the GPU or persistent system processes that tmux can’t protect.

The half-lid hack was a compromise — ugly but functional.

Adrafinil: The Agent-Aware Wakekeeper

Adrafinil, named after a nootropic used for wakefulness, takes a smarter approach. Instead of keeping your Mac awake 24/7, it only prevents sleep when an AI agent is actively using the CPU or GPU. When the agent finishes a task or goes idle, the lid can close normally. The result? Your battery lasts, your bag stays cool, and nobody has to see you cradling a laptop like a wounded bird.

The tool works by hooking into macOS’s power management framework and monitoring process activity. If a process tagged as an “agent” is above a usage threshold, it asserts a power assertion that blocks sleep. The moment usage drops, the assertion is released. It’s transparent, lightweight, and open source.

Early adopters are thrilled. “Finally, I can throw my laptop in my bag and trust that my fine-tuning job won’t die,” one Reddit user posted. Another said, “I was using a rubber band to keep the lid open. This is better.”

“Adrafinil only prevents sleep when an AI agent is actually working. That’s not a feature — that’s common sense.”

The Dark Side: Security and Abuse

Of course, a tool that overrides the lid-close mechanism raises security eyebrows. If your laptop doesn’t sleep when the lid closes, anyone with physical access can keep it running. Adrafinil’s creator acknowledges this: the tool only activates when the lid is closed if an agent is running — so if you’re not using an agent, normal behavior resumes. But there’s still a risk. If someone steals your closed laptop while an agent is churning, they have a warm machine.

Compare that to the half-lid hack: at least a closed lid signals “off.” Adrafinil’s state is invisible. The creator suggests using full-disk encryption and a strong lock screen — good practices anyway.

There’s also potential for abuse. Malware could pretend to be an agent to keep the machine awake and mine crypto or exfiltrate data. The tool relies on process identification by name or bundle ID, which can be spoofed. The community has already asked for a whitelist system; the creator says it’s on the roadmap.

Why This Matters More Than You Think

The half-lid hack isn’t just a niche annoyance. It’s a symptom of a deeper problem: desktop operating systems weren’t designed for autonomous agents. They were designed for humans who occasionally get coffee. Agents need persistent, unattended access to hardware — and macOS, iOS, Windows, and Linux all fight against it.

Adrafinil is a patch. A clever one, but a patch nonetheless. The real solution is for Apple to build an “agent mode” into macOS — a profile that allows certain processes to stay alive even when the lid closes, while enforcing security boundaries. Until then, we’re stuck with hacks.

Microsoft is already experimenting with similar ideas for Copilot+. Apple’s silence on the matter is deafening. For now, the community builds its own solutions — sticky notes, rubber bands, and now Adrafinil.

Verdict: A Necessary Evil

Adrafinil is not a revolution. It’s a utility, like a power strip with a timer. But for anyone running AI agents on a MacBook, it’s the only sane option short of buying a server. The half-lid era is ending. Good riddance.

Download it, test it, and trust it — but keep one eye on the battery indicator. The agents will thank you.

Advertisement
#adrafinil#macbook#ai agents#power management
分享到:XfWB