Claude Code delivers a sub-agent's report that arrives mid-turn as a
{role: "system"} message: "Another Claude session sent a message while
you were working: <agent-message from=...>report</agent-message>", beside
a <task-notification>. saidWithResults skips system text, and
withTaskNotices kept only the notification, so the bridged main agent was
told the report was delivered and never saw its 14k chars. withTaskNotices
now also hands over <agent-message> blocks from system/developer messages,
in order, labelled as another agent's output and not the user's. User-role
standalone reports already went through as said text, so no duplicate.
Siblings: the only other system filter is saidWithResults's (deliberate:
system text is never the user's); the workdir scan skips system on purpose.
Run: TestClaudeAgentMessageReportGoesWithTheResults (notification beside,
split across blocks, two agents) red on origin/main's code (3 of 3), green
after; go vet darwin/linux nogui/windows; full internal/gateway on mote ok;
gofmt clean.
Not tried: a real Claude Code with a real sub-agent, GUI tests (no GUI change).