From ef7dd59b7e31ee33e1f32bf877819375a8c91cc0 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 2 Apr 2026 16:28:57 -0400 Subject: [PATCH] skip Memory entries in conversation replay on restore Memory entries (surfaced nodes, memory_render results) are part of the context window but not the conversation display. Skip them during replay_session_to_ui to avoid showing system-reminder content as user messages. Co-Authored-By: Proof of Concept --- src/bin/poc-agent.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/poc-agent.rs b/src/bin/poc-agent.rs index da57ab9..2767d5f 100644 --- a/src/bin/poc-agent.rs +++ b/src/bin/poc-agent.rs @@ -1063,6 +1063,8 @@ fn replay_session_to_ui(entries: &[types::ConversationEntry], ui_tx: &ui_channel let mut target = StreamTarget::Conversation; for entry in entries { + // Memory entries are in the context window but not the conversation display + if entry.is_memory() { continue; } let msg = entry.message(); match msg.role { types::Role::System => {}