diff --git a/nanobot/agent/loop.py b/nanobot/agent/loop.py index 001009bb..5606230a 100644 --- a/nanobot/agent/loop.py +++ b/nanobot/agent/loop.py @@ -2151,6 +2151,12 @@ class AgentLoop: sender_id=chat_id, chat_id=chat_id, content=last_user_msg["content"], + # The message already exists in session history + # (persisted before the crash); skip persisting it + # again so recovery does not duplicate it. + metadata={ + turn_continuation.SKIP_USER_PERSIST_META: True + }, ) ) logger.info(