From 4cbc4cc0f104a86d301d1821cc82382243ee8b32 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 24 Apr 2026 23:11:46 -0400 Subject: [PATCH] chore(agent): log full traceback when MasterAgent fails Without exc_info we only see the bare exception string, which has been unhelpful for debugging Discuss DM failures (e.g. a KeyError whose message is just a JSON key, with no clue where it was raised). --- agent_service/agents/master_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent_service/agents/master_agent.py b/agent_service/agents/master_agent.py index 59bc233..d2e4acd 100644 --- a/agent_service/agents/master_agent.py +++ b/agent_service/agents/master_agent.py @@ -112,7 +112,7 @@ class MasterAgent: return MasterResponse(directive_id=directive_id, response=response_text, status=status, escalations=all_escalations, actions_taken=all_actions) except Exception as exc: - logger.error('MasterAgent FAILED directive=%s: %s', directive_id, exc) + logger.exception('MasterAgent FAILED directive=%s: %s', directive_id, exc) err_msg = 'I encountered an error processing your request. Please try again or contact your administrator.' await self._log_directive_complete(directive_id, 'failed', err_msg, error=str(exc)) return MasterResponse(directive_id=directive_id, response=err_msg, status='failed')