From 63fc4ea778b38f0299c5fe4b4d2463e39d54fc03 Mon Sep 17 00:00:00 2001 From: kmbandy Date: Fri, 20 Mar 2026 18:46:07 -0400 Subject: [PATCH] fix: add missing current_role param to build_messages_full build_messages_full used current_role at line 240 but never declared it as a parameter (unlike the sync build_messages). Caused NameError on every agent invocation after the upstream merge. Co-Authored-By: Claude Sonnet 4.6 --- nanobot/agent/context.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nanobot/agent/context.py b/nanobot/agent/context.py index 995cebb09da..bed8eab2c2c 100644 --- a/nanobot/agent/context.py +++ b/nanobot/agent/context.py @@ -224,6 +224,7 @@ async def build_messages_full( media: list[str] | None = None, channel: str | None = None, chat_id: str | None = None, + current_role: str = "user", ) -> list[dict[str, Any]]: """Build the complete message list with memory compaction for actual LLM calls.""" runtime_ctx = self._build_runtime_context(channel, chat_id)