Claude Code vs GitHub Copilot: the 5 decisions that survive a security review
Claude Code and GitHub Copilot differ on five deployment decisions rather than on features: where inference runs, what a developer can override locally, what the exclusion boundary really covers, whether spend attributes per developer, and what the audit log keeps. Pexon rates Copilot stronger on central policy and Claude Code stronger on per-developer cost attribution.
Five decisions, and a feature table answers none of them
Both products write code, run commands, read a repository and open a pull request. Feature comparisons between them go stale in weeks and decide nothing, because the two tools have converged on capability and diverged on where the control plane sits. GitHub Copilot enforces policy on GitHub's servers against the seat GitHub granted. Claude Code enforces policy on the endpoint, through a managed settings file or an MDM profile, and against whatever organisation the developer's credential belongs to.
That single structural difference produces every consequence below.
We run Claude Code on this site's own repository, which is how we found half of what follows — an AGENTS.md that forces the agent to read the framework's docs before writing code catches more than any permission rule does. We have not run a Claude Code or a Copilot rollout for a customer, so nothing below is drawn from one. The argument is structural: it rests on what each vendor documents its control plane can and cannot enforce, which is also the only part of this comparison that survives the next release of either product.
The state of play below is taken from each vendor's current documentation, read on 4 August 2026. Where a claim is not in a vendor doc, it is marked as our position rather than presented as fact.
The five decisions
What breaks if you skip it
| Decision | Claude Code | GitHub Copilot | What breaks if you skip it |
|---|---|---|---|
| Where inference runs | Your own AWS, Google Cloud or Azure account, via Bedrock, Vertex or Foundry | GitHub's tenant; pinned to the EU or the US with data residency, at 10% more AI credits | A residency answer that names a vendor instead of a region |
| Local override | Managed settings outrank every other scope and cannot be overridden | Policy is attached to the seat GitHub granted, so there is nothing on the laptop to override | A policy that holds in the pilot and not on a contractor's machine |
| Exclusion boundary | Read and Edit deny rules, not enforced against arbitrary subprocesses unless the sandbox is on | Content exclusion by repository path, explicitly not applied to Copilot CLI | A secrets story that a Python script walks straight through |
| Spend per developer | Analytics API returns estimated cost in cents USD per user per day, per model | Metrics API returns engagement, not cost; budgets cap spend per user, cost centre and enterprise | One invoice line, and no defensible case at renewal |
| Audit retention | Activity Feed queryable within a minute, retained six years, Claude Enterprise only | Audit log retained 180 days, local prompts explicitly excluded | A correlation window shorter than your own incident timeline |
Decision one: whose tenant runs the inference, and what measuring it costs
Claude Code can run inference in an account you own; GitHub Copilot cannot. Claude Code authenticates against Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry by environment variable, or through a self-hosted gateway that signs developers in with your own identity provider. Inference then bills through your cloud agreement, runs under your IAM policies and never establishes a commercial relationship between the developer and Anthropic at all.
Copilot's answer is a different shape and, for a lot of organisations, a sufficient one. GitHub documents Copilot with data residency as routing every Copilot request to model endpoints inside the enterprise's designated region, with code, prompts and responses never leaving that region during inference. The regions are the EU and the US. The price is stated on the same page: enforcing it increases AI credit consumption by 10 percent.
Ten percent for residency is the same premium AWS and Google charge for regional Claude endpoints, which is a coincidence worth noticing and not worth reading anything into.
What GitHub does not offer is your tenant. Its model hosting page is unusually candid about the topology: OpenAI models are hosted by OpenAI and by GitHub's Azure infrastructure, Anthropic models by Amazon Web Services, Anthropic PBC and Google Cloud Platform, xAI models on xAI, open-weight models on US-based Azure AI Foundry infrastructure managed by GitHub and Microsoft, and only Microsoft's own MAI-Code-1-Flash is described as hosted in GitHub's tenant. Data residency constrains the geography of that estate. It does not move any of it into your subscription.
Now the part that gets missed, and it is the reason this is decision one rather than decision five. Choosing your own tenant on the Claude side costs you the built-in measurement. Anthropic's documentation states that the Claude Code Analytics API tracks Claude Code usage on the Claude API only, and not usage through Bedrock, Microsoft Foundry, Google Cloud or Claude Platform on AWS. Operational telemetry follows the same pattern: metrics, error reports and feedback all default to off on those providers, and only turn on when the corresponding provider flag is set.
So tenancy and visibility pull against each other on exactly one of the two products. Take Bedrock for residency and you inherit an OpenTelemetry collector as a project, not a checkbox. That is a week of platform work, not a blocker, but it belongs in the estimate rather than in the surprise column.
Decision two: what a developer can override on their own laptop
Claude Code's managed settings scope cannot be overridden, and that is the whole enterprise story in one sentence. Anthropic documents five settings scopes with managed at the top, above command line arguments, local settings, project settings and user settings, delivered as a file, a drop-in directory, an MDM plist on macOS or a policy registry key on Windows. Two keys in that file do most of the governance work: disableBypassPermissionsMode, which removes the escape hatch, and forceLoginOrgUUID, which pins sessions to your organisation and exits at startup if the active credential belongs to a different one.
There is a documented hole in the pin, and it is the kind of thing a security review finds three months in rather than during the pilot.
Anthropic documents six login paths: the terminal login flow, the VS Code extension, the Agent SDK, claude setup-token, /install-github-app, and gateway sign-in for organisations routing through a cloud gateway. Three of those six enforce forceLoginOrgUUID — terminal, VS Code extension and Agent SDK. claude setup-token and /install-github-app enforce only forceLoginMethod, so those two can mint a token in a different organisation. Gateway sign-in is selected by forceLoginMethod rather than restricted by it, and never authenticates against an Anthropic organisation at all, so the org pin has nothing to bind to; Anthropic's instruction there is to restrict access at your gateway's identity provider.
Two further credential categories sit outside those six paths, and they fall opposite ways. Sessions authenticated by ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or apiKeyHelper are blocked by the keys, because organisation membership cannot be verified for an environment credential. Cloud provider sessions such as Bedrock are not blocked, because they authenticate against your cloud provider; the docs say plainly to restrict those through cloud IAM policies instead. Version matters too: only from Claude Code v2.1.212 does every path enforce forceLoginMethod, and before v2.1.146 the pin applied to the login flow alone and did not block API-key credentials.
Three of six login paths, plus environment credentials, is worth deploying. It is not worth describing to an auditor as a pin.
Copilot has no equivalent problem because it has no equivalent mechanism. Policies live on the enterprise's AI controls tab, the enterprise owner can enable, disable or delegate each one to organisations, and GitHub's documentation is explicit that where an enterprise owner has selected a specific policy, an organisation cannot override it. Model access is enumerated centrally: users can only access AI models enabled at the enterprise level. MCP servers can be restricted by allowlist policy and by a registry URL of approved servers. None of that requires shipping a file to a machine.
Our position: server-side policy is the better mechanism and the narrower reach. It governs the seat GitHub issued, completely and immediately. It has nothing to say about what else runs on that laptop, which is why organisations that pick Copilot for the admin model still end up needing the endpoint management they were hoping to avoid.
Managed settings
# The Claude Code control set worth deploying on day one.
# Managed settings outrank every other scope and cannot be overridden.
# https://code.claude.com/docs/en/settings
# https://code.claude.com/docs/en/iam
sudo mkdir -p "/Library/Application Support/ClaudeCode"
sudo tee "/Library/Application Support/ClaudeCode/managed-settings.json" >/dev/null <<'JSON'
{
"forceLoginMethod": "console",
"forceLoginOrgUUID": "00000000-0000-0000-0000-000000000000",
"permissions": {
"disableBypassPermissionsMode": "disable",
"deny": [
"Read(//**/.env)",
"Read(//**/*.pem)",
"Edit(//**/.env)",
"Bash(curl *)",
"Bash(wget *)",
"mcp__*"
]
},
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf"
}
}
JSON
# Two caveats the file cannot fix, both from Anthropic's own docs:
# 1. claude setup-token and /install-github-app enforce forceLoginMethod
# but not forceLoginOrgUUID, so they can mint a token elsewhere.
# 2. Read and Edit deny rules do not bind arbitrary subprocesses.
# For OS-level enforcement, turn on the sandbox.Decision three: the exclusion boundary is best-effort on both sides, and both vendors admit it
Neither product's file-exclusion feature is a data-loss control, and the honest version of this comparison says so about both. This is the section where a vendor-written page would pick a winner. There isn't one.
GitHub's content exclusion page lists its own limits without hedging. Copilot may still use semantic information from an excluded file when the IDE supplies it indirectly — type information, hover-over definitions for symbols used in code, and general project properties such as build configuration. Symbolic links are not honoured. Repositories on remote filesystems do not respect exclusions. Edit and Agent modes in Copilot Chat lack support across editors, and Xcode, Eclipse and Azure Data Studio have limited or no support at all.
Then the one that matters most now that everybody is running the agent rather than the completion: GitHub's Copilot CLI administration page states that file path-based content exclusions do not affect Copilot CLI. The exclusion list you spent a quarter negotiating with the security team governs the surface people are migrating away from.
Anthropic's boundary is drawn differently and leaks in a different place. Claude Code permission rules are evaluated deny, then ask, then allow, and a deny rule always wins — a broad Bash(aws *) deny blocks calls that a narrower allow rule also matches, so deny rules cannot carry allowlist exceptions. Read and Edit deny rules cover Claude's built-in file tools and the file commands Claude Code recognises inside Bash, such as cat, head, tail and sed.
And here is the sentence to take to the security review, because it is Anthropic's, not ours: those rules do not apply to arbitrary subprocesses that read or write files indirectly, like a Python or Node script that opens files itself. The documentation names the fix in the same breath — for OS-level enforcement that blocks all processes from accessing a path, enable the sandbox.
Both vendors are describing the same class of control and the same class of gap. An exclusion rule interpreted by the agent constrains the agent. It does not constrain the process tree the agent is allowed to start. If the requirement is that a file cannot be read, the control is a filesystem permission, a sandbox or a secrets manager, and the vendor feature is a relevance filter sitting on top of it.
- Ask which surfaces the exclusion applies to, by name — IDE completion, chat, agent mode, CLI, code review — and get the list in writing rather than as a product claim.
- Ask what happens to derived context: type information, symbol definitions, build configuration, and anything the IDE hands over without reading the file.
- Ask whether a subprocess started by the agent inherits the restriction. On both products today, the answer is no unless an OS-level boundary is doing the work.
- Test it rather than reading it: put a canary secret in an excluded path, then ask the agent to cat it, then ask it to write a three-line script that reads it. The second attempt is the one that tells you something.
- Decide who owns the gap once the test fails, because it will. Endpoint security owns it, not the team that bought the coding tool.
Decision four: only one of the two hands you a cost figure per developer
Claude Code produces a per-developer cost figure out of the box; GitHub Copilot produces a per-developer engagement figure and a spend cap. Anthropic's Claude Code Analytics API returns one record per user per day containing sessions, lines of code added and removed, commits and pull requests created through Claude Code, accept and reject counts for the Edit, MultiEdit, Write and NotebookEdit tools, and a model breakdown carrying input, output, cache-read and cache-creation tokens plus an estimated cost in cents USD. It is free for organisations with Admin API access, and data appears within about an hour.
GitHub's Copilot metrics REST API is a different instrument aimed at a different question. It reports usage statistics, user engagement and feature adoption at enterprise, organisation, repository and user level, with reports available from 10 October 2025 and a year of history. What it does not report is cost. Team-level views have to be assembled by joining user reports against team membership, because the API does not aggregate by team directly.
Copilot's cost control lives in billing instead, and it is genuinely better than Anthropic's on the containment side. Copilot Business includes 1,900 AI credits per user and Copilot Enterprise includes 3,900, pooled at the billing entity rather than held per person, with usage beyond the pool charged at $0.01 per AI credit and budget controls available at user, cost centre and enterprise level. Code completions and next edit suggestions stay unlimited on all paid plans and never draw on the pool.
So one product tells you what a developer cost and the other stops a developer costing more than you decided. Those are not the same control, and a FinOps team that assumes it is buying both will be disappointed by whichever one it picks.
The seat prices, meanwhile, are a distraction, and the arithmetic is worth doing once so nobody has the argument twice. Copilot Business is $19 per granted seat per month. A Claude Team standard seat is $20 per seat per month billed annually, or $25 billed monthly. For a hundred developers on annual terms that is $22,800 against $24,000 — a gap of $1,200 a year, which at GitHub's own $0.01 overage rate buys 120,000 AI credits, or roughly 63 developer-months of the Copilot Business allowance. The seat line is noise. The metered layer above it is the entire cost model.
The tier above is where that gets actively misleading, and the trap is that two different twenty-dollar figures sit on the same page. Team is $20 per seat per month billed annually, and that is the whole price. Enterprise also shows $20 per seat, but as a component — Anthropic's own wording is a seat price plus usage at API rates, with the rest through sales. The capabilities an enterprise is actually buying at that tier, among them role-based permissions and group management, are Enterprise-only, so they never come with the Team figure. Read either seat line alone and the comparison against Copilot Enterprise at $39 per granted seat per month is not a comparison at all.
The two seat fees do not buy the same thing, and this is the one number in this article worth reading twice. Anthropic states that the Enterprise seat fee covers access only and includes no usage — every token the team consumes is billed separately at standard API rates. That is also what separates it from the identically priced Team seat, which does include usage. Copilot Enterprise's $39 includes 3,900 AI credits per user, pooled at the billing entity, with overage at $0.01 per credit. So the cheaper seat is the one with the uncapped meter behind it, and any tier-for-tier table that stops at the seat price has the ranking backwards.
Decision five: what the audit log keeps, and what neither of them keeps
GitHub retains Copilot audit log events for 180 days; Anthropic retains Activity Feed events for six years. That is roughly twelve times the window a SIEM correlation can reach back into, and it is the cleanest single-number contrast in this entire comparison.
It is also less decisive than it looks, for two reasons.
The first is scope. Anthropic's Activity Feed is part of the Compliance API, which is a Claude Enterprise feature, and its content endpoints serve claude.ai data only — chats, files, projects and remote Cowork session transcripts. Six years of retention applies to the event stream, not to a Claude Code terminal session. GitHub's audit log covers plan settings, policy changes, license assignment and agent activity on the GitHub website, filterable with action:copilot and actor:Copilot.
The second is that both vendors have written down the same exclusion. GitHub states it directly: the audit log does not include client session data, such as the prompts a user sends to Copilot locally, and points organisations that need that data at hooks routing Copilot CLI events into their own logging service. On the Anthropic side the transcript is not absent, it is local — Claude Code clients store session transcripts in plaintext under ~/.claude/projects/ for 30 days by default, adjustable with cleanupPeriodDays.
Read those two facts together and the conclusion is the same for both products. The record of what an engineer actually asked, and what the agent actually did on their machine, is on that machine. Full-disk encryption, endpoint DLP and a retention decision about that directory are the controls. A vendor audit log tells you who was granted a seat and which policy changed, and that is a governance record rather than an incident record.
For anyone who has to satisfy a works council rather than an auditor, the useful consequence is the opposite of the usual one: the vendor sees less than people fear, and the laptop holds more than people expect.
The strongest argument for choosing Copilot anyway
Buy Copilot, because the control plane already exists and you already run it. Your repositories, your identities, your SSO, your audit log, your cost centres and your policy hierarchy are all in GitHub today. Copilot policies land in that same place, apply the moment they are saved, and require no MDM profile, no managed settings file, no endpoint rollout and no argument with the desktop team about who owns a JSON file in /Library.
That argument is the strong one, and we think it should win in most estates. Rollout speed is a real advantage, and a control that ships this quarter beats a better control that ships next year.
It stops winning at two specific requirements, and only two. The first is inference in an account you own — if the answer to "whose subscription processes this prompt" has to be "ours", data residency does not get you there and no amount of GitHub tenancy changes that. The second is a defensible cost figure per developer, which Copilot's metrics API does not produce and Claude Code's analytics API does.
Our position, stated plainly so it can be argued with: for a regulated European organisation whose code is the asset, Claude Code on Bedrock in an EU region is the stronger position, and the price is a telemetry project and a managed settings deployment. For everyone else, Copilot is the faster and cheaper answer, and choosing it is not a compromise.
What is not defensible is running both by accident, which is where most organisations already are, because a personal Copilot subscription and a personal Claude subscription both work perfectly well on a corporate laptop that nobody configured.
The order we run this in
Credentials first, policy second, telemetry third, and content exclusion last. The order matters because each step depends on a decision only the previous one can make, and because the step everyone starts with — the exclusion list — is the one that turns out to be worth least.
The single test worth running before any of it is the canary. Put a secret in an excluded path and try to get each agent to read it three ways: directly, through a shell command, and through a two-line script. The results decide how much of your security narrative rests on a vendor feature and how much has to rest on the operating system.
None of this needs a new platform. It needs a decision about which control plane you are prepared to operate, and the discipline to stop comparing features that will both exist by Christmas.
Sequence
The five steps, in that order
- Enumerate the credential paths, per product. Anthropic documents six login paths for Claude Code — terminal, VS Code extension, Agent SDK, setup-token, install-github-app and gateway sign-in — of which three honour forceLoginOrgUUID. Then two categories outside those six: environment credentials, which the pin does block, and cloud provider credentials, which it does not. For Copilot it is the seat, plus whatever personal subscription your endpoint management does not stop.
- Deploy the policy through the mechanism you already operate. Managed settings via MDM if you have MDM; the enterprise AI controls tab if your control plane is GitHub. Do not adopt a second endpoint management stack for a coding tool.
- Stand up the telemetry before the second team joins. On Claude Code that means an OpenTelemetry collector if you are on Bedrock or Vertex, and the Analytics API if you are on the first-party API. On Copilot it means the metrics API for adoption and budgets for containment, because those are two separate jobs.
- Aggregate at team level by default and keep per-user attribution only where a works council agreement or an equivalent policy already covers it. Both products can identify individual engineers; a telemetry stack that does so without agreement gets switched off, and then you have neither the data nor the trust.
- Run the canary test on a real machine with a real developer watching, and write down which of the three attempts succeeded. That single page is worth more in a security review than any comparison table, including this one.
Keep reading
- Claude in your own cloud tenant: Bedrock or Azure, under your own IAM roles
- Claude Code for enterprise: the three things that block sign-off past the first team
- Claude EU data residency: which platforms keep inference inside Europe, and what it costs
- LLM gateway for Claude: per-team budgets and audit-grade logging on one route
Questions we get asked when both tools are already in the building
Which is better for an enterprise rollout, Claude Code or GitHub Copilot?
Neither wins outright, because the two products put their control plane in different places. GitHub Copilot enforces policy server-side against the seat GitHub granted, so there is nothing to deploy to a laptop. Claude Code enforces policy through a managed settings file or an MDM profile on the endpoint, which is more work to ship and reaches further once shipped. Pick the one whose control plane you already operate.
Can a developer override a Claude Code policy we set centrally?
Not the settings themselves. Anthropic documents managed settings as the highest precedence scope, above command line arguments, local, project and user settings, and states they cannot be overridden. One gap is worth knowing: of the six login paths Anthropic documents, three enforce forceLoginOrgUUID — terminal, VS Code extension and Agent SDK. claude setup-token and /install-github-app enforce only forceLoginMethod, so those two can mint a token in a different organisation, and gateway sign-in does not authenticate against an Anthropic organisation at all, so the pin has nothing to bind to there.
Does GitHub Copilot content exclusion stop the agent from reading a secret file?
Not reliably, and GitHub says so. The documentation states that Copilot may still use semantic information from an excluded file when the IDE supplies it indirectly, such as type information, hover-over definitions and build configuration. Symbolic links are not honoured, repositories on remote filesystems do not respect exclusions, and file path-based content exclusions do not apply to Copilot CLI at all. Treat it as a relevance control, not a data-loss control.
Which of the two tells us what each developer costs?
Claude Code does, on the first-party API. The Claude Code Analytics API returns one record per user per day with estimated cost in cents USD broken down by model, plus sessions, lines added and removed, commits and tool acceptance rates. It is free for organisations with Admin API access. It does not cover Claude Code running on Amazon Bedrock, Google Cloud, Microsoft Foundry or Claude Platform on AWS, so choosing your own tenant costs you the built-in cost report.
Can either tool run inference inside our own cloud tenant?
Claude Code can, GitHub Copilot cannot. Claude Code authenticates against Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, so inference bills and runs in your own cloud account under your own IAM. Copilot runs in GitHub's tenant; the equivalent control is data residency, which pins all inference to the EU or the US and, per GitHub's documentation, increases AI credit consumption by 10 percent.
How long does each vendor keep the audit trail?
GitHub retains audit log events for 180 days and states plainly that the audit log does not include client session data such as the prompts a user sends to Copilot locally. Anthropic's Compliance API Activity Feed is queryable within one minute and retained for six years, but it is a Claude Enterprise feature and its content endpoints serve claude.ai data only. Neither vendor's audit surface holds the terminal transcript.
Where does the local session transcript actually live?
On the developer's machine, in both products. Claude Code stores session transcripts in plaintext under ~/.claude/projects/ for 30 days by default, adjustable with the cleanupPeriodDays setting. GitHub's guidance for capturing local Copilot CLI activity is to route events to your own logging service with hooks. Endpoint DLP and disk encryption are the controls here, not the vendor console.
What does it cost to get this decided rather than argued about?
The two-week blueprint is fixed at €4,900 net: the five decisions answered for your estate, the managed settings or policy set written and tested on real machines, the telemetry path that produces a cost figure per team, and the list of controls that turn out to be endpoint controls rather than vendor features. Rollout support runs from €7,500 per month.
Next step
Decide the control plane before the second team joins
Two weeks, fixed price. We answer the five decisions for your estate, write and test the policy set on real machines, stand up the telemetry that produces a cost figure per team, and hand back the list of controls that turn out to belong to endpoint security rather than to either vendor. The plan is yours to keep whether or not we build it.
