How to Track AI-Generated Code from GitHub Copilot
Guide
GitHub Copilot accepts millions of suggestions a day — but git history only shows the developer who committed them. Here is how to add per-line Copilot provenance: which suggestion was accepted, from which session, reviewed by whom, and with what risk score. Free and self-hosted.
Why Copilot code needs tracking
Copilot code lands in three ways: inline suggestions accepted with Tab, Copilot Chat edits, and Copilot Workspace agent runs. None of them are visible in git — blame and PR history name only the human. Six months later nobody can answer which files are mostly Copilot-written? or did anyone actually review that 200-line generated block?
That gap matters for license exposure (Copilot can emit code similar to training data), security review, and emerging audit obligations under the EU AI Act.
How LineageLens captures Copilot activity
LineageLens Base is a VS Code extension that observes accepted Copilot insertions as they happen. For each acceptance it records: the file and line range, the session context, the developer, the accepted/rejected outcome, and a timestamp — all locally, no code leaves your machine.
The provenance record then gives every line a permanent history. lineagelens blame shows it inline: Copilot lines are marked with the session that produced them, alongside human-written lines.
Setup in 30 seconds
- Install LineageLens Base from the VS Code Marketplace — free, open-source, no account.
- Keep coding with Copilot normally. Capture starts immediately.
- Run
lineagelens blame <file>to see per-line AI attribution. - Team dashboard, risk scoring and CI gates: step up to Plus (self-hosted Docker + Postgres).
Copilot tracking FAQ
Does this work with Copilot Chat and Workspace?
Editor-level capture attributes accepted insertions from any Copilot surface; full prompt capture for agentic tools runs via the proxy layer.
Does it send my code anywhere?
No. Base capture is fully local. Every tier including the team dashboard is self-hosted.
Does it slow down the editor?
No — capture is passive, observing insertions without touching Copilot itself.