--- "agents": patch "@cloudflare/ai-chat": patch "@cloudflare/think": patch --- Agent tools and sub-agents. - `Think.startAgentToolRun` takes an optional `signal`. - A run cut off by a parent reset re-attaches to its child and ends once, or `interrupted` after 2 s, and a throwing `onAgentToolFinish` goes to `onError`. - A run whose child cannot stay up ends `error`, and a detached run without progress ends `interrupted`, not `running` (#3073, #2467). - A given-up detached run is no longer re-armed forever, and `onMilestones` gets a milestone reached before finishing (#2769, #3278). - Runs wait for their child's recovery and start in order, and aged-media eviction runs for every sub-agent (#3024, #3144, #2974). - Many sub-agents started at once no longer stall, and their work resumes when the root restarts (#3077, #3014, #3086). - Sub-agents work under a jurisdiction, keep socket frames in order, and no longer reset their tree's storage when upgrading old chat tables (#3085, #3181, #3215, #3192). - An `AIChatAgent` agent-tool run is its chat turn: one durable run, so a reset of the child resumes it and a cancel ends it at once, and runs a released version kept, or that were in flight across the upgrade, carry on. - A run whose child resets right after it ends no longer reports `error` when the child cannot answer at once: the parent asks it again, within the re-attach budgets. - Progress and milestone frames from a sub-agent's `reportProgress` now reach the parent's clients live, with the default delivery and with `eventDelivery: "terminal"`, as [Report progress and milestones](https://developers.cloudflare.com/agents/api-reference/agent-tools/#report-progress-and-milestones) describes. - A tab that reconnects while a sub-agent runs is shown the chunks sent while it was away and the reply a sub-agent recovered after its own restart (the run completes instead of ending `error`), and a tab opened after the parent restarted is replayed the run, where it was replayed nothing.