Files
langchain/libs/langchain_v1/tests/unit_tests
Mason Daugherty df24c21c14 fix(langchain): make write_todos calls tool-only to stop duplicated plan text
Add a boundary rule to the `TodoListMiddleware` default prompt and tool
description: when calling `write_todos`, the assistant message must be
tool-only. User-facing plan text, status updates, approval questions, and
final answers should not appear in the same message as the call — they are
sent once, after the tool result returns. This stops streaming consumers
from showing the same plan/question twice (before and after the call) while
preserving #37643's contract that the final answer lands after the call.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-06-13 06:40:59 +00:00
..