When using the "ReAct" agent strategy, TOOL calls are not being executed #924

Closed
opened 2026-02-16 10:21:01 -05:00 by yindo · 4 comments
Owner

Originally created by @shingo-kurimoto-ulsystems on GitHub (Jan 7, 2026).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.2

Plugin version

Dify Agent Strategies 0.0.30

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Create a Chatflow type application with only 3 nodes: Input, Agent, and Answer.
  2. Configure the Agent node with the "ReAct" agent strategy. I used Claude 4.5 Haiku as the Model.
  3. Add a TOOL (this issue can be reproduced even with "current time" from "TIME") and write an arbitrary system prompt.
  4. In the chat, instruct it to use that TOOL.

Expected Behavior

The agent should thought and invoke the TOOL.
Then, in Round 2, it should answer to the user.

Current Behavior

The agent outputs Thought including TOOL parameters JSON.
The TOOL is not executed, and it does not proceed to Round 2.

✔️ Error log

No response

Originally created by @shingo-kurimoto-ulsystems on GitHub (Jan 7, 2026). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.2 ### Plugin version Dify Agent Strategies 0.0.30 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. Create a Chatflow type application with only 3 nodes: Input, Agent, and Answer. 2. Configure the Agent node with the "ReAct" agent strategy. I used Claude 4.5 Haiku as the Model. 3. Add a TOOL (this issue can be reproduced even with "current time" from "TIME") and write an arbitrary system prompt. 4. In the chat, instruct it to use that TOOL. # Expected Behavior The agent should thought and invoke the TOOL. Then, in Round 2, it should answer to the user. # Current Behavior The agent outputs Thought including TOOL parameters JSON. The TOOL is not executed, and it does not proceed to Round 2. ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:21:01 -05:00
yindo closed this issue 2026-02-16 10:21:01 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 7, 2026):

Hi @shingo-kurimoto-ulsystems! I'm Dosu and I’m helping the dify-official-plugins team.

This issue is likely caused by how the ReAct agent strategy parses and matches tool calls. The agent expects the LLM output to include an exact "Action:" prefix followed by a JSON object with the tool's name and parameters. If there is any mismatch between the tool name in your configuration and what the model outputs, or if the JSON structure is not exactly as expected, the tool call will not be executed and the flow will stop after the "Thought" step. This makes the strategy brittle—minor discrepancies in naming or formatting can prevent tool execution entirely. Recent changes to the output parser and streaming logic may also impact this behavior, so ensuring your tool names and prompts match exactly is critical for reliable execution. You can review the relevant implementation and recent changes for more details: ReAct output parser refactor and JSON handling, streaming and tool interaction flow, and ReAct agent strategy code.

As a workaround, double-check that the tool name in your prompt and the model's output matches the registered tool's identity exactly (case and spacing included). If the issue persists, it may be due to the model's output format or a subtle mismatch in the expected action JSON.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 7, 2026): <!-- Greeting --> Hi @shingo-kurimoto-ulsystems! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify-official-plugins team. <!-- Answer --> This issue is likely caused by how the ReAct agent strategy parses and matches tool calls. The agent expects the LLM output to include an exact "Action:" prefix followed by a JSON object with the tool's name and parameters. If there is any mismatch between the tool name in your configuration and what the model outputs, or if the JSON structure is not exactly as expected, the tool call will not be executed and the flow will stop after the "Thought" step. This makes the strategy brittle—minor discrepancies in naming or formatting can prevent tool execution entirely. Recent changes to the output parser and streaming logic may also impact this behavior, so ensuring your tool names and prompts match exactly is critical for reliable execution. You can review the relevant implementation and recent changes for more details: [ReAct output parser refactor and JSON handling](https://github.com/langgenius/dify-official-plugins/pull/2333), [streaming and tool interaction flow](https://github.com/langgenius/dify-official-plugins/pull/2322), and [ReAct agent strategy code](https://github.com/langgenius/dify-official-plugins/blob/b9aa7f0cda7432c554170618787721aa41b33fad/agent-strategies/cot_agent/strategies/ReAct.py#L68-L616). As a workaround, double-check that the tool name in your prompt and the model's output matches the registered tool's identity exactly (case and spacing included). If the issue persists, it may be due to the model's output format or a subtle mismatch in the expected action JSON. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/cf9afb6a-9869-4f09-a658-38707592468d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cf9afb6a-9869-4f09-a658-38707592468d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cf9afb6a-9869-4f09-a658-38707592468d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cf9afb6a-9869-4f09-a658-38707592468d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cf9afb6a-9869-4f09-a658-38707592468d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cf9afb6a-9869-4f09-a658-38707592468d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cf9afb6a-9869-4f09-a658-38707592468d?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20issue%20is%20likely%20caused%20by%20how%20the%20ReAct%20agent%20strategy%20parses%20and%20matches%20tool%20calls.%20The%20agent%20expects%20the%20LLM%20output%20to%20include%20an%20exact%20%22Action%3A%22%20prefix%20followed%20by%20a%20JSON%20object%20with%20the%20tool%27s%20name%20and%20parameters.%20If%20there%20is%20any%20mismatch%20between%20the%20tool%20name%20in%20your%20configuration%20and%20what%20the%20model%20outputs%2C%20or%20if%20the%20JSON%20structure%20is%20not%20exactly%20as%20expected%2C%20the%20tool%20call%20will%20not%20be%20executed%20and%20the%20flow%20will%20stop%20after%20the%20%22Thought%22%20step.%20This%20makes%20the%20strategy%20brittle%E2%80%94minor%20discrepancies%20in%20naming%20or%20formatting%20can%20prevent%20tool%20execution%20entirely.%20Recent%20changes%20to%20the%20output%20parser%20and%20streaming%20logic%20may%20also%20impact%20this%20behavior%2C%20so%20ensuring%20your%20tool%20names%20and%20prompts%20match%20exactly%20is%20critical%20for%20reliable%20execution.%20You%20can%20review%20the%20relevant%20implementation%20and%20recent%20changes%20for%20more%20details%3A%20%5BReAct%20output%20parser%20refactor%20and%20JSON%20handling%5D%28https%3A//github.com/langgenius/dify-official-plugins/pull/2333%29%2C%20%5Bstreaming%20and%20tool%20interaction%20flow%5D%28https%3A//github.com/langgenius/dify-official-plugins/pull/2322%29%2C%20and%20%5BReAct%20agent%20strategy%20code%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/b9aa7f0cda7432c554170618787721aa41b33fad/agent-strategies/cot_agent/strategies/ReAct.py%23L68-L616%29.%0A%0AAs%20a%20workaround%2C%20double-check%20that%20the%20tool%20name%20in%20your%20prompt%20and%20the%20model%27s%20output%20matches%20the%20registered%20tool%27s%20identity%20exactly%20%28case%20and%20spacing%20included%29.%20If%20the%20issue%20persists%2C%20it%20may%20be%20due%20to%20the%20model%27s%20output%20format%20or%20a%20subtle%20mismatch%20in%20the%20expected%20action%20JSON.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2375)
Author
Owner

@shingo-kurimoto-ulsystems commented on GitHub (Jan 7, 2026):

This functionality was working properly in December.

@shingo-kurimoto-ulsystems commented on GitHub (Jan 7, 2026): This functionality was working properly in December.
Author
Owner

@tkosht commented on GitHub (Jan 8, 2026):

I'm having the same problem..
model: Bedrock Claude Opus 4.5

@tkosht commented on GitHub (Jan 8, 2026): I'm having the same problem.. model: Bedrock Claude Opus 4.5
Author
Owner

@ArthurHSUflow commented on GitHub (Jan 19, 2026):

Same issue here. Working fine until 0.0.26 and not next versions.

@ArthurHSUflow commented on GitHub (Jan 19, 2026): Same issue here. Working fine until 0.0.26 and not next versions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#924