Skip to content

agentHost: enable subagent integration test for Claude real SDK#317353

Merged
TylerLeonhardt merged 1 commit into
mainfrom
tyler/motionless-condor
May 19, 2026
Merged

agentHost: enable subagent integration test for Claude real SDK#317353
TylerLeonhardt merged 1 commit into
mainfrom
tyler/motionless-condor

Conversation

@TylerLeonhardt

Copy link
Copy Markdown
Member

Now that subagent routing is wired up for Claude, enable the shared subagent integration test for the Claude real-SDK suite.

Changes

  • Refactor IRealSdkProviderConfig.subagentToolName (string) to subagentToolNames (readonly string[]) so providers that expose multiple subagent-kind tools can list them all. The first entry is used in the test prompt; all entries are exempted from the parent must not contain inner tool calls assertion.
  • Claude registers both Task and Agent as subagent-kind tools (see claudeToolDisplay.ts) and the model may pick either when asked to spawn a subagent. List both.
  • Flip supportsSubagents: true for the Claude config.
  • Copilot config updated to use the new array shape (['task']).

Verification

Both real-SDK suites pass end-to-end with AGENT_HOST_REAL_SDK=1:

Protocol WebSocket — Real Claude SDK
  ✔ subagent tool calls are routed to the subagent session, not flat in the parent (18s)
  ... 7 passing, 2 pending (worktree + plan mode still unsupported)

Protocol WebSocket — Real Copilot SDK
  ... 10 passing (no regression)

- Refactor IRealSdkProviderConfig.subagentToolName (string) to
  subagentToolNames (readonly string[]) so providers that expose multiple
  subagent-kind tools can list them all.
- Claude registers both 'Task' and 'Agent' as subagent tools; the model
  may pick either. Listing both exempts both from the 'parent must not
  contain inner tool calls' assertion.
- Flip supportsSubagents to true for Claude now that subagent routing
  works end-to-end.
Copilot AI review requested due to automatic review settings May 19, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables the shared real-SDK subagent routing integration test for Claude by allowing provider configs to declare multiple subagent-spawning tool names.

Changes:

  • Replaces the single subagentToolName config with subagentToolNames.
  • Updates the shared subagent test to prompt with the first tool name and exempt all configured subagent tools from parent-session inner-tool assertions.
  • Enables Claude subagent support with both Task and Agent, while updating Copilot to the new array shape.
Show a summary per file
File Description
src/vs/platform/agentHost/test/node/protocol/realSdkTestHelpers.ts Generalizes shared real-SDK subagent test configuration and assertions for multiple subagent tool names.
src/vs/platform/agentHost/test/node/protocol/copilotRealSdk.integrationTest.ts Updates Copilot real-SDK config to use subagentToolNames.
src/vs/platform/agentHost/test/node/protocol/claudeRealSdk.integrationTest.ts Enables Claude shared subagent testing and lists both Claude subagent tool names.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) May 19, 2026 18:15
@TylerLeonhardt TylerLeonhardt merged commit f2af4d8 into main May 19, 2026
31 of 32 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/motionless-condor branch May 19, 2026 18:26
@vs-code-engineering vs-code-engineering Bot added this to the 1.122.0 milestone May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants