Sourcegraph Cody: Navigate Large Codebases (2026)
🚀 Quick start
- Open Cody Chat in your IDE and scope every question to a directory or symbol.
- Use /explain for architecture overviews and @references for precise symbol lookups.
- Trace data flows with Mermaid output to visualize call chains.
- Verify plan limits before relying on large-context or multi-repo features.
💡 Why use Sourcegraph Cody for this
Sourcegraph Cody is an AI coding assistant that combines IDE chat with Sourcegraph's code search and code intelligence. The practical workflow in this guide is: scope a question to a directory or symbol, ask Cody to explain or trace it, then drill down with follow-up questions. This is useful for mapping dependencies and tracing data flows in large codebases without opening files one by one.
Plan gotchas matter here. Free and Pro tiers have context and repository limits, while Enterprise tiers unlock larger context windows and multi-repo search. Feature availability and pricing change; verify current limits on Sourcegraph's official pricing page before you build a workflow around them. Pricing and plan details in this guide were checked on 2026-10-15.
🛠️ How to Navigate Large Codebases (6 steps)
Step 1
Open the Cody Chat panel in your IDE. In VS Code, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run 'Cody: Open Chat'. In JetBrains, open the Cody tool window from the right sidebar.
Step 2
Scope your first question to a directory. Type '/explain' followed by the directory path, for example: /explain src/main/java/com/example/service. Press Enter.
Step 3
Ask a follow-up that names a specific symbol. For example: 'Show me the interface and implementation of the UserRepository class, and list all files that depend on it.'
Step 4
Trace a data flow by naming the entry point and the destination. For example: 'Trace the data flow from the createUser endpoint to the database. List each function and file involved.'
Step 5
Use @references to pin a specific symbol when Cody's answer is too broad. Type '@' and select the symbol from the picker, then ask your question.
Step 6
Run '/search' before architecture questions when you are unsure which files are relevant, then reference the results in your next question.
📦 What you'll get
For a directory-scoped /explain request, Cody typically returns a structured summary: a list of files, a short purpose statement for each, and the dependencies it can infer from the indexed context. For a data-flow trace, it returns an ordered chain of functions with file paths and a short description of each transformation.
💰 Pricing (checked 2026-10-15)
| Plan | Price | What you get for this workflow | Official link |
|---|---|---|---|
| Free | $0 |
Individual use with limited chat and autocomplete requests; context and repository limits apply. | pricing ↗ |
| Pro | $9/user/month |
Higher usage limits for individual developers; check current context and model limits. | pricing ↗ |
| Enterprise Starter | $19/user/month |
Team features, larger context, and multi-repo search; verify current limits. | pricing ↗ |
| Enterprise | Custom |
SSO, audit logs, self-hosted or cloud deployment options, and enterprise support. | pricing ↗ |
📋 Copy-paste prompts
"/explain the structure of [src/main/java/com/example/service]. Output as a markdown table with columns: File Name, Purpose, Dependencies."
"Trace the full data flow from [function name] to the database. List every function, its file path, and the transformation it performs. Use Mermaid syntax to show the flow."
"Create a step-by-step plan to replace [library/framework] with [new_library]. For each step, list the files that need changes, the exact code modifications, and any potential risks."
⚠️ Common mistakes
⚖️ Sourcegraph Cody vs Alternatives
| Tool | Price | Best For | Verdict |
|---|---|---|---|
Free tier available; Pro $10/month; Business $19/user/month; Enterprise $39/user/month (checked 2026-10-15) |
Teams already standardized on GitHub who want inline completions and chat inside VS Code, JetBrains, and Neovim. | ||
Free tier available; Pro $20/month; Business $40/user/month (checked 2026-10-15) |
Developers who want an AI-first editor with strong codebase indexing and multi-file edits. |
❓ Frequently Asked Questions
Q: Is Sourcegraph Cody free?
Yes, there is a free tier for individual use with limited chat and autocomplete requests. Paid plans start at $9/user/month for Pro and $19/user/month for Enterprise Starter. Check the official pricing page for current limits.
Q: Does Cody work with VS Code and JetBrains?
Yes. Cody is available as an extension for VS Code and as a plugin for JetBrains IDEs. The chat panel and command names differ slightly between the two.
Q: What is Cody's context window?
Context window size depends on your plan and the model selected. Sourcegraph has advertised a 1-million-token context window on enterprise plans, but you should verify the current limit for your tier on the official pricing page.
Q: Can Cody search across multiple repositories?
Multi-repo search is an enterprise feature. Free and Pro tiers are limited to the repositories you have indexed locally or connected. Verify your plan's repository limits before relying on cross-repo answers.
Q: Is my code sent to a third party?
Cody sends code context to the configured LLM provider to generate answers. Enterprise plans offer more control over data handling and deployment. Review Sourcegraph's security and privacy documentation for your plan.
Q: How accurate is Cody for architecture questions?
Accuracy depends on indexing quality, repository size, and how precisely you scope your question. Always verify critical dependency and data-flow answers against the actual code. [TODO: our test] measure accuracy on a real repository.
🚀 Level up your AI toolkit
Understand AI in 5 minutes a day. No jargon. No hype. Unsubscribe anytime.