Skip to content

VS Code: Test and document runSubagent as Squad spawn mechanism #32

Closed

Description

@bradygaster

Context

Part of #10: Copilot client parity across surfaces. VS Code is the priority.

Problem

VS Code Copilot uses runSubagent instead of the CLI's task tool. We need to validate that Squad can detect VS Code and use runSubagent correctly.

Key Questions to Investigate

  • Can squad.agent.md detect it's running in VS Code and switch from task to runSubagent?
  • What parameters does runSubagent support? (model, mode, description, model override)
  • Does background/async execution work? Can results be collected?
  • What's the fallback behavior if runSubagent is not available?

Success Criteria

  • Document VS Code agent spawn behavior (compatibility layer or conditional logic)
  • Write test/demo showing runSubagent call succeeding in VS Code
  • Document parameter parity (or gaps) with CLI task tool
  • Define fallback strategy for missing parameters
  • Update squad.agent.md with VS Code detection logic

Related

Activity

  1. added
    go:yesReady to implement
    type:spikeResearch/investigation — produces a plan, not code
    on Feb 13, 2026
  2. bradygaster commented on Feb 13, 2026

    @bradygaster
    CollaboratorAuthor

    Spike Complete ✅

    Strausz and Kujan completed parallel research on runSubagent vs CLI task tool parity.

    Key Findings

    • runSubagent is viable for Squad's VS Code spawn mechanism
    • No abstraction layer needed — prompt-level conditional instructions in squad.agent.md are sufficient
    • Platform detection: check for task tool (CLI) vs runSubagent/agent tool (VS Code)
    • MCP tool inheritance is better on VS Code — sub-agents inherit parent's MCP tools by default (CLI does not)
    • Parallel execution works via spawning multiple sub-agents in the same turn (sync but concurrent)
    • Model selection requires custom .agent.md files per role

    Gaps (both manageable)

    1. No mode: "background" — mitigated by parallel sync subagents
    2. No per-spawn model param — mitigated by custom .agent.md files (v0.4.x)

    Deliverables

    • team-docs/proposals/032a-runsubagent-api-research.md — Strausz's VS Code API research
    • team-docs/proposals/032b-cli-spawn-parity-analysis.md — Kujan's CLI parity analysis
    • .ai-team/skills/cross-platform-agent-spawning/SKILL.md — Reusable skill for multi-surface spawning

    Recommended Path

    • v0.4.0 MVP: Add platform detection + conditional spawn instructions to squad.agent.md. Accept session model for all VS Code spawns.
    • v0.4.x: Generate custom .agent.md files during squad init for per-agent model selection.
    • v0.5.0: Full parity with agents frontmatter restrictions and disable-model-invocation.

    Ready to move to #33 (file discovery) and #34 (model selection parity).

  3. changed the title [-]VS Code: Test and document \ unSubagent\ as Squad spawn mechanism[/-] [+]VS Code: Test and document runSubagent as Squad spawn mechanism[/+] on Feb 13, 2026
  4. bradygaster commented on Feb 13, 2026

    @bradygaster
    CollaboratorAuthor

    Spike complete. Proposals 032a (runSubagent API research) and 032b (CLI parity analysis) shipped to team-docs/proposals/. Findings fed into #33, #34, and #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:yesReady to implementrelease:v0.4.0Targeted for v0.4.0type:spikeResearch/investigation — produces a plan, not code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions