Skip to content

feat(cli): add /caffeinate command - #13927

Merged
marius-kilocode merged 2 commits into
mainfrom
dust-dianella
Sep 9, 2026
Merged

marius-kilocode merged 2 commits into
mainfrom
dust-dianella

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

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 /caffeinate and the typo-compatible /caffenate alias, 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 typecheck from packages/core/
  • bun run typecheck from packages/opencode/
  • bun run compile from packages/kilo-vscode/
  • Focused Caffeination and message-routing tests: 40 passed, 1 skipped
  • bun run script/build.ts --single --skip-install from packages/opencode/
  • CLI smoke tests for version, model listing, and sandbox worker startup passed
  • git diff --check passed

# Conflicts:
#	packages/opencode/src/kilocode/cli/cmd/tui/app.tsx
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.

2 participants