From bf200599383515dae790e1eb4c0cd8a4189d25fc Mon Sep 17 00:00:00 2001 From: Quratulain-bilal Date: Fri, 31 Jul 2026 17:58:04 +0500 Subject: [PATCH] fix: narrow exception in agent integration lookup from Exception to specific types Bare 'except Exception' silently swallows all errors including MemoryError, RecursionError, etc. Narrow to (ImportError, KeyError, ValueError) which are the realistic failure modes. --- src/specify_cli/agents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/specify_cli/agents.py b/src/specify_cli/agents.py index b2861d0ad2..203b293b70 100644 --- a/src/specify_cli/agents.py +++ b/src/specify_cli/agents.py @@ -679,7 +679,7 @@ def register_commands( _integ = get_integration(agent_name) if _integ is not None: _sep = _integ.invoke_separator_for_mode(registrar_writes_skills) - except Exception: + except (ImportError, KeyError, ValueError): pass _prefix = get_invocation_prefix(agent_name, registrar_writes_skills)