[BUG] TaskUpdate with owner auto-sends task_assignment messages to team lead, causing confusion and wasted tokens

Resolved 💬 2 comments Opened Mar 10, 2026 by napter Closed Apr 7, 2026

Description

When a teammate calls TaskUpdate to claim a task by setting owner, the system automatically sends a task_assignment JSON message to the parent agent (team lead / orchestrator). These system-generated messages are indistinguishable from intentional teammate messages and cause confusion.

Steps to Reproduce

  1. Create a team with TeamCreate
  2. Create tasks with TaskCreate
  3. Spawn a teammate
  4. Teammate calls TaskUpdate with owner: "teammate-name" and status: "in_progress" to claim a task

Expected: Task ownership is updated silently (or with a clearly labeled system notification)

Actual: A task_assignment message is automatically sent to the parent agent:

{"type":"task_assignment","taskId":"1","subject":"...","description":"...","assignedBy":"teammate-name","timestamp":"..."}

This message arrives as a <teammate-message> from the teammate, making it appear as if the teammate is deliberately assigning tasks to the parent.

Impact

  1. Token waste: The parent agent (orchestrator/team lead) interprets these as the teammate trying to assign work to it and sends correction messages telling the teammate to stop — but the teammate never sent them in the first place and can't stop them.
  1. Correction messages are also wasted: In our case, the orchestrator sent 3 correction messages, but only 1 was ever delivered (messages queue while the teammate is busy), and it arrived after all work was already done.
  1. Recurring across sessions: This affects every team session that uses TaskUpdate with owner assignment.

Evidence

We confirmed the root cause by analyzing both conversation transcripts:

  • Team lead's outgoing messages: 7 proper plain-text status reports via SendMessage. Zero task_assignment messages. The string task_assignment does not appear anywhere in the team lead's conversation.
  • Timestamp matching: Every task_assignment message received by the orchestrator matches a TaskUpdate call by the teammate to the millisecond:

| TaskUpdate result timestamp | task_assignment message timestamp |
|---|---|
| 22:32:14.339 | 22:32:14.338 |
| 22:32:15.094 | 22:32:15.093 |
| 22:38:09.540 | 22:38:09.540 |
| 22:51:20.552 | 22:51:20.551 |

  • Team lead was innocent: It followed the correct protocol (claim task via TaskUpdate, report status via SendMessage). The task_assignment messages were injected by the system, not the agent.

Suggested Fix

Either:

  1. Don't auto-send task_assignment messages when TaskUpdate sets owner — the parent can check TaskList if it wants task status
  2. Clearly label them as system notifications so they're distinguishable from teammate messages (e.g., use a system sender ID rather than the teammate's ID)
  3. Make it configurable — allow opting out of task assignment notifications

Environment

  • Claude Code CLI v2.1.71
  • Using teams with TeamCreate + TaskCreate + TaskUpdate + SendMessage

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗