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
| Strength | Detail |
|---|---|
| Codebase context | Retrieval from Sourcegraph index across repos |
| Monorepos | Finds symbols and usages without manual @Files |
| IDE extensions | VS Code, JetBrains, Neovim (verify current list) |
| Enterprise search | Same index powers human code search + Cody |
| Commands | Custom prompts (/test, /doc) in supported clients |
| Multi-repo | Cross-service context when index spans repositories |
Setup
| Deployment | Steps |
|---|---|
| Sourcegraph Cloud | Sign up; connect GitHub/GitLab; install IDE extension |
| Self-hosted | Run 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
| Feature | Use when |
|---|---|
| Chat with codebase context | "Where is auth middleware applied?" |
| Inline edit | Scoped change in current file |
| Custom commands | Team-standard prompts for tests, docs |
| Deep Search | Cross-repo symbol and reference questions |
Typical loop:
- Ask question referencing symbols or behavior (not just filenames)
- Verify Cody's cited files — search can return stale index results
- Apply edits; run local tests
- Re-index if repo structure changed significantly
Compare with RAG for Codebases when building your own retrieval.
When to use it vs alternatives
| Choose Cody | Choose something else |
|---|---|
| Already on Sourcegraph Enterprise | Cursor — no search index required |
Huge monorepo; @Files fails | MCP — live DB/API tools |
| Cross-repo navigation is daily pain | Copilot — simpler if repos are small |
| Compliance requires self-hosted index | Claude 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