GitHub Copilot: AI Coding Assistant and Autonomous Agent
What you’ll learn
Section titled “What you’ll learn”- The full GitHub Copilot product suite: autocomplete, chat, Agent Mode, the coding agent, and the CLI.
- How the multi-model selector works and when to choose Claude over GPT for a given task.
- How the Copilot coding agent creates pull requests from GitHub Issues autonomously.
- Configuring team standards and project context with
.github/copilot-instructions.md. - How Copilot compares with Cursor, Claude Code, and Windsurf across different workflows.
Summary
Section titled “Summary”GitHub Copilot is Microsoft and GitHub’s AI coding assistant, available as an extension for VS Code, Visual Studio, JetBrains IDEs, Vim, Neovim, and the GitHub web interface. It is the most widely deployed AI coding tool in the industry, used across millions of developers. Powered by OpenAI and offering optional access to Anthropic Claude and Google Gemini models, Copilot spans the full development lifecycle — from keystroke-level autocomplete to fully autonomous pull request creation from a GitHub issue.
Unlike purpose-built IDE forks such as Cursor or Windsurf, Copilot works inside your existing editor as an extension. That means no migration friction: you keep your existing extensions, keybindings, and workflows.
The product suite
Section titled “The product suite”Copilot is not a single tool but a suite of capabilities that have expanded significantly since the original autocomplete-only product launched in 2021.
| Product | Where it runs | What it does |
|---|---|---|
| Copilot autocomplete | IDE extension | Suggests completions as you type, from single tokens to entire functions |
| Copilot Chat | IDE extension, github.com | Conversational assistant with codebase-aware context symbols |
| Agent Mode | VS Code | Multi-step autonomous task execution with tool calling in the editor |
| Copilot coding agent | GitHub.com / Issues | Cloud-based agent that opens a full pull request from an issue |
| Copilot CLI | Terminal | Agentic terminal agent: reads code, edits files, runs commands |
| Copilot Extensions | IDE + github.com | Third-party integrations: Datadog, Docker, Sentry, Mermaid, and others |
Autocomplete
Section titled “Autocomplete”The original Copilot feature suggests continuations as you type. It is trained on billions of lines of open-source code, which makes its completions idiomatic rather than just syntactically valid.
What it draws on:
- The current file and open editor tabs
- Comments and docstrings (a detailed comment above a function dramatically improves suggestions)
- The file name and directory path (naming a file
payment-processor.tsactivates payment-related patterns)
Keyboard shortcuts in VS Code:
Tab— accept suggestionEsc— dismissAlt+]/Alt+[— cycle through alternative suggestionsCtrl+Enter— open the suggestions panel showing up to 10 alternatives
Copilot Chat
Section titled “Copilot Chat”Chat is a conversational panel inside the IDE with codebase-aware context symbols:
@workspace — reference your entire open project (indexes all files)@file — pin a specific file into the conversation#selection — reference the currently highlighted code#terminal — include recent terminal outputCommon productive prompts:
@workspace where is the payment processing logic?Explain #selection and list its edge casesWrite unit tests for @file covering the error pathsFix the TypeScript error in #terminal
Chat supports multi-turn conversations, so you can iterate: ask for a draft, then say “make the error handling more defensive” or “also cover the concurrent update case.”
Agent Mode
Section titled “Agent Mode”Agent Mode in VS Code gives Copilot the ability to call tools — read files, edit files, run terminal commands, and inspect their output — in a continuous loop until the task is complete.
Enabling it: open Copilot Chat in VS Code, switch from Ask to Agent in the mode selector.
A typical agentic session:
Add idempotency key checking to the refund endpoint in src/handlers/refund.ts.Store the key in a PostgreSQL table and return 200 with the cached response on replay.Write unit tests covering the fresh-request and replay paths.Copilot reads the handler, the existing test file, and the database schema; proposes changes; runs npm test; and fixes any failures before showing you the final diff. All file changes are shown in a unified review pane before being applied.
Configuring project context with .github/copilot-instructions.md
Section titled “Configuring project context with .github/copilot-instructions.md”Place a file at .github/copilot-instructions.md in any repository to give Copilot persistent context about the project. This is Copilot’s equivalent of CLAUDE.md or .cursorrules:
# OrdersPortal — Copilot Instructions
## Stack- Node.js 22, TypeScript 7, PostgreSQL 17- Express with Zod schema validation- Testing: Vitest + Supertest
## Architecture rules- Handlers call service layer only — no direct database access from handlers- All monetary values use the Money value object (src/lib/money.ts)- Repository interfaces live in src/domain/ — never import from src/infrastructure/ directly
## Commands- Test: npm test- Build: npm run build- Lint: npm run lintCopilot reads this file at the start of every chat and agent session. It is especially useful for enforcing architectural boundaries that are easy to violate accidentally.
The Copilot coding agent
Section titled “The Copilot coding agent”The coding agent goes further than Agent Mode: it works entirely in the cloud, reading your GitHub repository, making changes on a branch, and opening a pull request — all from a GitHub issue.
How to trigger it:
- Create or open a GitHub issue describing the feature or bug.
- Click Assign to Copilot in the issue’s assignees panel (or type
@copilotin a comment). - Copilot starts a cloud-based GitHub Actions environment, reads the codebase, and begins working.
- When done, it opens a pull request with its changes.
- Leave review comments on the PR; Copilot pushes follow-up commits in response.
This workflow is well-suited to well-defined tasks with clear acceptance criteria in the issue — adding a field to a form, fixing a known bug with a reproduction case, or adding a configuration option. It is less reliable for open-ended design work where the right approach is not yet settled.
Copilot CLI
Section titled “Copilot CLI”The Copilot CLI is a terminal-native agentic tool, separate from the IDE extension:
npm install -g @github/copilotcopilotOnce running in a project directory, it functions similarly to Claude Code: it reads your files, runs commands, edits code, and iterates on failures. The integration with GitHub means it can read issues and PRs from the repository you are working in.
The older gh copilot suggest / gh copilot explain commands (the GitHub CLI extension) were retired in October 2025. The standalone @github/copilot CLI is the current replacement.
Multi-model selection
Section titled “Multi-model selection”Copilot lets you choose the foundation model for each session. The available lineup changes as providers ship new releases:
| Model | Provider | Characteristics |
|---|---|---|
| GPT-6 family (Terra, Sol, Astra) | OpenAI | Fast, broad training, strong on common patterns |
| Claude Sonnet 5.5 / Opus 5.5 | Anthropic | Long context, careful reasoning, strong on code quality |
| Gemini models | Speed and large context window |
Practical guidance: GPT models are fast and adequate for most autocomplete and chat tasks. Switch to Claude Opus or Sonnet for multi-file refactoring where instruction-following precision matters more than latency. Availability varies by plan.
GitHub Copilot vs Cursor vs Claude Code
Section titled “GitHub Copilot vs Cursor vs Claude Code”| Feature | GitHub Copilot | Cursor | Claude Code |
|---|---|---|---|
| Works in existing IDE | Yes — extension | No — requires Cursor IDE | Yes — terminal |
| JetBrains support | Yes | No | Via terminal |
| Vim / Neovim support | Yes | No | Via terminal |
| Multi-file agent | Agent Mode (VS Code) | Composer | Full agent |
| Cloud PR creation | Yes (coding agent) | No | No |
| Model choice | GPT, Claude, Gemini | Claude, GPT, Gemini, Grok | Claude only |
| GitHub integration | Native | Via git CLI | Via git CLI |
| Project instructions | .github/copilot-instructions.md |
.cursorrules |
CLAUDE.md |
| Plan | Price | Key features |
|---|---|---|
| Free | $0 | 2,000 completions/month, 50 chat messages/month |
| Pro | $10/month | Unlimited completions and chat, 300 agent requests/month |
| Pro+ | $19/month | Higher agent limits, all models including frontier |
| Business | $19/user/month | Team management, audit logs, IP indemnity |
| Enterprise | $39/user/month | Fine-tuned model on your codebase, custom policies, private data |
GitHub Copilot is free for verified students, open-source maintainers, and teachers through the GitHub Education program.
Common mistakes
Section titled “Common mistakes”- Autocomplete without review: Copilot has high confidence even when wrong. Never accept a suggestion that you have not read; test-first workflows expose errors automatically.
- Vague Agent Mode prompts: “Make this better” produces unfocused changes. Specify the behavior you want, the files it should touch, and the command to verify success.
- Skipping
.github/copilot-instructions.md: Without project context, Copilot cannot enforce architectural rules. Set this up for every team repository. - Using the coding agent for open-ended design: It performs best on specific, well-defined tasks. Ambiguous requirements produce a PR that partially misses the goal.
When to use it and when not to
Section titled “When to use it and when not to”| Scenario | Recommendation |
|---|---|
| Developers who don’t want to leave VS Code or JetBrains | Use GitHub Copilot |
| Team needs cloud PR automation from GitHub issues | Use GitHub Copilot (coding agent) |
| Need multi-model flexibility with existing IDE | Use GitHub Copilot |
| Want visual multi-file diff review in a dedicated IDE | Use Cursor |
| Terminal-first workflows with large context needs | Use Claude Code or Gemini CLI |
Key takeaways
Section titled “Key takeaways”- GitHub Copilot is an extension, not an IDE fork — it works inside VS Code, JetBrains, Vim, and github.com.
- The product spans autocomplete, chat, Agent Mode, an autonomous coding agent, and a terminal CLI.
- Multi-model selection covers OpenAI GPT, Anthropic Claude, and Google Gemini.
- The coding agent creates pull requests from GitHub Issues without developer involvement.
.github/copilot-instructions.mdprovides persistent project context for every session.
Related pages
Section titled “Related pages”- Cursor AI Editor — AI-native IDE fork with Composer and multi-model selection
- Claude Code — Anthropic’s terminal-native agentic coding companion
- Gemini CLI — Google’s terminal agent with 1M token context
- AI Native Editors overview — comparison of AI-first development environments
Official references
Section titled “Official references”- GitHub Copilot documentation — features, plans, and configuration
- VS Code Copilot Chat docs — context symbols and slash commands
- Copilot coding agent — issue-to-PR automation
- Copilot CLI — terminal agent guide