Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix: don't append interim assistant message before retry to avoid prefill errors
Re-bin9a31571b6dd9
diff --git a/nanobot/agent/loop.py b/nanobot/agent/loop.pyindex 9f1e265c8..4850f9c0f 100644--- a/nanobot/agent/loop.py+++ b/nanobot/agent/loop.py@@ -253,10 +253,6 @@ class AgentLoop:if not tools_used and not text_only_retried and final_content:text_only_retried = Truelogger.debug("Interim text response (no tools used yet), retrying: {}", final_content[:80])- messages = self.context.add_assistant_message(- messages, response.content,- reasoning_content=response.reasoning_content,- )final_content = Nonecontinuebreak