One click in the Chat view's ⋯ menu shows the exact text the open Copilot chat sent to the model: system prompt by section, custom instructions, skills, every user message, tool call and result — read from Copilot's own session log.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
What did the Copilot agent actually get? This extension adds Show Loaded Context to the
⋯ menu of the Chat view, right under Show Agent Debug Logs. One click opens a page with
the exact text the open chat sent to the model:
the model requests, with input / cache / output tokens;
the system prompt split by section (bash, skill × 50, custom_instruction × 2, …),
with sizes, so you see what eats the context;
a timeline: runtime instructions, every user message as the model got it
(<current_datetime>, IDE selection…), the system prompt, assistant replies,
tool calls with their arguments, tool results, skills loaded, compaction summaries.
It reads Copilot's own session log, ~/.copilot/session-state/<session>/events.jsonl, and
finds which session the Chat view shows from VS Code's state. Nothing leaves your machine.
Not included: the JSON tool definitions. The log does not keep them; the page estimates how
many tokens they take, and Show Agent Debug Logs shows them.
Show Loaded Context of Session… lets you pick any recent session instead.
Works with chats run by the Copilot agent host (Copilot CLI sessions in VS Code).
Reading VS Code's state needs node:sqlite or the sqlite3 command (both present on macOS).