_find_dispatch_message 原实现会一路向前翻历史,直到撞到任意一条带 tool_calls 的 AIMessage,导致本轮 LLM 即使共识(tool_calls=[]),也会 被上一轮的派活 AI 翻出来再用一次,前端因此把同样的 task 又发给子智能体, 形成"嘴上共识、手上派活"的死循环。 改成只看最新一条 AIMessage(跳过末尾 skill_stop / clarification ack ToolMessage 即可),让 tool_calls 是否为空作为本轮的唯一权威信号。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
470 B
JSON
11 lines
470 B
JSON
{
|
|
"permissions": {
|
|
"allow": [
|
|
"PowerShell(uv --version)",
|
|
"PowerShell(netstat -ano)",
|
|
"PowerShell(Get-NetTCPConnection -LocalPort 8001 -ErrorAction SilentlyContinue)",
|
|
"PowerShell(Get-Process -Id 20560 -ErrorAction SilentlyContinue | Select-Object Id,ProcessName,Path,StartTime; try { \\(Invoke-WebRequest -Uri \"http://127.0.0.1:8001/health\" -UseBasicParsing -TimeoutSec 5\\).Content } catch { \"health check failed: $_\" })"
|
|
]
|
|
}
|
|
}
|