From 322b7519bd886227e87f42ee9113c73d0b04cfc9 Mon Sep 17 00:00:00 2001 From: Stefan Kuhn Date: Sat, 7 Mar 2026 03:00:41 +0000 Subject: [PATCH] fix(task-init): only skip init when saved state exists Use `save_data` instead of `load_mem` when deciding whether to run `initBotTask()`. This fixes the case where `load_memory=true` but no saved bot state exists: the bot could skip task initialization and start without the configured task setup, such as initial inventory. --- src/agent/agent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/agent.js b/src/agent/agent.js index f5a8e3d52..62533248c 100644 --- a/src/agent/agent.js +++ b/src/agent/agent.js @@ -122,7 +122,7 @@ export class Agent { this._setupEventHandlers(save_data, init_message); this.startEvents(); - if (!load_mem) { + if (!save_data) { if (settings.task) { this.task.initBotTask(); this.task.setAgentGoal(); @@ -550,4 +550,4 @@ export class Agent { killAll() { serverProxy.shutdown(); } -} \ No newline at end of file +}