[FEATURE]: Configurable CLI Binary Path for Enterprise / Restricted Environments #9694
castafe
started this conversation in
1. Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[FEATURE]: Configurable CLI Binary Path for Enterprise / Restricted Environments
Summary
Add a mechanism — via VS Code setting, environment variable, or configuration file — to override the hardcoded path used by the VS Code extension to locate the
kiloCLI binary. This is essential for users operating in corporate environments where application execution is restricted by security policies such as AppLocker or Windows Defender Application Control (WDAC).Problem Statement
In enterprise environments, security teams commonly enforce application whitelisting policies (AppLocker, WDAC, Group Policy) that block execution of binaries outside approved directories. The VS Code extension currently resolves the CLI binary path with a hardcoded function:
The resulting path —
%USERPROFILE%\.vscode\extensions\kilocode.kilo-code-X.X.X\bin\kilo.exe— is a user-writable directory, which corporate policies typically block by design to prevent execution of unvetted software. There is no way to override this path without patchingextension.jsdirectly.Observed Failure
When the binary is blocked, the extension fails silently from the user's perspective: the Sign In button does nothing, settings cannot be saved, and the "Not connected to CLI backend" error appears. The actual root cause is only visible in the VS Code Developer Tools console:
Running the binary manually confirms the root cause:
Proposed Solution
Introduce an override mechanism — in order of implementation preference:
Option A: VS Code Setting (Recommended)
Expose a new
contributes.configurationproperty inpackage.json:Then in
getCliPath():Option B: Environment Variable
Check for
KILO_CLI_PATH(orKILOCODE_CLI_PATH) before falling back to the bundled binary:Option C:
kilo.jsoncConfig FieldAdd a top-level
cliBinaryPathfield to thekilo.jsoncconfiguration file that the extension reads at startup.Use Cases
Why This Is Low Risk
Environment Where Issue Was Confirmed
This program is blocked by group policyerror)C:\Users\<user>\.vscode\extensions\kilocode.kilo-code-7.2.25-win32-x64\bin\kilo.exeWorkarounds (Inadequate)
The following workarounds were investigated and found insufficient:
KILOCODE_DEV_CLI_PATHenv var: Does not override the extension's CLI path. It is an internal development variable used by the CLI to locate the extension source, not the reverse.kilo-code.new.*settings: No CLI path override exists incontributes.configuration(verified inpackage.jsonv7.2.25).extension.js: Fragile, reverts on every extension update.References
ServerManager.getCliPath()indist/extension.jspython.pythonPath), ESLint (eslint.nodePath), Prettier (prettier.prettierPath)Beta Was this translation helpful? Give feedback.
All reactions