diff --git a/agent-office/app/agents/stock.py b/agent-office/app/agents/stock.py index 8cf5f3d..5b61d5e 100644 --- a/agent-office/app/agents/stock.py +++ b/agent-office/app/agents/stock.py @@ -307,7 +307,10 @@ class StockAgent(BaseAgent): # 정상 — Top 5 메시지 (stock-lab이 빌드해서 응답에 telegram_text 동봉) text = result.get("telegram_text") or "" if not text: - raise RuntimeError("telegram_text 누락") + add_log(self.agent_id, "telegram_text 누락 — stock-lab 응답 결함", "error", task_id) + update_task_status(task_id, "failed", {"error": "telegram_text 누락"}) + await self.transition("idle", "AI 뉴스 응답 결함") + return await self.transition("reporting", "AI 뉴스 알림 전송 중...") from ..telegram.messaging import send_raw