Skip to content

Sub-Agent Messages Are Stored as Supervisor User Messages #1407

Description

@thanveersubeerkhan

I found an issue with how sub-agent messages are persisted and represented in the UI.

When the supervisor agent assigns a task to a sub-agent, that task is saved as a user message under the supervisor agent.
The sub-agent's response is saved under the supervisor as an assistant message, with metadata containing the sub-agent ID and name.
However, the original sub-agent task/user message does not contain sub-agent metadata such as subagentId or subagentName.
Because of this, the UI cannot reliably filter or identify sub-agent assistant messages vs. sub-agent user/task messages.
Expected behavior

Both sides of the sub-agent interaction should include consistent metadata, for example:

{
"subagentId": "...",
"subagentName": "..."
}

The metadata should be attached to the sub-agent task/user message as well as the sub-agent assistant message.

This would allow the UI to correctly group, filter, and display the complete sub-agent conversation independently from the supervisor conversation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions