Cody Code AI Fix 4 min read

Sourcegraph Cody Not Working? Fix Auth, VS Code Extension & Chat Errors

Troubleshoot Sourcegraph Cody — VS Code extension not loading, sign-in auth errors, chat not responding, autocomplete not triggering, and Enterprise self-hosted connection issues.

Sourcegraph Cody live status

Sourcegraph Cody — live status

Updated every 5 minutes · Full incident history →

Full status →

Common errors and fixes

Not signed in / auth error

Cody free tier requires a Sourcegraph.com account (free, no credit card). Sign in via:

  • VS Code: click the Cody icon in sidebar → "Sign in with GitHub" or "Sign in with Sourcegraph.com"
  • Command Palette: run "Cody: Sign In" (Ctrl+Shift+P)

If sign-in loop (opens browser but returns to VS Code without signing in):

  1. 1
    Sign out and back in: Try signing out via Cody panel settings, then sign in again — this refreshes the auth token.
  2. 2
    Use access token instead: Run "Cody: Sign In with Access Token" — get token from sourcegraph.com → Settings → Access Tokens.
  3. 3
    Linux URI handler: On Linux, auth callback requires the correct URI handler registered for VS Code. Ensure VS Code is set as the default handler for vscode:// links.

VS Code extension not loading

Steps to diagnose and fix the Cody extension not loading:

  1. 1
    Open Output panel: View → Output → select "Cody by Sourcegraph". Look for "Error" or "Failed" messages that reveal the root cause.
  2. 2
    Reload window: If "Extension Host crashed" appears, run Ctrl+Shift+P → "Developer: Reload Window" to restart without closing VS Code.
  3. 3
    Update the extension: Open Extensions panel → right-click Cody AI → Update. Extension ID: sourcegraph.cody-ai — check marketplace.visualstudio.com/items?itemName=sourcegraph.cody-ai for current stable.
  4. 4
    Check for extension conflicts: If the extension host crashes with Cody loaded, disable other heavy extensions temporarily to check for a conflict.
  5. 5
    Reinstall as last resort: Uninstall Cody AI from Extensions panel, then reinstall from the VS Code marketplace.

Rate limits / quota exhausted

Cody free tier limits (as of 2024):

  • Chat: 1,500 messages/month (Claude 3.5 Sonnet)
  • Autocomplete: ~1,000 suggestions/day
  • Commands: counted toward chat quota

If you've hit limits:

  • Wait for the monthly reset (resets on the 1st of each month)
  • Upgrade to Cody Pro ($9/month) for 1,000 Claude Opus messages + unlimited Sonnet/Haiku
  • Enterprise removes all limits
  • Check your usage at sourcegraph.com → Settings → Usage

Autocomplete not triggering

VS Code settings to check (search "Cody" in settings):

  • "Cody: Autocomplete Enabled" → must be checked
  • "Cody: Autocomplete Language" → ensure your language is not in the disabled list
  • Autocomplete works by sending your current file context to StarCoder2

If autocomplete works sometimes but not always:

  • Network connectivity to sourcegraph.com/api/completions/* must be allowed through any firewall or proxy
  • On slow connections, suggestions time out before appearing — try a wired connection
  • Very large files (10,000+ lines) may cause autocomplete to skip — it works best on focused, smaller files

Cody Enterprise — self-hosted configuration

In VS Code settings.json:

{
  "cody.serverEndpoint": "https://sourcegraph.mycompany.com",
  "cody.customHeaders": {
    "X-My-Header": "value"
  }
}

Or configure via VS Code extension settings UI: search "Cody" → Server Endpoint.

  • Access token: get from your Sourcegraph instance → User icon → Settings → Access Tokens → Generate new token. Needs "read:user" and "read:org" scopes at minimum.
  • TLS issues: if your instance uses a self-signed certificate, add it to VS Code's trusted certificates via the NODE_EXTRA_CA_CERTS environment variable.
  • Cody Enterprise license: ensure your Sourcegraph instance has Cody enabled — it requires a Cody Enterprise license separate from a base Sourcegraph license.
🔔

Know when Sourcegraph Cody has an outage

Free email alerts. Star Cody on Prismix — no credit card needed.

FAQ

Cody vs GitHub Copilot vs Continue.dev — which is best?

Cody (free tier) uses Claude models and has a generous free quota. GitHub Copilot ($10/month) has the best GitHub integration. Continue.dev is fully open-source with bring-your-own-key. Cody's standout feature is Codebase Context — it can search your entire repo semantically, not just open files.

Does Cody work with JetBrains?

Yes. Install the Cody JetBrains plugin from the marketplace (search "Cody AI"). It has the same chat + autocomplete features as the VS Code extension. Configure the same Sourcegraph.com account.

What AI model does Cody use?

Free tier uses Claude 3.5 Sonnet for chat and StarCoder2 for autocomplete. Cody Pro offers Claude 3 Opus for complex tasks. Enterprise can be configured to use any supported model including GPT-4o.

Monitor related services