From 6cbdef8c16d217ab53f1761f632ed6189cec7741 Mon Sep 17 00:00:00 2001 From: Edvard Date: Thu, 19 Feb 2026 15:16:49 -0500 Subject: [PATCH] fix(channel): save original user text to conversation history Previously, the memory-enriched message (with [Memory context] block prepended) was saved to per-sender conversation history. On subsequent turns the LLM saw stale memory fragments with raw keys baked into prior "user" messages, creating compounding noise. Save the original msg.content instead. Memory context is still injected for the current LLM call but no longer persists across turns. Co-Authored-By: Claude Opus 4.6 --- src/channels/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channels/mod.rs b/src/channels/mod.rs index 537fd0c..9a40bb8 100644 --- a/src/channels/mod.rs +++ b/src/channels/mod.rs @@ -838,7 +838,7 @@ async fn process_channel_message( append_sender_turn( ctx.as_ref(), &history_key, - ChatMessage::user(&enriched_message), + ChatMessage::user(&msg.content), ); // Build history from per-sender conversation cache.