Prevent sleep while running for increased reliability #7049
Replies: 2 comments 1 reply
|
I have a working implementation of this, following what the issue proposed: a Scope decisions to keep it small:
Verified live on macOS: the assertion shows up in Windows and Linux go through the same cross-platform Electron API, but I could only verify end to end on macOS. If a Windows or Linux user wants to try the branch and confirm ( Opening a PR shortly. |
|
Filling in the Windows and Linux evidence that #5535 asked for and could not get, because it was only verified on macOS. Why the WSL case is not covered by the provider's own flagFor a WSL environment, a provider's sleep prevention cannot help. Codex's The same applies to a WSL-hosted Codex thread specifically, which is why enabling What I measuredWSL2 on Windows 11 Home, "Legion Balance Mode" power scheme,
What I can addI can build the #5535 branch, run a turn against a WSL environment, and confirm the assertion appears in |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Currently when running long-tasks there is a risk of the device falling asleep, this can cause connection issues & interrupt the active task. This is a feature I've found useful on the Codex app.
We should ensure it only runs while a thread is active/running.
I think this would use https://www.electronjs.org/docs/latest/api/power-save-blocker ? And we'd want to use
prevent-app-suspensionso the app isn't suspended but the screen etc can still turn off e.g. so policies like auto-locking the device after 10 mins of inactivity isn't affected by long running tasks.I can work on this feature in my free time if needed.
All reactions