From b46b0c2334d1d10a453c31c0a439c7894b755d2f Mon Sep 17 00:00:00 2001 From: tkc Date: Fri, 18 Sep 2026 08:54:22 +0900 Subject: [PATCH] docs: note that a sleeping Mac stops an agent waiting on a reset Claude Code resumes its task by itself when a usage limit resets, but only while its session is alive, which makes leaving termit open the thing that gets work done overnight. A sleeping Mac freezes every process, so the reset passes and nothing happens -- and none of the assertions already on this machine (coreaudiod, sharingd, powerd) hold PreventSystemSleep, so the default state is not enough. `caffeinate -is termit` covers it, and releases both assertions when termit exits. Verified: PreventSystemSleep goes 0 -> 1 while it runs and back to 0 after. The two limits are stated, because both are easy to trip over: -s applies only on AC power, per its man page, and neither flag stops a laptop sleeping when the lid closes. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 69cdeb6..21e8c3f 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,27 @@ disappeared falls back to your home directory. Turn it off with `restore_sessions = false`. +## Leaving it running + +Agents spend much of their time waiting — on a usage limit that resets in a few +hours, on a build, on a long test run. Claude Code picks its task back up by +itself when the limit resets, but only while its session is still alive, so the +useful thing is simply to leave termit open. + +A sleeping Mac freezes every process, so the reset comes and goes and nothing +happens. Launch under `caffeinate` and the machine stays awake exactly as long +as termit runs: + +```sh +caffeinate -is termit +``` + +`-i` prevents idle sleep, `-s` prevents system sleep, and both are released +when termit exits — nothing is left holding the machine awake. Two conditions +worth knowing: `-s` applies only on AC power, and neither flag stops a laptop +from sleeping when you close the lid. If you want the lid shut, run the work +somewhere that is not your machine. + ## Sandbox profiles A profile says where a pane runs. `host` is the default and runs directly.