From 27f91150e1570c078f84286c81231a2ed0c7e807 Mon Sep 17 00:00:00 2001
From: Pim Hutting
Date: Mon, 19 Jan 2026 16:02:17 +0100
Subject: [PATCH] fix: look for goals in steps rather than plans
small bugfix, we used to look for goals in plans, but they are part of
a plan.
ref: N25B-400
---
src/control_backend/agents/bdi/bdi_program_manager.py | 6 +++---
.../agents/user_interrupt/user_interrupt_agent.py | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/control_backend/agents/bdi/bdi_program_manager.py b/src/control_backend/agents/bdi/bdi_program_manager.py
index 54c9983..6e8a594 100644
--- a/src/control_backend/agents/bdi/bdi_program_manager.py
+++ b/src/control_backend/agents/bdi/bdi_program_manager.py
@@ -198,9 +198,9 @@ class BDIProgramManager(BaseAgent):
:return: All goals within and including the given goal.
"""
goals: list[Goal] = [goal]
- for plan in goal.plan:
- if isinstance(plan, Goal):
- goals.extend(BDIProgramManager._extract_goals_from_goal(plan))
+ for step in goal.plan.steps:
+ if isinstance(step, Goal):
+ goals.extend(BDIProgramManager._extract_goals_from_goal(step))
return goals
def _extract_current_goals(self) -> list[Goal]:
diff --git a/src/control_backend/agents/user_interrupt/user_interrupt_agent.py b/src/control_backend/agents/user_interrupt/user_interrupt_agent.py
index e2b2d87..117f83c 100644
--- a/src/control_backend/agents/user_interrupt/user_interrupt_agent.py
+++ b/src/control_backend/agents/user_interrupt/user_interrupt_agent.py
@@ -336,7 +336,6 @@ class UserInterruptAgent(BaseAgent):
else:
self.logger.warning("Tried to send belief with unknown type")
return
-
belief = Belief(name=belief_name, arguments=None)
self.logger.debug(f"Sending belief to BDI Core: {belief_name}")
# Conditional norms are unachieved by removing the belief