mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Drop subagent task notifications from parent timeline
Subagent task_notification system messages arrive without parent_tool_use_id but with tool_use_id pointing at the parent's Task call, so they slip past the sidechain router and render as top-level "Task Notification" rows in the parent's timeline. Skip them when the referenced tool_use is a Task call; parent-level background bash notifications still flow through.
This commit is contained in:
@@ -2975,6 +2975,16 @@ class ClaudeAgentSession implements AgentSession {
|
||||
return;
|
||||
}
|
||||
if (message.subtype === "task_notification") {
|
||||
// TODO: subagent timelines are best-effort. Subagent task_notifications
|
||||
// arrive without parent_tool_use_id but with tool_use_id pointing at the
|
||||
// parent's Task call, so they slip past the sidechain router and pollute
|
||||
// the parent timeline. Drop them here; eventually thread them into the
|
||||
// parent Task tool call's sub_agent log instead.
|
||||
const taskUseId = message.tool_use_id;
|
||||
const cachedTool = taskUseId ? this.toolUseCache.get(taskUseId) : undefined;
|
||||
if (cachedTool?.name === "Task") {
|
||||
return;
|
||||
}
|
||||
const taskNotificationItem = mapTaskNotificationSystemRecordToToolCall(message);
|
||||
if (taskNotificationItem) {
|
||||
events.push({
|
||||
|
||||
Reference in New Issue
Block a user