From 64a78f2e9753e9c0efdf756c6304456bc6cd0817 Mon Sep 17 00:00:00 2001 From: famez Date: Sat, 28 Feb 2026 23:22:01 +0100 Subject: [PATCH] fix(notes): Notes were not properly loading at the beginning. For correct loading with get_all_notes() function. --- pentestagent/interface/tui.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pentestagent/interface/tui.py b/pentestagent/interface/tui.py index 5ca2f10..00f15bb 100644 --- a/pentestagent/interface/tui.py +++ b/pentestagent/interface/tui.py @@ -1486,6 +1486,10 @@ class PentestAgentTUI(App): notify("warning", f"TUI: failed to register notifier callback: {e}") except Exception as ne: logging.getLogger(__name__).exception("Failed to notify operator about notifier registration failure: %s", ne) + + #Added, because the _notes variable is not properly loaded at the beginning and the notes.json is recreated unless you do a /notes command explicitely. + from ..tools.notes import get_all_notes + await get_all_notes() # Call the textual worker - decorator returns a Worker, not a coroutine _ = cast(Any, self._initialize_agent())