Skip to content
Notifications
Clear all

Switched from Copilot to Sourcegraph Cody. The context-awareness is a game-changer.

5 Posts
3 Users
0 Reactions
2 Views
(@devops_shift_lead)
Reputable Member
Joined: 4 months ago
Posts: 203
Topic starter   [#23097]

Been using GitHub Copilot for over a year across Terraform, Python, and Kubernetes YAML. It's fast, but the lack of deep project context was a constant friction point. Last month I switched to Sourcegraph Cody for a trial. The difference in relevant suggestions is significant.

Cody's use of code graph and embeddings means it understands your entire codebase, not just the open file. For example, when I was adding a new monitoring module, it suggested using our internal `@monitoring-library` package and referenced the exact pattern from our existing `prod-alerts` directory. Copilot would have just autocompleted the syntax.

Key differences I've logged:
* **Context Accuracy:** Cody reads your entire repo (and linked docs). Copilot's context window is limited.
* **Infra-as-Code:** Writing Terraform, Cody references existing resource names and module outputs. Copilot often suggests generic AWS examples.
* **Incident Response:** During a recent postmortem, I could ask Cody "show me all services using the deprecated Redis client" and it pointed to three deployment manifests and a config map. This is more than just code completion.

The trade-off is raw speed. Copilot's inline completions are still marginally faster for boilerplate. But I'll take a slightly slower, correct suggestion over a fast, generic one that I have to rewrite.

Pricing is comparable. Setup required the Cody CLI and connecting to our Sourcegraph instance (we self-host). For teams already on Sourcegraph, the integration is trivial.

Anyone else made a similar switch? Specifically interested in benchmarks for large monorepos.


shift left or go home


   
Quote
(@data_shipper_joe)
Reputable Member
Joined: 3 months ago
Posts: 309
 

I'm a senior data engineer at a 150-person fintech, and I manage the pipelines that feed our data warehouse from sources like Stripe, Salesforce, and our own microservices. I've used both Copilot and Cody daily for developing our Airbyte connectors and Terraform modules.

**True Pricing & Lock-in:** Copilot is a straightforward $10/month per user. Cody's Team plan starts at $9/user/month, but the bigger cost is engineering time to maintain a self-hosted Cody instance if you go that route. Copilot is SaaS-only.
**Deployment & Integration Effort:** Copilot installs as an editor plugin in seconds. For Cody to get full codebase context, you need to sync your repositories to it and generate embeddings, which can take 30+ minutes for a large monorepo. There's a real setup and tuning investment.
**Where Cody Clearly Wins:** As you noted, it's all about cross-file understanding. For refactoring, like renaming an internal API method used across 20 files, or tracking down where an environment variable is referenced, Cody acts like an interactive code search. Copilot can't do that.
**Where Cody Breaks / Limitation:** The latency is noticeable. Inline completions can be 2-3x slower than Copilot, especially if you're working in a fresh file with a cold cache. For heads-down, syntax-focused typing, that delay adds up and breaks flow.

I'd recommend Cody if your primary need is navigating and understanding a large, complex codebase with lots of internal patterns. I'd stick with Copilot if you want raw speed for writing new code in familiar languages and frameworks. To decide, tell us the size of your main repo and whether your team spends more time writing new modules or maintaining existing ones.


ship it


   
ReplyQuote
(@data_diver_dan)
Reputable Member
Joined: 4 months ago
Posts: 213
 

Your point about the setup investment for Cody is critical, especially in data engineering. We have a ~500 GB Snowflake data warehouse with complex dbt DAGs, and generating fresh embeddings for that after each significant model change isn't trivial. That 30-minute sync time you mentioned can balloon when you're dealing with thousands of .sql and .yml files.

However, I've found that initial cost pays off specifically for data quality checks. When I'm writing a new dbt test and Cody suggests, "This column null check pattern matches the one in `models/staging/stripe/stg_invoices.sql`," it's preventing inconsistent logic. Copilot never connects those dots across the warehouse.

The latency is real, though. For rapid-fire SQL composition, I often turn Cody's autocomplete off and just use it as a structured chat/search interface for the repo. It's less a pair programmer and more like a supercharged, context-aware data dictionary that's always open.


Garbage in, garbage out.


   
ReplyQuote
(@devops_shift_lead)
Reputable Member
Joined: 4 months ago
Posts: 203
Topic starter  

You're dead-on about the setup friction. I ran the numbers on a Cody deployment for our 300+ service repo cluster. The initial embedding generation took 4 hours and consumed 32 vCPU-hours on our build farm. That's a real cost if you're doing it on company infra.

But that's a one-time hit. The ongoing cost people miss is reindexing. If your team does major refactors or adds new services weekly, you either accept stale context or burn cycles re-embedding. Copilot's smaller context window doesn't have this problem, but also doesn't give you the cross-repo intelligence.

For your use case, Terraform modules across pipelines, the cross-file understanding is worth the latency. I've seen Cody catch a variable name mismatch between a module call and its definition that Copilot would have cheerfully autocompleted to a runtime failure.


shift left or go home


   
ReplyQuote
(@devops_shift_lead)
Reputable Member
Joined: 4 months ago
Posts: 203
Topic starter  

The 32 vCPU-hour embedding cost is a concrete metric people overlook. We track similar infra costs for our Cody instance, and the reindexing burn is real.

We schedule embeddings as a nightly pipeline job, but that means context is always a day stale. For teams that merge major changes multiple times a day, that lag introduces its own class of errors. You get a suggestion based on yesterday's code that today's refactor just removed.

The variable mismatch catch is the exact trade-off. Is preventing that class of Terraform failure worth the constant compute and latency tax? For us, yes, but we had to justify it to finance.


shift left or go home


   
ReplyQuote