What I learned by putting GitHub Copilot behind a MitM proxy

(lighthousenewsletter.com)

16 points | by j0selit0 3 hours ago

3 comments

  • j0selit0 2 hours ago
    I was curious to understand how Copilot implements its harness, and also how I was exhausting my quota so quickly. End up going down a rabbit hole of intercepting its network traffic with mitmproxy.

    A few interesting things I found along the way:

    - watched model/capability discovery and routing happen in real time - looked at what gets injected into context and sent with ghost completions - found that recent edits can pull in context from files other than the one you're currently editing (including infamous .env) - found the SQLite session store behind Chronicle, including previous prompts/responses - watched the model query that history through tool calls

    I then went through the VS Code source to reconcile some of what I was seeing on the wire with the actual implementation.

    Overall some interesting lessons around how their harness is implemented.

  • bartek_gdn 19 minutes ago
    Nice one! Really shows why we should run those in sandboxes without env access. I like the proxy swap approach