deleteSubAgent doesn't stick while a client is still connected
Maintainer thường phản hồi trong vòng 1 ngày
@cjol đang làm issue này rồi.
Từ ngày 5/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Steps:
- A client opens a WebSocket to a sub-agent (a
/sub/...path through the parent). - The parent calls
deleteSubAgentfor that sub-agent.hasSubAgentnow returns false. - The client sends one more message, or just disconnects.
hasSubAgentreturns true again. The sub-agent is back, with fresh state.
Expected: the sub-agent stays deleted.
Cause: the parent routes every incoming WebSocket frame with _cf_resolveSubAgent, which creates the sub-agent when it doesn't exist. deleteSubAgent doesn't close open connections. So the old connection survives the delete, and its next message (or its close event) recreates the sub-agent it was pointing at.
Repro on main (a68736f), using the existing test agents:
const parent = await getAgentByName(env.TestSubAgentParent, parentName);
await parent.subAgentPing(childName);
const ws = await connectWS(
`/agents/test-sub-agent-parent/${parentName}/sub/counter-sub-agent/${childName}`
);
await parent.subAgentDelete(childName);
expect(await parent.has("CounterSubAgent", childName)).toBe(false);
ws.send("straggler"); // or just ws.close()
await expect.poll(() => parent.has("CounterSubAgent", childName)).toBe(true);
Workaround: in _cf_forwardSubAgentWebSocketMessage and _cf_forwardSubAgentWebSocketClose, check hasSubAgent first and drop the frame when the sub-agent is gone.
- Ngôn ngữ chính
- TypeScript
- Star
- 5.6k
- Fork
- 726
- Merge trung bình
- 23 giờ 36 phút
- Pull request đã merge (30 ngày)
- 86
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudflare/agents
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
cloudflare/agents#2376 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
cloudflare/agents#2299 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Transcript repair keeps `approval-responded` tool parts forever; if their continuation never runs, every later turn fails at OpenAI-compatible providersCó thể đã có người làm @threepointone đã nhận 1 ngày trước. Đang mởbug
cloudflare/agents#2382 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
cloudflare/agents#2381 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
WorkersAIFluxSTT hides the Workers AI error when Flux refuses a connectionCó thể đã có người làm @cjol đã nhận 2 ngày trước. Đang mởbug
cloudflare/agents#2377 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudflare/agents
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-livepreview#876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"Đang mởNeeds Triage Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/product-integrator#2585 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Telemundo West sdĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MTES-MCT/monitor-field#119 ·
Maintainer thường phản hồi trong vòng 1 ngày