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) β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
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 thechat.customAgentInSubagent.enabledsetting is enabled, you can specify a different custom agent for a subagent.
Because a custom agent can define its owntools:andmodel:properties, you can assign a specialized toolset and optimal AI model per subagent. (Verified in practice by the author.)Reference links:
- Official docs: Context-isolated subagents
- GitHub Issue #275855: Request for model selection per subagent β Community request to βexplicitly specify different models for each subagentβ
- Model selection in custom agents
How to Use
- Enable the
runSubagenttool in the Tool Picker. - 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.
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.
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...
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
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 β
βββββββββββββββββββββββββββββββββββββββββββ
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) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
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.
...
<!-- 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.
...
<!-- 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.
Available models:
Claude Sonnet 4.5 (copilot)β High-performance, well-balanced modelClaude Haiku 4.5 (copilot)β Fast, lightweight modelClaude 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.
How It Works
Main Workspace: /project/main
βββ src/
βββ package.json
βββ ...
Background-agent Worktree: /project/.worktrees/session-abc123
βββ src/ # Agent makes changes here
βββ package.json
βββ ...
All files created or modified by the agent live under the worktree folder, so the main workspace remains untouched.
How to Use
- From the Chat view, select βNew Background Agentβ.
- For Isolation mode, choose βWorktreeβ (the default is βWorkspaceβ).
- Enter a prompt to start the agent session.
βββββββββββββββββββββββββββββββββββββββ
β Isolation mode: [Worktree βΌ] β
β ββββββββββββββββββββββββββββββββββββ
β β Worktree β isolated mode ββ
β β Workspace β direct changes ββ
β ββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββ
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:
- βApply Changesβ button β Apply worktree changes directly into the main branch.
- Git operations β Merge or cherry-pick as with any normal branch.
- 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
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
- Enable the feature in settings:
{
"github.copilot.chat.cli.customAgents.enabled": true
}
- 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
- 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 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
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:
- Custom agents configuration - GitHub Docs β Configuration properties and tool reference
- About custom agents - GitHub Docs β Concept and basic usage
- Custom agents in VS Code β VS Codeβspecific features and settings
- Custom agents for GitHub Copilot - GitHub Changelog β Feature announcement and latest updates
- awesome-copilot β Community-maintained examples of custom agents
π 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.
Top comments (0)