One engineer intercepted GitHub Copilot's network traffic inside VS Code and found the local layer reading .env files, recent edits, and past prompts before any model call.
An independent engineer, Rafael of the Lighthouse AI newsletter, ran a local packet capture on GitHub Copilot inside VS Code to see what the AI coding tool sends. He used mitmproxy, a tool that records traffic between an app and the network, and compared the wire payloads against VS Code's open source code.
The captured traffic showed the local harness, the on-device routing layer that decides what the model sees, pulling recent edits from files outside the active tab, including a .env configuration file that holds secrets like API keys. The harness also read from a local SQLite database that stores past prompts and answers, and queried that history through tool calls before sending anything to a model.
The puzzle that started the probe: Copilot's monthly usage allowance was running out earlier each month. The packet capture suggests part of the burn came from context the local layer chose to attach, not just from prompts the user typed.
A Hacker News thread confirmed the same five findings and noted surprise that .env is not excluded by default. GitHub has not responded to the post. GitHub's customer terms are available as a reference, but the mechanism story is what the harness does on the machine, not what any policy permits.