DEV Community

毎熊星湾
毎熊星湾

Posted on

Deep Dive into the Latest GitHub Copilot Updates

In VS Code November 2025 Insiders (v1.107), the GitHub Copilot agent features received a major upgrade.

This article walks through three particularly interesting experimental features in detail.

Reference: VS Code Release Notes v1.107


1. Running Agents as Subagents (Experimental)

What is a Subagent?

A subagent (Context-Isolated Subagent) is a context-isolated autonomous agent that can be invoked from within a main chat session.

It has its own context window independent from the main session and is well suited for complex multi-step tasks such as research and analysis.

Reference: Chat Sessions - Context-isolated subagents

┌────────────────────────────────────────────────────┐
│ Main Chat Session                                  │
│ ┌────────────────────────────────────────────────┐ │
│ │ User: Research best practices for auth,        │ │
│ │       then create an implementation plan       │ │
│ └────────────────────────────────────────────────┘ │
│                     ↓                              │
│ ┌────────────────────────────────────────────────┐ │
│ │ Subagent launched                              │ │
│ │ - Independent context window                   │ │
│ │ - Runs research via read-only tools            │ │
│ │ - Returns only the final result to main chat   │ │
│ └────────────────────────────────────────────────┘ │
│                     ↓                              │
│ ┌────────────────────────────────────────────────┐ │
│ │ Continue planning in the main session          │ │
│ │ (using the subagent’s research results)        │ │
│ └────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Characteristics

Property Details
Context isolation Does not consume the main session’s context
Autonomous execution Runs to completion without user feedback
Result handoff Only the final result is returned to the main session
Tool access Inherits the same tools as the main session by default
Can specify its own toolset via custom agents
Model Uses the same AI model as the main session by default
Can use its own model via custom agents

Extension via experimental feature:
When the chat.customAgentInSubagent.enabled setting is enabled, you can specify a different custom agent for a subagent.
Because a custom agent can define its own tools: and model: properties, you can assign a specialized toolset and optimal AI model per subagent. (Verified in practice by the author.)

Reference links:

How to Use

  1. Enable the runSubagent tool in the Tool Picker.
  2. In a prompt, explicitly instruct Copilot to run a subagent.
<!-- Example 1: Research task -->
Use a subagent to research authentication methods for web applications.
Summarize your findings.

<!-- Example 2: Explicitly referencing #runSubagent -->
Use #runSubagent to comprehensively research the user’s task using read-only tools,
and once you reach 80% confidence, return the context needed for planning.
Enter fullscreen mode Exit fullscreen mode

Combining with Custom Agents (Experimental)

When chat.customAgentInSubagent.enabled is enabled, you can have a subagent use a different custom agent.

<!-- Run the "research" agent as a subagent -->
Run the research agent as a subagent
and investigate the best authentication methods for this project.

<!-- Use the "plan" agent as a subagent to create a plan and save it to a file -->
Use the plan agent as a subagent to create an implementation plan for "myfeature"
and save it to plans/myfeature.plan.md.
Enter fullscreen mode Exit fullscreen mode

Subagents vs Normal Agents

Aspect Subagent Normal agent
Execution host Inside the main session Separate session
Context Isolated (efficient) Shared or fully independent
User feedback None (autonomous) Can request feedback as needed
Result sharing Only returns the final result Full conversation history available
Best suited for Research, analysis, subtasks Mainline development tasks

Why Subagents Matter: Solving the “Too Many Tools” Problem

More Tools ≠ Smarter Agents

Research by the GitHub Copilot team shows that giving an agent too many tools can actually hurt performance.

Reference: How we're making GitHub Copilot smarter with fewer tools - GitHub Blog

VS Code’s GitHub Copilot Chat can access hundreds of tools via MCP.
However, as the number of tools grows, the following issues appear:

Problem Details
Response latency Tool selection reasoning becomes slower, adding 400ms+ on average
Worse performance 2–5% lower success rate on the SWE-Lancer benchmark
Wrong tool usage Ignores explicit instructions or calls unnecessary tools
API limit overrun Some models can exceed tool-related limits when too many tools exist

You may have seen a spinner like this in VS Code:

🔄 Optimizing tool selection...
Enter fullscreen mode Exit fullscreen mode

This appears while the model is trying to reason over a huge tool set.

GitHub’s Fix: Reduce the Tool Set

(These are the states at the time of the GitHub blog above. With this VS Code update, additional changes have been made.)

The GitHub team reduced the default 40 built-in tools down to 13 core tools.
The remaining tools are grouped into “virtual tool groups” and expanded only when needed.

Core tool set (always available): 13 tools
├── Repository structure analysis
├── File read/write
├── Context search
└── Terminal operations

Virtual tool groups (expanded on demand):
├── Jupyter Notebook Tools
├── Web Interaction Tools
├── VS Code Workspace Tools
└── Testing Tools
Enter fullscreen mode Exit fullscreen mode

Results:

  • TTFT (Time To First Token): ~190ms faster on average
  • TTLT (Time To Last Token): ~400ms faster on average

A New Approach with Subagents

With subagents, we now get a new architecture to tackle the too-many-tools problem.

Old Approach (Single Agent + Many Tools)

┌─────────────────────────────────────────┐
│ Main Agent                              │
│ ┌─────────────────────────────────────┐ │
│ │ Tools: 40+                         │ │
│ │ - File operations                  │ │
│ │ - Git commands                     │ │
│ │ - Web search                       │ │
│ │ - Databases                        │ │
│ │ - Test running                     │ │
│ │ - ... many more                    │ │
│ └─────────────────────────────────────┘ │
│ → Tool selection takes time              │
│ → Likely to pick the wrong tool          │
└─────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

New Approach (Orchestrator + Specialized Subagents)

┌─────────────────────────────────────────────────────┐
│ Main Agent (Orchestrator)                          │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Tools: runSubagent only                        │ │
│ │ Model: Claude Sonnet 4.5 (copilot)             │ │
│ │        (for advanced reasoning)                │ │
│ └─────────────────────────────────────────────────┘ │
│                        ↓                            │
│    ┌───────────┬───────────┬───────────┬─────────┐ │
│    ↓           ↓           ↓           ↓         │ │
│ ┌──────┐  ┌──────┐  ┌──────┐  ┌──────┐          │ │
│ │Research││Impl.  ││Test   ││Git    │          │ │
│ │Agent   ││Agent  ││Agent  ││Agent  │          │ │
│ ├──────┤  ├──────┤  ├──────┤  ├──────┤          │ │
│ │Web   │ │File   │ │Test   │ │Git   │          │ │
│ │search│ │editing│ │running│ │ops   │          │ │
│ ├──────┤  ├──────┤  ├──────┤  ├──────┤          │ │
│ │Sonnet│ │Sonnet │ │Haiku  │ │Haiku │          │ │
│ │4.5   │ │4.5    │ │4.5    │ │4.5   │          │ │
│ └──────┘  └──────┘  └──────┘  └──────┘          │ │
│                                                     │
│ → Each agent has only the minimum tools it needs     │
│ → Tool calls are more accurate                       │
│ → The most suitable model can be chosen per task     │
│   (e.g. Sonnet for complex reasoning, Haiku for      │
│    simple repetitive work)                           │
└─────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Concrete Implementation Example

<!-- Custom agent: research-agent.agent.md -->
---
name: research-agent
description: A research agent specializing in web search and information analysis
tools:
  - web_search
  - web_fetch
model: Claude Sonnet 4.5 (copilot)  # Needs strong analytical ability
---

# Research Agent

You are an expert in information research and analysis.
Use web search extensively to conduct comprehensive research on technical topics.
...
Enter fullscreen mode Exit fullscreen mode
<!-- Custom agent: test-agent.agent.md -->
---
name: test-agent
description: An agent specialized in generating and running tests
tools:
  - codebase
  - runTerminal
model: Claude Haiku 4.5 (copilot)  # Lightweight model is sufficient and faster for routine tasks
---

# Test Agent

You are a test automation expert.
Analyze the existing codebase and generate appropriate unit tests.
...
Enter fullscreen mode Exit fullscreen mode
<!-- Custom agent: orchestrator.agent.md -->
---
name: orchestrator
description: An orchestrator that analyzes tasks and delegates them to specialist agents
tools:
  - runSubagent
model: Claude Sonnet 4.5 (copilot)  # Needs strong task decomposition and decision-making
---

# Orchestrator Agent

You specialize in task analysis and delegation.
Analyze the user’s request and delegate appropriately to the following specialist agents:

- research-agent: Research and information gathering tasks (when web search is needed)
- implementation-agent: Code implementation tasks
- test-agent: Test generation and execution (routine work)
- git-agent: Version control tasks

Do not write code or manipulate files directly.
Always delegate to the appropriate specialist agent.

Each agent has its own toolset and model,
optimized for the nature of its tasks.
Enter fullscreen mode Exit fullscreen mode

Available models:

  • Claude Sonnet 4.5 (copilot) – High-performance, well-balanced model
  • Claude Haiku 4.5 (copilot) – Fast, lightweight model
  • Claude Opus 4.5 (Preview) (copilot) – Top-tier performance (preview)

With this architecture:

  • Each agent’s toolset stays minimal
  • Tool selection becomes more accurate
  • Response time improves
  • Toolsets can be tailored to each task domain
  • Cost efficiency: Use Sonnet for complex reasoning, Haiku for routine tasks to optimize token usage
  • Performance: Choosing a model based on task complexity avoids unnecessary overhead

2. Isolating Background Agents with Git Worktrees

Background and Challenges

Background agents (Copilot CLI, OpenAI Codex, etc.) are designed to run tasks autonomously while you work in the editor.
Traditionally, their changes were applied directly to the workspace, which caused several problems:

  • Conflicts with files currently being edited by the user
  • Inability to safely run multiple background agents at once
  • Difficult to safely review and roll back the agent’s changes

Reference: Background Agents in VS Code

Solution: Git Worktrees

Git Worktrees are a Git feature that lets you create multiple working trees from the same repository.
In v1.107, VS Code automatically creates an independent worktree for each background agent session, providing complete isolation.

Reference: Branches & Worktrees - VS Code Source Control

How It Works

Main Workspace: /project/main
├── src/
├── package.json
└── ...

Background-agent Worktree: /project/.worktrees/session-abc123
├── src/           # Agent makes changes here
├── package.json
└── ...
Enter fullscreen mode Exit fullscreen mode

All files created or modified by the agent live under the worktree folder, so the main workspace remains untouched.

How to Use

  1. From the Chat view, select “New Background Agent”.
  2. For Isolation mode, choose “Worktree” (the default is “Workspace”).
  3. Enter a prompt to start the agent session.
┌─────────────────────────────────────┐
│  Isolation mode: [Worktree ▼]       │
│  ┌─────────────────────────────────┐│
│  │ Worktree  ← isolated mode       ││
│  │ Workspace ← direct changes      ││
│  └─────────────────────────────────┘│
└─────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Benefits

Aspect Worktree mode Workspace mode
Safety High (fully isolated) Low (direct changes)
Parallel run Possible Risk of conflicts
Review Easy via diffs Changes are applied directly
Rollback Delete worktree and done Requires Git revert

Merging Changes

When the agent finishes its task, you can bring its changes into the main branch via:

  1. “Apply Changes” button – Apply worktree changes directly into the main branch.
  2. Git operations – Merge or cherry-pick as with any normal branch.
  3. Source Control view – Use the Repositories view to inspect the worktree and review diffs.

3. Integrating Custom Agents with Background Agents (Experimental)

What Are Custom Agents?

Custom agents let you define specialized AI assistants for particular roles or tasks.
They are configured in Markdown files, where you specify:

  • Persona (e.g. DBA specialist, frontend developer)
  • Available tools
  • Preferred language model
  • Guidelines and instructions

Reference: Custom Agents - VS Code Copilot Customization

Using Them in Background Agents

Previously, custom agents were only available in local chat sessions within VS Code.
With the v1.107 experimental feature, you can now assign custom agents to background agent sessions as well.

Reference: Use custom agents with background agents

Configuration

  1. Enable the feature in settings:
   {
     "github.copilot.chat.cli.customAgents.enabled": true
   }
Enter fullscreen mode Exit fullscreen mode
  1. Create a custom agent in your workspace:
   <!-- .github/agents/code-reviewer.agent.md -->
   ---
   name: code-reviewer
   description: A code review expert focused on security and performance
   tools:
     - codebase
     - textSearch
   ---

   # Code Reviewer Agent

   You are an expert in security and performance.
   During code review, focus especially on:
   - Vulnerabilities such as SQL injection and XSS
   - Performance issues like N+1 queries
   - Proper error handling
Enter fullscreen mode Exit fullscreen mode
  1. When creating a background agent session, select the custom agent:

Example Use Cases

Custom agent Background task
Code reviewer Security audit of an entire PR
Test engineer Generating test cases for new features
Documenter Automatic API documentation generation
Refactoring expert Modernizing legacy code

Combining with Git Worktrees

By combining custom agents with worktree isolation, you can fully control who (which persona) does what, and where (in a separate environment).

┌─────────────────────────────────────────────────────┐
│ Background agent session                            │
│                                                     │
│ Agent:     [code-reviewer]  ← Custom agent          │
│ Isolation: [Worktree]       ← Isolated mode         │
│ Task:      "Run a security review on this PR"       │
│                                                     │
│ → Specialized review                                │
│ → In a safe, isolated environment                   │
│ → Runs autonomously in the background               │
└─────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Notes on Tool Compatibility Across Environments

Custom agents can run in three main environments:

  • VS Code (GitHub Copilot Chat) – Interactive local IDE experience
  • GitHub.com (Copilot coding agent) – Cloud-side background execution
  • GitHub Copilot CLI – Command-line usage from the terminal

The same .agent.md definition can be shared across these environments, but supported tools and settings differ per environment.
In particular, some tools are specific to VS Code and unavailable on GitHub.com or in the CLI.
Unsupported tools or properties are simply ignored.

Because of this, behavior may differ depending on where the agent runs.
For example, an agent that works perfectly inside VS Code might run in a partially degraded mode on GitHub.com if certain tools are not available.

Custom agents are evolving rapidly, and supported properties and tools may change over time.
Check the latest official docs for details:

Reference links:


📋 Disclaimer

Important: This article was created through a conversation with Claude, and may contain inaccuracies in the following areas:

  • Exact setting and property names (such as chat.customAgentInSubagent.enabled)
  • Syntax used in custom agent implementation examples
  • Existence and numbers of GitHub Issues or reference links
  • Details of experimental features

Always verify the latest information using the official resources below:


Summary

The GitHub Copilot updates in VS Code v1.107 push toward a balance between agent autonomy and developer control.

Feature Value
Subagents Efficient context management and a solution to the “too many tools” problem
Per-task tools & models
Git Worktree isolation Safe parallel execution of background agents
Integration with custom agents Specialized background tasks with tailored personas and tools

In particular, the orchestration pattern with subagents offers a promising architectural answer to tool overload.
By giving each specialist agent only the minimal toolset it needs, you can expect faster and more accurate behavior, consistent with the GitHub team’s findings.

Moreover, combining subagents with custom agents lets you assign an independent model to each subagent, enabling advanced optimizations:

  • Cost efficiency: Use Sonnet for complex reasoning, Haiku for routine work
  • Latency improvements: Choose models based on task complexity
  • Higher specialization: Tailor the model–tool combination to each domain

All of these features are still experimental, and will likely evolve based on user feedback.
If you’re on the Insiders build, it’s a good time to experiment and send feedback to the GitHub repositories.


Reference Links

Top comments (0)