jadhvank

Electronic Clam - Keeps your Mac awake for agents — without cooking it

by
Your Mac keeps falling asleep mid-task while Claude Code, Codex is running. Caffeinate-style tools fix that - but they stay awake forever, risky when the laptop is closed in a bag (it drains, and a closed clamshell runs hot). Electronic Clam stays awake only while work is actually happening, then lets the Mac sleep. It keeps going lid-closed (IOKit, no sudo), with a real safety guard — a state-conditioned battery floor and a thermal cutoff — so no drain or cook. Free and open source. Menu bar

Add a comment

Replies

Best
jadhvank
Maker
📌
Hey Product Hunt 👋 I'm the maker. I kept hitting the same annoying thing: I'd kick off a long Claude Code / Codex run (or a build, or a data job), close my MacBook, walk away — and come back to find the Mac had fallen asleep and the work had stalled. The usual fixes are caffeinate-like tools. They work, but they keep the Mac awake forever until you remember to turn them off. That's fine at a desk, but it's exactly wrong when the laptop is closed in a bag on battery: it quietly drains, and a closed clamshell with no airflow gets hot. So I built Electronic Clam around two ideas: 1) It watches the work, not just the process. It detects when an agent/build is actually doing something and keeps the Mac awake — then lets it sleep the moment things go idle or finish. No "remember to toggle it off." 2) It has a real safety guard. A state-conditioned battery floor and a thermal cutoff put the Mac back to sleep before it drains too low or runs too hot (lid-closed + on battery tightens the thresholds). That's the "without cooking it" part of the tagline. It keeps working with the lid closed via the IOKit power setting — no sudo/password shell-outs — and it's a menu bar app with a CLI and agent hooks. Free and open source (MIT). A couple of extras that make "walk away" real: you can blank the screen while it keeps working (saves power and heat overnight), and it can ping you on Telegram — when the run wraps up and the Mac goes back to sleep, or when a safety guard kicks in. All opt-in. I'd love feedback, especially on: the agent-activity detection — does it correctly stay awake while working and sleep when idle? the safety thresholds — battery floor / thermal cutoff too aggressive or too lax? which agents/tools you'd want first-class detection for. GitHub + download are in the links. Thanks for taking a look! 🐚