Developers frequently assign long-running tasks to coding agents like Claude Code or Codex before stepping away or traveling. Closing a MacBook lid typically pauses running processes or risks severe device overheating. The open-source menu bar app ClamDown keeps background workloads running while actively managing system cooling with the lid closed.

Limitations of Traditional Keep-Awake Tools and How ClamDown Works

Standard tools like caffeinate or virtual display plugins often require an external display or fail to regulate thermal conditions. When a MacBook lid closes, default macOS behavior caps fan speeds at minimal levels regardless of CPU temperature spikes. ClamDown detects the closed-lid state and takes direct control of fan speeds. On Apple Silicon MacBooks, it keeps fans at minimum speed when the CPU stays at 50°C and ramps fans to maximum speed once temperatures reach 75°C.

Safety Mechanisms and Watchdog Architecture

ClamDown includes built-in safeguards to prevent battery depletion and overheating. If the battery drops below 10% or the thermal state passes the serious threshold, the app halts operations and puts the MacBook to sleep. If a user steps away, the app confirms one minute of user inactivity before triggering sleep mode to prevent accidental heat buildup.

The app uses a root helper and watchdog architecture for system stability. The main app sends a heartbeat signal to the helper every 30 seconds. If the helper receives no response for 90 seconds, it immediately returns sleep configuration and fan control to macOS. ClamDown requires macOS 13 or later and root helper authorization during setup. Intel Macs can only read temperature data, while Apple Silicon Macs get full cooling control.

ClamDown provides practical convenience for developers executing heavy local agent workflows. A simple menu bar toggle keeps intensive tasks running safely without hardware risks.

Summary

  • Performs direct fan and thermal control with the lid closed, overriding limitations of caffeinate and virtual display plugins.
  • Triggers automatic sleep mode upon reaching low-battery or high-thermal thresholds to prevent overheating in bags.
  • Restores default macOS controls safely via a 30-second watchdog helper if the main app crashes.