Practical Copilot Patterns
This section is opinionated, not comprehensive. It’s what works in practice — not every feature Copilot has, but the patterns that make you faster and less likely to waste time.
The 30-second version: Copilot has four modes, and choosing the right one is a skill. Inline is fastest for simple completions. Chat is best for exploration. Agent mode handles multi-file tasks. Coding agent works asynchronously. And sometimes the right mode is none — knowing when to skip AI entirely is just as important.
Choosing your Copilot mode
The first practical skill is knowing which mode to use. Here’s the decision framework:
| Mode | Where it runs | What it does | When it responds | You apply changes by… |
|---|---|---|---|---|
| Inline suggestions | IDE editor | Suggests code as you type | Instantly (< 1 second) | Accepting the suggestion (Tab) |
| Copilot Chat | IDE sidebar | Answers questions, generates code | Immediately (1–3 seconds) | Copy-pasting or applying via IDE action |
| Agent mode | IDE (foreground) | Edits files, runs commands, iterates | Synchronously (you wait and watch) | Automatic — agent edits your files directly |
| Copilot Coding Agent | GitHub cloud | Creates pull requests | Asynchronously (minutes to hours) | Reviewing and merging the PR |
When to use each mode
Use this decision table to pick the right mode for your task:
| If you want to… | Use this mode | Why |
|---|---|---|
| Write the next line of code | Inline suggestions | Fastest. No context switch. |
| Understand existing code | Copilot Chat | Conversational. You can ask follow-up questions. |
| Generate a single function or component | Copilot Chat | You can review the code before applying it. |
| Ask “how do I…?” questions | Copilot Chat | You want advice, not file edits. |
| Refactor multiple files | Agent mode | The agent can touch 3–10 files in one task. |
| Fix failing tests | Agent mode | The agent can run tests, read errors, and iterate. |
| Add a feature that spans backend + tests | Agent mode | The agent can edit code + write tests + verify they pass. |
| Work on a task while you’re offline | Copilot Coding Agent | It runs asynchronously and creates a PR for review. |
| Make changes that need code review before merging | Copilot Coding Agent | The PR workflow is built-in. |
| Debug complex logic | None — do it yourself | You need to understand the code to debug it. |
| Learn a new framework or language | None — do it yourself | Letting Copilot write the code means you don’t learn. |
Common mode-selection mistakes
Mistake 1: Using Copilot Chat when you should use agent mode
Symptom: You ask Copilot Chat to “refactor the auth middleware”, copy-paste code, realize tests weren’t updated, ask again… 20 minutes of back-and-forth.
Solution: Use agent mode. Give it the goal and let it handle the iteration.
Mistake 2: Using agent mode when inline suggestions would do
Symptom: You invoke agent mode to “add error handling” when you could have just typed try { and let inline suggestions finish it.
Solution: Use inline suggestions for small, local changes. Agent mode is for multi-file tasks.
Mistake 3: Using inline suggestions when you should use Copilot Chat
Symptom: You keep accepting and rejecting inline suggestions for 10 minutes, trying to get a complex function.
Solution: Open Copilot Chat, ask for the function, review it, then apply it.
What’s in this section
This section teaches three core skills:
- Prompting — what makes a good vs bad prompt for agent mode, with real examples
- Custom Instructions — practical patterns for
copilot-instructions.mdfiles that actually get read - When NOT to Use AI — when to skip Copilot entirely and code yourself
Why opinionated?
These pages reflect one developer’s experience with Copilot across hundreds of real tasks. Your mileage may vary. The goal is to give you a starting point that works, not to document every edge case.
Related Concepts
- Copilot Agent Mode — what agent mode is (read this before the prompting page)
- Instruction Files — what instruction files are (read this before the custom instructions page)
📍 Layer 2 — Practical Agent Patterns · Back to the AICA Onion
What’s next?
- Prompting — learn how to write effective prompts for agent mode