GitHub Copilot Coding Agent: Code Referencing Added for License Transparency

GitHub Copilot

GitHub added code referencing support to the Copilot coding agent, bringing the same source attribution capabilities previously available in inline completions to the agent's autonomous development sessions. When the coding agent generates code that matches public repositories on GitHub, the matching code is now flagged in the agent's session logs with a direct link to the original source, giving developers visibility into the code's origin and any applicable license. The feature does not support the "Block" mode of the public code matching policy β€” matching code is surfaced as an informational highlight in session logs rather than being blocked outright.


Code Referencing Comes to the Copilot Coding Agent

On February 18, 2026, GitHub extended its Copilot code referencing feature β€” previously limited to inline completions in IDEs β€” to the Copilot coding agent. The coding agent is GitHub's asynchronous, autonomous development assistant that takes on tasks independently, runs in a cloud environment powered by GitHub Actions, and delivers draft pull requests for human review. With this update, the agent's output is now subject to the same source attribution transparency that inline completions have supported.

How Code Referencing Works in Agent Sessions

When the Copilot coding agent generates code during an autonomous session and that code matches code found in a public GitHub repository, the matching code is highlighted in the agent's session logs. Each highlight includes a link back to the original repository, allowing developers reviewing the session to understand where the code pattern originated and evaluate what license terms, if any, might apply to their use of it.

This is particularly relevant because the coding agent can produce large volumes of code across many files in a single session, making manual review of potential public code similarities difficult. Surfacing matches automatically in the session logs reduces the chance of license compliance issues slipping through to a merged pull request.

Block Mode Limitation

An important constraint accompanies this feature: the coding agent does not support the "Block" policy mode of the "Suggestions matching public code" setting. In standard Copilot inline completions, the Block mode prevents suggestions from being shown at all when they match public code. In the coding agent context, blocking is not enforced β€” instead, matching code is highlighted in the session logs regardless of the policy setting. Organizations that rely on Block mode as a hard guardrail should be aware that this behavior does not carry over to agent sessions.

GitHub notes that a match between generated and public code does not automatically constitute copyright infringement, and it remains the responsibility of developers to review flagged matches, assess license obligations, and decide whether and how to attribute the code.

Availability

Code referencing is now available for all Copilot coding agent sessions. Developers can consult the GitHub Docs section "Finding public code that matches GitHub Copilot suggestions" for further details on how referencing works and how to interpret the session log highlights.