[危急] 工具执行无异常保护,任一工具异常崩溃整个Agent #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题描述
backend/app/agent_runtime/core.py 第399行和第721行,Agent调用工具时没有 try/except 包裹。如果任何工具抛出异常,整个 Agent 运行时崩溃,之前所有对话上下文丢失。
涉及文件
修复建议
在工具调用处添加 try/except,捕获异常后返回错误 JSON 给 LLM 继续处理,而非崩溃。
严重程度
危急 - Agent 稳定性问题