Skip to main content

GitHub Copilot

Tasks

Route GitHub Copilot completions and chat through AIControls using the AIControls VS Code extension. Setup takes under two minutes — no GitHub organization settings or config files to edit.

Prerequisites

  • VS Code installed
  • GitHub Copilot active on your GitHub account (Individual, Business, or Enterprise)
  • A GitHub account already signed in to VS Code

Setup

  1. Install the AIControls VS Code extension. Install from the VS Code Marketplace or from downloads.nirmata.io. The extension adds an AIControls item to the VS Code status bar.

  2. Open the AIControls panel. Click the AIControls item in the VS Code status bar (bottom bar). The panel opens and checks whether a GitHub account is already signed in to VS Code.

  3. Connect with your GitHub account. If a GitHub session is detected, click "Connect with GitHub account: <your-username>". The extension silently exchanges your VS Code GitHub session for an AIControls personal access token — no copy-pasting required.

    No GitHub session in VS Code? Sign in to GitHub first via Accounts → Sign in with GitHub, then return to this step. Alternatively, paste a personal access token from Settings → Access Tokens directly into the AIControls panel.

  4. Done. All GitHub Copilot Chat and inline completions now route through AIControls. Policies, audit logging, spend tracking, and HITL approvals apply automatically.

What gets governed

  • Inline code completions in VS Code
  • Copilot Chat messages and responses
  • Copilot edits and multi-file changes
note

Governance applies to Copilot traffic routed through the VS Code extension. Copilot usage in other IDEs (JetBrains, Neovim, etc.) or via gh copilot in the CLI is not covered by this extension.

Verify the connection

Use Copilot Chat or trigger an inline completion in VS Code. Check your workspace Audit Log — the request should appear with your GitHub identity within seconds.

Troubleshooting

No GitHub session detected

Sign in to GitHub in VS Code via Accounts → Sign in with GitHub, then reopen the AIControls panel and connect again.

Copilot completions not appearing in Audit Log

  • Confirm the AIControls panel shows your account as connected (not "disconnected" or "token expired")
  • Restart VS Code after installing the extension if the status bar item is missing
  • Regenerate your access token in Settings → Access Tokens and reconnect in the panel

Copilot stops working after connecting

If Copilot becomes unresponsive after connecting AIControls, a policy may be blocking requests. Check Audit Log → Denied for your identity and contact your administrator.