feat(cli): add /caffeinate command - #13927
Merged
Merged
Conversation
marius-kilocode
enabled auto-merge
September 8, 2026 15:37
# Conflicts: # packages/opencode/src/kilocode/cli/cmd/tui/app.tsx
eshurakov
approved these changes
Sep 9, 2026
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Kilo can keep a computer awake from VS Code, but the behavior was not available from the CLI and the shared VS Code surfaces did not clearly explain when the feature was enabled.
Why This Change Was Made
The native platform inhibitor now lives in a Kilo-owned core module shared by the CLI and VS Code. The CLI TUI registers
/caffeinateand the typo-compatible/caffenatealias, while VS Code routes the same action through the existing CaffeinationService. A host-level notification explains enable, disable, and runtime failure states from both the sidebar and Agent Manager.User Impact
Users can opt in from the CLI or VS Code. Keep Awake activates while Kilo sessions are busy or retrying, releases the inhibitor when sessions are idle, and cleans up when the client exits. The existing local-window and workspace-trust safeguards remain in place.
Evidence
bun run typecheckfrompackages/core/bun run typecheckfrompackages/opencode/bun run compilefrompackages/kilo-vscode/bun run script/build.ts --single --skip-installfrompackages/opencode/git diff --checkpassed