Agent teams: TaskUpdate owner assignment sends undocumented task_assignment self-notification
Description
When a teammate in an agent team calls TaskUpdate and the owner field is set (either explicitly or via auto-assignment), the SDK sends an undocumented task_assignment message to the owner's inbox. When the owner is the calling agent itself (the standard self-claim pattern), this becomes a self-notification that wastes a turn.
Steps to Reproduce
- Create a team with
TeamCreate - Create a task with
TaskCreate - Spawn a teammate
- Have the teammate claim the task:
TaskUpdate(taskId="1", status="in_progress", owner="worker") - The teammate receives a
task_assignmentmessage in its inbox from itself:
{
"type": "task_assignment",
"taskId": "1",
"subject": "...",
"assignedBy": "worker",
"timestamp": "..."
}
This notification arrives asynchronously (typically 5-10 seconds after the TaskUpdate call) and consumes an extra agent turn to process.
Key Findings from Testing
- All claim patterns trigger it: Explicit
owner, noowner(auto-assigned),metadata-based,description-based — the SDK auto-assigns owner on everyin_progresstransition regardless of parameters - The notification is asynchronous: It does NOT appear in the TaskUpdate tool response. It arrives later as a queued
teammate-messagein the agent's inbox assignedByequals the recipient: The agent receives a notification about its own action- N tasks = N wasted turns: Each claim generates one self-notification, each costing latency + tokens
- No client-side workaround: Since the SDK auto-assigns owner, there's no parameter combination that avoids the notification
Expected Behavior
When an agent sets itself as owner of a task (or is auto-assigned), the SDK should NOT send a task_assignment notification back to that same agent. The agent already knows about the assignment — it just made it.
Suggested fix: Filter notifications where assignedBy === recipient.
Additional Context
- The SDK's own
TaskListtool documentation instructs teammates to "Claim an available task using TaskUpdate (setownerto your name)" — this is the pattern that causes the self-notification - The
task_assignmentmessage type is not documented in any tool description visible to agents - The
TaskUpdatetool response includes a helpful "Task completed. Call TaskList now..." hint which is working as intended — this issue is only about the separate inbox notification
Environment
- Claude Code version: latest as of 2026-02-17
- Model: claude-opus-4-6
- OS: Linux (WSL2)
- Agent teams enabled via
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗