Conversation
Add opt-in, task-scoped system sleep inhibition for the VS Code extension. - Add the preventSleepDuringTasks setting, with a disabled-by-default 30-minute limit and 0 for no extension-imposed limit. - Add the Power settings panel with nested timeout control, battery icon, Save-state handling, persistence, and translations. - Track each task independently and pause its active-time budget while waiting for questions, permissions, network recovery, or blocking suggestions. - Restore task state safely across reconnects, concurrent requests, helper restarts, and partial backend failures. - Use readiness-checked native inhibitors with watchdogs and reference counting on Windows, macOS, and Linux without preventing display sleep or screen locking. - Add unit coverage, user documentation, and a release changeset.
|
Maybe duplicate #12974 ? |
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (57 files)
Fix these issues in Kilo Cloud Reviewed by grok-4.6 · Input: 191.3K · Output: 20.7K · Cached: 968.6K Review guidance: REVIEW.md from base branch |
Handle ChildProcess close independently from exit so a helper stopped during a failed spawn cannot remain tracked indefinitely. Restart the native inhibitor when active task references return before the closing helper completes.
Query directory-scoped suggestions for every known directory during reconnect. Reconcile suggestion waits only for directories whose request succeeded, preventing sleep inhibition from resuming while user input remains pending.
|
It might make sense maybe to ship this as optional plugin. I haven't tested if that is possible, yet. |
|
No problem if you prefer the other one. I had not seen it before starting this work, but since I had already completed it, I thought I would put it forward anyway, just in case. As for compliance within the company, I am having trouble understanding the concern. Why would this raise a compliance issue, given that the feature can be disabled, especially since it is disabled by default? Could you tell me more about it? |
Summary
Add opt-in, cross-platform system sleep prevention while VS Code agent tasks are actively running.
kilo-code.new.preventSleepDuringTaskssetting.0removes only Kilo’s time limit.Why
Long-running agent tasks can be interrupted by automatic system sleep. Existing operating-system power settings are still respected, but users need an explicit way to keep the system awake while work is actually executing.
The feature is opt-in because changing power behaviour should never be a surprise. The timeout is based on active execution rather than wall-clock time so time spent waiting for the user is not charged.
Behaviour
stateDiagram-v2 [*] --> Running: task becomes busy/retry Running --> Paused: question / permission / network / blocking suggestion Paused --> Running: reply / recovery Running --> Finished: idle / completed / failed / cancelled / limit reached Paused --> Finished: task ends Finished --> [*]flowchart LR A[Active task] --> B[Session sleep tracker] B --> C{Any task actively running?} C -- No --> D[Release native inhibitor] C -- Yes --> E[Shared native inhibitor] E --> F{Platform} F --> G[Windows: ES_SYSTEM_REQUIRED] F --> H[macOS: caffeinate -i] F --> I[Linux: systemd-inhibit] I --> J[Fallback: gnome-session-inhibit] G --> K[Ready signal] H --> K I --> K J --> K K --> L[Report inhibition active]Implementation notes
caffeinate -i.systemd-inhibit --what=sleepand falls back tognome-session-inhibit --inhibit=suspend.Visual evidence
Kilo Settings:

VSCode status bar:

System notification (KDE Plasma 6.7.4)

Verification
Completed:
The VSIX archive was also built and verified with
unzip -tq.bun script/dev-snapshot.ts buildstalled locally while invokingbun esbuild.js --production. As substitute verification,node esbuild.js --productioncompleted successfully and the same@vscode/vscepackaging path produced a valid VSIX archive.