From 140e0ef9655d5aded70f2fb40b95443faf286287 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 24 Mar 2026 22:48:40 +0700 Subject: [PATCH] fix(chat): skip archived agent notifications --- skills/paseo-chat/bin/chat.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/skills/paseo-chat/bin/chat.sh b/skills/paseo-chat/bin/chat.sh index 6ccb81bb0..5fe54655a 100755 --- a/skills/paseo-chat/bin/chat.sh +++ b/skills/paseo-chat/bin/chat.sh @@ -211,6 +211,14 @@ room_participant_ids() { awk 'NF && $0 != "manual" && !seen[$0]++' } +agent_is_archived() { + local target_agent_id="$1" + local archived_at + + archived_at="$("$paseo_bin" inspect "$target_agent_id" --json 2>/dev/null | jq -r '.ArchivedAt // empty' 2>/dev/null)" || archived_at="" + [[ -n "$archived_at" ]] +} + notify_agent() { local target_agent_id="$1" local room="$2" @@ -224,6 +232,10 @@ notify_agent() { return fi + if agent_is_archived "$target_agent_id"; then + return + fi + local sender_label if [[ -n "$sender_agent_name" ]]; then sender_label="$sender_agent_name ($sender_agent_id)"