1. ai
  2. /tools
  3. /sourcegraph-cody

Sourcegraph Cody

Sourcegraph Cody is an AI coding assistant grounded in codebase search — it pulls context from indexed repos, not just open files, which helps in large monorepos.

Last reviewed: June 2026

Cody features and Sourcegraph Cloud vs self-hosted options change. Verify sourcegraph.com/cody and your enterprise contract.

What it is good at

StrengthDetail
Codebase contextRetrieval from Sourcegraph index across repos
MonoreposFinds symbols and usages without manual @Files
IDE extensionsVS Code, JetBrains, Neovim (verify current list)
Enterprise searchSame index powers human code search + Cody
CommandsCustom prompts (/test, /doc) in supported clients
Multi-repoCross-service context when index spans repositories

Setup

DeploymentSteps
Sourcegraph CloudSign up; connect GitHub/GitLab; install IDE extension
Self-hostedRun Sourcegraph instance; index repos; configure Cody with LLM provider

IDE: install Cody extension → sign in to Sourcegraph → select default LLM (verify org policy).

Docs: Cody quickstart.

Modes / core workflow

FeatureUse when
Chat with codebase context"Where is auth middleware applied?"
Inline editScoped change in current file
Custom commandsTeam-standard prompts for tests, docs
Deep SearchCross-repo symbol and reference questions

Typical loop:

  1. Ask question referencing symbols or behavior (not just filenames)
  2. Verify Cody's cited files — search can return stale index results
  3. Apply edits; run local tests
  4. Re-index if repo structure changed significantly

Compare with RAG for Codebases when building your own retrieval.

When to use it vs alternatives

Choose CodyChoose something else
Already on Sourcegraph EnterpriseCursor — no search index required
Huge monorepo; @Files failsMCP — live DB/API tools
Cross-repo navigation is daily painCopilot — simpler if repos are small
Compliance requires self-hosted indexClaude Code — terminal agent without search vendor

See Choosing an AI Coding Tool.

Limitations

  • Requires maintained Sourcegraph index — stale index → wrong context
  • LLM costs separate from Sourcegraph licensing in many plans
  • Less autonomous agent tooling than Cursor/Cline for multi-step terminal workflows
  • Not a replacement for code review or architecture decisions