GitHub Copilot in VS Code: Setup, Agent Tasks, and Change Review
Set up GitHub Copilot in VS Code, try chat and inline suggestions, and review agent commands and code changes before accepting them.
To get started with GitHub Copilot in VS Code, sign in with a GitHub account that has Copilot access, use chat to understand code, and give the agent a small task first. Inspect changed files and proposed commands, then test and review the result before accepting it. This guide is for new users; the interface and available features can vary by VS Code version and organization policy.
AI-generated illustration of code suggestions and change review. It is not a product screenshot.
1. Check your account and usage
Select Use AI Features from the Copilot icon in the VS Code status bar and sign in with GitHub. If you already have a Copilot subscription, use that account. Without one, eligible accounts can start with the Free plan. If your employer provides a license, check the organization account and policies. VS Code setup guide
Usage depends on the model and task. Check your allowance in the Copilot status dashboard, and review your organization's policies and data-handling terms before sending work code. VS Code's general telemetry settings are separate from the AI provider's data-handling terms.
2. Start with questions and inline suggestions
Open a file and launch Copilot Chat. The default shortcut is Ctrl+Alt+I on Windows and Linux, or Control+Command+I on macOS; custom keybindings may differ. Select a section and specify both the scope and the question, for example: “Explain the inputs this function accepts and what it returns on failure.”
As you type, inspect a gray inline suggestion and press Tab to accept it. If no suggestion appears, check the signed-in account, usage allowance, and inline suggestion settings. Generated code is not guaranteed to be correct or secure, so review it before applying it. GitHub quickstart
3. Give the agent a small, verifiable task
Select Agent in chat and specify the scope and acceptance criteria. For example, this request limits the change and asks for tests:
This is an illustrative prompt, not a result from a particular repository. The agent can locate and edit files or propose commands. Before a command runs, check its target and effects; scrutinize unclear network access or deletion commands. Permission prompts and automatic approval scope vary with settings and organization policies. Agent mode guide
4. Review the changes and tests separately before accepting
- Inspect the changed-file list and diff for edits outside the request.
- Check that the tests actually cover the requested boundaries, such as empty input and errors.
- Review the commands and exit results reported by the agent, and rerun necessary tests yourself.
- Check that secrets or internal information have not appeared in code, logs, or the conversation.
- If the result is correct, save and commit it. Passing tests alone does not eliminate every security or quality issue.
If an answer is wrong or a change exceeds the scope, request a specific correction before accepting it. Separating what chat explained, what the agent did, and what you verified makes the first workflow easier to control.
Related post: GitHub Copilot Assisted permissions 정식 출시: 승인 창을 줄여도 되는 범위