VpnWP

How to Configure GitHub Copilot in VS Code: Modes, Models, and Permissions

How to Configure GitHub Copilot in VS Code: Modes, Models, and Permissions

A good Copilot setup does not maximise every automation switch. It matches autonomy, model cost, and context access to the work. For routine questions, Copilot should not be able to run commands. For a reviewed implementation in a trusted repository, an agent can use tools—but only with clear boundaries and a visible diff.

Model availability and setting names change faster than programming fundamentals. The recommendations below use the current VS Code and GitHub documentation checked on August 8, 2026, and avoid relying on a fixed list of models that may differ by plan or organisation policy.

Start with the Right Mode

VS Code’s agent-first workflow guide distinguishes three modes:

Mode and model are separate choices. A powerful reasoning model in Ask mode remains read-only; a fast model in Agent mode can still make changes if tools are permitted.

For system administration, WordPress maintenance, PowerShell, and network configuration, begin in Ask when interpreting logs, switch to Plan for a risky change, and enter Agent only after backups, targets, and rollback are clear.

Use Auto as the General Default

GitHub’s Auto model selection evaluates task complexity along with model health and availability. In VS Code it can route routine work to a fast model and harder work to a more capable option, subject to the models allowed by the subscription and organisation.

Auto is a sensible default when:

GitHub currently documents a discount on model costs for eligible paid-plan Auto usage, but plan limits, multipliers, and supported models can change. Check the current billing and model picker rather than treating any multiplier as permanent.

Choose a Model Manually When the Task Justifies It

Use the model picker at the bottom of Copilot Chat, as described in GitHub’s VS Code model-selection guide. A manual choice is useful for controlled comparisons or a task with a clear profile:

Work Model characteristic to prefer
Small edit, formatting, boilerplate Fast, low-cost model
Log explanation or ordinary refactor Balanced general coding model
Multi-file bug, migration, architecture Strong reasoning and long-context model
Screenshot or diagram analysis Model that explicitly supports image input
Security review Strong reasoning model, followed by independent validation

Do not select the most expensive model for every autocomplete or one-line question. Conversely, a fast model that repeatedly misses a cross-file dependency can cost more through retries and bad changes.

If the picker shows only Auto, check Workspace Trust, plan entitlement, extension state, and organisation policy. VS Code notes that Restricted Mode can limit the picker, while Business and Enterprise policies can exclude preview or third-party models.

Keep Agent Permissions Conservative

Agent mode can read files, edit code, run terminal commands, call extensions or MCP servers, and access network resources when tools allow it. Each capability expands the impact of a mistaken instruction or malicious repository content.

Recommended defaults are:

VS Code’s current AI settings reference includes controls for agent enablement, request limits, automatic fix behaviour, MCP access and discovery, tool output, planning, and organisation-managed policy. Managed settings may prevent a local user from changing a control, which is preferable to silently bypassing enterprise policy.

Set a Bounded Agent Loop

chat.agent.maxRequests limits how many requests an agent can make during a turn. The documented default is 25. A lower value can be appropriate for small repositories or cost control; a complex test-and-fix task may need more.

Do not raise the limit merely to make an unclear task “finish.” First improve the request with an outcome, files in scope, prohibited actions, test command, and stop condition. A bounded agent that stops with an honest error is safer than an unbounded loop that keeps changing unrelated files.

Automatic diagnosis and fix features can save time after a compile or test failure. They should still operate on a branch or recoverable working tree. Keep unrelated user changes intact and inspect the final diff.

Control Context Deliberately

Copilot answers improve when it can see the relevant project instructions, source files, errors, and tests. More context is not always better. Exclude generated output, archives, dependencies, large logs, secret files, and customer data where possible.

Give a troubleshooting request four parts:

  1. observed symptom and exact error;
  2. expected behaviour;
  3. relevant files or commands;
  4. constraints such as read-only diagnosis, no dependency upgrades, or no production writes.

For a WordPress failure, include the plugin and PHP versions plus a redacted stack. For PowerShell, specify Windows and PowerShell versions. For infrastructure, state whether the request is diagnosis or authorised change. This matters more than adding dramatic instructions such as “use maximum intelligence.”

Separate Suggestions from Agent Changes

Inline suggestions predict code at the cursor. Next-edit suggestions anticipate nearby edits. Chat answers questions. Agent mode performs a workflow. Enable each based on usefulness rather than assuming they share one risk profile.

Inline completion is convenient for repetitive code but can reproduce an insecure local pattern. Agent edits may span files and run tests. Always run the project’s formatter, static analysis, unit tests, and security checks after generated changes, then review the diff as if it came from an external contributor.

A Practical Configuration for Technical Operations

For a mixed workload of WordPress, Windows, networking, and automation:

The best Copilot configuration is therefore contextual, not maximal. Start read-only, plan risky work, grant tools only for implementation, and let task complexity—not marketing rank—determine the model.

Related Guides

Exit mobile version