Keep your Mac awake while coding agents are working
Sleep prevention, local dictation, and agent controls in one macOS menu bar app.
The Problem
You ask your coding agent to refactor your codebase. It's going to take 10 minutes. You close your MacBook lid to grab coffee...
💀 Mac sleeps. The agent stops. Work lost.
The Solution
Install this tool. Now your Mac stays awake while your agent works, even with the lid closed. When it finishes, normal sleep resumes. The same menu bar app also provides local speech-to-text dictation for any app.
| Before | After |
|---|---|
| 😴 Lid closed = Mac sleeps | ☕ Lid closed = agent keeps working |
| 🔄 Come back to interrupted work | ✅ Come back to finished work |
Features
- Sleep prevention while supported coding agents are active
- Agent notifications: get notified when a long task finishes or when an agent is waiting for your input
- Local voice dictation with a customizable hotkey (Fn+Shift by default)
- Two dictation engines: Whisper (best accuracy, custom vocabulary) or Parakeet v3 (near-instant transcription)
- English transcription by default, with language selection in Settings
- Sparkle updates from signed releases
Installation
🍎 Download DMG (Easiest)
- Download the latest DMG
- Drag
AgentsSleepPreventer.appto Applications - Launch the app - it will auto-configure on first run
- Restart your coding agents
The menu bar app uses Sparkle for in-app updates and can download + install new signed releases directly.
🍺 Homebrew
brew tap CharlonTank/tap brew install agents-sleep-preventer asp install
🦀 Build from Source
git clone https://github.com/CharlonTank/agents-sleep-preventer.git
cd agents-sleep-preventer
cargo build --release
./target/release/asp installHow It Works
Sleep Prevention
You send a prompt
↓
Agent starts working → 🔒 Sleep disabled
↓
Agent finishes → 🔓 Sleep re-enabled
Sleep prevention works automatically after setup.
Dictation
Agents Sleep Preventer includes local speech-to-text dictation:
- Open the app and allow Microphone and Accessibility permissions.
- Download the local Whisper model when prompted.
- Press and hold Fn+Shift (default) to record, then release to transcribe and insert text.
Dictation starts in English by default. To change the language, the hotkey, or the engine, open Settings... and select the Dictation tab.
Two engines are available:
| Model | Best for |
|---|---|
| Whisper Turbo (574 MB / 1.6 GB) | Best accuracy, 99 languages, custom vocabulary support |
| Parakeet v3 (670 MB) | Near-instant transcription, English + 24 European languages |
Commands
asp status # Check current state asp settings # Open sleep prevention and dictation settings asp cleanup # Clean up after interrupts asp uninstall # Remove completely
FAQ
Does it drain my battery? No more than usual. Your Mac just stays awake instead of sleeping.
What if I interrupt an agent with Ctrl+C?
Run asp cleanup or the tool auto-detects idle sessions after 30 seconds.
Does it work with multiple agent instances? Yes! Mac stays awake until ALL instances finish.
How do app updates work?
The menu bar app uses Sparkle. Use Check for Updates... from the menu bar app, or let Sparkle check automatically in the background. New signed releases are installed through Sparkle instead of just opening a DMG download.