mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-12 11:21:37 +00:00
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>