Skip to content

Keep Mac awake while agents run - #2227

Merged
brennanb2025 merged 7 commits into
mainfrom
brennanb2025/keep-awake-while-lid-closed
May 18, 2026
Merged

Keep Mac awake while agents run#2227
brennanb2025 merged 7 commits into
mainfrom
brennanb2025/keep-awake-while-lid-closed

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • upgrade the agent-awake Electron blocker to prevent-display-sleep while agents are working
  • add platform lid-closed assertions where Orca can do that without mutating global power settings
  • refresh assertions on power resume and update Settings copy/search metadata to reflect the current device

Platform behavior

  • macOS: Orca starts a caffeinate -i -s assertion while eligible agents are working.
  • Linux: Orca starts a systemd-inhibit --what=sleep:handle-lid-switch --mode=block assertion on supported systemd/logind systems.
  • Windows: Orca keeps the computer/display awake for normal idle sleep, but lid-close behavior follows the user's device power settings. Orca does not change the global Windows power plan.

Testing

  • pnpm exec vitest run --config config/vitest.config.ts src/main/linux-lid-sleep-assertion.test.ts src/main/agent-awake-service.test.ts src/main/agent-awake-service-platform-assertions.test.ts
  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/settings/AgentsPane.test.tsx
  • SKIP_BUILD=1 pnpm exec playwright test tests/e2e/settings-agent-awake.spec.ts --config tests/playwright.config.ts --project=electron-headless --workers=1
  • pnpm run typecheck

Notes

  • Closed-lid behavior still depends on OS, hardware, AC power, and thermal/battery policy. This PR uses app-scoped assertions on macOS/Linux and intentionally avoids silently changing Windows power-plan settings.

Made with Orca 🐋

brennanb2025 and others added 7 commits May 17, 2026 23:18
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
@brennanb2025
brennanb2025 merged commit ffc7d77 into main May 18, 2026
1 check passed
@brennanb2025
brennanb2025 deleted the brennanb2025/keep-awake-while-lid-closed branch May 18, 2026 21:09
thomaszdxsn pushed a commit to thomaszdxsn/orca that referenced this pull request Jun 15, 2026
Co-authored-by: Orca <help@stably.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant