5 Keys to Agent-First Dev in VS Code

Master harness, model, prompts, tools, and context to run precise AI agent sessions in VS Code with GitHub Copilot, turning general models into codebase-specific developers.

The 5-Part Formula for Reliable Agent Results

Agents aren't magic—they follow a formula: harness + model + prompts + tools + context. Tune these to avoid vague outputs and achieve tasks matching your codebase standards. The harness (VS Code's GitHub Copilot Chat) wires the model to tools, files, and actions, like a car's wiring distributing engine power. Without specifics, agents fail; with this setup, they handle full software development lifecycles.

Start sessions in Copilot Chat: select a model (e.g., Sonnet, Codex), set thinking effort (low for boilerplate, medium for refactoring, high for architecture/debugging—high balances speed and reasoning), craft detailed-but-not-overwhelming prompts, enable relevant tools, and add context.

Model and Effort Selection Drives Reasoning Quality

Choose from developer-preferred models in Copilot Chat (e.g., Sonnet at high effort as default). Low effort suits quick tasks like formatting; medium handles straightforward refactors; high tackles complex architecture or debugging. This trades speed for depth—use high for non-trivial work to get accurate code generation and reasoning.

Prompts must specify tasks clearly: include details without minutiae, e.g., "create to-dos and run Z shell command" triggers tools automatically if enabled.

Curate Tools to Match Your Task, Avoid Overload

Agents execute via 100+ built-in and extension tools (e.g., from 152 to 55 by disabling irrelevant ones like Azure, Bicep, Mermaid). Key categories: delegate to sub-agents, browser interaction, file edits/reads/searches, terminal commands, to-do management, VS Code features, web search.

Granular control: enable only essentials (e.g., to-dos icon for task lists, terminal icon for shell runs). Over-enabling bloats sessions; under-enabling blocks actions—review tool picker per task. Demo: agent created to-dos and ran terminal commands because both were active.

Ground Agents with Codebase Context

Models lack niche expertise—provide files/folders via + icon (GitHub repos, MCP resources) or #filename in prompts. Agents auto-read directories (e.g., scanned project dir), incorporating specifics over general training data. This yields codebase-tailored results, e.g., reading dirs before commands.

VS Code Layout Tweaks for Agent Efficiency

Customize for visibility: right-click Explorer to swap primary sidebar (left/right), set activity bar to top (right-click > Activity Bar Position > Top). These position Copilot Chat, tools, and outputs optimally—default is left activity bar, but top aids multi-panel agent monitoring.

Next: approval levels (allow/skip commands) prevent unchecked runs.

Video description
In this video Gwyneth introduces and demos the 5 concepts you need to understand in order to kick off your first agent session! Follow along in this series to learn what the agent is doing, how to review changes, approval levels, different reasoning effort levels and build your first app! 🔎 Chapters: 00:00 Introduction to the Agent-First Development series 00:55 Customizing your terminal 01:50 The 5 concepts you need to understand to get started 02:30 Harness 03:30 Model 04:28 Prompts 05:17 Tools 08:00 Context 09:17 In Summary 09:42 What's Next 🎙️ Featuring: Gwyneth Peña-Siguenza (https://x.com/madebygps) 📲 Follow VS Code: X: https://x.com/code Bluesky: https://bsky.app/profile/vscode.dev YouTube: / code LinkedIn: / 104107263 GitHub: https://github.com/microsoft/vscode #vscode #agents

Summarized by x-ai/grok-4.1-fast via openrouter

5479 input / 1525 output tokens in 19888ms

© 2026 Edge