Coding agent

How to use
GitHub Copilot.

Making scoped changes in a connected repository while reviewing the diff and carrying the work into a pull request.

What it isAI coding agent Workflows2 UpdatedSeptember 2026

GitHub Copilot is a AI coding agent. Making scoped changes in a connected repository while reviewing the diff and carrying the work into a pull request. This guide covers the whole path in one place: official access, a first session that produces something reviewable, the checks that make output trustworthy, and the permissions worth limiting before you connect real work.

Troiana principle

AI should make the work easier to inspect. If the workflow removes the source, the owner, or the review step, redesign the workflow.

01

Access & setup

Find, install, and sign in to GitHub Copilot

Get into the official GitHub Copilot experience with the right account and a setup you understand.

  1. 01

    Start at https://github.com/features/copilot and confirm the domain before entering account or payment information.

  2. 02

    Availability: GitHub documents a desktop Copilot app, and Copilot is also available in supported developer environments.

  3. 03

    You need a GitHub account and either Copilot access or a configured model provider. GitHub's desktop-app guide also requires Git for local project work.

  4. 04

    Sign in with the account you intend to keep using, then review plan, data, notification, and permission settings.

  5. 05

    Run one low-risk test task before connecting sensitive files, repositories, or workspace data.

  • Use official download pages.
  • Review permissions during setup.
  • Keep installers and applications updated.
02

First session

Your first useful GitHub Copilot session

Learn the interaction loop using a small task with a clear outcome.

  1. 01

    Install and sign in to the GitHub Copilot app, then connect one local folder or repository.

  2. 02

    Ask for a small, low-risk change and require an explanation of the planned files and checks.

  3. 03

    Use an interactive agent session so you can answer questions as it works.

  4. 04

    Review the diff, run the relevant checks, and create a pull request only when you understand the change.

  • State the outcome before the background.
  • Provide the real source material.
  • Review the result before expanding the task.
03

Quality control

Check the quality of GitHub Copilot output

Turn generated code into a change you would put your name on in review.

  1. 01

    Restate the intended behaviour and the acceptance criteria before reading a single generated line.

  2. 02

    Read the diff rather than the chat summary; the summary describes intent, the diff describes what actually changed.

  3. 03

    Run the test suite, then write a test that would fail if the change were wrong, and confirm it passes for the right reason.

  4. 04

    Check the edges the model tends to skip: error paths, null and empty cases, concurrency, and migration or rollback behaviour.

  5. 05

    Trace every new dependency, network call, and file write, and confirm each one is genuinely required.

  • Review the diff, never the description of the diff.
  • A passing test suite proves the tests pass, not that the change is correct.
  • Keep changes small enough that a human can actually review them.
04

Privacy & permissions

Use GitHub Copilot safely

Give the tool enough repository access to help, and no more than that.

  1. 01

    Decide what the tool may read and what it may write before connecting a repository.

  2. 02

    Scope tokens and integrations to the narrowest repository, branch, and permission set that still works.

  3. 03

    Keep secrets out of the context window: use environment variables and secret stores, never inline credentials.

  4. 04

    Require review before generated code touches authentication, payments, permissions, migrations, or deletion paths.

  5. 05

    Audit what the integration retained after the session, and revoke access that is no longer needed.

  • Connecting a repository grants the tool context about that codebase. Review organisation policy, model-provider credentials, and the generated diff before you accept or publish a change.
  • Follow your organisation's approved-use policy.
  • Never treat fluent output as authorization to act.
05

Models & pricing

What GitHub Copilot costs, model by model.

GitHub Copilot moved to usage-based credit billing in June 2026, but code completions and next-edit suggestions remain free on every paid plan and never consume credits.

GitHub Copilot plans
PlanPriceBest for
Free$0Occasional completions
Pro$10 / monthIndividual developers
Pro+$39 / monthFrequent agent and premium model use
Max$100 / monthSustained heavy agent workloads
Business$19 / user / monthTeams needing policy and audit
Enterprise$39 / user / monthOrganisation-wide governance
Credits apply to agentic and premium model requests, not to ordinary completions. Business and Enterprise add policy, audit, and organisation-wide controls.

Figures verified 2 September 2026 against GitHub Copilot plans ↗. Model pricing changes frequently — confirm before you budget.

Frontier and default-tier pricing across the three major providers
ProviderFrontier tierBalanced defaultLow-cost tier
OpenAIGPT-5.6 Sol — $5 / $30GPT-5.6 Terra — $2 / $12GPT-5.6 Luna — $0.20 / $1.20
AnthropicFable 5.1 — $10 / $50Sonnet 5 — $2 / $10Haiku 4.5 — $1 / $5
GoogleGemini 3.1 Pro — $2 / $12Gemini 3.1 Pro — $2 / $12Gemini 3.5 Flash-Lite — $0.15 / $1.25
Input / output USD per million tokens, standard context, before batch or caching discounts. Compare tiers by role rather than by name — vendors label their tiers differently.

Cross-provider comparison verified 2 September 2026. Sources: OpenAI API pricing ↗ · Claude platform pricing ↗ · Gemini API pricing ↗

06

Common questions

GitHub Copilot questions people actually ask.

How much does GitHub Copilot cost?

Free at $0, Pro at $10 per month, Pro+ at $39, Max at $100, Business at $19 per user per month, and Enterprise at $39 per user per month.

Do Copilot completions use credits?

No. Code completions and next-edit suggestions are free on every paid plan and never touch your credit allowance. Credits are consumed by agentic requests and premium model calls, which is where unexpected spend comes from.

07

Core workflows

Step-by-step ways to use GitHub Copilot for the work it does best.

Each workflow below has its own outcome, steps and review checkpoints.

Workflow 01

Complete a scoped repository task with Copilot

Give Copilot a bounded issue, inspect its plan, and carry the result through checks and review.

Outcome: Use an agent to accelerate a change while retaining engineering control.

  1. 01

    Connect the intended repository and confirm the correct branch and working tree state.

  2. 02

    Provide acceptance criteria, relevant files, constraints, and the exact checks that must pass.

  3. 03

    Ask Copilot to explain its plan before it edits.

  4. 04

    Review the diff for behavior, security, style, generated files, and dependency changes.

  5. 05

    Run checks locally and summarize the verified result before opening a pull request.

What good use looks like

  • Keep one task per session.
  • Treat tool output as untrusted.
  • Never publish a diff you have not read.

Workflow 02

Review AI-generated code before a pull request

Use a repeatable review pass for correctness, security, maintainability, and test coverage.

Outcome: Catch plausible-looking mistakes before they enter review.

  1. 01

    Read the issue and acceptance criteria again before reading the implementation.

  2. 02

    Inspect the diff without generated noise and identify every changed behavior.

  3. 03

    Check trust boundaries, error paths, data handling, permissions, and backward compatibility.

  4. 04

    Run focused tests, static checks, and the repository's standard validation.

  5. 05

    Write a pull-request summary that distinguishes what was tested from what was only inspected.

What good use looks like

  • Review dependencies separately.
  • Test negative paths.
  • Do not accept tests that merely mirror the implementation.
08

Official references

Check the current product documentation.

Features, plan limits, availability, and data controls change. These official pages are the starting points used for this guide.

Explore the Troiana AI Hub →