Close your MacBook and Claude Code keeps working: Double Shot keeps the Mac awake only while your agents run
Double Shot is a free, open-source macOS menu bar app that keeps your Mac awake while coding agents are actually working, even with the lid closed and on battery. It notices when Claude Code, Codex, Gemini CLI, Cursor Agent, Copilot CLI, OpenCode, Amp or Aider are busy, counts background runs like claude -p until they finish, and lets the Mac sleep a few minutes after everything goes quiet. To protect a closed Mac in a bag, it stops when the Mac gets warm, turns the display off, switches on Low Power Mode on battery and lets go when the battery is low.
Why it matters
Long agent runs die when macOS sleeps on lid close. This lets you start a job, pack the laptop and have the work finished when you open it.
Who it's for
Mac users who run long Claude Code, Codex, Gemini CLI or Cursor sessions and want to close the lid without killing them.
How to try it
- Install with Homebrew: brew install --cask noahelhadedy/tap/double-shot, or download the latest release from GitHub.
- Follow the welcome steps to turn on open at login, lid closed mode and AI agent detection.
- Start your agent run, close the lid, and keep the Mac somewhere it can breathe; Double Shot puts it to sleep when the work is done.
Plan & availability: Free, MIT licensed, macOS only. Lid-closed mode needs a one-time admin password. Checked November 1, 2026.
Related
Source: Noah Elhadedy (GitHub) on github.com
Written by Emily Carter from the original post. Checked Nov 1, 2026. Features, plans and availability can change, so confirm on the source before you rely on it.
claude-codemacosopen-sourcecodexproductivity
More Claude tricks
- One URL and one key for all your MCP servers: ngrok's MCP Gateway is live · Dec 2
- OpenCode 2.4.2 cuts about 700 tokens per request and tunes GPT-6.2 · Nov 26
- OpenCode 2.4 gives your coding agent a browser, automations, and video generation · Nov 24
- Claude Code 2.1.330 draws your charts with easel and lets scheduled tasks run 30 days · Nov 21