Keep Claude Code running when your MacBook is closed
Claude Code can run for a long time on a single task. Close the lid and macOS suspends it. Here is how to keep Claude Code running when your MacBook is closed without leaving the hardware unwatched.
Why the agent stops
Claude Code runs in your terminal as a normal process. When the lid closes and the Mac sleeps, that process is suspended along with everything else.
A long agent run can lose its place, and you come back to a session that stalled the moment you walked away.
The LidRun workflow for Claude Code
LidRun detects Claude Code and holds the Mac awake while it runs, so you can close the lid and let the agent finish.
Battery and thermal thresholds gate the whole session. If charge drops or heat climbs past your limits, LidRun lets the Mac sleep instead of pushing it.
The activity log records why a session ended, so a stalled run is never a mystery.
A practical setup
Plug in, start your Claude Code task, turn on keep-running mode, then close the lid and move on.
Set a session timer that matches how long you expect the work to take so it caps itself even if you forget.
LidRun giữ công việc của bạn chạy tiếp khi đóng nắp, với cơ chế bảo vệ pin và nhiệt tích hợp sẵn.
Câu hỏi thường gặp
Yes. LidRun recognizes Claude Code along with many other dev and AI tools and holds the Mac awake while they run.
When the work ends and no watched task remains, LidRun can release the keep-awake assertion so the Mac returns to normal sleep behavior.
LidRun uses safety thresholds to help reduce risk, but keep the Mac on a flat, ventilated surface and plugged in for long runs.