deleteSubAgent doesn't stick while a client is still connected
メンテナーはふだん 1 日以内に返信
@cjol がすでに取り組んでいます。
2026年8月5日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- TypeScript
- スター
- 5.6k
- フォーク
- 726
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 103
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/agents のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
cloudflare/agents#2376 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
think: telegramMessenger can't enable native draft streaming (@chat-adapter/telegram >= 4.38 made it opt-in)対応中かも @threepointone が 1 日前に担当しました。 オープンbug
cloudflare/agents#2397 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
WorkersAIFluxSTT hides the Workers AI error when Flux refuses a connection対応中かも @cjol が 3 日前に担当しました。 オープンbug
cloudflare/agents#2377 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
cloudflare/agents#2367 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
cloudflare/agents#2359 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
cloudflare/agents の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
inu-appcenter/memorIN-frontend#106 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 7 日以内に返信
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
CSCfi/sd-search-ui#145 ·
メンテナーはふだん 1 日以内に返信
-
Add: Cbeebies pl SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信