UStackUStack
Holdor icon

Holdor

Holdor is a free macOS menu bar app that prevents your Mac from sleeping while AI coding agents run, while still allowing screen lock.

Holdor

What is Holdor?

Holdor is a free, open-source macOS menu bar app that prevents your Mac from going to sleep while AI coding agents are running. Its core purpose is to keep long-running coding tasks from being interrupted when the machine would otherwise enter idle sleep—while still allowing you to lock your screen.

Holdor is designed to work with common AI coding tools (including Claude, Cursor, Windsurf, VS Code, and terminal-based workflows). It watches running processes and uses macOS built-in power management behavior to hold an active state only while the selected apps are running.

Key Features

  • Menu bar app (no dock icon, no main window): Lives in the macOS menu bar to minimize on-screen clutter.
  • Select-and-watch app support with auto-detection: You can toggle which apps to protect, and Holdor detects when supported apps launch or quit.
  • Smart caffeinate per process (Regular mode): Uses the macOS caffeinate mechanism tied to each watched app’s process ID to prevent idle sleep while they run.
  • Extended mode for lid-close scenarios: Adds system sleep prevention when closing the lid (in addition to idle sleep prevention), intended for plugged-in setups.
  • Persistent configuration: App selections persist across restarts.
  • Lightweight native implementation: Built with Swift (no Electron runtime), aiming for minimal memory and CPU overhead.

How to Use Holdor

  1. Download and open Holdor on macOS (v1.4.0 is referenced on the site). The app provides a menu bar icon.
  2. Use the menu to toggle which apps you want to protect. Holdor supports built-in app detection for several tools and will automatically track when they launch or quit.
  3. Choose the appropriate mode:
    • Regular mode to prevent idle sleep while watched apps run.
    • Extended mode if you need to prevent system sleep when the lid is closed (e.g., a plugged-in desktop setup).
  4. Start your AI coding agent as normal. Lock your screen and walk away as needed—Holdor keeps the Mac from sleeping until the watched process quits.

Use Cases

  • Prevent idle sleep during refactors in an IDE: Run a long agent-driven refactor in a supported editor and lock your screen afterward; Holdor prevents the Mac from going into idle sleep that could terminate the session.
  • Keep terminal-based coding tasks running: Protect CLI workflows (e.g., terminal sessions using supported AI coding tools) so the system doesn’t sleep mid-command while you’re away.
  • Plugged-in setup with lid closed: Use Extended mode to prevent system sleep when closing the lid, which can be relevant for desk setups where you want the machine to remain active.
  • Continue an agent after stepping away: When you start an AI coding task, lock the screen to satisfy security requirements; Holdor is intended to keep the agent running in the background while your screen is locked.
  • Protect multiple tools in one workflow: Select several supported apps (for example, an editor plus a terminal) so Holdor can hold the Mac awake across the parts of your workflow that rely on AI agents.

FAQ

How does Holdor prevent macOS from sleeping?

Holdor uses macOS’s built-in caffeinate command tied to the watched app’s process ID. In Regular mode it uses caffeinate -i -w PID to prevent idle sleep. In Extended mode it adds the -s flag to also prevent system sleep triggered by closing the lid. When the watched app quits, the assertion is released automatically.

What’s the difference between Regular and Extended mode?

Regular mode prevents idle sleep so the Mac stays awake from inactivity while a watched app is running. Extended mode additionally prevents system sleep caused by lid close. Both modes allow the display to turn off and the screen to lock normally.

Does Holdor drain my battery?

The site states that Holdor itself uses negligible resources because it is a native Swift app without Electron. In Regular mode it only prevents idle sleep while watched apps are running. In Extended mode, the Mac remains awake even with the lid closed, which can use more battery if the machine is unplugged.

Can I lock my screen while Holdor is active?

Yes. The purpose described on the site is to prevent sleep while allowing the display to sleep and the screen to lock normally, so your security policy can be satisfied while AI agents continue running.

Is Holdor free?

Yes. The site states that Holdor is completely free and open source under the MIT license, with source code available on GitHub.

Alternatives

  • Built-in macOS power settings / sleep prevention tools: Instead of per-app process monitoring, these options typically apply more generally to the whole system and may not limit the awake state to only when an AI agent is running.
  • Per-session workflow changes (keeping the machine awake manually): Solutions like leaving the laptop open or adjusting sleep behavior can work, but they don’t address the security requirement to lock the screen while the agent runs.
  • Other process-aware “keep awake” utilities: Category-level alternatives are apps that prevent sleep based on activity or running processes, rather than strictly tied to AI coding tool sessions; the main difference is how they detect what to watch and what sleep modes they prevent (idle vs system/lid close).
  • Hardware/desk setup approaches (e.g., using external power and keeping lid open): This can avoid sleep interruptions, but it trades away convenience or security workflow (locking screen while working away).