[危急] Agent运行时崩溃: _inject_knowledge_context引用未定义变量db #67
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 第839行,_inject_knowledge_context 方法在 finally 块中引用了 db.close(),但 db 变量在该方法中从未定义。这是上一轮修复通知系统时引入的复制粘贴错误。该 Bug 导致所有 Agent 执行在知识注入阶段崩溃。
涉及文件
修复建议
删除 finally: if db: db.close() 代码块,该方法不涉及数据库操作。
严重程度
危急 - 所有 Agent 执行受影响