diff --git a/pentestagent/interface/tui.py b/pentestagent/interface/tui.py index 00f15bb..0a888bb 100644 --- a/pentestagent/interface/tui.py +++ b/pentestagent/interface/tui.py @@ -2226,7 +2226,8 @@ Be concise. Use the actual data from notes.""" elif cmd_lower == "/tools": # Open the interactive tools browser (split-pane). try: - await self.push_screen(ToolsScreen(tools=self.agent.get_tools())) + if self.agent: + await self.push_screen(ToolsScreen(tools=self.agent.get_tools())) except Exception: # Fallback: list tools in the system area if UI push fails from ..runtime.runtime import detect_environment