docs: note that a sleeping Mac stops an agent waiting on a reset - #38
Merged
Merged
Conversation
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) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new Leaving it running section in the README, after Session restore.
Claude Code resumes its task by itself when a usage limit resets — but only while its session is still alive, which is what makes leaving termit open the thing that gets work done overnight. A sleeping Mac freezes every process, so the reset passes and nothing happens.
The default state is not enough on its own. Checked what was actually holding this machine awake:
Everything holding an assertion was holding the idle one, and those come and go (
coreaudiod's disappears when the audio stops).Verified rather than assumed:
PreventSystemSleepgoes 0 → 1 whilecaffeinate -isruns and back to 0 when it exits, so nothing is left holding the machine awake after termit closes.Both limits are stated in the section, because both are easy to trip over:
-sapplies only on AC power (its man page says so).Test
cargo test— unchanged, including the test pinning the README's[paste]example to the shipped defaults. No code touched.Separate from #37 so each lands on its own; they touch different parts of the README and merge cleanly in either order.
🤖 Generated with Claude Code