Agent team lead spawns a subagent (Task tool) instead of a teammate when instructed to create a team from a skill

Open 💬 1 comment Opened Feb 6, 2026 by kvnwolf

Description

When a custom skill instructs the team lead to create an agent team and spawn a teammate, the lead uses the Task tool to spawn a subagent instead of creating an actual teammate within the agent team. This means the spawned agent runs as an isolated subagent rather than as a team member that can communicate via SendMessage.

As a consequence:

  1. The lead tries to read the subagent's result using TaskOutput, which fails with No task found with ID
  2. In some attempts, the lead skips delegation entirely and calls MCP tools directly, hallucinating the result before the actual data arrives
  3. The teammate communication flow (SendMessage) that the skill expects never works as intended

Steps to reproduce

  1. Enable agent teams: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
  2. Create a skill at .claude/skills/qa/SKILL.md:
---
name: qa
description: Review a Linear issue
disable-model-invocation: true
argument-hint: <issue-id>
allowed-tools: mcp__plugin_linear_linear__get_issue
---

## Requirements

- $issueId = $0
- If $issueId is not defined, show an error message telling the user to use `/qa <issue-id>` and **STOP IMMEDIATELY**

## Steps

1. Create a team with the name `$issueId`
2. Spawn a teammate named `$issueId` with the following instructions:
   - Use the Linear plugin to fetch issue `$issueId`
   - Extract only the **title** from the result
   - Send the title back to the team lead
3. Wait for the teammate to send you the issue title, then relay it to the user
4. **DO NOT** shut down teammates or delete the team unless the user explicitly asks you to
  1. Run /qa DELTA-2480 (or any valid Linear issue ID)

Expected behavior

  1. Team lead creates the agent team
  2. Team lead spawns a teammate (part of the agent team) that can communicate via SendMessage
  3. The teammate calls the MCP tool, extracts the title, and sends it back to the lead
  4. The lead relays the title to the user

Actual behavior

  1. Team lead creates the agent team ✅
  2. Team lead spawns a subagent using the Task tool instead of a teammate ❌
  3. The lead tries to read the result via TaskOutput, which fails:

``
Task Output DELTA-2480@DELTA-2480
⎿ Error: No task found with ID: DELTA-2480@DELTA-2480
``

  1. In some attempts, the lead also calls MCP tools directly and hallucinated an incorrect issue title before the actual result arrived

Output logs

Attempt 1 — Lead calls MCP directly and hallucinates the title

⏺ Task(Review Linear issue DELTA-2480)
⏺ Task Output DELTA-2480@qa-delta-2480
  ⎿  Error: No task found with ID: DELTA-2480@qa-delta-2480
⏺ The issue title for DELTA-2480 is:
  Implement Agentic QA Workflow for Linear Issues    <-- WRONG, hallucinated

@DELTA-2480❯ DELTA-2480 title: Viewing Participants - New participants UX  <-- correct, from actual teammate

Attempt 2 — Lead uses Task (subagent) instead of teammate

⏺ Task(Fetch Linear issue title) Haiku 4.5
⏺ Task Output DELTA-2480@DELTA-2480
  ⎿  Error: No task found with ID: DELTA-2480@DELTA-2480

@DELTA-2480❯ DELTA-2480 title fetched
⏺ The issue title for DELTA-2480 is:
  Viewing Participants - New participants UX    <-- correct, from actual teammate

Environment

  • Claude Code v2.1.34
  • Opus 4.6 · Claude Max
  • macOS (Darwin 25.1.0)
  • Agent teams enabled via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗