Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Feb 2, 2026

Summary

Syncs documentation for cloudflare/agents PR #829, which fixes duplicate assistant messages when using addToolApprovalResponse with tools that have needsApproval.

Changes

  • API Reference (agents-api.mdx): Added addToolApprovalResponse to the useAgentChat return type signature and documented tool approval handling with detailed example
  • Human-in-the-Loop Guide (human-in-the-loop.mdx): Updated tool approval flow section to explain how the fix prevents duplicate messages
  • Changelog: Added entry documenting the bug fix and its automatic behavior

Problem Solved

Previously, when a user approved a tool via addToolApprovalResponse and then called sendMessage, two assistant messages were persisted with different IDs but the same content. This fix ensures the server updates the message in place using the existing ID, preventing duplicates.

Related PR


Synced from cloudflare/agents#829

…lResponse

This syncs documentation for cloudflare/agents PR #829, which fixes
duplicate assistant messages when using addToolApprovalResponse with
tools that have needsApproval.

Changes:
- Add addToolApprovalResponse to useAgentChat API reference
- Document tool approval handling with example
- Update human-in-the-loop guide to explain the fix
- Add changelog entry for the bug fix

Related to: cloudflare/agents#829
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:changelog size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants