A developer has found a way to keep Claude Code running on a MacBook even when the lid is closed, preventing the common issue of stalled sessions. The solution involves using the macOS `pmset` command to disable sleep mode entirely, which can be risky if not managed properly. To mitigate these risks, a custom script was created that temporarily enables `disablesleep` only while a command is running and automatically reverts the setting upon completion or interruption. AI
IMPACT Enables uninterrupted long-running AI tasks on laptops, improving developer workflow.
RANK_REASON The item describes a technical workaround for a specific software product, not a new release or significant industry event.
Read on dev.to — Claude Code tag →
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →