fix: purge GOAP tracking state when Instagram is forced to restart

This commit is contained in:
2026-05-02 22:50:57 +02:00
parent 51ee7a6793
commit 3da3849ca1

View File

@@ -214,6 +214,15 @@ class GoalExecutor:
if success:
steps_taken.append({"action": action})
if action == "force start instagram":
logger.info("🔄 [GOAP State] App restarted. Purging memory/traps to attempt fresh routing.")
self.action_failures.clear()
explored_nav_actions.clear()
visited_screens.clear()
consecutive_back_presses = 0
continue
# Check if it was a navigation action (vs a goal action). If we are not on the required screen,
# any action taken is essentially a navigation attempt.
explored_nav_actions.add(action)