A security researcher conducted an in-depth analysis of GitHub Copilot by routing all network traffic from Visual Studio Code through an mitmproxy instance configured as a man-in-the-middle proxy.
The study began with the observation that Copilot rapidly consumes monthly request quotas, prompting an investigation into its internal communication patterns. Because Visual Studio Code and Copilot are built on Electron, the researcher first mapped the application’s network architecture, distinguishing between Chromium-based renderer processes and Node.js HTTP requests.
Proxy Setup and Traffic Interception
After installing mitmproxy via Homebrew and configuring VS Code proxy settings (Http Proxy, Strict SSL disabled, Proxy Support set to override), the researcher launched mitmweb to capture live requests. Additional steps included restarting the Extension Host process to ensure fresh connections were routed through the proxy.
Traffic analysis showed multiple request categories even before any code was typed: authentication and session management via OAuth, configuration and policy retrieval, MCP registry access, repository and session context, model discovery, and recent repository listings.
Model Intent Routing and Prompt Construction
In Auto mode, Copilot sends each prompt to the /models/session/intent endpoint for classification into categories such as code-gen, debugging, or tool-use. The resulting classification determines which model handles the request.
Inline suggestion requests were observed to include the current file path and content from recently edited files. When a fake secret was placed in a .env file, the secret appeared in prompts generated while editing an unrelated pyproject.toml file, demonstrating that context collection is not limited to the file where suggestions are enabled.
Local Session History and Chronicle Tool
Many requests referenced a tool named session_store_sql that can execute read-only SQLite queries against a local database called session-store.db. The database stores session summaries, user prompts, LLM responses, repositories, branches, and checkpoints.
When the researcher asked Copilot what work had been done the previous week, the model first attempted an invalid query, performed schema introspection, and then successfully retrieved records from the local store using the Copilot Chronicle skill.
The findings illustrate how GitHub Copilot maintains persistent local state and incorporates broad context into prompts sent to remote models.

