Choosing the Right Copilot Tool for the Job

Developers often hit a wall with AI coding assistants when the tool seems to produce code that’s close but not quite right. More often than not, these frustrations come down to using the wrong mode for the task. Before starting any request, ask yourself: do I need a quick answer or a thoughtful conversation? That distinction helps you decide between GitHub Copilot’s two primary execution modes in VS Code.

Copilot Edits handles fast, precise modifications like refactoring a single function or applying consistent changes across a few files. Agent mode is built for larger, multi-file challenges where the AI needs to analyze your codebase, propose architectural adjustments, and execute terminal commands while you review and approve each step.

Understanding where each tool excels makes your AI assistant significantly more effective.

The Chat Window as the Command Center

The Copilot chat window in VS Code is the main hub for AI interactions. Beyond launching Edits and agent mode, it supports slash commands for common workflows: /explain for breaking down complex code, /fix for debugging, and /tests for generating test cases. The window also lets you ask general questions like “How do I implement JWT authentication in Node.js?” while maintaining context on your current project.

Once you’re comfortable navigating the chat interface, picking between Edits and agent mode depends entirely on the scope of the task at hand.

Copilot Edits for Focused Changes

Copilot Edits is the right choice when you need surgical, deliberate updates to working code. It requires you to specify the files in its working set, and it only modifies those files unless it needs to create a new one. The workflow is straightforward: define the working set, describe the change, and review the proposed diff before accepting anything.

A common use case involves extending a switch statement inside a single function, say adding a github command to a processCommand handler. Edits makes these targeted changes without touching unrelated logic or globally reworking your file structure.

Where Edits doesn’t shine is when a request touches multiple avenues of your app, such as adding animation effects, keyboard navigation, and theming simultaneously. Those tasks require understanding how each subsystem interacts with the others across multiple files.

Agent Mode for Multi-File Problem Solving

Agent mode takes a different philosophy as a collaborative tool that operates from higher-level direction. Instead of focusing on limited changes you might have already scoped, agent mode explores the codebase itself to determine the most comprehensive solution.

Keep in mind that you remain in control of agent mode throughout the entire process. It has broad latitude to search files and run commands, but you review and approve all suggested modifications before they stick. This is about delegating implementation details while you focus on architecture and outcomes, not surrendering authority over your code.

What Agent Mode Handles Automatically

  • Codebase search: Finds relevant files on its own instead of requiring you to explicitly list them.
  • Self-iteration: Reviews and refines its own output to complete your full request in one pass.
  • Error correction: Spots and fixes problems in the code it suggests without being prompted.
  • Terminal commands: Proposes and runs shell commands with your permission.
  • Build verification: Compiles and executes your application to confirm the changes work.

Ideal Use Cases for Agent Mode

  • Full features: “Add analytics tracking throughout the app.”
  • Codebase orientation: “Help me understand how authentication works in this project.”
  • Testing loops: “Write tests for the UserService and make sure they pass.”
  • Project scaffolding: “Set up a new React project with TypeScript, Redux, and styled-components.”
  • Cross-cutting refactors: “Refactor our API calls to use the new error handling pattern.”

For a terminal-style easter egg on a developer portfolio, a feature request might include typing animations, command history navigation, tab completion, and a new theming system with a theme command. Agent mode succeeds here because it can search the codebase to understand the existing terminal implementation, create the required CSS file from scratch, add keyboard handlers, extend existing command processing, and verify that no new functionality breaks prior behavior. The interplay between history navigation and current terminal rendering gets checked automatically, ensuring consistent integration.

This works because agent mode doesn’t just recognize standalone code fragments. It looks at the relationships between modules extending them, issues, and shared conventions. That makes it an explicit fit for implementing complete features where components must coexist rather than single-variable tweaks.

Using Both Together

Regardless of which tool you pick, you are still steering the AI. The quality of the output depends heavily on the level of context you provide in your prompts. Quick, isolated edits warrant Copilot Edits, whereas agent mode suits work where a change must weave through several files and potentially trigger commands.

Combining the two gives flexible workflow options, whether you prefer the granular control over file diffs or letting the agent autonomously bridge gaps between systems. Both modes require final human sign-off, but they operate on different scales.

Getting Started

To try Copilot Edits in VS Code:

  1. Open the Copilot Chat window.
  2. Click the “Edit with Copilot” button to open the Copilot Edits view.
  3. Add the relevant files to the working set. Copilot will only change these files unless it creates a new one.
  4. Enter a prompt describing the needed modifications.
  5. Review the diff of all changes before accepting them.

For agent mode:

  1. Make sure you’re running VS Code version 1.99 or higher (initially available in VS Code Insiders).
  2. Switch the mode selector from “Edit” to “Agent.”
  3. Enter a prompt that explains the full scope of the feature or fix you want.
  4. Let agent mode work autonomously, then approve each proposed change.
  5. Use custom instructions to tailor agent behavior to your team’s coding conventions.