← Back
GitHub
GitHub Copilot coding agent now supports code referencing with public repository tracking

Code Referencing Now Available in Copilot Coding Agent

GitHub has extended its code referencing feature to the Copilot coding agent, enabling the autonomous background agent to track and surface code matches from public repositories. When the agent generates code that matches existing public code on GitHub, the matching code is highlighted directly in the agent session logs with a link to the original source.

What This Means for Developers

This addition provides critical transparency into code origins:

  • Visibility into matches: Generated code that matches public repositories is flagged in session logs
  • License awareness: Links to original code help developers understand applicable licenses
  • Provenance tracking: Clear attribution for where suggestions originate

Important Policy Behavior

The feature has one key limitation: the "Block" mode from the "Suggestions matching public code" policy is not enforced in the coding agent. When a policy is set to Block, matching code suggestions will not be prevented; instead, they will be highlighted in session logs for transparency.

Developers relying on strict blocking behavior should be aware of this exception when using the autonomous agent.

Next Steps

For detailed information on configuring and using this feature, see the GitHub documentation on finding and viewing code references for the Copilot coding agent.