Files
orca/src
Neiladversarial-review (round 0 self-defense)Orca
8108ef6a66 perf(agent-awake): let the display sleep during agent silence, keep system awake
The 'keep computer awake while agents run' setting (opt-in, off by default)
held an Electron prevent-display-sleep assertion for the entire time an agent
was 'working' — up to the 2h staleness backstop. If an agent went quiet (a long
silent tool call) or died with its shell still open (no terminating hook), the
DISPLAY — the biggest battery draw — stayed lit for up to 2 hours.

Split the assertion into two tiers keyed off the same working status:
- Recent activity (<15m): prevent-display-sleep, as before.
- Quiet past 15m but within the 2h window: downgrade to prevent-app-suspension,
  so the system (and the agent) stays awake but the display sleeps normally.

The agent is never suspended (the 2h system window is unchanged), so there is
no functional regression; only the screen is allowed to sleep during silence.
Updates the setting copy (5 locales) to match, and the tests.

Co-authored-by: adversarial-review (round 0 self-defense)

Co-authored-by: Orca <help@stably.ai>
2026-07-13 18:16:02 -07:00
..
2026-07-13 12:42:55 -07:00