-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Summary
When running long Copilot CLI sessions (builds, tests, multi-step tasks), the computer may go to sleep, interrupting the work. A --caffeine flag would prevent the system from sleeping while a session is active.
Proposed Behavior
copilot-cli --caffeine— keeps the machine awake for the duration of the session, releasing on exit.copilot-cli --caffeine=30m(or similar) — keeps the machine awake for a specified duration, with a sensible default (e.g., 2 hours) if no value is provided.- On macOS, this could use
caffeinateunder the hood. - On Linux,
systemd-inhibitor similar. - On Windows,
SetThreadExecutionStateor equivalent.
Motivation
During long-running agent tasks (complex refactors, large test suites, background CI monitoring), the session can be interrupted if the machine sleeps. Users currently have to manually run caffeinate or adjust system settings. Integrating this into the CLI would be a nice quality-of-life improvement.
Open Questions
- Should this be opt-in per session or configurable as a default?
- What should the default timeout be if no duration is specified? (e.g., match session lifetime, or a fixed cap like 2h)
- Should it also prevent display sleep, or only system sleep?
Reactions are currently unavailable