[BUG] Agent Team: Internal coordination messages incorrectly labeled as user-sent (Phantom User Messages)

Resolved 💬 2 comments Opened Feb 12, 2026 by MC5Spear Closed Feb 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

A message appeared in conversation history attributed to me (the user) that I did not send. This message caused the Agent Team to close unexpectedly.

Evidence from session log:
{
"parentUuid": "6393e0d6-4801-447c-a2e7-21eb5ef3a90b",
"isSidechain": false,
"teamName": "cozy-yawning-river",
"userType": "external",
"cwd": "C:\\Users\\xxxuser\\.claude\\skills\\rai-task-dev",
"sessionId": "2bae0dc1-a900-4aeb-919a-178ff8410940",
"version": "2.1.39",
"gitBranch": "main",
"slug": "resilient-waddling-acorn",
"type": "user",
"message": {
"role": "user",
"content": "close the team and summarize findings to a file"
},
"uuid": "51b9478a-9303-44a2-bac2-67fc8222521b",
"timestamp": "2026-02-12T12:31:13.254Z",
"thinkingMetadata": {
"maxThinkingTokens": 31999
},
"permissionMode": "default"
}

Facts:

  1. I was typing in Chinese at that moment
  2. The message above (in English) was recorded as sent by me
  3. Upon receiving this message, Claude closed the team and attempted to write a summary file
  4. I did not request either action

What Should Happen?

Messages not typed by the user should not appear in conversation history with "type": "user".

Error Messages/Logs

{
    "parentUuid": "6393e0d6-4801-447c-a2e7-21eb5ef3a90b",
    "isSidechain": false,
    "teamName": "cozy-yawning-river",
    "userType": "external",
    "cwd": "C:\\Users\\xxxuser\\.claude\\skills\\rai-task-dev",
    "sessionId": "2bae0dc1-a900-4aeb-919a-178ff8410940",
    "version": "2.1.39",
    "gitBranch": "main",
    "slug": "resilient-waddling-acorn",
    "type": "user",
    "message": {
        "role": "user",
        "content": "close the team and summarize findings to a file"
    },
    "uuid": "51b9478a-9303-44a2-bac2-67fc8222521b",
    "timestamp": "2026-02-12T12:31:13.254Z",
    "thinkingMetadata": {
        "maxThinkingTokens": 31999
    },
    "permissionMode": "default"
}

Steps to Reproduce

  1. Enable Agent Team: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
  2. Create an Agent Team and assign tasks
  3. Wait for agent coordination to complete
  4. Observe conversation history for unsolicited user messages

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.39 (Claude Code)

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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