{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "krishhgg-insomnia--run-timed-lid-closed-agent-session",
 "repo": "krishhgg/Insomnia",
 "repo_url": "https://github.com/krishhgg/Insomnia",
 "repo_slug": "krishhgg-insomnia",
 "title": "Keep a MacBook awake for a timed agent run",
 "page_title": "How to keep a MacBook awake for a timed agent run with Insomnia",
 "summary": "Install Insomnia, then start a timed awake session so a long agent job keeps running with the lid closed.",
 "who": "A 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.",
 "problem": "macOS sleeps the laptop when the lid closes, which stops a long task and can leave work unfinished.",
 "outcome": "The Mac stays awake until the session end time, the lid-close actions are applied, and the session's changes are undone when it ends.",
 "steps": [
  "Paste the install prompt from the README into your coding agent, or follow docs/install.md, and enter your password in Terminal when asked.",
  "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.",
  "Check Settings, including the lid-close options, before you close the lid.",
  "Read `~/Library/Logs/Insomnia/insomnia.log` after the first session to confirm what happened."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "swift",
 "requirements": [
  "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"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "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."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/krishhgg-insomnia/run-timed-lid-closed-agent-session/",
 "md": "https://dedupedai.com/use-cases/krishhgg-insomnia/run-timed-lid-closed-agent-session/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/krishhgg-insomnia--run-timed-lid-closed-agent-session.json",
 "api_version": "v1"
}
