GitHub Copilot interview questions show up in two places: a developer-tools role where the team uses Copilot daily, and the GH-300 certification exam. Both reward the same thing — you can explain how a suggestion is actually produced, not just recite what Copilot is.
This is a bank of 35 grouped questions and answers, current as of 2026. It starts with a short primer on how Copilot works, because every strong answer builds on it.
How to use this guide
Two audiences ask these questions. A hiring manager at a team that ships with Copilot wants to know if you understand the tool well enough to use it safely — they probe context, agent mode, and the security trade-offs. The GH-300 exam tests the same surface area but as multiple choice across defined domains.
Answers are scored on precision. "Copilot autocompletes code" is a weak answer. "Inline completions use a low-latency model through a fill-in-the-middle endpoint, while chat and agent mode default to a larger reasoning model" is a strong one. The interviewer is separating people who clicked install from people who understand the machine.
Read the primer first. Then drill the 35. If you want adjacent prep, the Claude Code interview questions and using Cursor for coding interviews guides cover the other two agents teams quiz on.
How GitHub Copilot works (the foundation every answer builds on)
Copilot is not one model doing one thing. It is a system: a client (your editor extension), a proxy service that GitHub runs, and a set of models behind it. A suggestion flows from your editor, through the proxy, to a model, and back. Understanding each hop is what turns a vague answer into a confident one.
The three layers matter because interviewers attack the seams. Where does context get assembled? What does the proxy strip out? Which model answers, and why are there several? Get those and you can reason about latency, privacy, and quality on the spot instead of guessing.
The model behind Copilot — default model, multi-model selection, low-latency completions
Copilot runs more than one model. Inline completions — the gray text that appears as you type — come from a small, fast model tuned for low latency, because you need a suggestion in well under a second. Chat, Edit, and Agent mode default to a larger general-purpose model (the cross-mode default has been GPT-4.1 since May 2025), and on Business and Enterprise plans you can switch the chat model from a picker: GPT family, Claude, and Gemini options appear depending on your plan and admin settings.
The interview point is the split. Completions and chat are different workloads. Completions optimize for speed and run constantly; chat optimizes for reasoning and runs on demand. If you say "Copilot uses GPT" without the latency split, you have missed half the design.
Context window and prompt assembly — what Copilot actually sends to the model
The model never sees your whole repo. The client assembles a prompt under a token budget and sends only that. For completions, the prompt includes the code before your cursor (the prefix), the code after it (the suffix), and snippets pulled from neighboring open tabs and similar files. For chat and agent mode, it adds the files you reference, recent edits, and any custom instructions.
So "context window" has two meanings, and good candidates name both. There is the model's hard token limit, and there is what Copilot chooses to fit inside it. The selection — which open files, which symbols, how much suffix — is the real lever on suggestion quality. That is also why closing irrelevant tabs and opening the right ones changes what you get.
The Copilot proxy — sanitization, prompt-injection checks, rate limiting
Between your editor and the model sits GitHub's proxy. It does a few jobs. It applies the optional code-referencing filter that blocks suggestions matching public code. It runs prompt-injection and abuse checks. It enforces rate limits and routes the request to the right model. On Business and Enterprise, it is also where the no-training guarantee is enforced — prompts and suggestions are not retained to train the models.
Name the proxy in an interview and you signal systems thinking. It is the layer that makes the privacy and IP guarantees real, not just a policy on a webpage.
Copilot Completions vs Chat vs Agent Mode (the modes interviewers test)
Modes are where interviewers separate casual users from power users. There are completions (passive, inline), chat (you ask), and several chat sub-modes — Ask, Edit, Agent. Knowing which one to reach for, and why, is a frequent live question.
| Mode | Initiation | Scope of changes | You review | Reach for it when |
|---|---|---|---|---|
| Inline completions | Passive, as you type | None (you accept ghost text) | The single suggestion | You want fast in-flow autocomplete |
| Ask | You ask a question | None — returns code you copy | Nothing lands automatically | Understanding code or one-off snippets |
| Edit | You name files | Multi-file diff you apply | The proposed diff | A known, bounded change across a few files |
| Agent mode | You give a task | Picks files, runs commands, iterates | Each step, live, in-editor | A fuzzy task where you do not know every file yet |
| Coding agent | You assign a GitHub issue | Works in its own cloud env | A pull request, after the fact | Delegated, asynchronous issue-to-PR work |
Inline completions and fill-in-the-middle
Inline completions are the original Copilot: ghost text as you type, accept with Tab. They use a fill-in-the-middle (FIM) approach. Instead of only predicting forward from your cursor, the model gets the prefix and the suffix and predicts the middle — which is why Copilot can complete a function body that sits between code you have already written above and below it.
That is the technical heart of completions. The request hits a dedicated completion endpoint, runs on the low-latency model, and is built from prefix plus suffix plus neighboring snippets. If asked "how is an inline suggestion different from a chat answer," FIM and the latency-tuned model are the two facts to state.
Ask, Edit, and Agent mode — what each does and when to use it
Copilot Chat has three working modes. Ask answers questions and returns code you copy in yourself — read-only, no file changes. Edit lets you name a set of files and Copilot proposes a multi-file diff you review and apply — you stay in control of scope. Agent mode is autonomous within your session: it decides which files to touch, runs terminal commands and tools, reads the results, and iterates until the task is done or it stops to ask.
When to use which: Ask for understanding and one-off snippets, Edit for a known, bounded change across a few files, Agent for a fuzzier task where you do not yet know every file involved. A strong candidate says they default to Edit for surgical work because the diff is reviewable, and reach for Agent only when the task genuinely needs exploration. This maps closely to the modes covered in agentic AI interview questions.
Agent mode vs the autonomous coding agent
This is the distinction most candidates miss. Agent mode runs inside your editor session, in real time, with you watching. The coding agent is a separate, asynchronous product: you assign it a GitHub issue, it spins up its own cloud environment, works on its own, and opens a pull request for review. One is interactive and local; the other is delegated and runs without you.
Say both clearly and you stand out. Agent mode = synchronous, in-editor, you supervise. Coding agent = asynchronous, cloud, issue-to-PR. Conflating them is the tell that someone has read marketing pages but not used the product.
GitHub Copilot interview questions: Fundamentals (Q1–Q8)
1. What is GitHub Copilot?
An AI pair-programming tool from GitHub and OpenAI that suggests code and answers questions inside your editor. It works as inline completions, a chat interface, and an autonomous agent. It supports VS Code, Visual Studio, JetBrains IDEs, Neovim, and the GitHub web and CLI.
2. What languages does it support?
Any language with enough public training data. It is strongest on popular languages — Python, JavaScript, TypeScript, Go, Java, C#, Ruby — and weaker on niche or proprietary ones. There is no hard allowlist; quality just tracks how much of that language the model saw.
3. How do you accept, reject, or cycle suggestions?
Tab accepts an inline completion, Esc rejects it, and you cycle alternatives with the next/previous suggestion shortcuts. You can accept word by word instead of the whole block. In chat, you apply a proposed edit explicitly rather than it landing automatically.
4. What plans does Copilot have?
Free (a capped monthly allotment of completions and chat), Pro, Pro+, Business, and Enterprise. Business and Enterprise add admin policy control, the no-training guarantee, and seat management. Enterprise adds organization-wide knowledge bases and deeper customization.
5. Does Copilot work offline?
No. Every suggestion is a round-trip to GitHub's servers and the model behind them. No network, no suggestions. This is a common warm-up — answer it without hedging.
6. What editors and surfaces does it run in?
VS Code, Visual Studio, the JetBrains family, Neovim, Xcode, plus GitHub.com (Copilot Chat in the web UI), the GitHub CLI, and the mobile app. The editor extensions carry the most features; completions and chat are the common core.
7. What is Copilot good at, and where does it fail?
Good at boilerplate, tests, repetitive patterns, unfamiliar syntax, and explaining code. It fails on novel logic, anything needing context it cannot see, and current library APIs — it confidently hallucinates method names that do not exist. The honest answer names both halves.
8. Is using Copilot allowed in a job interview?
For take-home and pairing rounds where the company explicitly allows AI tools, yes. For a clean-room algorithm screen, assume no unless told otherwise. The safe move is to ask. Some teams now run "interview with Copilot" rounds on purpose to watch how you drive it.
Models, context, and how suggestions are generated (Q9–Q15)
9. What model powers Copilot?
There is no single model. Inline completions run on a low-latency model through a fill-in-the-middle endpoint. Chat, Edit, and Agent mode default to GPT-4.1, with multi-model selection on paid plans letting you switch to Claude or Gemini options. The split exists because completions need speed and chat needs reasoning.
10. What is fill-in-the-middle and why does it matter?
FIM gives the model both the code before your cursor (prefix) and after it (suffix), so it predicts the middle rather than only continuing forward. It is why Copilot can fill a function body that already has code above and below it. Plain left-to-right prediction could not use the suffix.
11. What is Copilot's context window?
Two things. The model's token limit, and what Copilot decides to fit in it. For completions, that is prefix, suffix, and snippets from open and related files. For chat, it adds referenced files, recent edits, and custom instructions. Quality comes mostly from the selection, not the raw limit — the context window is really a budgeting problem, much like the retrieval trade-offs in RAG interview questions.
12. How does Copilot pick which files to send as context?
It pulls from open tabs, recently edited files, and files similar to the one you are in, then ranks snippets by relevance and packs the budget. That is why opening the files you want it to learn from — and closing noise — directly changes suggestions. It is the most actionable internals fact.
13. Why does the same prompt give different suggestions?
Sampling is non-deterministic (there is a temperature), and the assembled context changes as your open files and cursor move. Same intent, different context or different sample, different output. Strong candidates mention both causes.
14. How would you improve a bad suggestion without leaving the editor?
Give the model more of the right context: open the relevant files, write a clear function signature and a descriptive name, add a comment stating intent, and include a type or an example. You are shaping the prompt through the code around the cursor. This overlaps with prompt engineering interview questions.
15. Does Copilot retrieve from the internet or your whole repo?
Not by default for completions — it sees assembled local context, not live web or the full repo. Chat and agent mode can use indexed workspace context and, with the right setup, external tools through MCP. The base completion path is local context only.
Chat, Agent Mode, MCP, and custom instructions (Q16–Q22)
16. Explain Ask vs Edit vs Agent mode.
Ask is read-only Q&A returning code you copy. Edit proposes a reviewable multi-file diff over files you name. Agent is autonomous in your session — it picks files, runs commands, reads output, and iterates. Default to Edit for bounded changes; use Agent when the task needs exploration.
17. What is the difference between agent mode and the coding agent?
Agent mode is synchronous and in-editor: you watch it work. The coding agent is asynchronous: you assign it an issue, it works in its own cloud environment and opens a PR. Interactive-and-local versus delegated-and-remote. This is the highest-signal distinction in the set.
18. What is MCP and how does Copilot use it?
The Model Context Protocol is an open standard for connecting models to external tools and data through servers. Copilot can act as an MCP client, so agent mode can call out to a database, a ticketing system, or a docs server you have wired up. It is how Copilot reaches beyond the editor.
19. What are custom instructions?
A repo-level file (a .github/copilot-instructions.md) where you state project conventions — framework, style, test approach, dos and don'ts. Copilot loads it into context so suggestions match house rules without you repeating yourself. The team-level version of prompt shaping.
20. How does Copilot Chat know about your codebase?
Through workspace context: it indexes and references your open project so you can ask "where is auth handled" and get repo-specific answers. On Enterprise, knowledge bases let it pull from designated docs and repos across the org.
21. Can Copilot run and read terminal commands?
In agent mode, yes — it runs commands, reads stdout and stderr, and uses the result to decide the next step (run tests, see a failure, fix it). You can gate this so it asks before executing, which most teams keep on.
22. How would you stop agent mode from going off the rails?
Scope it: name the task tightly, keep command approval on, work on a branch, and review the diff before merge. Treat it like a junior who is fast but needs supervision. Containment is the answer interviewers want, not blind trust.
Prompt strategies for better Copilot suggestions (Q23–Q27)
23. What is the single biggest lever on completion quality?
Context. Open the files Copilot should learn from, write a precise function signature, and name things descriptively. The model predicts from what surrounds the cursor, so you control output by controlling that surrounding code.
24. How do comments change suggestions?
A clear comment stating intent above a function acts as a mini-prompt. "// parse the ISO date and return epoch millis, throw on invalid" gets a far better body than an empty function. Vague comments get vague code.
25. How do you get Copilot to write tests well?
Open the file under test so its signatures are in context, then ask in Edit mode for tests covering the happy path and named edge cases. Point at an existing test file so it copies your framework and style. Specify the edge cases — it will not invent the ones you care about.
26. What is "prompt crafting" inside the editor versus in chat?
In the editor you craft through code: signatures, names, types, comments, open files. In chat you craft through natural language: state the goal, the constraints, the files, and the format you want. Both are prompt engineering; the surface differs.
27. When should you stop prompting and just write it yourself?
When the logic is novel, security-sensitive, or you have re-prompted twice without a usable result. Past that point you are spending more time steering than coding. Knowing when to drop the tool is itself a senior signal.
Security, privacy, and IP — code referencing filter and indemnification (Q28–Q32)
28. Does Copilot train on my code?
On Business and Enterprise, no — prompts and suggestions are not used to train the models, by contract. On individual plans, training behavior depends on the settings you choose; you can opt out of having snippets used for product improvement. The clean answer is: Business/Enterprise carry a no-training guarantee.
29. What is the code-referencing filter?
An optional filter (also called the public-code-match or duplication-detection filter) that checks a suggestion against public code on GitHub and blocks or flags suggestions that match. Turn it on and Copilot suppresses verbatim public-code matches, which lowers the risk of pulling in licensed code unknowingly.
30. How does IP indemnification work?
GitHub offers IP indemnification for Copilot on paid plans — but only when the code-referencing/duplication filter is enabled. The trade-off is the whole point: you accept the filter (occasionally fewer suggestions) and in return GitHub backs you on third-party IP claims over Copilot output. No filter, no indemnity. State that link precisely.
31. What data leaves your machine?
The assembled prompt — code context, your chat messages, file references. It goes to GitHub's proxy and the model, comes back, and on Business/Enterprise is not retained for training. Secrets in context can be sent, which is why you keep credentials out of files Copilot can see.
32. How do you use Copilot safely on a private or regulated codebase?
Business or Enterprise plan for the no-training guarantee, code-referencing filter on for indemnity, admin policies to restrict models and features, and review discipline so nothing lands unreviewed. Keep secrets out of the editor context entirely.
Enterprise features, limitations, and using Copilot well in real engineering (Q33–Q35)
33. What do Business and Enterprise add over Pro?
Admin policy control over features and models, the no-training guarantee, seat and license management, and audit logs. Enterprise adds organization knowledge bases, deeper customization, and the coding agent for issue-to-PR work at scale.
34. What are Copilot's real limitations in production engineering?
It hallucinates APIs, it cannot see context outside what is assembled, it has no real understanding of your business logic, and over-reliance erodes review discipline. The failure mode on teams is engineers merging plausible-looking code they did not actually read. Name the human risk, not just the model's.
35. Tell me about a time Copilot was wrong and what you did.
Have a real story. Mine: it suggested a method on a library that did not exist — confident, well-named, fake. I caught it because the test failed, checked the docs, and wrote the real call. The lesson is to verify generated API calls against docs and to treat green tests, not green suggestions, as the bar. This review reflex is exactly what AI engineer interview questions probe.
GH-300 GitHub Copilot Certification: how these questions map to the exam domains
The GH-300 certification (reportedly refreshed for early 2026) tests roughly these domains: responsible AI and ethics; Copilot plans and features; how Copilot works and its data flow; prompt crafting; developer use cases; testing with Copilot; and privacy, security, and IP.
The 35 above map cleanly. Q1–Q8 and Q33 cover plans and features. The primer plus Q9–Q15 cover how it works and data flow. Q23–Q27 cover prompt crafting. Q25 and Q34 cover testing and use cases. Q28–Q32 cover privacy, security, and IP — the domain candidates lose the most points on, so over-index there. For the version-specific exam objectives, check the official GitHub Copilot docs.
Sample strong vs weak answer
Question: "What model does Copilot use?"
Weak: "It uses GPT to autocomplete your code." True but shallow. It reveals no understanding of the system, and an interviewer learns nothing about you.
Strong: "There isn't one model. Inline completions run on a low-latency model through a fill-in-the-middle endpoint, so suggestions land in under a second. Chat, Edit, and Agent mode default to GPT-4.1, and on paid plans you can switch to Claude or Gemini from the model picker. The split is deliberate — completions optimize for speed and run constantly, chat optimizes for reasoning and runs on demand."
Same question. The second answer names the latency split, the FIM endpoint, the default, multi-model selection, and the reason. That is the gap between a user and a power user, and it is exactly what the question is built to expose.
FAQ
Is Copilot allowed in coding interviews? In take-homes and pairing rounds where the company says AI tools are fine, yes. In a clean-room algorithm screen, assume not unless told. Always ask. Some teams now run Copilot-enabled rounds specifically to evaluate how you use it.
Does Copilot train on my code? On Business and Enterprise, no — there is a contractual no-training guarantee, and prompts and suggestions are not retained for training. On individual plans it depends on your settings, and you can opt out.
What model does GitHub Copilot use? A low-latency model for inline completions via a fill-in-the-middle endpoint, and GPT-4.1 by default for chat, Edit, and Agent mode, with Claude and Gemini selectable on paid plans.
What is the difference between agent mode and the coding agent? Agent mode is synchronous and runs in your editor while you watch. The coding agent is asynchronous — you assign it an issue and it opens a PR from its own cloud environment.
Practice with realistic mock interviews
Reading this bank gets you through a recruiter screen. Onsites filter on whether you can explain the internals out loud and defend a mode choice under pushback. Interview Coder runs timed mocks against this exact rubric with live feedback. Its answer engine runs on Claude Sonnet 4.6, Anthropic's latest Sonnet, and it ships as a desktop app with 20+ stealth features, used by 100K+ developers with face-shown video recordings of real interviews. Plans: Free at $0, Monthly Pro at $299, or Lifetime Pro at $799 one-time. Two mocks a week for three weeks and the answers stop sounding rehearsed. Full disclosure: this guide is published by Interview Coder, its own product.


