DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to keep a MacBook awake for a timed agent run with Insomnia

Install Insomnia, then start a timed awake session so a long agent job keeps running with the lid closed.

Short answer: Paste the install prompt from the README into your coding agent, or follow docs/install.md, and enter your password in Terminal when asked; then run open "$HOME/Applications/Insomnia.app" to start the app; Click the eye in the menu bar, enter days, hours and minutes, and press Enter to start the session. All steps.

Credentials. The installed sudoers rule lets any program running as your user account run the pmset power commands without a password, so review /etc/sudoers.d/insomnia before you install.

Who it is forA developer who starts a long coding agent task on a MacBook and needs it to keep running after they close the lid and walk away.

The problemmacOS sleeps the laptop when the lid closes, which stops a long task and can leave work unfinished.

The outcomeThe Mac stays awake until the session end time, the lid-close actions are applied, and the session's changes are undone when it ends.

What you need first

  • A Mac with Apple Silicon running macOS 26 or later
  • Your administrator password, because the installer adds a sudoers rule
  • Terminal access, and optionally Xcode with Swift 6.2 or later if you build from source
  • A stable, well-ventilated surface for the Mac during a session, as the README advises

Steps

  1. Paste the install prompt from the README into your coding agent, or follow docs/install.md, and enter your password in Terminal when asked.
  2. Run open "$HOME/Applications/Insomnia.app" to start the app.
  3. Click the eye in the menu bar, enter days, hours and minutes, and press Enter to start the session.
  4. Check Settings, including the lid-close options, before you close the lid.
  5. Read ~/Library/Logs/Insomnia/insomnia.log after the first session to confirm what happened.

Prompt for your agent

Using the repo https://github.com/krishhgg/Insomnia, install Insomnia on this Mac by following skills/install-insomnia/SKILL.md, and if a step needs my password, give me the exact Terminal command to run. Then start a session of <session-length> from the menu bar eye. Verify that ~/Applications/Insomnia.app exists and report the installed version from Settings > App.

Caveat. Insomnia is described as experimental, the timer is not a safety guarantee, and the battery and heat rules only work while the app is running.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for krishhgg/Insomnia and "Keep a MacBook awake for a timed agent run"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer