diff --git a/src/aipass/aipass/apps/aipass.py b/src/aipass/aipass/apps/aipass.py index a3a8427f..555fb7f8 100644 --- a/src/aipass/aipass/apps/aipass.py +++ b/src/aipass/aipass/apps/aipass.py @@ -17,6 +17,7 @@ Auto-discovery architecture: import sys import importlib +import traceback from pathlib import Path from typing import List, Any @@ -59,7 +60,12 @@ def route_command(command: str, args: List[str], modules: List[Any]) -> bool: if module.handle_command(command, args): return True except Exception as e: + # A module that owns this command but fails must not be masked as + # "Unknown command" — surface the real error (and traceback) to + # stderr so failures are diagnosable instead of silently swallowed. logger.error(f"[AIPASS] Module {module.__name__} error: {e}") + print(f"[AIPASS] {module.__name__.split('.')[-1]} failed: {e}", file=sys.stderr) + traceback.print_exc(file=sys.stderr) return False