Before you compare these two, check whether you can actually buy one of them. Sourcegraph ended Cody Free and Cody Pro on July 23, 2025, and removed Cody from the Enterprise Starter plan the same day. The Cody docs now open with a single eligibility line: supported on Sourcegraph Enterprise. Sourcegraph's pricing page lists one plan, starting at $16K on a minimum annual contract.
GitHub Copilot starts at zero. Its organisation plans are $19 per seat for Business and $39 for Enterprise.
So for most people reading a "Cody vs Copilot" comparison, this isn't a choice. It's a migration question, or a renewal question, and the useful comparison is what each tool does with your code rather than which one wins on features.
TL;DR
Cody is Sourcegraph Enterprise only since July 2025, starting at $16K a year. Copilot runs from free to $39 per seat. Neither keeps your code on your hardware by default: Sourcegraph's own FAQ says self-hosted Cody ships snippets of up to 28 KB per request to Anthropic or OpenAI and needs internet access to work, and GitHub states Copilot is not available for GitHub Enterprise Server at all. The controls that actually differ are where the retrieval layer runs and how far your exclusion list really reaches.
What changed since most comparisons were written
Four vendor changes landed after the bulk of the "Cody vs Copilot" articles on the internet were published, and each one breaks a claim those articles make. Several of the pages ranking for this comparison still describe a Cody free tier and a $9 Pro plan.
Cody stopped being available to individuals. Sourcegraph's announcement is direct about it: as of July 23, 2025, Cody Free and Cody Pro are no longer available, and the Enterprise Starter plan no longer includes Cody. The Cody FAQ adds that the change "will not impact Cody Enterprise customers."
Copilot stopped being an OpenAI-only product. GitHub's supported models reference now lists models from OpenAI, Anthropic, Google, Microsoft, Moonshot AI, and xAI. Model choice was the standard argument for Cody in every older comparison, this one included. It's gone.
Copilot's content exclusions now reach its agents. Earlier versions of this page, and of GitHub's own docs, said agent mode in IDE chat did not support content exclusion. GitHub's content exclusion concepts page now marks chat and agent support for VS Code, Visual Studio, the Copilot CLI, the Copilot app and Copilot in the cloud. The gap moved rather than closed; the section on where those exclusions stop has the details.
Sourcegraph and Amp are different companies. When the free plans ended, Sourcegraph pointed individual developers at Amp. Then on December 2, 2025, the two split, with Dan Adler taking over as CEO of Sourcegraph and co-founders Quinn Slack and Beyang Liu launching Amp Inc.
If your developers moved from Cody to Amp, your vendor review is pointed at the wrong company. The DPA, the security questionnaire, and the risk register all say Sourcegraph. Amp is a separate legal entity now. That's a new vendor intake, not a renewal.
The self-hosting claim, corrected
This is the part that older comparisons get wrong most often, and the reason this page needed a rewrite rather than a retitle. Earlier versions of this article said self-hosted Cody means "code never leaves your network." That isn't what Sourcegraph says.
From the Cody FAQ, on running Cody with self-hosted Sourcegraph:
Cody operates by sending code snippets (up to 28 KB per request) to a third-party cloud service. By default, this service is Anthropic but can also be OpenAI. To use Cody effectively, your self-hosted Sourcegraph instance must have internet access for these interactions with external services.
Read that twice if you've been telling your security team otherwise. Self-hosting Sourcegraph moves the code graph in-house. It does not move the inference. Your repository index, your permissions, and your search layer sit on your hardware; the snippets that get retrieved still go out over the internet to somebody else's model.
There is a configuration where the air-gap argument holds, and it's narrower than "self-hosted." Sourcegraph states it does not collect or have access to prompts and responses for enterprise customers who bring their own LLM API key on a self-hosted deployment. That removes Sourcegraph from the data path. It does not remove the model provider, unless the endpoint that key points at is one you run yourself. Air-gapped Cody means self-hosted Sourcegraph plus an inference endpoint inside your own network, and that's a project, not a checkbox.
Do not buy either tool on an air-gap promise you haven't tested. If your compliance posture depends on code never reaching a third party, the thing to verify is the egress, not the marketing page. Point the instance at a test repo with a canary string in it and watch what leaves the network.
Where the code actually goes
| Sourcegraph Cody | GitHub Copilot | |
|---|---|---|
| Availability | Sourcegraph Enterprise only, since July 23, 2025 | Free, Pro $10, Pro+ $39, Max $100, Business $19, Enterprise $39 per seat |
| On-premises option | Sourcegraph instance yes, inference no | None. Not available for GitHub Enterprise Server |
| Where retrieval runs | Your instance, if self-hosted | GitHub infrastructure |
| Where inference runs | Anthropic or OpenAI by default, or your own endpoint with BYOK | GitHub infrastructure |
| Snippet size per request | Up to 28 KB, per Sourcegraph's FAQ | Not published as a fixed figure |
| Model providers | Multiple, configurable on Enterprise | OpenAI, Anthropic, Google, Microsoft, Moonshot AI, xAI |
| Training on your code | No, for Enterprise customers | No, for Business and Enterprise |
| File exclusions | Permission-scoped via Sourcegraph search | Content exclusions, agents included, not a filesystem boundary |
The row that matters most for a security review is the second one, and it reads the same for both tools once you're honest about it. Neither vendor gives you a deployment where the model never sees your code, unless you supply the model yourself.
Where Copilot's exclusions stop
Content exclusions are Copilot's main answer to "keep this file away from the AI." You list paths, GitHub stops its tools from reading them. Until recently the headline limit was that agent mode ignored the list. GitHub has since extended exclusion to its agents, and the limits that remain are quieter and easier to miss.
From GitHub's content exclusion documentation, as of November 2026:
- In an IDE agent, the Copilot CLI or the Copilot app, exclusion blocks Copilot's own file tools and checks file paths it can identify in commands and scripts, but "might not detect indirect file access." A script that builds the path at runtime, or a build step that reads the file for you, can still put its contents in front of the model.
- Exclusion "is not guaranteed to be respected by third-party MCP servers or clients." If your agent has a filesystem MCP server attached, your list is a request, not a rule.
- It does not apply to symlinks or to repositories on remote filesystems.
- Xcode and Eclipse support it for inline suggestions only, not for chat or agents.
- Copilot can still see semantic information from an excluded file that the IDE hands over indirectly, such as type information and hover definitions.
- Changes take up to 30 minutes to reach IDEs that already have settings loaded.
GitHub's own summary is the line to quote to your auditor: content exclusion "is not a filesystem security boundary." Teams add .env, secrets.json and /config/** to the list, report that secrets are excluded, and then wire up an MCP server or a symlinked config directory that walks straight past it.
The fix is upstream of the tool. An exclusion list is a control on what the assistant reads. It isn't a control on what's in the repository. If a live credential sits in a tracked file, every exclusion gap, every new IDE mode, and every future feature is another chance for it to leave. Remove the secret; don't route around it.
We see the downstream shape of this constantly in scans: hardcoded keys in files whose authors assumed some tool-level setting was keeping them private. The setting usually was doing its job. The file was the problem.
Choosing between them in 2026
Cody still makes sense if you already have a Sourcegraph Enterprise contract and a large multi-repo codebase where the code graph earns its keep. The retrieval quality across repositories is genuinely the thing Sourcegraph is good at, and running the index on your own hardware with permission-scoped retrieval is a real control. Budget for the $16K floor and for a BYOK inference endpoint if air-gapping is the point.
Copilot is the default for everyone else, which now includes every individual developer and every team without a Sourcegraph contract. Buy Business or Enterprise rather than Pro for anything commercial: that's the tier where the no-training and no-retention commitments apply. Then treat content exclusions as a guardrail rather than a boundary, and close the gaps with repository hygiene instead.
The honest summary is that the privacy comparison has narrowed. Copilot picked up model choice. Cody priced out everyone below enterprise. What's left is a retrieval-architecture difference and a cost difference, and neither tool will keep your code on your own hardware unless you build that part yourself.
What to check before either tool touches your repo
Both assistants read whatever's in the working tree. That makes the repository, not the vendor, the first thing to secure.
Can I still get Sourcegraph Cody?
Only on a Sourcegraph Enterprise contract. Cody Free and Cody Pro ended on July 23, 2025, and Enterprise Starter stopped including Cody the same day. The Cody docs now open with one eligibility line: supported on Sourcegraph Enterprise. Sourcegraph's pricing page lists a single Enterprise plan starting at $16K with a minimum annual contract.
Does self-hosted Cody keep my code inside my network?
No, not on a default install. Sourcegraph's Cody FAQ says Cody sends code snippets of up to 28 KB per request to a third-party cloud service, Anthropic by default and optionally OpenAI, and that your self-hosted instance must have internet access for those calls. Self-hosting moves the code graph in-house, not the inference. Bringing your own LLM API key removes Sourcegraph from the data path, but the model endpoint has to be yours before anything resembling an air gap exists.
Does GitHub Copilot only use OpenAI models?
Not anymore. GitHub's supported-models reference lists models from OpenAI, Anthropic, Google, Microsoft, Moonshot AI, and xAI. Model choice used to be the standard argument for Cody, and it isn't one now. Check which provider your team has actually selected before you write it into a vendor review.
Can I run GitHub Copilot on-premises?
No. GitHub's plans documentation states that Copilot is not currently available for GitHub Enterprise Server. Every plan is a cloud service on GitHub's infrastructure.
Do Copilot content exclusions cover everything?
No. GitHub now applies content exclusion to its agents in the IDE, the Copilot CLI and the Copilot app, but says plainly that it is not a filesystem security boundary. Agents might not detect indirect file access, third-party MCP servers aren't guaranteed to respect it, symlinks and remote filesystems aren't covered, and Xcode and Eclipse only support it for inline suggestions. If your policy is "secrets are excluded," those are the holes in it.
Check What Your Assistant Can Read
Exclusion lists only help if there's nothing dangerous left to exclude. CheckYourVibe scans your deployed app for hardcoded keys and exposed config, so the files Cody and Copilot read aren't the ones that hurt you.