Skip to content

feat(agent): add VS Code Copilot multi-agent support and phase-based model routing #677

@Snakeblack

Description

@Snakeblack

Pre-flight Checklist

  • I have searched existing issues and this is not a duplicate
  • I understand that PRs will be rejected if the linked issue does not have status:approved

🔍 Affected Area

Other (Agent / VS Code Copilot Integration)

💡 Problem Statement

Currently, Gentle AI does not support multi-agent orchestration or phase-based model routing when running inside VS Code Copilot. In internal/agents/vscode/adapter.go, the capability is explicitly disabled:

func (a *Adapter) SupportsSubAgents() bool {
	return false
}

While other environments (like Claude Code) allow configuring different models per phase in SDD workflows by rewriting placeholders in localized agent files (~/.claude/agents/*.md), the VS Code Copilot integration lacks any multi-agent capability.

Historically, a workaround suggested for this limitation was to use Copilot subscriptions inside alternative clients like OpenCode or Pi Agent (which already support these workflows). However, in many corporate environments, security and compliance policies strictly prohibit the use of unofficial clients like OpenCode or Pi Agent. Dev teams in these enterprises are mandated to standardize exclusively on the official VS Code Copilot extension.

Without native multi-agent support in the official VS Code Copilot extension, dev teams in compliance-restricted companies cannot adopt or use Gentle AI's multi-phase workflows (like SDD) effectively. This limits Gentle AI's adoption in the enterprise space.

We need a way to:

  1. Optimize Costs: Running simple mechanical tasks like code generation/applying (sdd-apply) or testing/verification (sdd-verify) on cheaper models instead of wasting premium credits.
  2. Improve Accuracy: Restricting instructions to a single, monolithic agent context instead of routing specialized phases to subagents configured with focused instructions and agent skills.

📦 Proposed Solution

We propose implementing multi-agent support in the VS Code Copilot adapter by enabling SupportsSubAgents() = true and managing dynamic model routing at the orchestrator layer.

Since VS Code Copilot extensions are compiled and distributed as static plugins, we cannot dynamically rewrite local agent files like in Claude Code. However, VS Code Copilot's runtime execution engine supports dynamic overrides: when calling subagents via the underlying runSubagent tool/API, the model can be overridden by passing a dynamic model parameter.

To support this:

  1. Enable SupportsSubAgents() = true in the VS Code adapter.
  2. Add support to resolve model mappings per phase (e.g., from openspec/config.yaml or workspace configurations).
  3. Have the orchestrator agent inject the target model parameter dynamically when delegating tasks to subagents via the tool call.

📎 Additional Context

For details on how VS Code Copilot supports agent plugins, custom agents, subagents, and skills, see the official documentation (ordered by relevance):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions