From 36ad8336f9fcf2fe03f43782281cc7a555cbc6ed Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sat, 16 May 2026 23:43:09 -0700 Subject: [PATCH] fix(run_agent): guard memory provider init against empty/whitespace string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit 8d756a421 by austrian_guy targeted __init__ in pre-refactor run_agent.py. The body now lives in agent/agent_init.init_agent — re-applied there. Co-authored-by: austrian_guy <33156212+ether-btc@users.noreply.github.com> --- agent/agent_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/agent_init.py b/agent/agent_init.py index d5798f163ff..df8fe229e7b 100644 --- a/agent/agent_init.py +++ b/agent/agent_init.py @@ -960,7 +960,7 @@ def init_agent( try: _mem_provider_name = mem_config.get("provider", "") if mem_config else "" - if _mem_provider_name: + if _mem_provider_name and _mem_provider_name.strip(): from agent.memory_manager import MemoryManager as _MemoryManager from plugins.memory import load_memory_provider as _load_mem agent._memory_manager = _MemoryManager()