Fix subagent monitor events being treated as user input (#1173)

* Fix subagent monitor routing to avoid LLM re-entry

* Update yanked uds_windows dependency in lockfile
This commit is contained in:
pikaxinge
2026-03-15 06:00:19 +00:00
committed by GitHub
parent f470f5db80
commit c4e098d4e3
5 changed files with 137 additions and 17 deletions
+17
View File
@@ -750,6 +750,23 @@ impl Agent {
"Message details"
);
// Internal job-monitor notifications are already rendered text and
// should be forwarded directly to the user without entering the
// normal user-input pipeline (which would run the LLM/tool loop).
if message
.metadata
.get("__internal_job_monitor")
.and_then(|v| v.as_bool())
== Some(true)
{
tracing::debug!(
message_id = %message.id,
channel = %message.channel,
"Forwarding internal job monitor notification"
);
return Ok(Some(message.content.clone()));
}
// Set message tool context for this turn (current channel and target)
// For Signal, use signal_target from metadata (group:ID or phone number),
// otherwise fall back to user_id