Skip to main content
GitHub Copilot in Visual Studio Code is integrated through a dedicated OneX VS Code extension, in addition to the governance client. Complete Installation with copilot included in your --tools list before proceeding.

Setup summary

:: Install the governance client
OneXGovernance.exe install-client -y ^
  --api-url https://onex-api.yourcompany.com ^
  --secret YOUR_SECRET ^
  --tenant your-tenant ^
  --tools claude_code,copilot ^
  --register-task

:: Install the VS Code extension (skipped if already installed)
OneXGovernance.exe install copilot
./OneXGovernance install-client -y \
  --api-url https://onex-api.yourcompany.com \
  --secret YOUR_SECRET \
  --tenant your-tenant \
  --tools claude_code,copilot

./OneXGovernance install copilot
Restart Visual Studio Code. On first launch, accept the prompt to enable governance for Copilot chat, then reload the window when requested. Activity appears under View → Output → “OneX Governance”.

Requirements

  • Visual Studio Code 1.90 or later, with GitHub Copilot and Copilot Chat signed in
  • Governance client installed with copilot in --tools
  • The code command on your PATH (Command Palette → “Shell Command: Install ‘code’ command in PATH”)

VS Code extension

Including copilot in install-client installs the extension automatically when the code CLI and extension package are present. You can also install it directly:
OneXGovernance.exe install copilot
If your organization distributes a signed onex-governance.vsix, install it with:
code --install-extension onex-governance.vsix --force
Restart VS Code after any extension change.

Enabling Copilot chat governance

Standard Copilot chat (without a prefix on every message) requires a one-time enable step:
  1. Click Enable on the OneX prompt at first launch, or run Command Palette → “OneX: Enable built-in Copilot capture”.
  2. Reload the window when prompted.
  3. Continue using Copilot chat as usual.
Enabling built-in Copilot chat governance adjusts local network settings on your workstation. Confirm this aligns with your organization’s security policy before proceeding.
To disable: Command Palette → “OneX: Disable built-in Copilot capture”, then reload VS Code.

Extension settings

Under Settings → OneX Governance:
SettingPurpose
onexGovernance.enabledEnable or disable governance for the current window
onexGovernance.captureBuiltinChatGovern built-in Copilot chat (requires one-time consent)
onexGovernance.exePathOverride the path to the governance client when auto-detection fails

Validation

Confirm the OneX Governance output channel shows activity when you use Copilot or save files, then verify corresponding events in your governance dashboard.

Known issues

SymptomResolution
No “OneX Governance” output channelRe-run install copilot, restart VS Code, and confirm the extension is listed under Extensions
Extension cannot locate the clientRun install-client, or set onexGovernance.exePath in settings
Output shows activity; dashboard does notConfirm the forwarder secret in the dashboard and run doctor
@onex returns “no language model”Verify Copilot Chat is signed in and a model is available
Built-in Copilot chat not governedRun “OneX: Enable built-in Copilot capture” and reload the window
code command not foundInstall the shell command from VS Code (see Requirements)
For client-wide issues, see Troubleshooting.