GUIDE
How to debug GitHub Copilot agent mode
Last updated 2026-11-22
When Copilot's agent does something strange, the answer is usually in the requests it sent. Here is how to see them and what to look for.
What happens when the agent runs
One task in agent mode is a series of model calls. The model asks for a tool, Copilot runs it, and the result goes back to the model in the next call. Problems usually come from what was, or was not, in those calls.
Ways to inspect agent runs
- VS Code's Chat Debug view shows the requests behind a chat session.
- VacuumPrompts groups every model call under the prompt that started it and shows the inputs, outputs, instructions, tool definitions, tool calls and tokens for each one. Requests can be exported as JSON.
Common problems and what to check
- Ignoring your instructions: check whether your instructions file actually appears in the request.
- Stuck in a loop: look for the same tool call repeating across steps.
- Slow or expensive runs: find the steps with the largest inputs, usually long logs or many files.
- Wrong files edited: check which files were attached or read before that step.
Frequently asked questions
How do I see what Copilot agent mode did?
Use VS Code's Chat Debug view, or VacuumPrompts to see every model call and tool call grouped under your original prompt.
Why is Copilot ignoring my instructions?
Often the instructions file was not included, or it was buried in a very long context. Inspect the request to check.
Download VacuumPrompts free for Windows